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.apiB BillingProtoPZEgoogle.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.apiB ContextProtoPZEgoogle.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.apiB ControlProtoPZEgoogle.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.apiB LoggingProtoPZEgoogle.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.apiB PolicyProtoPZEgoogle.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.apiB RoutingProtoPZAgoogle.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.apiB ServiceProtoPZEgoogle.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.v1B OptionsProtoPZ)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.rpcB StatusProtoPZ7google.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.proto google.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.proto google.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.proto google.type" +Decimal +value ( Bf +com.google.typeB DecimalProtoPZ: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.proto google.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.proto google.type"2 +Fraction + numerator ( + denominator (Bf +com.google.typeB FractionProtoPZinternalAddGeneratedFile( + ' +† +google/type/interval.proto google.type"h +Interval. + +start_time ( 2.google.protobuf.Timestamp, +end_time ( 2.google.protobuf.TimestampBi +com.google.typeB IntervalProtoPZinternalAddGeneratedFile( + ' +ร +google/type/latlng.proto google.type"- +LatLng +latitude ( + longitude (Bc +com.google.typeB LatLngProtoPZ8google.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.proto google.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.proto google.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.proto google.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.proto google.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.proto google.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: + *
documentation:
+     *   summary: ...
+     *   overview: (== include overview.md ==)
+     * 
+ * This is a shortcut for the following declaration (using pages style): + *
documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: (== include overview.md ==)
+     * 
+ * 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: + *
documentation:
+     *             summary: ...
+     *             overview: (== include overview.md ==)
+     *           
+ * This is a shortcut for the following declaration (using pages style): + *
documentation:
+     *             summary: ...
+     *             pages:
+     *             - name: Overview
+     *               content: (== include overview.md ==)
+     *           
+ * 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: + *
documentation:
+     *   summary: ...
+     *   overview: (== include overview.md ==)
+     * 
+ * This is a shortcut for the following declaration (using pages style): + *
documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: (== include overview.md ==)
+     * 
+ * 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: + *
documentation:
+     *   summary: ...
+     *   overview: (== include overview.md ==)
+     * 
+ * This is a shortcut for the following declaration (using pages style): + *
documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: (== include overview.md ==)
+     * 
+ * 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: + *
pages:
+     * - name: Tutorial
+     *   content: (== include tutorial.md ==)
+     *   subpages:
+     *   - name: Java
+     *     content: (== include tutorial_java.md ==)
+     * 
+ * 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: + *
pages:
+     *           - name: Tutorial
+     *             content: (== include tutorial.md ==)
+     *             subpages:
+     *             - name: Java
+     *               content: (== include tutorial_java.md ==)
+     *           
+ * 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: + *
pages:
+     * - name: Tutorial
+     *   content: (== include tutorial.md ==)
+     *   subpages:
+     *   - name: Java
+     *     content: (== include tutorial_java.md ==)
+     * 
+ * 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: + *
pages:
+     * - name: Tutorial
+     *   content: (== include tutorial.md ==)
+     *   subpages:
+     *   - name: Java
+     *     content: (== include tutorial_java.md ==)
+     * 
+ * 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. + + + +## Installation + +Install the latest version with + +```bash +composer require monolog/monolog +``` + +## Basic Usage + +```php +pushHandler(new StreamHandler('path/to/your.log', Level::Warning)); + +// add records to the log +$log->warning('Foo'); +$log->error('Bar'); +``` + +## Documentation + +- [Usage Instructions](doc/01-usage.md) +- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) +- [Utility Classes](doc/03-utilities.md) +- [Extending Monolog](doc/04-extending.md) +- [Log Record Structure](doc/message-structure.md) + +## Support Monolog Financially + +Get supported Monolog and help fund the project with the [Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-monolog-monolog?utm_source=packagist-monolog-monolog&utm_medium=referral&utm_campaign=enterprise) or via [GitHub sponsorship](https://github.com/sponsors/Seldaek). + +Tidelift delivers 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. + +## Third Party Packages + +Third party handlers, formatters and processors are +[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You +can also add your own there if you publish one. + +## About + +### Requirements + +- Monolog `^3.0` works with PHP 8.1 or above. +- Monolog `^2.5` works with PHP 7.2 or above. +- Monolog `^1.25` works with PHP 5.3 up to 8.1, but is not very maintained anymore and will not receive PHP support fixes anymore. + +### Support + +Monolog 1.x support is somewhat limited at this point and only important fixes will be done. You should migrate to Monolog 2 or 3 where possible to benefit from all the latest features and fixes. + +### Submitting bugs and feature requests + +Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) + +### Framework Integrations + +- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) + can be used very easily with Monolog since it implements the interface. +- [Symfony](http://symfony.com) comes out of the box with Monolog. +- [Laravel](http://laravel.com/) comes out of the box with Monolog. +- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. +- [PPI](https://github.com/ppi/framework) comes out of the box with Monolog. +- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. +- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. +- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. +- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. +- [Nette Framework](http://nette.org/en/) is usable with Monolog via the [contributte/monolog](https://github.com/contributte/monolog) or [orisai/nette-monolog](https://github.com/orisai/nette-monolog) extensions. +- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. +- [FuelPHP](http://fuelphp.com/) comes out of the box with Monolog. +- [Equip Framework](https://github.com/equip/framework) comes out of the box with Monolog. +- [Yii 2](http://www.yiiframework.com/) is usable with Monolog via the [yii2-monolog](https://github.com/merorafael/yii2-monolog) or [yii2-psr-log-target](https://github.com/samdark/yii2-psr-log-target) plugins. +- [Hawkbit Micro Framework](https://github.com/HawkBitPhp/hawkbit) comes out of the box with Monolog. +- [SilverStripe 4](https://www.silverstripe.org/) comes out of the box with Monolog. +- [Drupal](https://www.drupal.org/) is usable with Monolog via the [monolog](https://www.drupal.org/project/monolog) module. +- [Aimeos ecommerce framework](https://aimeos.org/) is usable with Monolog via the [ai-monolog](https://github.com/aimeos/ai-monolog) extension. +- [Magento](https://magento.com/) comes out of the box with Monolog. +- [Spiral Framework](https://spiral.dev) comes out of the box with Monolog bridge. + +### Author + +Jordi Boggiano - -
+See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) who participated in this project. + +### License + +Monolog is licensed under the MIT License - see the [LICENSE](LICENSE) file for details + +### Acknowledgements + +This library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/) +library, although most concepts have been adjusted to fit to the PHP world. diff --git a/tests/php_test_files/vendor/monolog/monolog/composer.json b/tests/php_test_files/vendor/monolog/monolog/composer.json new file mode 100644 index 0000000..30a99d7 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/composer.json @@ -0,0 +1,77 @@ +{ + "name": "monolog/monolog", + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "keywords": ["log", "logging", "psr-3"], + "homepage": "https://github.com/Seldaek/monolog", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "require-dev": { + "ext-json": "*", + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "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": { + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-openssl": "Required to send log messages using SSL" + }, + "autoload": { + "psr-4": {"Monolog\\": "src/Monolog"} + }, + "autoload-dev": { + "psr-4": {"Monolog\\": "tests/Monolog"} + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "scripts": { + "test": "@php vendor/bin/phpunit", + "phpstan": "@php vendor/bin/phpstan analyse" + }, + "config": { + "lock": false, + "sort-packages": true, + "platform-check": false + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php new file mode 100644 index 0000000..c519e05 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Attribute; + +/** + * A reusable attribute to help configure a class or a method as a processor. + * + * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer. + * + * Using it with the Monolog library only has no effect at all: processors should still be turned into a callable if + * needed and manually pushed to the loggers and to the processable handlers. + */ +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] +class AsMonologProcessor +{ + /** + * @param string|null $channel The logging channel the processor should be pushed to. + * @param string|null $handler The handler the processor should be pushed to. + * @param string|null $method The method that processes the records (if the attribute is used at the class level). + * @param int|null $priority The priority of the processor so the order can be determined. + */ + public function __construct( + public readonly ?string $channel = null, + public readonly ?string $handler = null, + public readonly ?string $method = null, + public readonly ?int $priority = null + ) { + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php new file mode 100644 index 0000000..862e05b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Attribute; + +/** + * A reusable attribute to help configure a class as expecting a given logger channel. + * + * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer. + * + * Using it with the Monolog library only has no effect at all: wiring the logger instance into + * other classes is not managed by Monolog. + */ +#[\Attribute(\Attribute::TARGET_CLASS)] +final class WithMonologChannel +{ + public function __construct( + public readonly string $channel + ) { + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php new file mode 100644 index 0000000..3d9477f --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use DateTimeZone; + +/** + * Overrides default json encoding of date time objects + * + * @author Menno Holtkamp + * @author Jordi Boggiano + */ +class DateTimeImmutable extends \DateTimeImmutable implements \JsonSerializable +{ + private bool $useMicroseconds; + + public function __construct(bool $useMicroseconds, ?DateTimeZone $timezone = null) + { + $this->useMicroseconds = $useMicroseconds; + + // if you like to use a custom time to pass to Logger::addRecord directly, + // call modify() or setTimestamp() on this instance to change the date after creating it + parent::__construct('now', $timezone); + } + + public function jsonSerialize(): string + { + if ($this->useMicroseconds) { + return $this->format('Y-m-d\TH:i:s.uP'); + } + + return $this->format('Y-m-d\TH:i:sP'); + } + + public function __toString(): string + { + return $this->jsonSerialize(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/ErrorHandler.php new file mode 100644 index 0000000..452778b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -0,0 +1,279 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Closure; +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; + +/** + * Monolog error handler + * + * A facility to enable logging of runtime errors, exceptions and fatal errors. + * + * Quick setup: ErrorHandler::register($logger); + * + * @author Jordi Boggiano + */ +class ErrorHandler +{ + private Closure|null $previousExceptionHandler = null; + + /** @var array an array of class name to LogLevel::* constant mapping */ + private array $uncaughtExceptionLevelMap = []; + + /** @var Closure|true|null */ + private Closure|bool|null $previousErrorHandler = null; + + /** @var array an array of E_* constant to LogLevel::* constant mapping */ + private array $errorLevelMap = []; + + private bool $handleOnlyReportedErrors = true; + + private bool $hasFatalErrorHandler = false; + + private string $fatalLevel = LogLevel::ALERT; + + private string|null $reservedMemory = null; + + /** @var ?array{type: int, message: string, file: string, line: int, trace: mixed} */ + private array|null $lastFatalData = null; + + private const FATAL_ERRORS = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR]; + + public function __construct( + private LoggerInterface $logger + ) { + } + + /** + * Registers a new ErrorHandler for a given Logger + * + * By default it will handle errors, exceptions and fatal errors + * + * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling + * @param array|false $exceptionLevelMap an array of class name to LogLevel::* constant mapping, or false to disable exception handling + * @param LogLevel::*|null|false $fatalLevel a LogLevel::* constant, null to use the default LogLevel::ALERT or false to disable fatal error handling + * @return static + */ + public static function register(LoggerInterface $logger, $errorLevelMap = [], $exceptionLevelMap = [], $fatalLevel = null): self + { + /** @phpstan-ignore-next-line */ + $handler = new static($logger); + if ($errorLevelMap !== false) { + $handler->registerErrorHandler($errorLevelMap); + } + if ($exceptionLevelMap !== false) { + $handler->registerExceptionHandler($exceptionLevelMap); + } + if ($fatalLevel !== false) { + $handler->registerFatalHandler($fatalLevel); + } + + return $handler; + } + + /** + * @param array $levelMap an array of class name to LogLevel::* constant mapping + * @return $this + */ + public function registerExceptionHandler(array $levelMap = [], bool $callPrevious = true): self + { + $prev = set_exception_handler(function (\Throwable $e): void { + $this->handleException($e); + }); + $this->uncaughtExceptionLevelMap = $levelMap; + foreach ($this->defaultExceptionLevelMap() as $class => $level) { + if (!isset($this->uncaughtExceptionLevelMap[$class])) { + $this->uncaughtExceptionLevelMap[$class] = $level; + } + } + if ($callPrevious && null !== $prev) { + $this->previousExceptionHandler = $prev(...); + } + + return $this; + } + + /** + * @param array $levelMap an array of E_* constant to LogLevel::* constant mapping + * @return $this + */ + public function registerErrorHandler(array $levelMap = [], bool $callPrevious = true, int $errorTypes = -1, bool $handleOnlyReportedErrors = true): self + { + $prev = set_error_handler($this->handleError(...), $errorTypes); + $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); + if ($callPrevious) { + $this->previousErrorHandler = $prev !== null ? $prev(...) : true; + } else { + $this->previousErrorHandler = null; + } + + $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; + + return $this; + } + + /** + * @param LogLevel::*|null $level a LogLevel::* constant, null to use the default LogLevel::ALERT + * @param int $reservedMemorySize Amount of KBs to reserve in memory so that it can be freed when handling fatal errors giving Monolog some room in memory to get its job done + * @return $this + */ + public function registerFatalHandler($level = null, int $reservedMemorySize = 20): self + { + register_shutdown_function($this->handleFatalError(...)); + + $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); + $this->fatalLevel = null === $level ? LogLevel::ALERT : $level; + $this->hasFatalErrorHandler = true; + + return $this; + } + + /** + * @return array + */ + protected function defaultExceptionLevelMap(): array + { + return [ + 'ParseError' => LogLevel::CRITICAL, + 'Throwable' => LogLevel::ERROR, + ]; + } + + /** + * @return array + */ + protected function defaultErrorLevelMap(): array + { + return [ + E_ERROR => LogLevel::CRITICAL, + E_WARNING => LogLevel::WARNING, + E_PARSE => LogLevel::ALERT, + E_NOTICE => LogLevel::NOTICE, + E_CORE_ERROR => LogLevel::CRITICAL, + E_CORE_WARNING => LogLevel::WARNING, + E_COMPILE_ERROR => LogLevel::ALERT, + E_COMPILE_WARNING => LogLevel::WARNING, + E_USER_ERROR => LogLevel::ERROR, + E_USER_WARNING => LogLevel::WARNING, + E_USER_NOTICE => LogLevel::NOTICE, + E_STRICT => LogLevel::NOTICE, + E_RECOVERABLE_ERROR => LogLevel::ERROR, + E_DEPRECATED => LogLevel::NOTICE, + E_USER_DEPRECATED => LogLevel::NOTICE, + ]; + } + + private function handleException(\Throwable $e): never + { + $level = LogLevel::ERROR; + foreach ($this->uncaughtExceptionLevelMap as $class => $candidate) { + if ($e instanceof $class) { + $level = $candidate; + break; + } + } + + $this->logger->log( + $level, + sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), + ['exception' => $e] + ); + + if (null !== $this->previousExceptionHandler) { + ($this->previousExceptionHandler)($e); + } + + if (!headers_sent() && \in_array(strtolower((string) \ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) { + http_response_code(500); + } + + exit(255); + } + + private function handleError(int $code, string $message, string $file = '', int $line = 0): bool + { + if ($this->handleOnlyReportedErrors && 0 === (error_reporting() & $code)) { + return false; + } + + // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries + if (!$this->hasFatalErrorHandler || !\in_array($code, self::FATAL_ERRORS, true)) { + $level = $this->errorLevelMap[$code] ?? LogLevel::CRITICAL; + $this->logger->log($level, self::codeToString($code).': '.$message, ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line]); + } else { + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + array_shift($trace); // Exclude handleError from trace + $this->lastFatalData = ['type' => $code, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $trace]; + } + + if ($this->previousErrorHandler === true) { + return false; + } + if ($this->previousErrorHandler instanceof Closure) { + return (bool) ($this->previousErrorHandler)($code, $message, $file, $line); + } + + return true; + } + + /** + * @private + */ + public function handleFatalError(): void + { + $this->reservedMemory = ''; + + if (\is_array($this->lastFatalData)) { + $lastError = $this->lastFatalData; + } else { + $lastError = error_get_last(); + } + if (\is_array($lastError) && \in_array($lastError['type'], self::FATAL_ERRORS, true)) { + $trace = $lastError['trace'] ?? null; + $this->logger->log( + $this->fatalLevel, + 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], + ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $trace] + ); + + if ($this->logger instanceof Logger) { + foreach ($this->logger->getHandlers() as $handler) { + $handler->close(); + } + } + } + } + + private static function codeToString(int $code): string + { + return match ($code) { + E_ERROR => 'E_ERROR', + E_WARNING => 'E_WARNING', + E_PARSE => 'E_PARSE', + E_NOTICE => 'E_NOTICE', + E_CORE_ERROR => 'E_CORE_ERROR', + E_CORE_WARNING => 'E_CORE_WARNING', + E_COMPILE_ERROR => 'E_COMPILE_ERROR', + E_COMPILE_WARNING => 'E_COMPILE_WARNING', + E_USER_ERROR => 'E_USER_ERROR', + E_USER_WARNING => 'E_USER_WARNING', + E_USER_NOTICE => 'E_USER_NOTICE', + E_STRICT => 'E_STRICT', + E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', + E_DEPRECATED => 'E_DEPRECATED', + E_USER_DEPRECATED => 'E_USER_DEPRECATED', + default => 'Unknown PHP error', + }; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php new file mode 100644 index 0000000..beb5106 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Formats a log message according to the ChromePHP array format + * + * @author Christophe Coevoet + */ +class ChromePHPFormatter implements FormatterInterface +{ + /** + * Translates Monolog log levels to Wildfire levels. + * + * @return 'log'|'info'|'warn'|'error' + */ + private function toWildfireLevel(Level $level): string + { + return match ($level) { + Level::Debug => 'log', + Level::Info => 'info', + Level::Notice => 'info', + Level::Warning => 'warn', + Level::Error => 'error', + Level::Critical => 'error', + Level::Alert => 'error', + Level::Emergency => 'error', + }; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record) + { + // Retrieve the line and file if set and remove them from the formatted extra + $backtrace = 'unknown'; + if (isset($record->extra['file'], $record->extra['line'])) { + $backtrace = $record->extra['file'].' : '.$record->extra['line']; + unset($record->extra['file'], $record->extra['line']); + } + + $message = ['message' => $record->message]; + if (\count($record->context) > 0) { + $message['context'] = $record->context; + } + if (\count($record->extra) > 0) { + $message['extra'] = $record->extra; + } + if (\count($message) === 1) { + $message = reset($message); + } + + return [ + $record->channel, + $message, + $backtrace, + $this->toWildfireLevel($record->level), + ]; + } + + /** + * @inheritDoc + */ + public function formatBatch(array $records) + { + $formatted = []; + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php new file mode 100644 index 0000000..8c92eff --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Elastica\Document; +use Monolog\LogRecord; + +/** + * Format a log message into an Elastica Document + * + * @author Jelle Vink + */ +class ElasticaFormatter extends NormalizerFormatter +{ + /** + * @var string Elastic search index name + */ + protected string $index; + + /** + * @var string|null Elastic search document type + */ + protected string|null $type; + + /** + * @param string $index Elastic Search index name + * @param ?string $type Elastic Search document type, deprecated as of Elastica 7 + * + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(string $index, ?string $type) + { + // elasticsearch requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->index = $index; + $this->type = $type; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record) + { + $record = parent::format($record); + + return $this->getDocument($record); + } + + public function getIndex(): string + { + return $this->index; + } + + /** + * @deprecated since Elastica 7 type has no effect + */ + public function getType(): string + { + /** @phpstan-ignore-next-line */ + return $this->type; + } + + /** + * Convert a log message into an Elastica Document + * + * @param mixed[] $record + */ + protected function getDocument(array $record): Document + { + $document = new Document(); + $document->setData($record); + if (method_exists($document, 'setType')) { + $document->setType($this->type); + } + $document->setIndex($this->index); + + return $document; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php new file mode 100644 index 0000000..b38aca0 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use DateTimeInterface; +use Monolog\LogRecord; + +/** + * Format a log message into an Elasticsearch record + * + * @author Avtandil Kikabidze + */ +class ElasticsearchFormatter extends NormalizerFormatter +{ + /** + * @var string Elasticsearch index name + */ + protected string $index; + + /** + * @var string Elasticsearch record type + */ + protected string $type; + + /** + * @param string $index Elasticsearch index name + * @param string $type Elasticsearch record type + * + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(string $index, string $type) + { + // Elasticsearch requires an ISO 8601 format date with optional millisecond precision. + parent::__construct(DateTimeInterface::ISO8601); + + $this->index = $index; + $this->type = $type; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record) + { + $record = parent::format($record); + + return $this->getDocument($record); + } + + /** + * Getter index + */ + public function getIndex(): string + { + return $this->index; + } + + /** + * Getter type + */ + public function getType(): string + { + return $this->type; + } + + /** + * Convert a log message into an Elasticsearch record + * + * @param mixed[] $record Log message + * @return mixed[] + */ + protected function getDocument(array $record): array + { + $record['_index'] = $this->index; + $record['_type'] = $this->type; + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php new file mode 100644 index 0000000..cc805c8 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\LogRecord; + +/** + * formats the record to be used in the FlowdockHandler + * + * @author Dominik Liebler + * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 + */ +class FlowdockFormatter implements FormatterInterface +{ + private string $source; + + private string $sourceEmail; + + public function __construct(string $source, string $sourceEmail) + { + $this->source = $source; + $this->sourceEmail = $sourceEmail; + } + + /** + * @inheritDoc + * + * @return mixed[] + */ + public function format(LogRecord $record): array + { + $tags = [ + '#logs', + '#' . $record->level->toPsrLogLevel(), + '#' . $record->channel, + ]; + + foreach ($record->extra as $value) { + $tags[] = '#' . $value; + } + + $subject = sprintf( + 'in %s: %s - %s', + $this->source, + $record->level->getName(), + $this->getShortMessage($record->message) + ); + + return [ + 'source' => $this->source, + 'from_address' => $this->sourceEmail, + 'subject' => $subject, + 'content' => $record->message, + 'tags' => $tags, + 'project' => $this->source, + ]; + } + + /** + * @inheritDoc + * + * @return mixed[][] + */ + public function formatBatch(array $records): array + { + $formatted = []; + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } + + public function getShortMessage(string $message): string + { + static $hasMbString; + + if (null === $hasMbString) { + $hasMbString = \function_exists('mb_strlen'); + } + + $maxLength = 45; + + if ($hasMbString) { + if (mb_strlen($message, 'UTF-8') > $maxLength) { + $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; + } + } else { + if (\strlen($message) > $maxLength) { + $message = substr($message, 0, $maxLength - 4) . ' ...'; + } + } + + return $message; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php new file mode 100644 index 0000000..0c9f3e1 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Class FluentdFormatter + * + * Serializes a log message to Fluentd unix socket protocol + * + * Fluentd config: + * + * + * type unix + * path /var/run/td-agent/td-agent.sock + * + * + * Monolog setup: + * + * $logger = new Monolog\Logger('fluent.tag'); + * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); + * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); + * $logger->pushHandler($fluentHandler); + * + * @author Andrius Putna + */ +class FluentdFormatter implements FormatterInterface +{ + /** + * @var bool $levelTag should message level be a part of the fluentd tag + */ + protected bool $levelTag = false; + + /** + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(bool $levelTag = false) + { + if (!\function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); + } + + $this->levelTag = $levelTag; + } + + public function isUsingLevelsInTag(): bool + { + return $this->levelTag; + } + + public function format(LogRecord $record): string + { + $tag = $record->channel; + if ($this->levelTag) { + $tag .= '.' . $record->level->toPsrLogLevel(); + } + + $message = [ + 'message' => $record->message, + 'context' => $record->context, + 'extra' => $record->extra, + ]; + + if (!$this->levelTag) { + $message['level'] = $record->level->value; + $message['level_name'] = $record->level->getName(); + } + + return Utils::jsonEncode([$tag, $record->datetime->getTimestamp(), $message]); + } + + public function formatBatch(array $records): string + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php new file mode 100644 index 0000000..3413a4b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\LogRecord; + +/** + * Interface for formatters + * + * @author Jordi Boggiano + */ +interface FormatterInterface +{ + /** + * Formats a log record. + * + * @param LogRecord $record A record to format + * @return mixed The formatted record + */ + public function format(LogRecord $record); + + /** + * Formats a set of log records. + * + * @param array $records A set of records to format + * @return mixed The formatted set of records + */ + public function formatBatch(array $records); +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php new file mode 100644 index 0000000..dd6fefb --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Level; +use Gelf\Message; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Serializes a log message to GELF + * @see http://docs.graylog.org/en/latest/pages/gelf.html + * + * @author Matt Lehner + */ +class GelfMessageFormatter extends NormalizerFormatter +{ + protected const DEFAULT_MAX_LENGTH = 32766; + + /** + * @var string the name of the system for the Gelf log message + */ + protected string $systemName; + + /** + * @var string a prefix for 'extra' fields from the Monolog record (optional) + */ + protected string $extraPrefix; + + /** + * @var string a prefix for 'context' fields from the Monolog record (optional) + */ + protected string $contextPrefix; + + /** + * @var int max length per field + */ + protected int $maxLength; + + /** + * Translates Monolog log levels to Graylog2 log priorities. + */ + private function getGraylog2Priority(Level $level): int + { + return match ($level) { + Level::Debug => 7, + Level::Info => 6, + Level::Notice => 5, + Level::Warning => 4, + Level::Error => 3, + Level::Critical => 2, + Level::Alert => 1, + Level::Emergency => 0, + }; + } + + /** + * @throws \RuntimeException + */ + public function __construct(?string $systemName = null, ?string $extraPrefix = null, string $contextPrefix = 'ctxt_', ?int $maxLength = null) + { + if (!class_exists(Message::class)) { + throw new \RuntimeException('Composer package graylog2/gelf-php is required to use Monolog\'s GelfMessageFormatter'); + } + + parent::__construct('U.u'); + + $this->systemName = (null === $systemName || $systemName === '') ? (string) gethostname() : $systemName; + + $this->extraPrefix = null === $extraPrefix ? '' : $extraPrefix; + $this->contextPrefix = $contextPrefix; + $this->maxLength = null === $maxLength ? self::DEFAULT_MAX_LENGTH : $maxLength; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record): Message + { + $context = $extra = []; + if (isset($record->context)) { + /** @var mixed[] $context */ + $context = parent::normalize($record->context); + } + if (isset($record->extra)) { + /** @var mixed[] $extra */ + $extra = parent::normalize($record->extra); + } + + $message = new Message(); + $message + ->setTimestamp($record->datetime) + ->setShortMessage($record->message) + ->setHost($this->systemName) + ->setLevel($this->getGraylog2Priority($record->level)); + + // message length + system name length + 200 for padding / metadata + $len = 200 + \strlen($record->message) + \strlen($this->systemName); + + if ($len > $this->maxLength) { + $message->setShortMessage(Utils::substr($record->message, 0, $this->maxLength)); + } + + if (isset($record->channel)) { + $message->setAdditional('facility', $record->channel); + } + + foreach ($extra as $key => $val) { + $val = \is_scalar($val) || null === $val ? $val : $this->toJson($val); + $len = \strlen($this->extraPrefix . $key . $val); + if ($len > $this->maxLength) { + $message->setAdditional($this->extraPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); + + continue; + } + $message->setAdditional($this->extraPrefix . $key, $val); + } + + foreach ($context as $key => $val) { + $val = \is_scalar($val) || null === $val ? $val : $this->toJson($val); + $len = \strlen($this->contextPrefix . $key . $val); + if ($len > $this->maxLength) { + $message->setAdditional($this->contextPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); + + continue; + } + $message->setAdditional($this->contextPrefix . $key, $val); + } + + if (!$message->hasAdditional('file') && isset($context['exception']['file'])) { + if (1 === preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { + $message->setAdditional('file', $matches[1]); + $message->setAdditional('line', $matches[2]); + } + } + + return $message; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php new file mode 100644 index 0000000..c97b912 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use DateTimeInterface; +use Monolog\LogRecord; + +/** + * Encodes message information into JSON in a format compatible with Cloud logging. + * + * @see https://cloud.google.com/logging/docs/structured-logging + * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry + * + * @author Luรญs Cobucci + */ +class GoogleCloudLoggingFormatter extends JsonFormatter +{ + protected function normalizeRecord(LogRecord $record): array + { + $normalized = parent::normalizeRecord($record); + + // Re-key level for GCP logging + $normalized['severity'] = $normalized['level_name']; + $normalized['time'] = $record->datetime->format(DateTimeInterface::RFC3339_EXTENDED); + + // Remove keys that are not used by GCP + unset($normalized['level'], $normalized['level_name'], $normalized['datetime']); + + return $normalized; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php new file mode 100644 index 0000000..b5d69bc --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Formats incoming records into an HTML table + * + * This is especially useful for html email logging + * + * @author Tiago Brito + */ +class HtmlFormatter extends NormalizerFormatter +{ + /** + * Translates Monolog log levels to html color priorities. + */ + protected function getLevelColor(Level $level): string + { + return match ($level) { + Level::Debug => '#CCCCCC', + Level::Info => '#28A745', + Level::Notice => '#17A2B8', + Level::Warning => '#FFC107', + Level::Error => '#FD7E14', + Level::Critical => '#DC3545', + Level::Alert => '#821722', + Level::Emergency => '#000000', + }; + } + + /** + * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(?string $dateFormat = null) + { + parent::__construct($dateFormat); + } + + /** + * Creates an HTML table row + * + * @param string $th Row header content + * @param string $td Row standard cell content + * @param bool $escapeTd false if td content must not be html escaped + */ + protected function addRow(string $th, string $td = ' ', bool $escapeTd = true): string + { + $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); + if ($escapeTd) { + $td = '
'.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
'; + } + + return "
\n\n\n"; + } + + /** + * Create a HTML h1 tag + * + * @param string $title Text to be in the h1 + */ + protected function addTitle(string $title, Level $level): string + { + $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); + + return '

'.$title.'

'; + } + + /** + * Formats a log record. + * + * @return string The formatted record + */ + public function format(LogRecord $record): string + { + $output = $this->addTitle($record->level->getName(), $record->level); + $output .= '
$th:".$td."
'; + + $output .= $this->addRow('Message', $record->message); + $output .= $this->addRow('Time', $this->formatDate($record->datetime)); + $output .= $this->addRow('Channel', $record->channel); + if (\count($record->context) > 0) { + $embeddedTable = '
'; + foreach ($record->context as $key => $value) { + $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); + } + $embeddedTable .= '
'; + $output .= $this->addRow('Context', $embeddedTable, false); + } + if (\count($record->extra) > 0) { + $embeddedTable = ''; + foreach ($record->extra as $key => $value) { + $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); + } + $embeddedTable .= '
'; + $output .= $this->addRow('Extra', $embeddedTable, false); + } + + return $output.''; + } + + /** + * Formats a set of log records. + * + * @return string The formatted set of records + */ + public function formatBatch(array $records): string + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + /** + * @param mixed $data + */ + protected function convertToString($data): string + { + if (null === $data || \is_scalar($data)) { + return (string) $data; + } + + $data = $this->normalize($data); + + return Utils::jsonEncode($data, JSON_PRETTY_PRINT | Utils::DEFAULT_JSON_FLAGS, true); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php new file mode 100644 index 0000000..640043a --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php @@ -0,0 +1,220 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Stringable; +use Throwable; +use Monolog\LogRecord; + +/** + * Encodes whatever record data is passed to it as json + * + * This can be useful to log to databases or remote APIs + * + * @author Jordi Boggiano + */ +class JsonFormatter extends NormalizerFormatter +{ + public const BATCH_MODE_JSON = 1; + public const BATCH_MODE_NEWLINES = 2; + + /** @var self::BATCH_MODE_* */ + protected int $batchMode; + + protected bool $appendNewline; + + protected bool $ignoreEmptyContextAndExtra; + + protected bool $includeStacktraces = false; + + /** + * @param self::BATCH_MODE_* $batchMode + * + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(int $batchMode = self::BATCH_MODE_JSON, bool $appendNewline = true, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) + { + $this->batchMode = $batchMode; + $this->appendNewline = $appendNewline; + $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; + $this->includeStacktraces = $includeStacktraces; + + parent::__construct(); + } + + /** + * The batch mode option configures the formatting style for + * multiple records. By default, multiple records will be + * formatted as a JSON-encoded array. However, for + * compatibility with some API endpoints, alternative styles + * are available. + */ + public function getBatchMode(): int + { + return $this->batchMode; + } + + /** + * True if newlines are appended to every formatted record + */ + public function isAppendingNewlines(): bool + { + return $this->appendNewline; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record): string + { + $normalized = parent::format($record); + + if (isset($normalized['context']) && $normalized['context'] === []) { + if ($this->ignoreEmptyContextAndExtra) { + unset($normalized['context']); + } else { + $normalized['context'] = new \stdClass; + } + } + if (isset($normalized['extra']) && $normalized['extra'] === []) { + if ($this->ignoreEmptyContextAndExtra) { + unset($normalized['extra']); + } else { + $normalized['extra'] = new \stdClass; + } + } + + return $this->toJson($normalized, true) . ($this->appendNewline ? "\n" : ''); + } + + /** + * @inheritDoc + */ + public function formatBatch(array $records): string + { + return match ($this->batchMode) { + static::BATCH_MODE_NEWLINES => $this->formatBatchNewlines($records), + default => $this->formatBatchJson($records), + }; + } + + /** + * @return $this + */ + public function includeStacktraces(bool $include = true): self + { + $this->includeStacktraces = $include; + + return $this; + } + + /** + * Return a JSON-encoded array of records. + * + * @phpstan-param LogRecord[] $records + */ + protected function formatBatchJson(array $records): string + { + return $this->toJson($this->normalize($records), true); + } + + /** + * Use new lines to separate records instead of a + * JSON-encoded array. + * + * @phpstan-param LogRecord[] $records + */ + protected function formatBatchNewlines(array $records): string + { + $oldNewline = $this->appendNewline; + $this->appendNewline = false; + $formatted = array_map(fn (LogRecord $record) => $this->format($record), $records); + $this->appendNewline = $oldNewline; + + return implode("\n", $formatted); + } + + /** + * Normalizes given $data. + * + * @return null|scalar|array|object + */ + protected function normalize(mixed $data, int $depth = 0): mixed + { + if ($depth > $this->maxNormalizeDepth) { + return 'Over '.$this->maxNormalizeDepth.' levels deep, aborting normalization'; + } + + if (\is_array($data)) { + $normalized = []; + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ > $this->maxNormalizeItemCount) { + $normalized['...'] = 'Over '.$this->maxNormalizeItemCount.' items ('.\count($data).' total), aborting normalization'; + break; + } + + $normalized[$key] = $this->normalize($value, $depth + 1); + } + + return $normalized; + } + + if (\is_object($data)) { + if ($data instanceof \DateTimeInterface) { + return $this->formatDate($data); + } + + if ($data instanceof Throwable) { + return $this->normalizeException($data, $depth); + } + + // if the object has specific json serializability we want to make sure we skip the __toString treatment below + if ($data instanceof \JsonSerializable) { + return $data; + } + + if ($data instanceof Stringable) { + return $data->__toString(); + } + + if (\get_class($data) === '__PHP_Incomplete_Class') { + return new \ArrayObject($data); + } + + return $data; + } + + if (\is_resource($data)) { + return parent::normalize($data); + } + + return $data; + } + + /** + * Normalizes given exception with or without its own stack trace based on + * `includeStacktraces` property. + * + * @inheritDoc + */ + protected function normalizeException(Throwable $e, int $depth = 0): array + { + $data = parent::normalizeException($e, $depth); + if (!$this->includeStacktraces) { + unset($data['trace']); + } + + return $data; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php new file mode 100644 index 0000000..ba5852b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php @@ -0,0 +1,316 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Closure; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Formats incoming records into a one-line string + * + * This is especially useful for logging to files + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +class LineFormatter extends NormalizerFormatter +{ + public const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; + + protected string $format; + protected bool $allowInlineLineBreaks; + protected bool $ignoreEmptyContextAndExtra; + protected bool $includeStacktraces; + protected ?int $maxLevelNameLength = null; + protected string $indentStacktraces = ''; + protected Closure|null $stacktracesParser = null; + protected string $basePath = ''; + + /** + * @param string|null $format The format of the message + * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format + * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries + * + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(?string $format = null, ?string $dateFormat = null, bool $allowInlineLineBreaks = false, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) + { + $this->format = $format === null ? static::SIMPLE_FORMAT : $format; + $this->allowInlineLineBreaks = $allowInlineLineBreaks; + $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; + $this->includeStacktraces($includeStacktraces); + parent::__construct($dateFormat); + } + + /** + * Setting a base path will hide the base path from exception and stack trace file names to shorten them + * @return $this + */ + public function setBasePath(string $path = ''): self + { + if ($path !== '') { + $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + } + + $this->basePath = $path; + + return $this; + } + + /** + * @return $this + */ + public function includeStacktraces(bool $include = true, ?Closure $parser = null): self + { + $this->includeStacktraces = $include; + if ($this->includeStacktraces) { + $this->allowInlineLineBreaks = true; + $this->stacktracesParser = $parser; + } + + return $this; + } + + /** + * Indent stack traces to separate them a bit from the main log record messages + * + * @param string $indent The string used to indent, for example " " + * @return $this + */ + public function indentStacktraces(string $indent): self + { + $this->indentStacktraces = $indent; + + return $this; + } + + /** + * @return $this + */ + public function allowInlineLineBreaks(bool $allow = true): self + { + $this->allowInlineLineBreaks = $allow; + + return $this; + } + + /** + * @return $this + */ + public function ignoreEmptyContextAndExtra(bool $ignore = true): self + { + $this->ignoreEmptyContextAndExtra = $ignore; + + return $this; + } + + /** + * Allows cutting the level name to get fixed-length levels like INF for INFO, ERR for ERROR if you set this to 3 for example + * + * @param int|null $maxLevelNameLength Maximum characters for the level name. Set null for infinite length (default) + * @return $this + */ + public function setMaxLevelNameLength(?int $maxLevelNameLength = null): self + { + $this->maxLevelNameLength = $maxLevelNameLength; + + return $this; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record): string + { + $vars = parent::format($record); + + if ($this->maxLevelNameLength !== null) { + $vars['level_name'] = substr($vars['level_name'], 0, $this->maxLevelNameLength); + } + + $output = $this->format; + foreach ($vars['extra'] as $var => $val) { + if (false !== strpos($output, '%extra.'.$var.'%')) { + $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); + unset($vars['extra'][$var]); + } + } + + foreach ($vars['context'] as $var => $val) { + if (false !== strpos($output, '%context.'.$var.'%')) { + $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); + unset($vars['context'][$var]); + } + } + + if ($this->ignoreEmptyContextAndExtra) { + if (\count($vars['context']) === 0) { + unset($vars['context']); + $output = str_replace('%context%', '', $output); + } + + if (\count($vars['extra']) === 0) { + unset($vars['extra']); + $output = str_replace('%extra%', '', $output); + } + } + + foreach ($vars as $var => $val) { + if (false !== strpos($output, '%'.$var.'%')) { + $output = str_replace('%'.$var.'%', $this->stringify($val), $output); + } + } + + // remove leftover %extra.xxx% and %context.xxx% if any + if (false !== strpos($output, '%')) { + $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); + if (null === $output) { + $pcreErrorCode = preg_last_error(); + + throw new \RuntimeException('Failed to run preg_replace: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); + } + } + + return $output; + } + + public function formatBatch(array $records): string + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + /** + * @param mixed $value + */ + public function stringify($value): string + { + return $this->replaceNewlines($this->convertToString($value)); + } + + protected function normalizeException(\Throwable $e, int $depth = 0): string + { + $str = $this->formatException($e); + + if (($previous = $e->getPrevious()) instanceof \Throwable) { + do { + $depth++; + if ($depth > $this->maxNormalizeDepth) { + $str .= "\n[previous exception] Over " . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; + break; + } + + $str .= "\n[previous exception] " . $this->formatException($previous); + } while ($previous = $previous->getPrevious()); + } + + return $str; + } + + /** + * @param mixed $data + */ + protected function convertToString($data): string + { + if (null === $data || \is_bool($data)) { + return var_export($data, true); + } + + if (\is_scalar($data)) { + return (string) $data; + } + + return $this->toJson($data, true); + } + + protected function replaceNewlines(string $str): string + { + if ($this->allowInlineLineBreaks) { + if (0 === strpos($str, '{') || 0 === strpos($str, '[')) { + $str = preg_replace('/(?getCode(); + if ($e instanceof \SoapFault) { + if (isset($e->faultcode)) { + $str .= ' faultcode: ' . $e->faultcode; + } + + if (isset($e->faultactor)) { + $str .= ' faultactor: ' . $e->faultactor; + } + + if (isset($e->detail)) { + if (\is_string($e->detail)) { + $str .= ' detail: ' . $e->detail; + } elseif (\is_object($e->detail) || \is_array($e->detail)) { + $str .= ' detail: ' . $this->toJson($e->detail, true); + } + } + } + + $file = $e->getFile(); + if ($this->basePath !== '') { + $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file); + } + + $str .= '): ' . $e->getMessage() . ' at ' . $file . ':' . $e->getLine() . ')'; + + if ($this->includeStacktraces) { + $str .= $this->stacktracesParser($e); + } + + return $str; + } + + private function stacktracesParser(\Throwable $e): string + { + $trace = $e->getTraceAsString(); + + if ($this->basePath !== '') { + $trace = preg_replace('{^(#\d+ )' . preg_quote($this->basePath) . '}m', '$1', $trace) ?? $trace; + } + + if ($this->stacktracesParser !== null) { + $trace = $this->stacktracesParserCustom($trace); + } + + if ($this->indentStacktraces !== '') { + $trace = str_replace("\n", "\n{$this->indentStacktraces}", $trace); + } + + return "\n{$this->indentStacktraces}[stacktrace]\n{$this->indentStacktraces}" . $trace . "\n"; + } + + private function stacktracesParserCustom(string $trace): string + { + return implode("\n", array_filter(array_map($this->stacktracesParser, explode("\n", $trace)))); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php new file mode 100644 index 0000000..5f0b6a4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\LogRecord; + +/** + * Encodes message information into JSON in a format compatible with Loggly. + * + * @author Adam Pancutt + */ +class LogglyFormatter extends JsonFormatter +{ + /** + * Overrides the default batch mode to new lines for compatibility with the + * Loggly bulk API. + */ + public function __construct(int $batchMode = self::BATCH_MODE_NEWLINES, bool $appendNewline = false) + { + parent::__construct($batchMode, $appendNewline); + } + + /** + * Appends the 'timestamp' parameter for indexing by Loggly. + * + * @see https://www.loggly.com/docs/automated-parsing/#json + * @see \Monolog\Formatter\JsonFormatter::format() + */ + protected function normalizeRecord(LogRecord $record): array + { + $recordData = parent::normalizeRecord($record); + + $recordData["timestamp"] = $record->datetime->format("Y-m-d\TH:i:s.uO"); + unset($recordData["datetime"]); + + return $recordData; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php new file mode 100644 index 0000000..9e44c19 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\LogRecord; + +/** + * Encodes message information into JSON in a format compatible with Logmatic. + * + * @author Julien Breux + */ +class LogmaticFormatter extends JsonFormatter +{ + protected const MARKERS = ["sourcecode", "php"]; + + protected string $hostname = ''; + + protected string $appName = ''; + + /** + * @return $this + */ + public function setHostname(string $hostname): self + { + $this->hostname = $hostname; + + return $this; + } + + /** + * @return $this + */ + public function setAppName(string $appName): self + { + $this->appName = $appName; + + return $this; + } + + /** + * Appends the 'hostname' and 'appname' parameter for indexing by Logmatic. + * + * @see http://doc.logmatic.io/docs/basics-to-send-data + * @see \Monolog\Formatter\JsonFormatter::format() + */ + public function normalizeRecord(LogRecord $record): array + { + $record = parent::normalizeRecord($record); + + if ($this->hostname !== '') { + $record["hostname"] = $this->hostname; + } + if ($this->appName !== '') { + $record["appname"] = $this->appName; + } + + $record["@marker"] = static::MARKERS; + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php new file mode 100644 index 0000000..abee3cd --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\LogRecord; + +/** + * Serializes a log message to Logstash Event Format + * + * @see https://www.elastic.co/products/logstash + * @see https://github.com/elastic/logstash/blob/master/logstash-core/src/main/java/org/logstash/Event.java + * + * @author Tim Mower + */ +class LogstashFormatter extends NormalizerFormatter +{ + /** + * @var string the name of the system for the Logstash log message, used to fill the @source field + */ + protected string $systemName; + + /** + * @var string an application name for the Logstash log message, used to fill the @type field + */ + protected string $applicationName; + + /** + * @var string the key for 'extra' fields from the Monolog record + */ + protected string $extraKey; + + /** + * @var string the key for 'context' fields from the Monolog record + */ + protected string $contextKey; + + /** + * @param string $applicationName The application that sends the data, used as the "type" field of logstash + * @param string|null $systemName The system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine + * @param string $extraKey The key for extra keys inside logstash "fields", defaults to extra + * @param string $contextKey The key for context keys inside logstash "fields", defaults to context + * + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(string $applicationName, ?string $systemName = null, string $extraKey = 'extra', string $contextKey = 'context') + { + // logstash requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->systemName = $systemName === null ? (string) gethostname() : $systemName; + $this->applicationName = $applicationName; + $this->extraKey = $extraKey; + $this->contextKey = $contextKey; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record): string + { + $recordData = parent::format($record); + + $message = [ + '@timestamp' => $recordData['datetime'], + '@version' => 1, + 'host' => $this->systemName, + ]; + if (isset($recordData['message'])) { + $message['message'] = $recordData['message']; + } + if (isset($recordData['channel'])) { + $message['type'] = $recordData['channel']; + $message['channel'] = $recordData['channel']; + } + if (isset($recordData['level_name'])) { + $message['level'] = $recordData['level_name']; + } + if (isset($recordData['level'])) { + $message['monolog_level'] = $recordData['level']; + } + if ('' !== $this->applicationName) { + $message['type'] = $this->applicationName; + } + if (\count($recordData['extra']) > 0) { + $message[$this->extraKey] = $recordData['extra']; + } + if (\count($recordData['context']) > 0) { + $message[$this->contextKey] = $recordData['context']; + } + + return $this->toJson($message) . "\n"; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php new file mode 100644 index 0000000..2da3e0b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use MongoDB\BSON\Type; +use MongoDB\BSON\UTCDateTime; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Formats a record for use with the MongoDBHandler. + * + * @author Florian Plattner + */ +class MongoDBFormatter implements FormatterInterface +{ + private bool $exceptionTraceAsString; + private int $maxNestingLevel; + private bool $isLegacyMongoExt; + + /** + * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record->context is 2 + * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings + */ + public function __construct(int $maxNestingLevel = 3, bool $exceptionTraceAsString = true) + { + $this->maxNestingLevel = max($maxNestingLevel, 0); + $this->exceptionTraceAsString = $exceptionTraceAsString; + + $this->isLegacyMongoExt = \extension_loaded('mongodb') && version_compare((string) phpversion('mongodb'), '1.1.9', '<='); + } + + /** + * @inheritDoc + * + * @return mixed[] + */ + public function format(LogRecord $record): array + { + /** @var mixed[] $res */ + $res = $this->formatArray($record->toArray()); + + return $res; + } + + /** + * @inheritDoc + * + * @return array + */ + public function formatBatch(array $records): array + { + $formatted = []; + foreach ($records as $key => $record) { + $formatted[$key] = $this->format($record); + } + + return $formatted; + } + + /** + * @param mixed[] $array + * @return mixed[]|string Array except when max nesting level is reached then a string "[...]" + */ + protected function formatArray(array $array, int $nestingLevel = 0) + { + if ($this->maxNestingLevel > 0 && $nestingLevel > $this->maxNestingLevel) { + return '[...]'; + } + + foreach ($array as $name => $value) { + if ($value instanceof \DateTimeInterface) { + $array[$name] = $this->formatDate($value, $nestingLevel + 1); + } elseif ($value instanceof \Throwable) { + $array[$name] = $this->formatException($value, $nestingLevel + 1); + } elseif (\is_array($value)) { + $array[$name] = $this->formatArray($value, $nestingLevel + 1); + } elseif (\is_object($value) && !$value instanceof Type) { + $array[$name] = $this->formatObject($value, $nestingLevel + 1); + } + } + + return $array; + } + + /** + * @param mixed $value + * @return mixed[]|string + */ + protected function formatObject($value, int $nestingLevel) + { + $objectVars = get_object_vars($value); + $objectVars['class'] = Utils::getClass($value); + + return $this->formatArray($objectVars, $nestingLevel); + } + + /** + * @return mixed[]|string + */ + protected function formatException(\Throwable $exception, int $nestingLevel) + { + $formattedException = [ + 'class' => Utils::getClass($exception), + 'message' => $exception->getMessage(), + 'code' => (int) $exception->getCode(), + 'file' => $exception->getFile() . ':' . $exception->getLine(), + ]; + + if ($this->exceptionTraceAsString === true) { + $formattedException['trace'] = $exception->getTraceAsString(); + } else { + $formattedException['trace'] = $exception->getTrace(); + } + + return $this->formatArray($formattedException, $nestingLevel); + } + + protected function formatDate(\DateTimeInterface $value, int $nestingLevel): UTCDateTime + { + if ($this->isLegacyMongoExt) { + return $this->legacyGetMongoDbDateTime($value); + } + + return $this->getMongoDbDateTime($value); + } + + private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime + { + return new UTCDateTime((int) floor(((float) $value->format('U.u')) * 1000)); + } + + /** + * This is needed to support MongoDB Driver v1.19 and below + * + * See https://github.com/mongodb/mongo-php-driver/issues/426 + * + * It can probably be removed in 2.1 or later once MongoDB's 1.2 is released and widely adopted + */ + private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime + { + $milliseconds = floor(((float) $value->format('U.u')) * 1000); + + $milliseconds = (PHP_INT_SIZE == 8) //64-bit OS? + ? (int) $milliseconds + : (string) $milliseconds; + + return new UTCDateTime($milliseconds); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php new file mode 100644 index 0000000..e6f35be --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -0,0 +1,357 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\DateTimeImmutable; +use Monolog\Utils; +use Throwable; +use Monolog\LogRecord; + +/** + * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets + * + * @author Jordi Boggiano + */ +class NormalizerFormatter implements FormatterInterface +{ + public const SIMPLE_DATE = "Y-m-d\TH:i:sP"; + + protected string $dateFormat; + protected int $maxNormalizeDepth = 9; + protected int $maxNormalizeItemCount = 1000; + + private int $jsonEncodeOptions = Utils::DEFAULT_JSON_FLAGS; + + protected string $basePath = ''; + + /** + * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(?string $dateFormat = null) + { + $this->dateFormat = null === $dateFormat ? static::SIMPLE_DATE : $dateFormat; + if (!\function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); + } + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record) + { + return $this->normalizeRecord($record); + } + + /** + * Normalize an arbitrary value to a scalar|array|null + * + * @return null|scalar|array + */ + public function normalizeValue(mixed $data): mixed + { + return $this->normalize($data); + } + + /** + * @inheritDoc + */ + public function formatBatch(array $records) + { + foreach ($records as $key => $record) { + $records[$key] = $this->format($record); + } + + return $records; + } + + public function getDateFormat(): string + { + return $this->dateFormat; + } + + /** + * @return $this + */ + public function setDateFormat(string $dateFormat): self + { + $this->dateFormat = $dateFormat; + + return $this; + } + + /** + * The maximum number of normalization levels to go through + */ + public function getMaxNormalizeDepth(): int + { + return $this->maxNormalizeDepth; + } + + /** + * @return $this + */ + public function setMaxNormalizeDepth(int $maxNormalizeDepth): self + { + $this->maxNormalizeDepth = $maxNormalizeDepth; + + return $this; + } + + /** + * The maximum number of items to normalize per level + */ + public function getMaxNormalizeItemCount(): int + { + return $this->maxNormalizeItemCount; + } + + /** + * @return $this + */ + public function setMaxNormalizeItemCount(int $maxNormalizeItemCount): self + { + $this->maxNormalizeItemCount = $maxNormalizeItemCount; + + return $this; + } + + /** + * Enables `json_encode` pretty print. + * + * @return $this + */ + public function setJsonPrettyPrint(bool $enable): self + { + if ($enable) { + $this->jsonEncodeOptions |= JSON_PRETTY_PRINT; + } else { + $this->jsonEncodeOptions &= ~JSON_PRETTY_PRINT; + } + + return $this; + } + + /** + * Setting a base path will hide the base path from exception and stack trace file names to shorten them + * @return $this + */ + public function setBasePath(string $path = ''): self + { + if ($path !== '') { + $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + } + + $this->basePath = $path; + + return $this; + } + + /** + * Provided as extension point + * + * Because normalize is called with sub-values of context data etc, normalizeRecord can be + * extended when data needs to be appended on the record array but not to other normalized data. + * + * @return array + */ + protected function normalizeRecord(LogRecord $record): array + { + /** @var array $normalized */ + $normalized = $this->normalize($record->toArray()); + + return $normalized; + } + + /** + * @return null|scalar|array + */ + protected function normalize(mixed $data, int $depth = 0): mixed + { + if ($depth > $this->maxNormalizeDepth) { + return 'Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; + } + + if (null === $data || \is_scalar($data)) { + if (\is_float($data)) { + if (is_infinite($data)) { + return ($data > 0 ? '' : '-') . 'INF'; + } + if (is_nan($data)) { + return 'NaN'; + } + } + + return $data; + } + + if (\is_array($data)) { + $normalized = []; + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ > $this->maxNormalizeItemCount) { + $normalized['...'] = 'Over ' . $this->maxNormalizeItemCount . ' items ('.\count($data).' total), aborting normalization'; + break; + } + + $normalized[$key] = $this->normalize($value, $depth + 1); + } + + return $normalized; + } + + if ($data instanceof \DateTimeInterface) { + return $this->formatDate($data); + } + + if (\is_object($data)) { + if ($data instanceof Throwable) { + return $this->normalizeException($data, $depth); + } + + if ($data instanceof \JsonSerializable) { + /** @var null|scalar|array $value */ + $value = $data->jsonSerialize(); + } elseif (\get_class($data) === '__PHP_Incomplete_Class') { + $accessor = new \ArrayObject($data); + $value = (string) $accessor['__PHP_Incomplete_Class_Name']; + } elseif (method_exists($data, '__toString')) { + try { + /** @var string $value */ + $value = $data->__toString(); + } catch (\Throwable) { + // if the toString method is failing, use the default behavior + /** @var null|scalar|array $value */ + $value = json_decode($this->toJson($data, true), true); + } + } else { + // the rest is normalized by json encoding and decoding it + /** @var null|scalar|array $value */ + $value = json_decode($this->toJson($data, true), true); + } + + return [Utils::getClass($data) => $value]; + } + + if (\is_resource($data)) { + return sprintf('[resource(%s)]', get_resource_type($data)); + } + + return '[unknown('.\gettype($data).')]'; + } + + /** + * @return mixed[] + */ + protected function normalizeException(Throwable $e, int $depth = 0) + { + if ($depth > $this->maxNormalizeDepth) { + return ['Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization']; + } + + if ($e instanceof \JsonSerializable) { + return (array) $e->jsonSerialize(); + } + + $file = $e->getFile(); + if ($this->basePath !== '') { + $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file); + } + + $data = [ + 'class' => Utils::getClass($e), + 'message' => $e->getMessage(), + 'code' => (int) $e->getCode(), + 'file' => $file.':'.$e->getLine(), + ]; + + if ($e instanceof \SoapFault) { + if (isset($e->faultcode)) { + $data['faultcode'] = $e->faultcode; + } + + if (isset($e->faultactor)) { + $data['faultactor'] = $e->faultactor; + } + + if (isset($e->detail)) { + if (\is_string($e->detail)) { + $data['detail'] = $e->detail; + } elseif (\is_object($e->detail) || \is_array($e->detail)) { + $data['detail'] = $this->toJson($e->detail, true); + } + } + } + + $trace = $e->getTrace(); + foreach ($trace as $frame) { + if (isset($frame['file'], $frame['line'])) { + $file = $frame['file']; + if ($this->basePath !== '') { + $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file); + } + $data['trace'][] = $file.':'.$frame['line']; + } + } + + if (($previous = $e->getPrevious()) instanceof \Throwable) { + $data['previous'] = $this->normalizeException($previous, $depth + 1); + } + + return $data; + } + + /** + * Return the JSON representation of a value + * + * @param mixed $data + * @throws \RuntimeException if encoding fails and errors are not ignored + * @return string if encoding fails and ignoreErrors is true 'null' is returned + */ + protected function toJson($data, bool $ignoreErrors = false): string + { + return Utils::jsonEncode($data, $this->jsonEncodeOptions, $ignoreErrors); + } + + protected function formatDate(\DateTimeInterface $date): string + { + // in case the date format isn't custom then we defer to the custom DateTimeImmutable + // formatting logic, which will pick the right format based on whether useMicroseconds is on + if ($this->dateFormat === self::SIMPLE_DATE && $date instanceof DateTimeImmutable) { + return (string) $date; + } + + return $date->format($this->dateFormat); + } + + /** + * @return $this + */ + public function addJsonEncodeOption(int $option): self + { + $this->jsonEncodeOptions |= $option; + + return $this; + } + + /** + * @return $this + */ + public function removeJsonEncodeOption(int $option): self + { + $this->jsonEncodeOptions &= ~$option; + + return $this; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php new file mode 100644 index 0000000..ec73a0e --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\LogRecord; + +/** + * Formats data into an associative array of scalar (+ null) values. + * Objects and arrays will be JSON encoded. + * + * @author Andrew Lawson + */ +class ScalarFormatter extends NormalizerFormatter +{ + /** + * @inheritDoc + * + * @phpstan-return array $record + */ + public function format(LogRecord $record): array + { + $result = []; + foreach ($record->toArray() as $key => $value) { + $result[$key] = $this->toScalar($value); + } + + return $result; + } + + protected function toScalar(mixed $value): string|int|float|bool|null + { + $normalized = $this->normalize($value); + + if (\is_array($normalized)) { + return $this->toJson($normalized, true); + } + + return $normalized; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/SyslogFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/SyslogFormatter.php new file mode 100644 index 0000000..ccaddf7 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/SyslogFormatter.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Serializes a log message according to RFC 5424 + * + * @author Dalibor Karloviฤ‡ + * @author Renat Gabdullin + */ +class SyslogFormatter extends LineFormatter +{ + private const SYSLOG_FACILITY_USER = 1; + private const FORMAT = "<%extra.priority%>1 %datetime% %extra.hostname% %extra.app-name% %extra.procid% %channel% %extra.structured-data% %level_name%: %message% %context% %extra%\n"; + private const NILVALUE = '-'; + + private string $hostname; + private int $procid; + + public function __construct(private string $applicationName = self::NILVALUE) + { + parent::__construct(self::FORMAT, 'Y-m-d\TH:i:s.uP', true, true); + $this->hostname = (string) gethostname(); + $this->procid = (int) getmypid(); + } + + public function format(LogRecord $record): string + { + $record->extra = $this->formatExtra($record); + + return parent::format($record); + } + + /** + * @return array + */ + private function formatExtra(LogRecord $record): array + { + $extra = $record->extra; + $extra['app-name'] = $this->applicationName; + $extra['hostname'] = $this->hostname; + $extra['procid'] = $this->procid; + $extra['priority'] = self::calculatePriority($record->level); + $extra['structured-data'] = self::NILVALUE; + + return $extra; + } + + private static function calculatePriority(Level $level): int + { + return (self::SYSLOG_FACILITY_USER * 8) + $level->toRFC5424Level(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php new file mode 100644 index 0000000..28a1dee --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Serializes a log message according to Wildfire's header requirements + * + * @author Eric Clemmons (@ericclemmons) + * @author Christophe Coevoet + * @author Kirill chEbba Chebunin + */ +class WildfireFormatter extends NormalizerFormatter +{ + /** + * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format + * + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(?string $dateFormat = null) + { + parent::__construct($dateFormat); + + // http headers do not like non-ISO-8559-1 characters + $this->removeJsonEncodeOption(JSON_UNESCAPED_UNICODE); + } + + /** + * Translates Monolog log levels to Wildfire levels. + * + * @return 'LOG'|'INFO'|'WARN'|'ERROR' + */ + private function toWildfireLevel(Level $level): string + { + return match ($level) { + Level::Debug => 'LOG', + Level::Info => 'INFO', + Level::Notice => 'INFO', + Level::Warning => 'WARN', + Level::Error => 'ERROR', + Level::Critical => 'ERROR', + Level::Alert => 'ERROR', + Level::Emergency => 'ERROR', + }; + } + + /** + * @inheritDoc + */ + public function format(LogRecord $record): string + { + // Retrieve the line and file if set and remove them from the formatted extra + $file = $line = ''; + if (isset($record->extra['file'])) { + $file = $record->extra['file']; + unset($record->extra['file']); + } + if (isset($record->extra['line'])) { + $line = $record->extra['line']; + unset($record->extra['line']); + } + + $message = ['message' => $record->message]; + $handleError = false; + if (\count($record->context) > 0) { + $message['context'] = $this->normalize($record->context); + $handleError = true; + } + if (\count($record->extra) > 0) { + $message['extra'] = $this->normalize($record->extra); + $handleError = true; + } + if (\count($message) === 1) { + $message = reset($message); + } + + if (\is_array($message) && isset($message['context']['table'])) { + $type = 'TABLE'; + $label = $record->channel .': '. $record->message; + $message = $message['context']['table']; + } else { + $type = $this->toWildfireLevel($record->level); + $label = $record->channel; + } + + // Create JSON object describing the appearance of the message in the console + $json = $this->toJson([ + [ + 'Type' => $type, + 'File' => $file, + 'Line' => $line, + 'Label' => $label, + ], + $message, + ], $handleError); + + // The message itself is a serialization of the above JSON object + it's length + return sprintf( + '%d|%s|', + \strlen($json), + $json + ); + } + + /** + * @inheritDoc + * + * @phpstan-return never + */ + public function formatBatch(array $records) + { + throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); + } + + /** + * @inheritDoc + * + * @return null|scalar|array|object + */ + protected function normalize(mixed $data, int $depth = 0): mixed + { + if (\is_object($data) && !$data instanceof \DateTimeInterface) { + return $data; + } + + return parent::normalize($data, $depth); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php new file mode 100644 index 0000000..61d45d5 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php @@ -0,0 +1,104 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Logger; +use Monolog\ResettableInterface; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Base Handler class providing basic level/bubble support + * + * @author Jordi Boggiano + */ +abstract class AbstractHandler extends Handler implements ResettableInterface +{ + protected Level $level = Level::Debug; + protected bool $bubble = true; + + /** + * @param int|string|Level|LogLevel::* $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) + { + $this->setLevel($level); + $this->bubble = $bubble; + } + + /** + * @inheritDoc + */ + public function isHandling(LogRecord $record): bool + { + return $record->level->value >= $this->level->value; + } + + /** + * Sets minimum logging level at which this handler will be triggered. + * + * @param Level|LogLevel::* $level Level or level name + * @return $this + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function setLevel(int|string|Level $level): self + { + $this->level = Logger::toMonologLevel($level); + + return $this; + } + + /** + * Gets minimum logging level at which this handler will be triggered. + */ + public function getLevel(): Level + { + return $this->level; + } + + /** + * Sets the bubbling behavior. + * + * @param bool $bubble true means that this handler allows bubbling. + * false means that bubbling is not permitted. + * @return $this + */ + public function setBubble(bool $bubble): self + { + $this->bubble = $bubble; + + return $this; + } + + /** + * Gets the bubbling behavior. + * + * @return bool true means that this handler allows bubbling. + * false means that bubbling is not permitted. + */ + public function getBubble(): bool + { + return $this->bubble; + } + + /** + * @inheritDoc + */ + public function reset(): void + { + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php new file mode 100644 index 0000000..de13a76 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\LogRecord; + +/** + * Base Handler class providing the Handler structure, including processors and formatters + * + * Classes extending it should (in most cases) only implement write($record) + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +abstract class AbstractProcessingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface +{ + use ProcessableHandlerTrait; + use FormattableHandlerTrait; + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if (!$this->isHandling($record)) { + return false; + } + + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + $record->formatted = $this->getFormatter()->format($record); + + $this->write($record); + + return false === $this->bubble; + } + + /** + * Writes the (already formatted) record down to the log of the implementing handler + */ + abstract protected function write(LogRecord $record): void; + + public function reset(): void + { + parent::reset(); + + $this->resetProcessors(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php new file mode 100644 index 0000000..4a70317 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; + +/** + * Common syslog functionality + */ +abstract class AbstractSyslogHandler extends AbstractProcessingHandler +{ + protected int $facility; + + /** + * List of valid log facility names. + * @var array + */ + protected array $facilities = [ + 'auth' => \LOG_AUTH, + 'authpriv' => \LOG_AUTHPRIV, + 'cron' => \LOG_CRON, + 'daemon' => \LOG_DAEMON, + 'kern' => \LOG_KERN, + 'lpr' => \LOG_LPR, + 'mail' => \LOG_MAIL, + 'news' => \LOG_NEWS, + 'syslog' => \LOG_SYSLOG, + 'user' => \LOG_USER, + 'uucp' => \LOG_UUCP, + ]; + + /** + * Translates Monolog log levels to syslog log priorities. + */ + protected function toSyslogPriority(Level $level): int + { + return $level->toRFC5424Level(); + } + + /** + * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant + */ + public function __construct(string|int $facility = \LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true) + { + parent::__construct($level, $bubble); + + if (!\defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->facilities['local0'] = \LOG_LOCAL0; + $this->facilities['local1'] = \LOG_LOCAL1; + $this->facilities['local2'] = \LOG_LOCAL2; + $this->facilities['local3'] = \LOG_LOCAL3; + $this->facilities['local4'] = \LOG_LOCAL4; + $this->facilities['local5'] = \LOG_LOCAL5; + $this->facilities['local6'] = \LOG_LOCAL6; + $this->facilities['local7'] = \LOG_LOCAL7; + } else { + $this->facilities['local0'] = 128; // LOG_LOCAL0 + $this->facilities['local1'] = 136; // LOG_LOCAL1 + $this->facilities['local2'] = 144; // LOG_LOCAL2 + $this->facilities['local3'] = 152; // LOG_LOCAL3 + $this->facilities['local4'] = 160; // LOG_LOCAL4 + $this->facilities['local5'] = 168; // LOG_LOCAL5 + $this->facilities['local6'] = 176; // LOG_LOCAL6 + $this->facilities['local7'] = 184; // LOG_LOCAL7 + } + + // convert textual description of facility to syslog constant + if (\is_string($facility) && \array_key_exists(strtolower($facility), $this->facilities)) { + $facility = $this->facilities[strtolower($facility)]; + } elseif (!\in_array($facility, array_values($this->facilities), true)) { + throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); + } + + $this->facility = $facility; + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php new file mode 100644 index 0000000..119f339 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php @@ -0,0 +1,170 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Gelf\Message as GelfMessage; +use Monolog\Level; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\JsonFormatter; +use PhpAmqpLib\Message\AMQPMessage; +use PhpAmqpLib\Channel\AMQPChannel; +use AMQPExchange; +use Monolog\LogRecord; + +class AmqpHandler extends AbstractProcessingHandler +{ + protected AMQPExchange|AMQPChannel $exchange; + + /** @var array */ + private array $extraAttributes = []; + + protected string $exchangeName; + + /** + * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use + * @param string|null $exchangeName Optional exchange name, for AMQPChannel (PhpAmqpLib) only + */ + public function __construct(AMQPExchange|AMQPChannel $exchange, ?string $exchangeName = null, int|string|Level $level = Level::Debug, bool $bubble = true) + { + if ($exchange instanceof AMQPChannel) { + $this->exchangeName = (string) $exchangeName; + } elseif ($exchangeName !== null) { + @trigger_error('The $exchangeName parameter can only be passed when using PhpAmqpLib, if using an AMQPExchange instance configure it beforehand', E_USER_DEPRECATED); + } + $this->exchange = $exchange; + + parent::__construct($level, $bubble); + } + + /** + * @return array + */ + public function getExtraAttributes(): array + { + return $this->extraAttributes; + } + + /** + * Configure extra attributes to pass to the AMQPExchange (if you are using the amqp extension) + * + * @param array $extraAttributes One of content_type, content_encoding, + * message_id, user_id, app_id, delivery_mode, + * priority, timestamp, expiration, type + * or reply_to, headers. + * @return $this + */ + public function setExtraAttributes(array $extraAttributes): self + { + $this->extraAttributes = $extraAttributes; + + return $this; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $data = $record->formatted; + $routingKey = $this->getRoutingKey($record); + + if($data instanceof GelfMessage) { + $data = json_encode($data->toArray()); + } + + if ($this->exchange instanceof AMQPExchange) { + $attributes = [ + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ]; + if (\count($this->extraAttributes) > 0) { + $attributes = array_merge($attributes, $this->extraAttributes); + } + $this->exchange->publish( + $data, + $routingKey, + 0, + $attributes + ); + } else { + $this->exchange->basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $routingKey + ); + } + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + if ($this->exchange instanceof AMQPExchange) { + parent::handleBatch($records); + + return; + } + + foreach ($records as $record) { + if (!$this->isHandling($record)) { + continue; + } + + $record = $this->processRecord($record); + $data = $this->getFormatter()->format($record); + + if($data instanceof GelfMessage) { + $data = json_encode($data->toArray()); + } + + $this->exchange->batch_basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $this->getRoutingKey($record) + ); + } + + $this->exchange->publish_batch(); + } + + /** + * Gets the routing key for the AMQP exchange + */ + protected function getRoutingKey(LogRecord $record): string + { + $routingKey = sprintf('%s.%s', $record->level->name, $record->channel); + + return strtolower($routingKey); + } + + private function createAmqpMessage(string $data): AMQPMessage + { + $attributes = [ + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ]; + if (\count($this->extraAttributes) > 0) { + $attributes = array_merge($attributes, $this->extraAttributes); + } + + return new AMQPMessage($data, $attributes); + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php new file mode 100644 index 0000000..0d75cb3 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -0,0 +1,300 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; +use Monolog\Utils; +use Monolog\LogRecord; +use Monolog\Level; + +use function headers_list; +use function stripos; + +/** + * Handler sending logs to browser's javascript console with no browser extension required + * + * @author Olivier Poitrey + */ +class BrowserConsoleHandler extends AbstractProcessingHandler +{ + protected static bool $initialized = false; + + /** @var LogRecord[] */ + protected static array $records = []; + + protected const FORMAT_HTML = 'html'; + protected const FORMAT_JS = 'js'; + protected const FORMAT_UNKNOWN = 'unknown'; + + /** + * @inheritDoc + * + * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. + * + * Example of formatted string: + * + * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + // Accumulate records + static::$records[] = $record; + + // Register shutdown handler if not already done + if (!static::$initialized) { + static::$initialized = true; + $this->registerShutdownFunction(); + } + } + + /** + * Convert records to javascript console commands and send it to the browser. + * This method is automatically called on PHP shutdown if output is HTML or Javascript. + */ + public static function send(): void + { + $format = static::getResponseFormat(); + if ($format === self::FORMAT_UNKNOWN) { + return; + } + + if (\count(static::$records) > 0) { + if ($format === self::FORMAT_HTML) { + static::writeOutput(''); + } else { // js format + static::writeOutput(self::generateScript()); + } + static::resetStatic(); + } + } + + public function close(): void + { + self::resetStatic(); + } + + public function reset(): void + { + parent::reset(); + + self::resetStatic(); + } + + /** + * Forget all logged records + */ + public static function resetStatic(): void + { + static::$records = []; + } + + /** + * Wrapper for register_shutdown_function to allow overriding + */ + protected function registerShutdownFunction(): void + { + if (PHP_SAPI !== 'cli') { + register_shutdown_function(['Monolog\Handler\BrowserConsoleHandler', 'send']); + } + } + + /** + * Wrapper for echo to allow overriding + */ + protected static function writeOutput(string $str): void + { + echo $str; + } + + /** + * Checks the format of the response + * + * If Content-Type is set to application/javascript or text/javascript -> js + * If Content-Type is set to text/html, or is unset -> html + * If Content-Type is anything else -> unknown + * + * @return string One of 'js', 'html' or 'unknown' + * @phpstan-return self::FORMAT_* + */ + protected static function getResponseFormat(): string + { + // Check content type + foreach (headers_list() as $header) { + if (stripos($header, 'content-type:') === 0) { + return static::getResponseFormatFromContentType($header); + } + } + + return self::FORMAT_HTML; + } + + /** + * @return string One of 'js', 'html' or 'unknown' + * @phpstan-return self::FORMAT_* + */ + protected static function getResponseFormatFromContentType(string $contentType): string + { + // This handler only works with HTML and javascript outputs + // text/javascript is obsolete in favour of application/javascript, but still used + if (stripos($contentType, 'application/javascript') !== false || stripos($contentType, 'text/javascript') !== false) { + return self::FORMAT_JS; + } + + if (stripos($contentType, 'text/html') !== false) { + return self::FORMAT_HTML; + } + + return self::FORMAT_UNKNOWN; + } + + private static function generateScript(): string + { + $script = []; + foreach (static::$records as $record) { + $context = self::dump('Context', $record->context); + $extra = self::dump('Extra', $record->extra); + + if (\count($context) === 0 && \count($extra) === 0) { + $script[] = self::call_array(self::getConsoleMethodForLevel($record->level), self::handleStyles($record->formatted)); + } else { + $script = array_merge( + $script, + [self::call_array('groupCollapsed', self::handleStyles($record->formatted))], + $context, + $extra, + [self::call('groupEnd')] + ); + } + } + + return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; + } + + private static function getConsoleMethodForLevel(Level $level): string + { + return match ($level) { + Level::Debug => 'debug', + Level::Info, Level::Notice => 'info', + Level::Warning => 'warn', + Level::Error, Level::Critical, Level::Alert, Level::Emergency => 'error', + }; + } + + /** + * @return string[] + */ + private static function handleStyles(string $formatted): array + { + $args = []; + $format = '%c' . $formatted; + preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); + + foreach (array_reverse($matches) as $match) { + $args[] = '"font-weight: normal"'; + $args[] = self::quote(self::handleCustomStyles($match[2][0], $match[1][0])); + + $pos = $match[0][1]; + $format = Utils::substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . Utils::substr($format, $pos + \strlen($match[0][0])); + } + + $args[] = self::quote('font-weight: normal'); + $args[] = self::quote($format); + + return array_reverse($args); + } + + private static function handleCustomStyles(string $style, string $string): string + { + static $colors = ['blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey']; + static $labels = []; + + $style = preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function (array $m) use ($string, &$colors, &$labels) { + if (trim($m[1]) === 'autolabel') { + // Format the string as a label with consistent auto assigned background color + if (!isset($labels[$string])) { + $labels[$string] = $colors[\count($labels) % \count($colors)]; + } + $color = $labels[$string]; + + return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; + } + + return $m[1]; + }, $style); + + if (null === $style) { + $pcreErrorCode = preg_last_error(); + + throw new \RuntimeException('Failed to run preg_replace_callback: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); + } + + return $style; + } + + /** + * @param mixed[] $dict + * @return mixed[] + */ + private static function dump(string $title, array $dict): array + { + $script = []; + $dict = array_filter($dict); + if (\count($dict) === 0) { + return $script; + } + $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title)); + foreach ($dict as $key => $value) { + $value = json_encode($value); + if (false === $value) { + $value = self::quote(''); + } + $script[] = self::call('log', self::quote('%s: %o'), self::quote((string) $key), $value); + } + + return $script; + } + + private static function quote(string $arg): string + { + return '"' . addcslashes($arg, "\"\n\\") . '"'; + } + + /** + * @param mixed $args + */ + private static function call(...$args): string + { + $method = array_shift($args); + if (!\is_string($method)) { + throw new \UnexpectedValueException('Expected the first arg to be a string, got: '.var_export($method, true)); + } + + return self::call_array($method, $args); + } + + /** + * @param mixed[] $args + */ + private static function call_array(string $method, array $args): string + { + return 'c.' . $method . '(' . implode(', ', $args) . ');'; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php new file mode 100644 index 0000000..c241c32 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php @@ -0,0 +1,165 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\ResettableInterface; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Buffers all records until closing the handler and then pass them as batch. + * + * This is useful for a MailHandler to send only one mail per request instead of + * sending one per log message. + * + * @author Christophe Coevoet + */ +class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface +{ + use ProcessableHandlerTrait; + + protected HandlerInterface $handler; + + protected int $bufferSize = 0; + + protected int $bufferLimit; + + protected bool $flushOnOverflow; + + /** @var LogRecord[] */ + protected array $buffer = []; + + protected bool $initialized = false; + + /** + * @param HandlerInterface $handler Handler. + * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. + * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded + */ + public function __construct(HandlerInterface $handler, int $bufferLimit = 0, int|string|Level $level = Level::Debug, bool $bubble = true, bool $flushOnOverflow = false) + { + parent::__construct($level, $bubble); + $this->handler = $handler; + $this->bufferLimit = $bufferLimit; + $this->flushOnOverflow = $flushOnOverflow; + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if ($record->level->isLowerThan($this->level)) { + return false; + } + + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function([$this, 'close']); + $this->initialized = true; + } + + if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { + if ($this->flushOnOverflow) { + $this->flush(); + } else { + array_shift($this->buffer); + $this->bufferSize--; + } + } + + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + $this->buffer[] = $record; + $this->bufferSize++; + + return false === $this->bubble; + } + + public function flush(): void + { + if ($this->bufferSize === 0) { + return; + } + + $this->handler->handleBatch($this->buffer); + $this->clear(); + } + + public function __destruct() + { + // suppress the parent behavior since we already have register_shutdown_function() + // to call close(), and the reference contained there will prevent this from being + // GC'd until the end of the request + } + + /** + * @inheritDoc + */ + public function close(): void + { + $this->flush(); + + $this->handler->close(); + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + */ + public function clear(): void + { + $this->bufferSize = 0; + $this->buffer = []; + } + + public function reset(): void + { + $this->flush(); + + parent::reset(); + + $this->resetProcessors(); + + if ($this->handler instanceof ResettableInterface) { + $this->handler->reset(); + } + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + if ($this->handler instanceof FormattableHandlerInterface) { + $this->handler->setFormatter($formatter); + + return $this; + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); + } + + /** + * @inheritDoc + */ + public function getFormatter(): FormatterInterface + { + if ($this->handler instanceof FormattableHandlerInterface) { + return $this->handler->getFormatter(); + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php new file mode 100644 index 0000000..8b1cd5a --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php @@ -0,0 +1,192 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\ChromePHPFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; +use Monolog\DateTimeImmutable; + +/** + * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) + * + * This also works out of the box with Firefox 43+ + * + * @author Christophe Coevoet + */ +class ChromePHPHandler extends AbstractProcessingHandler +{ + use WebRequestRecognizerTrait; + + /** + * Version of the extension + */ + protected const VERSION = '4.0'; + + /** + * Header name + */ + protected const HEADER_NAME = 'X-ChromeLogger-Data'; + + /** + * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) + */ + protected const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; + + protected static bool $initialized = false; + + /** + * Tracks whether we sent too much data + * + * Chrome limits the headers to 4KB, so when we sent 3KB we stop sending + */ + protected static bool $overflowed = false; + + /** @var mixed[] */ + protected static array $json = [ + 'version' => self::VERSION, + 'columns' => ['label', 'log', 'backtrace', 'type'], + 'rows' => [], + ]; + + protected static bool $sendHeaders = true; + + /** + * @throws \RuntimeException If the function json_encode does not exist + */ + public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) + { + parent::__construct($level, $bubble); + if (!\function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); + } + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + if (!$this->isWebRequest()) { + return; + } + + $messages = []; + + foreach ($records as $record) { + if ($record->level < $this->level) { + continue; + } + + $message = $this->processRecord($record); + $messages[] = $message; + } + + if (\count($messages) > 0) { + $messages = $this->getFormatter()->formatBatch($messages); + self::$json['rows'] = array_merge(self::$json['rows'], $messages); + $this->send(); + } + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new ChromePHPFormatter(); + } + + /** + * Creates & sends header for a record + * + * @see sendHeader() + * @see send() + */ + protected function write(LogRecord $record): void + { + if (!$this->isWebRequest()) { + return; + } + + self::$json['rows'][] = $record->formatted; + + $this->send(); + } + + /** + * Sends the log header + * + * @see sendHeader() + */ + protected function send(): void + { + if (self::$overflowed || !self::$sendHeaders) { + return; + } + + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? ''; + } + + $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); + $data = base64_encode($json); + if (\strlen($data) > 3 * 1024) { + self::$overflowed = true; + + $record = new LogRecord( + message: 'Incomplete logs, chrome header size limit reached', + level: Level::Warning, + channel: 'monolog', + datetime: new DateTimeImmutable(true), + ); + self::$json['rows'][\count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); + $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); + $data = base64_encode($json); + } + + if (trim($data) !== '') { + $this->sendHeader(static::HEADER_NAME, $data); + } + } + + /** + * Send header string to the client + */ + protected function sendHeader(string $header, string $content): void + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + */ + protected function headersAccepted(): bool + { + if (!isset($_SERVER['HTTP_USER_AGENT'])) { + return false; + } + + return preg_match(static::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']) === 1; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php new file mode 100644 index 0000000..8d9c10e --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\JsonFormatter; +use Monolog\Level; +use Monolog\LogRecord; + +/** + * CouchDB handler + * + * @author Markus Bachmann + * @phpstan-type Options array{ + * host: string, + * port: int, + * dbname: string, + * username: string|null, + * password: string|null + * } + * @phpstan-type InputOptions array{ + * host?: string, + * port?: int, + * dbname?: string, + * username?: string|null, + * password?: string|null + * } + */ +class CouchDBHandler extends AbstractProcessingHandler +{ + /** + * @var mixed[] + * @phpstan-var Options + */ + private array $options; + + /** + * @param mixed[] $options + * + * @phpstan-param InputOptions $options + */ + public function __construct(array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) + { + $this->options = array_merge([ + 'host' => 'localhost', + 'port' => 5984, + 'dbname' => 'logger', + 'username' => null, + 'password' => null, + ], $options); + + parent::__construct($level, $bubble); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $basicAuth = null; + if (null !== $this->options['username'] && null !== $this->options['password']) { + $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); + } + + $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; + $context = stream_context_create([ + 'http' => [ + 'method' => 'POST', + 'content' => $record->formatted, + 'ignore_errors' => true, + 'max_redirects' => 0, + 'header' => 'Content-type: application/json', + ], + ]); + + if (false === @file_get_contents($url, false, $context)) { + throw new \RuntimeException(sprintf('Could not connect to %s', $url)); + } + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php new file mode 100644 index 0000000..a76bf40 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php @@ -0,0 +1,167 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Logs to Cube. + * + * @link https://github.com/square/cube/wiki + * @author Wan Chen + * @deprecated Since 2.8.0 and 3.2.0, Cube appears abandoned and thus we will drop this handler in Monolog 4 + */ +class CubeHandler extends AbstractProcessingHandler +{ + private ?\Socket $udpConnection = null; + private ?\CurlHandle $httpConnection = null; + private string $scheme; + private string $host; + private int $port; + /** @var string[] */ + private array $acceptedSchemes = ['http', 'udp']; + + /** + * Create a Cube handler + * + * @throws \UnexpectedValueException when given url is not a valid url. + * A valid url must consist of three parts : protocol://host:port + * Only valid protocols used by Cube are http and udp + */ + public function __construct(string $url, int|string|Level $level = Level::Debug, bool $bubble = true) + { + $urlInfo = parse_url($url); + + if ($urlInfo === false || !isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { + throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); + } + + if (!\in_array($urlInfo['scheme'], $this->acceptedSchemes, true)) { + throw new \UnexpectedValueException( + 'Invalid protocol (' . $urlInfo['scheme'] . ').' + . ' Valid options are ' . implode(', ', $this->acceptedSchemes) + ); + } + + $this->scheme = $urlInfo['scheme']; + $this->host = $urlInfo['host']; + $this->port = $urlInfo['port']; + + parent::__construct($level, $bubble); + } + + /** + * Establish a connection to an UDP socket + * + * @throws \LogicException when unable to connect to the socket + * @throws MissingExtensionException when there is no socket extension + */ + protected function connectUdp(): void + { + if (!\extension_loaded('sockets')) { + throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); + } + + $udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); + if (false === $udpConnection) { + throw new \LogicException('Unable to create a socket'); + } + + $this->udpConnection = $udpConnection; + if (!socket_connect($this->udpConnection, $this->host, $this->port)) { + throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); + } + } + + /** + * Establish a connection to an http server + * + * @throws \LogicException when unable to connect to the socket + * @throws MissingExtensionException when no curl extension + */ + protected function connectHttp(): void + { + if (!\extension_loaded('curl')) { + throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler'); + } + + $httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); + if (false === $httpConnection) { + throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); + } + + $this->httpConnection = $httpConnection; + curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); + curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $date = $record->datetime; + + $data = ['time' => $date->format('Y-m-d\TH:i:s.uO')]; + $context = $record->context; + + if (isset($context['type'])) { + $data['type'] = $context['type']; + unset($context['type']); + } else { + $data['type'] = $record->channel; + } + + $data['data'] = $context; + $data['data']['level'] = $record->level; + + if ($this->scheme === 'http') { + $this->writeHttp(Utils::jsonEncode($data)); + } else { + $this->writeUdp(Utils::jsonEncode($data)); + } + } + + private function writeUdp(string $data): void + { + if (null === $this->udpConnection) { + $this->connectUdp(); + } + + if (null === $this->udpConnection) { + throw new \LogicException('No UDP socket could be opened'); + } + + socket_send($this->udpConnection, $data, \strlen($data), 0); + } + + private function writeHttp(string $data): void + { + if (null === $this->httpConnection) { + $this->connectHttp(); + } + + if (null === $this->httpConnection) { + throw new \LogicException('No connection could be established'); + } + + curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); + curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, [ + 'Content-Type: application/json', + 'Content-Length: ' . \strlen('['.$data.']'), + ]); + + Curl\Util::execute($this->httpConnection, 5, false); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php new file mode 100644 index 0000000..f102811 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Curl; + +use CurlHandle; + +/** + * This class is marked as internal and it is not under the BC promise of the package. + * + * @internal + */ +final class Util +{ + /** @var array */ + private static array $retriableErrorCodes = [ + CURLE_COULDNT_RESOLVE_HOST, + CURLE_COULDNT_CONNECT, + CURLE_HTTP_NOT_FOUND, + CURLE_READ_ERROR, + CURLE_OPERATION_TIMEOUTED, + CURLE_HTTP_POST_ERROR, + CURLE_SSL_CONNECT_ERROR, + ]; + + /** + * Executes a CURL request with optional retries and exception on failure + * + * @param CurlHandle $ch curl handler + * @return bool|string @see curl_exec + */ + public static function execute(CurlHandle $ch, int $retries = 5, bool $closeAfterDone = true) + { + while ($retries--) { + $curlResponse = curl_exec($ch); + if ($curlResponse === false) { + $curlErrno = curl_errno($ch); + + if (false === \in_array($curlErrno, self::$retriableErrorCodes, true) || $retries === 0) { + $curlError = curl_error($ch); + + if ($closeAfterDone) { + curl_close($ch); + } + + throw new \RuntimeException(sprintf('Curl error (code %d): %s', $curlErrno, $curlError)); + } + + continue; + } + + if ($closeAfterDone) { + curl_close($ch); + } + + return $curlResponse; + } + + return false; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php new file mode 100644 index 0000000..873a4b8 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php @@ -0,0 +1,174 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Logger; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Simple handler wrapper that deduplicates log records across multiple requests + * + * It also includes the BufferHandler functionality and will buffer + * all messages until the end of the request or flush() is called. + * + * This works by storing all log records' messages above $deduplicationLevel + * to the file specified by $deduplicationStore. When further logs come in at the end of the + * request (or when flush() is called), all those above $deduplicationLevel are checked + * against the existing stored logs. If they match and the timestamps in the stored log is + * not older than $time seconds, the new log record is discarded. If no log record is new, the + * whole data set is discarded. + * + * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers + * that send messages to people, to avoid spamming with the same message over and over in case of + * a major component failure like a database server being down which makes all requests fail in the + * same way. + * + * @author Jordi Boggiano + */ +class DeduplicationHandler extends BufferHandler +{ + protected string $deduplicationStore; + + protected Level $deduplicationLevel; + + protected int $time; + protected bool $gc = false; + + /** + * @param HandlerInterface $handler Handler. + * @param string|null $deduplicationStore The file/path where the deduplication log should be kept + * @param int|string|Level|LogLevel::* $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes + * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $deduplicationLevel + */ + public function __construct(HandlerInterface $handler, ?string $deduplicationStore = null, int|string|Level $deduplicationLevel = Level::Error, int $time = 60, bool $bubble = true) + { + parent::__construct($handler, 0, Level::Debug, $bubble, false); + + $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; + $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); + $this->time = $time; + } + + public function flush(): void + { + if ($this->bufferSize === 0) { + return; + } + + $store = null; + + if (file_exists($this->deduplicationStore)) { + $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + } + + $passthru = null; + + foreach ($this->buffer as $record) { + if ($record->level->value >= $this->deduplicationLevel->value) { + $passthru = $passthru === true || !\is_array($store) || !$this->isDuplicate($store, $record); + if ($passthru) { + $line = $this->buildDeduplicationStoreEntry($record); + file_put_contents($this->deduplicationStore, $line . "\n", FILE_APPEND); + if (!\is_array($store)) { + $store = []; + } + $store[] = $line; + } + } + } + + // default of null is valid as well as if no record matches duplicationLevel we just pass through + if ($passthru === true || $passthru === null) { + $this->handler->handleBatch($this->buffer); + } + + $this->clear(); + + if ($this->gc) { + $this->collectLogs(); + } + } + + /** + * If there is a store entry older than e.g. a day, this method should set `$this->gc` to `true` to trigger garbage collection. + * @param string[] $store The deduplication store + */ + protected function isDuplicate(array $store, LogRecord $record): bool + { + $timestampValidity = $record->datetime->getTimestamp() - $this->time; + $expectedMessage = preg_replace('{[\r\n].*}', '', $record->message); + $yesterday = time() - 86400; + + for ($i = \count($store) - 1; $i >= 0; $i--) { + list($timestamp, $level, $message) = explode(':', $store[$i], 3); + + if ($level === $record->level->getName() && $message === $expectedMessage && $timestamp > $timestampValidity) { + return true; + } + + if ($timestamp < $yesterday) { + $this->gc = true; + } + } + + return false; + } + + /** + * @return string The given record serialized as a single line of text + */ + protected function buildDeduplicationStoreEntry(LogRecord $record): string + { + return $record->datetime->getTimestamp() . ':' . $record->level->getName() . ':' . preg_replace('{[\r\n].*}', '', $record->message); + } + + private function collectLogs(): void + { + if (!file_exists($this->deduplicationStore)) { + return; + } + + $handle = fopen($this->deduplicationStore, 'rw+'); + + if (false === $handle) { + throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore); + } + + flock($handle, LOCK_EX); + $validLogs = []; + + $timestampValidity = time() - $this->time; + + while (!feof($handle)) { + $log = fgets($handle); + if (\is_string($log) && '' !== $log && substr($log, 0, 10) >= $timestampValidity) { + $validLogs[] = $log; + } + } + + ftruncate($handle, 0); + rewind($handle); + foreach ($validLogs as $log) { + fwrite($handle, $log); + } + + flock($handle, LOCK_UN); + fclose($handle); + + $this->gc = false; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php new file mode 100644 index 0000000..eab9f10 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Formatter\NormalizerFormatter; +use Monolog\Formatter\FormatterInterface; +use Doctrine\CouchDB\CouchDBClient; +use Monolog\LogRecord; + +/** + * CouchDB handler for Doctrine CouchDB ODM + * + * @author Markus Bachmann + */ +class DoctrineCouchDBHandler extends AbstractProcessingHandler +{ + private CouchDBClient $client; + + public function __construct(CouchDBClient $client, int|string|Level $level = Level::Debug, bool $bubble = true) + { + $this->client = $client; + parent::__construct($level, $bubble); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->client->postDocument($record->formatted); + } + + protected function getDefaultFormatter(): FormatterInterface + { + return new NormalizerFormatter; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php new file mode 100644 index 0000000..f1c5a95 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Aws\Sdk; +use Aws\DynamoDb\DynamoDbClient; +use Monolog\Formatter\FormatterInterface; +use Aws\DynamoDb\Marshaler; +use Monolog\Formatter\ScalarFormatter; +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) + * + * @link https://github.com/aws/aws-sdk-php/ + * @author Andrew Lawson + */ +class DynamoDbHandler extends AbstractProcessingHandler +{ + public const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; + + protected DynamoDbClient $client; + + protected string $table; + + protected Marshaler $marshaler; + + public function __construct(DynamoDbClient $client, string $table, int|string|Level $level = Level::Debug, bool $bubble = true) + { + $this->marshaler = new Marshaler; + + $this->client = $client; + $this->table = $table; + + parent::__construct($level, $bubble); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $filtered = $this->filterEmptyFields($record->formatted); + $formatted = $this->marshaler->marshalItem($filtered); + + $this->client->putItem([ + 'TableName' => $this->table, + 'Item' => $formatted, + ]); + } + + /** + * @param mixed[] $record + * @return mixed[] + */ + protected function filterEmptyFields(array $record): array + { + return array_filter($record, function ($value) { + return [] !== $value; + }); + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new ScalarFormatter(self::DATE_FORMAT); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php new file mode 100644 index 0000000..d9b85b4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Elastica\Document; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\ElasticaFormatter; +use Monolog\Level; +use Elastica\Client; +use Elastica\Exception\ExceptionInterface; +use Monolog\LogRecord; + +/** + * Elastic Search handler + * + * Usage example: + * + * $client = new \Elastica\Client(); + * $options = array( + * 'index' => 'elastic_index_name', + * 'type' => 'elastic_doc_type', Types have been removed in Elastica 7 + * ); + * $handler = new ElasticaHandler($client, $options); + * $log = new Logger('application'); + * $log->pushHandler($handler); + * + * @author Jelle Vink + * @phpstan-type Options array{ + * index: string, + * type: string, + * ignore_error: bool + * } + * @phpstan-type InputOptions array{ + * index?: string, + * type?: string, + * ignore_error?: bool + * } + */ +class ElasticaHandler extends AbstractProcessingHandler +{ + protected Client $client; + + /** + * @var mixed[] Handler config options + * @phpstan-var Options + */ + protected array $options; + + /** + * @param Client $client Elastica Client object + * @param mixed[] $options Handler configuration + * + * @phpstan-param InputOptions $options + */ + public function __construct(Client $client, array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) + { + parent::__construct($level, $bubble); + $this->client = $client; + $this->options = array_merge( + [ + 'index' => 'monolog', // Elastic index name + 'type' => 'record', // Elastic document type + 'ignore_error' => false, // Suppress Elastica exceptions + ], + $options + ); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->bulkSend([$record->formatted]); + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + if ($formatter instanceof ElasticaFormatter) { + return parent::setFormatter($formatter); + } + + throw new \InvalidArgumentException('ElasticaHandler is only compatible with ElasticaFormatter'); + } + + /** + * @return mixed[] + * + * @phpstan-return Options + */ + public function getOptions(): array + { + return $this->options; + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new ElasticaFormatter($this->options['index'], $this->options['type']); + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + $documents = $this->getFormatter()->formatBatch($records); + $this->bulkSend($documents); + } + + /** + * Use Elasticsearch bulk API to send list of documents + * + * @param Document[] $documents + * + * @throws \RuntimeException + */ + protected function bulkSend(array $documents): void + { + try { + $this->client->addDocuments($documents); + } catch (ExceptionInterface $e) { + if (!$this->options['ignore_error']) { + throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); + } + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php new file mode 100644 index 0000000..74cc7b6 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php @@ -0,0 +1,230 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Elastic\Elasticsearch\Response\Elasticsearch; +use Throwable; +use RuntimeException; +use Monolog\Level; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\ElasticsearchFormatter; +use InvalidArgumentException; +use Elasticsearch\Common\Exceptions\RuntimeException as ElasticsearchRuntimeException; +use Elasticsearch\Client; +use Monolog\LogRecord; +use Elastic\Elasticsearch\Exception\InvalidArgumentException as ElasticInvalidArgumentException; +use Elastic\Elasticsearch\Client as Client8; + +/** + * Elasticsearch handler + * + * @link https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html + * + * Simple usage example: + * + * $client = \Elasticsearch\ClientBuilder::create() + * ->setHosts($hosts) + * ->build(); + * + * $options = array( + * 'index' => 'elastic_index_name', + * 'type' => 'elastic_doc_type', + * ); + * $handler = new ElasticsearchHandler($client, $options); + * $log = new Logger('application'); + * $log->pushHandler($handler); + * + * @author Avtandil Kikabidze + * @phpstan-type Options array{ + * index: string, + * type: string, + * ignore_error: bool, + * op_type: 'index'|'create' + * } + * @phpstan-type InputOptions array{ + * index?: string, + * type?: string, + * ignore_error?: bool, + * op_type?: 'index'|'create' + * } + */ +class ElasticsearchHandler extends AbstractProcessingHandler +{ + protected Client|Client8 $client; + + /** + * @var mixed[] Handler config options + * @phpstan-var Options + */ + protected array $options; + + /** + * @var bool + */ + private $needsType; + + /** + * @param Client|Client8 $client Elasticsearch Client object + * @param mixed[] $options Handler configuration + * + * @phpstan-param InputOptions $options + */ + public function __construct(Client|Client8 $client, array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) + { + parent::__construct($level, $bubble); + $this->client = $client; + $this->options = array_merge( + [ + 'index' => 'monolog', // Elastic index name + 'type' => '_doc', // Elastic document type + 'ignore_error' => false, // Suppress Elasticsearch exceptions + 'op_type' => 'index', // Elastic op_type (index or create) (https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#docs-index-api-op_type) + ], + $options + ); + + if ($client instanceof Client8 || $client::VERSION[0] === '7') { + $this->needsType = false; + // force the type to _doc for ES8/ES7 + $this->options['type'] = '_doc'; + } else { + $this->needsType = true; + } + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->bulkSend([$record->formatted]); + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + if ($formatter instanceof ElasticsearchFormatter) { + return parent::setFormatter($formatter); + } + + throw new InvalidArgumentException('ElasticsearchHandler is only compatible with ElasticsearchFormatter'); + } + + /** + * Getter options + * + * @return mixed[] + * + * @phpstan-return Options + */ + public function getOptions(): array + { + return $this->options; + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new ElasticsearchFormatter($this->options['index'], $this->options['type']); + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + $documents = $this->getFormatter()->formatBatch($records); + $this->bulkSend($documents); + } + + /** + * Use Elasticsearch bulk API to send list of documents + * + * @param array> $records Records + _index/_type keys + * @throws \RuntimeException + */ + protected function bulkSend(array $records): void + { + try { + $params = [ + 'body' => [], + ]; + + foreach ($records as $record) { + $params['body'][] = [ + $this->options['op_type'] => $this->needsType ? [ + '_index' => $record['_index'], + '_type' => $record['_type'], + ] : [ + '_index' => $record['_index'], + ], + ]; + unset($record['_index'], $record['_type']); + + $params['body'][] = $record; + } + + /** @var Elasticsearch */ + $responses = $this->client->bulk($params); + + if ($responses['errors'] === true) { + throw $this->createExceptionFromResponses($responses); + } + } catch (Throwable $e) { + if (! $this->options['ignore_error']) { + throw new RuntimeException('Error sending messages to Elasticsearch', 0, $e); + } + } + } + + /** + * Creates elasticsearch exception from responses array + * + * Only the first error is converted into an exception. + * + * @param mixed[]|Elasticsearch $responses returned by $this->client->bulk() + */ + protected function createExceptionFromResponses($responses): Throwable + { + foreach ($responses['items'] ?? [] as $item) { + if (isset($item['index']['error'])) { + return $this->createExceptionFromError($item['index']['error']); + } + } + + if (class_exists(ElasticInvalidArgumentException::class)) { + return new ElasticInvalidArgumentException('Elasticsearch failed to index one or more records.'); + } + + return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.'); + } + + /** + * Creates elasticsearch exception from error array + * + * @param mixed[] $error + */ + protected function createExceptionFromError(array $error): Throwable + { + $previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null; + + if (class_exists(ElasticInvalidArgumentException::class)) { + return new ElasticInvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous); + } + + return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php new file mode 100644 index 0000000..aaad9d4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Stores to PHP error_log() handler. + * + * @author Elan Ruusamรคe + */ +class ErrorLogHandler extends AbstractProcessingHandler +{ + public const OPERATING_SYSTEM = 0; + public const SAPI = 4; + + protected int $messageType; + protected bool $expandNewlines; + + /** + * @param int $messageType Says where the error should go. + * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries + * + * @throws \InvalidArgumentException If an unsupported message type is set + */ + public function __construct(int $messageType = self::OPERATING_SYSTEM, int|string|Level $level = Level::Debug, bool $bubble = true, bool $expandNewlines = false) + { + parent::__construct($level, $bubble); + + if (false === \in_array($messageType, self::getAvailableTypes(), true)) { + $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); + + throw new \InvalidArgumentException($message); + } + + $this->messageType = $messageType; + $this->expandNewlines = $expandNewlines; + } + + /** + * @return int[] With all available types + */ + public static function getAvailableTypes(): array + { + return [ + self::OPERATING_SYSTEM, + self::SAPI, + ]; + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + if (!$this->expandNewlines) { + error_log((string) $record->formatted, $this->messageType); + + return; + } + + $lines = preg_split('{[\r\n]+}', (string) $record->formatted); + if ($lines === false) { + $pcreErrorCode = preg_last_error(); + + throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / '. Utils::pcreLastErrorMessage($pcreErrorCode)); + } + foreach ($lines as $line) { + error_log($line, $this->messageType); + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php new file mode 100644 index 0000000..58318be --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Throwable; +use Monolog\LogRecord; + +/** + * Forwards records to at most one handler + * + * If a handler fails, the exception is suppressed and the record is forwarded to the next handler. + * + * As soon as one handler handles a record successfully, the handling stops there. + */ +class FallbackGroupHandler extends GroupHandler +{ + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + foreach ($this->handlers as $handler) { + try { + $handler->handle(clone $record); + break; + } catch (Throwable $e) { + // What throwable? + } + } + + return false === $this->bubble; + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + if (\count($this->processors) > 0) { + $processed = []; + foreach ($records as $record) { + $processed[] = $this->processRecord($record); + } + $records = $processed; + } + + foreach ($this->handlers as $handler) { + try { + $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); + break; + } catch (Throwable $e) { + // What throwable? + } + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php new file mode 100644 index 0000000..6653fa1 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php @@ -0,0 +1,202 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Closure; +use Monolog\Level; +use Monolog\Logger; +use Monolog\ResettableInterface; +use Monolog\Formatter\FormatterInterface; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Simple handler wrapper that filters records based on a list of levels + * + * It can be configured with an exact list of levels to allow, or a min/max level. + * + * @author Hennadiy Verkh + * @author Jordi Boggiano + */ +class FilterHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface +{ + use ProcessableHandlerTrait; + + /** + * Handler or factory Closure($record, $this) + * + * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface + */ + protected Closure|HandlerInterface $handler; + + /** + * Minimum level for logs that are passed to handler + * + * @var bool[] Map of Level value => true + * @phpstan-var array, true> + */ + protected array $acceptedLevels; + + /** + * Whether the messages that are handled can bubble up the stack or not + */ + protected bool $bubble; + + /** + * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler + * + * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $filterHandler). + * @param int|string|Level|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided + * @param int|string|Level|LogLevel::* $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @phpstan-param value-of|value-of|Level|LogLevel::*|array|value-of|Level|LogLevel::*> $minLevelOrList + * @phpstan-param value-of|value-of|Level|LogLevel::* $maxLevel + */ + public function __construct(Closure|HandlerInterface $handler, int|string|Level|array $minLevelOrList = Level::Debug, int|string|Level $maxLevel = Level::Emergency, bool $bubble = true) + { + $this->handler = $handler; + $this->bubble = $bubble; + $this->setAcceptedLevels($minLevelOrList, $maxLevel); + } + + /** + * @phpstan-return list List of levels + */ + public function getAcceptedLevels(): array + { + return array_map(fn (int $level) => Level::from($level), array_keys($this->acceptedLevels)); + } + + /** + * @param int|string|Level|LogLevel::*|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided + * @param int|string|Level|LogLevel::* $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array + * @return $this + * + * @phpstan-param value-of|value-of|Level|LogLevel::*|array|value-of|Level|LogLevel::*> $minLevelOrList + * @phpstan-param value-of|value-of|Level|LogLevel::* $maxLevel + */ + public function setAcceptedLevels(int|string|Level|array $minLevelOrList = Level::Debug, int|string|Level $maxLevel = Level::Emergency): self + { + if (\is_array($minLevelOrList)) { + $acceptedLevels = array_map(Logger::toMonologLevel(...), $minLevelOrList); + } else { + $minLevelOrList = Logger::toMonologLevel($minLevelOrList); + $maxLevel = Logger::toMonologLevel($maxLevel); + $acceptedLevels = array_values(array_filter(Level::cases(), fn (Level $level) => $level->value >= $minLevelOrList->value && $level->value <= $maxLevel->value)); + } + $this->acceptedLevels = []; + foreach ($acceptedLevels as $level) { + $this->acceptedLevels[$level->value] = true; + } + + return $this; + } + + /** + * @inheritDoc + */ + public function isHandling(LogRecord $record): bool + { + return isset($this->acceptedLevels[$record->level->value]); + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if (!$this->isHandling($record)) { + return false; + } + + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + $this->getHandler($record)->handle($record); + + return false === $this->bubble; + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + $filtered = []; + foreach ($records as $record) { + if ($this->isHandling($record)) { + $filtered[] = $record; + } + } + + if (\count($filtered) > 0) { + $this->getHandler($filtered[\count($filtered) - 1])->handleBatch($filtered); + } + } + + /** + * Return the nested handler + * + * If the handler was provided as a factory, this will trigger the handler's instantiation. + */ + public function getHandler(LogRecord|null $record = null): HandlerInterface + { + if (!$this->handler instanceof HandlerInterface) { + $handler = ($this->handler)($record, $this); + if (!$handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory Closure should return a HandlerInterface"); + } + $this->handler = $handler; + } + + return $this->handler; + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + $handler = $this->getHandler(); + if ($handler instanceof FormattableHandlerInterface) { + $handler->setFormatter($formatter); + + return $this; + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); + } + + /** + * @inheritDoc + */ + public function getFormatter(): FormatterInterface + { + $handler = $this->getHandler(); + if ($handler instanceof FormattableHandlerInterface) { + return $handler->getFormatter(); + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); + } + + public function reset(): void + { + $this->resetProcessors(); + + if ($this->getHandler() instanceof ResettableInterface) { + $this->getHandler()->reset(); + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php new file mode 100644 index 0000000..e8a1b0b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\LogRecord; + +/** + * Interface for activation strategies for the FingersCrossedHandler. + * + * @author Johannes M. Schmitt + */ +interface ActivationStrategyInterface +{ + /** + * Returns whether the given record activates the handler. + */ + public function isHandlerActivated(LogRecord $record): bool; +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php new file mode 100644 index 0000000..383e19a --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Level; +use Monolog\Logger; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Channel and Error level based monolog activation strategy. Allows to trigger activation + * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except + * for records of the 'sql' channel; those should trigger activation on level 'WARN'. + * + * Example: + * + * + * $activationStrategy = new ChannelLevelActivationStrategy( + * Level::Critical, + * array( + * 'request' => Level::Alert, + * 'sensitive' => Level::Error, + * ) + * ); + * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); + * + * + * @author Mike Meessen + */ +class ChannelLevelActivationStrategy implements ActivationStrategyInterface +{ + private Level $defaultActionLevel; + + /** + * @var array + */ + private array $channelToActionLevel; + + /** + * @param int|string|Level|LogLevel::* $defaultActionLevel The default action level to be used if the record's category doesn't match any + * @param array $channelToActionLevel An array that maps channel names to action levels. + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $defaultActionLevel + * @phpstan-param array|value-of|Level|LogLevel::*> $channelToActionLevel + */ + public function __construct(int|string|Level $defaultActionLevel, array $channelToActionLevel = []) + { + $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); + $this->channelToActionLevel = array_map(Logger::toMonologLevel(...), $channelToActionLevel); + } + + public function isHandlerActivated(LogRecord $record): bool + { + if (isset($this->channelToActionLevel[$record->channel])) { + return $record->level->value >= $this->channelToActionLevel[$record->channel]->value; + } + + return $record->level->value >= $this->defaultActionLevel->value; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php new file mode 100644 index 0000000..c3ca296 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Level; +use Monolog\LogRecord; +use Monolog\Logger; +use Psr\Log\LogLevel; + +/** + * Error level based activation strategy. + * + * @author Johannes M. Schmitt + */ +class ErrorLevelActivationStrategy implements ActivationStrategyInterface +{ + private Level $actionLevel; + + /** + * @param int|string|Level $actionLevel Level or name or value + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $actionLevel + */ + public function __construct(int|string|Level $actionLevel) + { + $this->actionLevel = Logger::toMonologLevel($actionLevel); + } + + public function isHandlerActivated(LogRecord $record): bool + { + return $record->level->value >= $this->actionLevel->value; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php new file mode 100644 index 0000000..7631830 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -0,0 +1,242 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Closure; +use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; +use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; +use Monolog\Level; +use Monolog\Logger; +use Monolog\ResettableInterface; +use Monolog\Formatter\FormatterInterface; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Buffers all records until a certain level is reached + * + * The advantage of this approach is that you don't get any clutter in your log files. + * Only requests which actually trigger an error (or whatever your actionLevel is) will be + * in the logs, but they will contain all records, not only those above the level threshold. + * + * You can then have a passthruLevel as well which means that at the end of the request, + * even if it did not get activated, it will still send through log records of e.g. at least a + * warning level. + * + * You can find the various activation strategies in the + * Monolog\Handler\FingersCrossed\ namespace. + * + * @author Jordi Boggiano + */ +class FingersCrossedHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface +{ + use ProcessableHandlerTrait; + + /** + * Handler or factory Closure($record, $this) + * + * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface + */ + protected Closure|HandlerInterface $handler; + + protected ActivationStrategyInterface $activationStrategy; + + protected bool $buffering = true; + + protected int $bufferSize; + + /** @var LogRecord[] */ + protected array $buffer = []; + + protected bool $stopBuffering; + + protected Level|null $passthruLevel = null; + + protected bool $bubble; + + /** + * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler + * + * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $fingersCrossedHandler). + * @param int|string|Level|LogLevel::* $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated + * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) + * @param int|string|Level|LogLevel::*|null $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered + * + * @phpstan-param value-of|value-of|Level|LogLevel::*|ActivationStrategyInterface $activationStrategy + * @phpstan-param value-of|value-of|Level|LogLevel::* $passthruLevel + */ + public function __construct(Closure|HandlerInterface $handler, int|string|Level|ActivationStrategyInterface $activationStrategy = null, int $bufferSize = 0, bool $bubble = true, bool $stopBuffering = true, int|string|Level|null $passthruLevel = null) + { + if (null === $activationStrategy) { + $activationStrategy = new ErrorLevelActivationStrategy(Level::Warning); + } + + // convert simple int activationStrategy to an object + if (!$activationStrategy instanceof ActivationStrategyInterface) { + $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); + } + + $this->handler = $handler; + $this->activationStrategy = $activationStrategy; + $this->bufferSize = $bufferSize; + $this->bubble = $bubble; + $this->stopBuffering = $stopBuffering; + + if ($passthruLevel !== null) { + $this->passthruLevel = Logger::toMonologLevel($passthruLevel); + } + } + + /** + * @inheritDoc + */ + public function isHandling(LogRecord $record): bool + { + return true; + } + + /** + * Manually activate this logger regardless of the activation strategy + */ + public function activate(): void + { + if ($this->stopBuffering) { + $this->buffering = false; + } + + $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); + $this->buffer = []; + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + if ($this->buffering) { + $this->buffer[] = $record; + if ($this->bufferSize > 0 && \count($this->buffer) > $this->bufferSize) { + array_shift($this->buffer); + } + if ($this->activationStrategy->isHandlerActivated($record)) { + $this->activate(); + } + } else { + $this->getHandler($record)->handle($record); + } + + return false === $this->bubble; + } + + /** + * @inheritDoc + */ + public function close(): void + { + $this->flushBuffer(); + + $this->getHandler()->close(); + } + + public function reset(): void + { + $this->flushBuffer(); + + $this->resetProcessors(); + + if ($this->getHandler() instanceof ResettableInterface) { + $this->getHandler()->reset(); + } + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + * + * It also resets the handler to its initial buffering state. + */ + public function clear(): void + { + $this->buffer = []; + $this->reset(); + } + + /** + * Resets the state of the handler. Stops forwarding records to the wrapped handler. + */ + private function flushBuffer(): void + { + if (null !== $this->passthruLevel) { + $passthruLevel = $this->passthruLevel; + $this->buffer = array_filter($this->buffer, static function ($record) use ($passthruLevel) { + return $passthruLevel->includes($record->level); + }); + if (\count($this->buffer) > 0) { + $this->getHandler(end($this->buffer))->handleBatch($this->buffer); + } + } + + $this->buffer = []; + $this->buffering = true; + } + + /** + * Return the nested handler + * + * If the handler was provided as a factory, this will trigger the handler's instantiation. + */ + public function getHandler(LogRecord|null $record = null): HandlerInterface + { + if (!$this->handler instanceof HandlerInterface) { + $handler = ($this->handler)($record, $this); + if (!$handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory Closure should return a HandlerInterface"); + } + $this->handler = $handler; + } + + return $this->handler; + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + $handler = $this->getHandler(); + if ($handler instanceof FormattableHandlerInterface) { + $handler->setFormatter($formatter); + + return $this; + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); + } + + /** + * @inheritDoc + */ + public function getFormatter(): FormatterInterface + { + $handler = $this->getHandler(); + if ($handler instanceof FormattableHandlerInterface) { + return $handler->getFormatter(); + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php new file mode 100644 index 0000000..6b9e510 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php @@ -0,0 +1,174 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\WildfireFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. + * + * @author Eric Clemmons (@ericclemmons) + */ +class FirePHPHandler extends AbstractProcessingHandler +{ + use WebRequestRecognizerTrait; + + /** + * WildFire JSON header message format + */ + protected const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; + + /** + * FirePHP structure for parsing messages & their presentation + */ + protected const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; + + /** + * Must reference a "known" plugin, otherwise headers won't display in FirePHP + */ + protected const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; + + /** + * Header prefix for Wildfire to recognize & parse headers + */ + protected const HEADER_PREFIX = 'X-Wf'; + + /** + * Whether or not Wildfire vendor-specific headers have been generated & sent yet + */ + protected static bool $initialized = false; + + /** + * Shared static message index between potentially multiple handlers + */ + protected static int $messageIndex = 1; + + protected static bool $sendHeaders = true; + + /** + * Base header creation function used by init headers & record headers + * + * @param array $meta Wildfire Plugin, Protocol & Structure Indexes + * @param string $message Log message + * + * @return array Complete header string ready for the client as key and message as value + * + * @phpstan-return non-empty-array + */ + protected function createHeader(array $meta, string $message): array + { + $header = sprintf('%s-%s', static::HEADER_PREFIX, join('-', $meta)); + + return [$header => $message]; + } + + /** + * Creates message header from record + * + * @return array + * + * @phpstan-return non-empty-array + * + * @see createHeader() + */ + protected function createRecordHeader(LogRecord $record): array + { + // Wildfire is extensible to support multiple protocols & plugins in a single request, + // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. + return $this->createHeader( + [1, 1, 1, self::$messageIndex++], + $record->formatted + ); + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new WildfireFormatter(); + } + + /** + * Wildfire initialization headers to enable message parsing + * + * @see createHeader() + * @see sendHeader() + * + * @return array + */ + protected function getInitHeaders(): array + { + // Initial payload consists of required headers for Wildfire + return array_merge( + $this->createHeader(['Protocol', 1], static::PROTOCOL_URI), + $this->createHeader([1, 'Structure', 1], static::STRUCTURE_URI), + $this->createHeader([1, 'Plugin', 1], static::PLUGIN_URI) + ); + } + + /** + * Send header string to the client + */ + protected function sendHeader(string $header, string $content): void + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Creates & sends header for a record, ensuring init headers have been sent prior + * + * @see sendHeader() + * @see sendInitHeaders() + */ + protected function write(LogRecord $record): void + { + if (!self::$sendHeaders || !$this->isWebRequest()) { + return; + } + + // WildFire-specific headers must be sent prior to any messages + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + foreach ($this->getInitHeaders() as $header => $content) { + $this->sendHeader($header, $content); + } + } + + $header = $this->createRecordHeader($record); + if (trim(current($header)) !== '') { + $this->sendHeader(key($header), current($header)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + */ + protected function headersAccepted(): bool + { + if (isset($_SERVER['HTTP_USER_AGENT']) && 1 === preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { + return true; + } + + return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php new file mode 100644 index 0000000..46ebfc0 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php @@ -0,0 +1,132 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Sends logs to Fleep.io using Webhook integrations + * + * You'll need a Fleep.io account to use this handler. + * + * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation + * @author Ando Roots + */ +class FleepHookHandler extends SocketHandler +{ + protected const FLEEP_HOST = 'fleep.io'; + + protected const FLEEP_HOOK_URI = '/hook/'; + + /** + * @var string Webhook token (specifies the conversation where logs are sent) + */ + protected string $token; + + /** + * Construct a new Fleep.io Handler. + * + * For instructions on how to create a new web hook in your conversations + * see https://fleep.io/integrations/webhooks/ + * + * @param string $token Webhook token + * @throws MissingExtensionException if OpenSSL is missing + */ + public function __construct( + string $token, + $level = Level::Debug, + bool $bubble = true, + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + if (!\extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); + } + + $this->token = $token; + + $connectionString = 'ssl://' . static::FLEEP_HOST . ':443'; + parent::__construct( + $connectionString, + $level, + $bubble, + $persistent, + $timeout, + $writingTimeout, + $connectionTimeout, + $chunkSize + ); + } + + /** + * Returns the default formatter to use with this handler + * + * Overloaded to remove empty context and extra arrays from the end of the log message. + * + * @return LineFormatter + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter(null, null, true, true); + } + + /** + * Handles a log record + */ + public function write(LogRecord $record): void + { + parent::write($record); + $this->closeSocket(); + } + + /** + * @inheritDoc + */ + protected function generateDataStream(LogRecord $record): string + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the header of the API Call + */ + private function buildHeader(string $content): string + { + $header = "POST " . static::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; + $header .= "Host: " . static::FLEEP_HOST . "\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . \strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * Builds the body of API call + */ + private function buildContent(LogRecord $record): string + { + $dataArray = [ + 'message' => $record->formatted, + ]; + + return http_build_query($dataArray); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php new file mode 100644 index 0000000..27c6c15 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Utils; +use Monolog\Formatter\FlowdockFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Sends notifications through the Flowdock push API + * + * This must be configured with a FlowdockFormatter instance via setFormatter() + * + * Notes: + * API token - Flowdock API token + * + * @author Dominik Liebler + * @see https://www.flowdock.com/api/push + * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 + */ +class FlowdockHandler extends SocketHandler +{ + protected string $apiToken; + + /** + * @throws MissingExtensionException if OpenSSL is missing + */ + public function __construct( + string $apiToken, + $level = Level::Debug, + bool $bubble = true, + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + if (!\extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); + } + + parent::__construct( + 'ssl://api.flowdock.com:443', + $level, + $bubble, + $persistent, + $timeout, + $writingTimeout, + $connectionTimeout, + $chunkSize + ); + $this->apiToken = $apiToken; + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + if (!$formatter instanceof FlowdockFormatter) { + throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + return parent::setFormatter($formatter); + } + + /** + * Gets the default formatter. + */ + protected function getDefaultFormatter(): FormatterInterface + { + throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + parent::write($record); + + $this->closeSocket(); + } + + /** + * @inheritDoc + */ + protected function generateDataStream(LogRecord $record): string + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + */ + private function buildContent(LogRecord $record): string + { + return Utils::jsonEncode($record->formatted); + } + + /** + * Builds the header of the API Call + */ + private function buildHeader(string $content): string + { + $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; + $header .= "Host: api.flowdock.com\r\n"; + $header .= "Content-Type: application/json\r\n"; + $header .= "Content-Length: " . \strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php new file mode 100644 index 0000000..72da59e --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; + +/** + * Interface to describe loggers that have a formatter + * + * @author Jordi Boggiano + */ +interface FormattableHandlerInterface +{ + /** + * Sets the formatter. + * + * @return HandlerInterface self + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface; + + /** + * Gets the formatter. + */ + public function getFormatter(): FormatterInterface; +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php new file mode 100644 index 0000000..c044e07 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; + +/** + * Helper trait for implementing FormattableInterface + * + * @author Jordi Boggiano + */ +trait FormattableHandlerTrait +{ + protected FormatterInterface|null $formatter = null; + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + $this->formatter = $formatter; + + return $this; + } + + /** + * @inheritDoc + */ + public function getFormatter(): FormatterInterface + { + if (null === $this->formatter) { + $this->formatter = $this->getDefaultFormatter(); + } + + return $this->formatter; + } + + /** + * Gets the default formatter. + * + * Overwrite this if the LineFormatter is not a good default for your handler. + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php new file mode 100644 index 0000000..ba5bb97 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Gelf\PublisherInterface; +use Monolog\Level; +use Monolog\Formatter\GelfMessageFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Handler to send messages to a Graylog2 (http://www.graylog2.org) server + * + * @author Matt Lehner + * @author Benjamin Zikarsky + */ +class GelfHandler extends AbstractProcessingHandler +{ + /** + * @var PublisherInterface the publisher object that sends the message to the server + */ + protected PublisherInterface $publisher; + + /** + * @param PublisherInterface $publisher a gelf publisher object + */ + public function __construct(PublisherInterface $publisher, int|string|Level $level = Level::Debug, bool $bubble = true) + { + parent::__construct($level, $bubble); + + $this->publisher = $publisher; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->publisher->publish($record->formatted); + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new GelfMessageFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php new file mode 100644 index 0000000..0423dc3 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php @@ -0,0 +1,130 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\ResettableInterface; +use Monolog\LogRecord; + +/** + * Forwards records to multiple handlers + * + * @author Lenar Lรตhmus + */ +class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface +{ + use ProcessableHandlerTrait; + + /** @var HandlerInterface[] */ + protected array $handlers; + protected bool $bubble; + + /** + * @param HandlerInterface[] $handlers Array of Handlers. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @throws \InvalidArgumentException if an unsupported handler is set + */ + public function __construct(array $handlers, bool $bubble = true) + { + foreach ($handlers as $handler) { + if (!$handler instanceof HandlerInterface) { + throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); + } + } + + $this->handlers = $handlers; + $this->bubble = $bubble; + } + + /** + * @inheritDoc + */ + public function isHandling(LogRecord $record): bool + { + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + foreach ($this->handlers as $handler) { + $handler->handle(clone $record); + } + + return false === $this->bubble; + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + if (\count($this->processors) > 0) { + $processed = []; + foreach ($records as $record) { + $processed[] = $this->processRecord($record); + } + $records = $processed; + } + + foreach ($this->handlers as $handler) { + $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); + } + } + + public function reset(): void + { + $this->resetProcessors(); + + foreach ($this->handlers as $handler) { + if ($handler instanceof ResettableInterface) { + $handler->reset(); + } + } + } + + public function close(): void + { + parent::close(); + + foreach ($this->handlers as $handler) { + $handler->close(); + } + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + foreach ($this->handlers as $handler) { + if ($handler instanceof FormattableHandlerInterface) { + $handler->setFormatter($formatter); + } + } + + return $this; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Handler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Handler.php new file mode 100644 index 0000000..e89f969 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Handler.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Base Handler class providing basic close() support as well as handleBatch + * + * @author Jordi Boggiano + */ +abstract class Handler implements HandlerInterface +{ + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + foreach ($records as $record) { + $this->handle($record); + } + } + + /** + * @inheritDoc + */ + public function close(): void + { + } + + public function __destruct() + { + try { + $this->close(); + } catch (\Throwable $e) { + // do nothing + } + } + + public function __sleep() + { + $this->close(); + + $reflClass = new \ReflectionClass($this); + + $keys = []; + foreach ($reflClass->getProperties() as $reflProp) { + if (!$reflProp->isStatic()) { + $keys[] = $reflProp->getName(); + } + } + + return $keys; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php new file mode 100644 index 0000000..93306d9 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\LogRecord; + +/** + * Interface that all Monolog Handlers must implement + * + * @author Jordi Boggiano + */ +interface HandlerInterface +{ + /** + * Checks whether the given record will be handled by this handler. + * + * This is mostly done for performance reasons, to avoid calling processors for nothing. + * + * Handlers should still check the record levels within handle(), returning false in isHandling() + * is no guarantee that handle() will not be called, and isHandling() might not be called + * for a given record. + * + * @param LogRecord $record Partial log record having only a level initialized + */ + public function isHandling(LogRecord $record): bool; + + /** + * Handles a record. + * + * All records may be passed to this method, and the handler should discard + * those that it does not want to handle. + * + * The return value of this function controls the bubbling process of the handler stack. + * Unless the bubbling is interrupted (by returning true), the Logger class will keep on + * calling further handlers in the stack with a given log record. + * + * @param LogRecord $record The record to handle + * @return bool true means that this handler handled the record, and that bubbling is not permitted. + * false means the record was either not processed or that this handler allows bubbling. + */ + public function handle(LogRecord $record): bool; + + /** + * Handles a set of records at once. + * + * @param array $records The records to handle + */ + public function handleBatch(array $records): void; + + /** + * Closes the handler. + * + * Ends a log cycle and frees all resources used by the handler. + * + * Closing a Handler means flushing all buffers and freeing any open resources/handles. + * + * Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) + * and ideally handlers should be able to reopen themselves on handle() after they have been closed. + * + * This is useful at the end of a request and will be called automatically when the object + * is destroyed if you extend Monolog\Handler\Handler. + * + * If you are thinking of calling this method yourself, most likely you should be + * calling ResettableInterface::reset instead. Have a look. + */ + public function close(): void; +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php new file mode 100644 index 0000000..541ec25 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\ResettableInterface; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * This simple wrapper class can be used to extend handlers functionality. + * + * Example: A custom filtering that can be applied to any handler. + * + * Inherit from this class and override handle() like this: + * + * public function handle(LogRecord $record) + * { + * if ($record meets certain conditions) { + * return false; + * } + * return $this->handler->handle($record); + * } + * + * @author Alexey Karapetov + */ +class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, FormattableHandlerInterface, ResettableInterface +{ + protected HandlerInterface $handler; + + public function __construct(HandlerInterface $handler) + { + $this->handler = $handler; + } + + /** + * @inheritDoc + */ + public function isHandling(LogRecord $record): bool + { + return $this->handler->isHandling($record); + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + return $this->handler->handle($record); + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + $this->handler->handleBatch($records); + } + + /** + * @inheritDoc + */ + public function close(): void + { + $this->handler->close(); + } + + /** + * @inheritDoc + */ + public function pushProcessor(callable $callback): HandlerInterface + { + if ($this->handler instanceof ProcessableHandlerInterface) { + $this->handler->pushProcessor($callback); + + return $this; + } + + throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); + } + + /** + * @inheritDoc + */ + public function popProcessor(): callable + { + if ($this->handler instanceof ProcessableHandlerInterface) { + return $this->handler->popProcessor(); + } + + throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + if ($this->handler instanceof FormattableHandlerInterface) { + $this->handler->setFormatter($formatter); + + return $this; + } + + throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); + } + + /** + * @inheritDoc + */ + public function getFormatter(): FormatterInterface + { + if ($this->handler instanceof FormattableHandlerInterface) { + return $this->handler->getFormatter(); + } + + throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); + } + + public function reset(): void + { + if ($this->handler instanceof ResettableInterface) { + $this->handler->reset(); + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php new file mode 100644 index 0000000..b9c7ba8 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * IFTTTHandler uses cURL to trigger IFTTT Maker actions + * + * Register a secret key and trigger/event name at https://ifttt.com/maker + * + * value1 will be the channel from monolog's Logger constructor, + * value2 will be the level name (ERROR, WARNING, ..) + * value3 will be the log record's message + * + * @author Nehal Patel + */ +class IFTTTHandler extends AbstractProcessingHandler +{ + private string $eventName; + private string $secretKey; + + /** + * @param string $eventName The name of the IFTTT Maker event that should be triggered + * @param string $secretKey A valid IFTTT secret key + * + * @throws MissingExtensionException If the curl extension is missing + */ + public function __construct(string $eventName, string $secretKey, int|string|Level $level = Level::Error, bool $bubble = true) + { + if (!\extension_loaded('curl')) { + throw new MissingExtensionException('The curl extension is needed to use the IFTTTHandler'); + } + + $this->eventName = $eventName; + $this->secretKey = $secretKey; + + parent::__construct($level, $bubble); + } + + /** + * @inheritDoc + */ + public function write(LogRecord $record): void + { + $postData = [ + "value1" => $record->channel, + "value2" => $record["level_name"], + "value3" => $record->message, + ]; + $postString = Utils::jsonEncode($postData); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); + curl_setopt($ch, CURLOPT_HTTPHEADER, [ + "Content-Type: application/json", + ]); + + Curl\Util::execute($ch); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php new file mode 100644 index 0000000..4b558bd --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php @@ -0,0 +1,74 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Inspired on LogEntriesHandler. + * + * @author Robert Kaufmann III + * @author Gabriel Machado + */ +class InsightOpsHandler extends SocketHandler +{ + protected string $logToken; + + /** + * @param string $token Log token supplied by InsightOps + * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. + * @param bool $useSSL Whether or not SSL encryption should be used + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct( + string $token, + string $region = 'us', + bool $useSSL = true, + $level = Level::Debug, + bool $bubble = true, + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + if ($useSSL && !\extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for InsightOpsHandler'); + } + + $endpoint = $useSSL + ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' + : $region . '.data.logs.insight.rapid7.com:80'; + + parent::__construct( + $endpoint, + $level, + $bubble, + $persistent, + $timeout, + $writingTimeout, + $connectionTimeout, + $chunkSize + ); + $this->logToken = $token; + } + + /** + * @inheritDoc + */ + protected function generateDataStream(LogRecord $record): string + { + return $this->logToken . ' ' . $record->formatted; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php new file mode 100644 index 0000000..8c12898 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * @author Robert Kaufmann III + */ +class LogEntriesHandler extends SocketHandler +{ + protected string $logToken; + + /** + * @param string $token Log token supplied by LogEntries + * @param bool $useSSL Whether or not SSL encryption should be used. + * @param string $host Custom hostname to send the data to if needed + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct( + string $token, + bool $useSSL = true, + $level = Level::Debug, + bool $bubble = true, + string $host = 'data.logentries.com', + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + if ($useSSL && !\extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); + } + + $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; + parent::__construct( + $endpoint, + $level, + $bubble, + $persistent, + $timeout, + $writingTimeout, + $connectionTimeout, + $chunkSize + ); + $this->logToken = $token; + } + + /** + * @inheritDoc + */ + protected function generateDataStream(LogRecord $record): string + { + return $this->logToken . ' ' . $record->formatted; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php new file mode 100644 index 0000000..ff298c6 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php @@ -0,0 +1,156 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LogglyFormatter; +use CurlHandle; +use Monolog\LogRecord; + +/** + * Sends errors to Loggly. + * + * @author Przemek Sobstel + * @author Adam Pancutt + * @author Gregory Barchard + */ +class LogglyHandler extends AbstractProcessingHandler +{ + protected const HOST = 'logs-01.loggly.com'; + protected const ENDPOINT_SINGLE = 'inputs'; + protected const ENDPOINT_BATCH = 'bulk'; + + /** + * Caches the curl handlers for every given endpoint. + * + * @var CurlHandle[] + */ + protected array $curlHandlers = []; + + protected string $token; + + /** @var string[] */ + protected array $tag = []; + + /** + * @param string $token API token supplied by Loggly + * + * @throws MissingExtensionException If the curl extension is missing + */ + public function __construct(string $token, int|string|Level $level = Level::Debug, bool $bubble = true) + { + if (!\extension_loaded('curl')) { + throw new MissingExtensionException('The curl extension is needed to use the LogglyHandler'); + } + + $this->token = $token; + + parent::__construct($level, $bubble); + } + + /** + * Loads and returns the shared curl handler for the given endpoint. + */ + protected function getCurlHandler(string $endpoint): CurlHandle + { + if (!\array_key_exists($endpoint, $this->curlHandlers)) { + $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint); + } + + return $this->curlHandlers[$endpoint]; + } + + /** + * Starts a fresh curl session for the given endpoint and returns its handler. + */ + private function loadCurlHandle(string $endpoint): CurlHandle + { + $url = sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token); + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + return $ch; + } + + /** + * @param string[]|string $tag + * @return $this + */ + public function setTag(string|array $tag): self + { + if ('' === $tag || [] === $tag) { + $this->tag = []; + } else { + $this->tag = \is_array($tag) ? $tag : [$tag]; + } + + return $this; + } + + /** + * @param string[]|string $tag + * @return $this + */ + public function addTag(string|array $tag): self + { + if ('' !== $tag) { + $tag = \is_array($tag) ? $tag : [$tag]; + $this->tag = array_unique(array_merge($this->tag, $tag)); + } + + return $this; + } + + protected function write(LogRecord $record): void + { + $this->send($record->formatted, static::ENDPOINT_SINGLE); + } + + public function handleBatch(array $records): void + { + $level = $this->level; + + $records = array_filter($records, function ($record) use ($level) { + return ($record->level->value >= $level->value); + }); + + if (\count($records) > 0) { + $this->send($this->getFormatter()->formatBatch($records), static::ENDPOINT_BATCH); + } + } + + protected function send(string $data, string $endpoint): void + { + $ch = $this->getCurlHandler($endpoint); + + $headers = ['Content-Type: application/json']; + + if (\count($this->tag) > 0) { + $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); + } + + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + + Curl\Util::execute($ch, 5, false); + } + + protected function getDefaultFormatter(): FormatterInterface + { + return new LogglyFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php new file mode 100644 index 0000000..6aa1b31 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LogmaticFormatter; +use Monolog\LogRecord; + +/** + * @author Julien Breux + */ +class LogmaticHandler extends SocketHandler +{ + private string $logToken; + + private string $hostname; + + private string $appName; + + /** + * @param string $token Log token supplied by Logmatic. + * @param string $hostname Host name supplied by Logmatic. + * @param string $appName Application name supplied by Logmatic. + * @param bool $useSSL Whether or not SSL encryption should be used. + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct( + string $token, + string $hostname = '', + string $appName = '', + bool $useSSL = true, + $level = Level::Debug, + bool $bubble = true, + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + if ($useSSL && !\extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use SSL encrypted connection for LogmaticHandler'); + } + + $endpoint = $useSSL ? 'ssl://api.logmatic.io:10515' : 'api.logmatic.io:10514'; + $endpoint .= '/v1/'; + + parent::__construct( + $endpoint, + $level, + $bubble, + $persistent, + $timeout, + $writingTimeout, + $connectionTimeout, + $chunkSize + ); + + $this->logToken = $token; + $this->hostname = $hostname; + $this->appName = $appName; + } + + /** + * @inheritDoc + */ + protected function generateDataStream(LogRecord $record): string + { + return $this->logToken . ' ' . $record->formatted; + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + $formatter = new LogmaticFormatter(); + + if ($this->hostname !== '') { + $formatter->setHostname($this->hostname); + } + if ($this->appName !== '') { + $formatter->setAppName($this->appName); + } + + return $formatter; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php new file mode 100644 index 0000000..b6c8227 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\HtmlFormatter; +use Monolog\LogRecord; + +/** + * Base class for all mail handlers + * + * @author Gyula Sallai + */ +abstract class MailHandler extends AbstractProcessingHandler +{ + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + $messages = []; + + foreach ($records as $record) { + if ($record->level->isLowerThan($this->level)) { + continue; + } + + $message = $this->processRecord($record); + $messages[] = $message; + } + + if (\count($messages) > 0) { + $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); + } + } + + /** + * Send a mail with the given content + * + * @param string $content formatted email body to be sent + * @param array $records the array of log records that formed this content + * + * @phpstan-param non-empty-array $records + */ + abstract protected function send(string $content, array $records): void; + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->send((string) $record->formatted, [$record]); + } + + /** + * @phpstan-param non-empty-array $records + */ + protected function getHighestRecord(array $records): LogRecord + { + $highestRecord = null; + foreach ($records as $record) { + if ($highestRecord === null || $record->level->isHigherThan($highestRecord->level)) { + $highestRecord = $record; + } + } + + return $highestRecord; + } + + protected function isHtmlBody(string $body): bool + { + return ($body[0] ?? null) === '<'; + } + + /** + * Gets the default formatter. + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new HtmlFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php new file mode 100644 index 0000000..64e16c9 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Swift; +use Swift_Message; + +/** + * MandrillHandler uses cURL to send the emails to the Mandrill API + * + * @author Adam Nicholson + */ +class MandrillHandler extends MailHandler +{ + protected Swift_Message $message; + protected string $apiKey; + + /** + * @phpstan-param (Swift_Message|callable(): Swift_Message) $message + * + * @param string $apiKey A valid Mandrill API key + * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced + * + * @throws \InvalidArgumentException if not a Swift Message is set + */ + public function __construct(string $apiKey, callable|Swift_Message $message, int|string|Level $level = Level::Error, bool $bubble = true) + { + parent::__construct($level, $bubble); + + if (!$message instanceof Swift_Message) { + $message = $message(); + } + if (!$message instanceof Swift_Message) { + throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); + } + $this->message = $message; + $this->apiKey = $apiKey; + } + + /** + * @inheritDoc + */ + protected function send(string $content, array $records): void + { + $mime = 'text/plain'; + if ($this->isHtmlBody($content)) { + $mime = 'text/html'; + } + + $message = clone $this->message; + $message->setBody($content, $mime); + /** @phpstan-ignore-next-line */ + if (version_compare(Swift::VERSION, '6.0.0', '>=')) { + $message->setDate(new \DateTimeImmutable()); + } else { + /** @phpstan-ignore-next-line */ + $message->setDate(time()); + } + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ + 'key' => $this->apiKey, + 'raw_message' => (string) $message, + 'async' => false, + ])); + + Curl\Util::execute($ch); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php new file mode 100644 index 0000000..3965aee --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Exception can be thrown if an extension for a handler is missing + * + * @author Christian Bergau + */ +class MissingExtensionException extends \Exception +{ +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php new file mode 100644 index 0000000..33ab68c --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use MongoDB\Driver\BulkWrite; +use MongoDB\Driver\Manager; +use MongoDB\Client; +use Monolog\Level; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\MongoDBFormatter; +use Monolog\LogRecord; + +/** + * Logs to a MongoDB database. + * + * Usage example: + * + * $log = new \Monolog\Logger('application'); + * $client = new \MongoDB\Client('mongodb://localhost:27017'); + * $mongodb = new \Monolog\Handler\MongoDBHandler($client, 'logs', 'prod'); + * $log->pushHandler($mongodb); + * + * The above examples uses the MongoDB PHP library's client class; however, the + * MongoDB\Driver\Manager class from ext-mongodb is also supported. + */ +class MongoDBHandler extends AbstractProcessingHandler +{ + private \MongoDB\Collection $collection; + + private Client|Manager $manager; + + private string|null $namespace = null; + + /** + * Constructor. + * + * @param Client|Manager $mongodb MongoDB library or driver client + * @param string $database Database name + * @param string $collection Collection name + */ + public function __construct(Client|Manager $mongodb, string $database, string $collection, int|string|Level $level = Level::Debug, bool $bubble = true) + { + if ($mongodb instanceof Client) { + $this->collection = $mongodb->selectCollection($database, $collection); + } else { + $this->manager = $mongodb; + $this->namespace = $database . '.' . $collection; + } + + parent::__construct($level, $bubble); + } + + protected function write(LogRecord $record): void + { + if (isset($this->collection)) { + $this->collection->insertOne($record->formatted); + } + + if (isset($this->manager, $this->namespace)) { + $bulk = new BulkWrite; + $bulk->insert($record->formatted); + $this->manager->executeBulkWrite($this->namespace, $bulk); + } + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new MongoDBFormatter; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php new file mode 100644 index 0000000..c68b1dd --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Formatter\LineFormatter; + +/** + * NativeMailerHandler uses the mail() function to send the emails + * + * @author Christophe Coevoet + * @author Mark Garrett + */ +class NativeMailerHandler extends MailHandler +{ + /** + * The email addresses to which the message will be sent + * @var string[] + */ + protected array $to; + + /** + * The subject of the email + */ + protected string $subject; + + /** + * Optional headers for the message + * @var string[] + */ + protected array $headers = []; + + /** + * Optional parameters for the message + * @var string[] + */ + protected array $parameters = []; + + /** + * The wordwrap length for the message + */ + protected int $maxColumnWidth; + + /** + * The Content-type for the message + */ + protected string|null $contentType = null; + + /** + * The encoding for the message + */ + protected string $encoding = 'utf-8'; + + /** + * @param string|string[] $to The receiver of the mail + * @param string $subject The subject of the mail + * @param string $from The sender of the mail + * @param int $maxColumnWidth The maximum column width that the message lines will have + */ + public function __construct(string|array $to, string $subject, string $from, int|string|Level $level = Level::Error, bool $bubble = true, int $maxColumnWidth = 70) + { + parent::__construct($level, $bubble); + $this->to = (array) $to; + $this->subject = $subject; + $this->addHeader(sprintf('From: %s', $from)); + $this->maxColumnWidth = $maxColumnWidth; + } + + /** + * Add headers to the message + * + * @param string|string[] $headers Custom added headers + * @return $this + */ + public function addHeader($headers): self + { + foreach ((array) $headers as $header) { + if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { + throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); + } + $this->headers[] = $header; + } + + return $this; + } + + /** + * Add parameters to the message + * + * @param string|string[] $parameters Custom added parameters + * @return $this + */ + public function addParameter($parameters): self + { + $this->parameters = array_merge($this->parameters, (array) $parameters); + + return $this; + } + + /** + * @inheritDoc + */ + protected function send(string $content, array $records): void + { + $contentType = $this->getContentType() ?? ($this->isHtmlBody($content) ? 'text/html' : 'text/plain'); + + if ($contentType !== 'text/html') { + $content = wordwrap($content, $this->maxColumnWidth); + } + + $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); + $headers .= 'Content-type: ' . $contentType . '; charset=' . $this->getEncoding() . "\r\n"; + if ($contentType === 'text/html' && false === strpos($headers, 'MIME-Version:')) { + $headers .= 'MIME-Version: 1.0' . "\r\n"; + } + + $subjectFormatter = new LineFormatter($this->subject); + $subject = $subjectFormatter->format($this->getHighestRecord($records)); + + $parameters = implode(' ', $this->parameters); + foreach ($this->to as $to) { + mail($to, $subject, $content, $headers, $parameters); + } + } + + public function getContentType(): ?string + { + return $this->contentType; + } + + public function getEncoding(): string + { + return $this->encoding; + } + + /** + * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML messages. + * @return $this + */ + public function setContentType(string $contentType): self + { + if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { + throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); + } + + $this->contentType = $contentType; + + return $this; + } + + /** + * @return $this + */ + public function setEncoding(string $encoding): self + { + if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { + throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); + } + + $this->encoding = $encoding; + + return $this; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php new file mode 100644 index 0000000..4f28dd4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php @@ -0,0 +1,180 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Utils; +use Monolog\Formatter\NormalizerFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Class to record a log on a NewRelic application. + * Enabling New Relic High Security mode may prevent capture of useful information. + * + * This handler requires a NormalizerFormatter to function and expects an array in $record->formatted + * + * @see https://docs.newrelic.com/docs/agents/php-agent + * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security + */ +class NewRelicHandler extends AbstractProcessingHandler +{ + /** + * @inheritDoc + */ + public function __construct( + int|string|Level $level = Level::Error, + bool $bubble = true, + + /** + * Name of the New Relic application that will receive logs from this handler. + */ + protected string|null $appName = null, + + /** + * Some context and extra data is passed into the handler as arrays of values. Do we send them as is + * (useful if we are using the API), or explode them for display on the NewRelic RPM website? + */ + protected bool $explodeArrays = false, + + /** + * Name of the current transaction + */ + protected string|null $transactionName = null + ) { + parent::__construct($level, $bubble); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + if (!$this->isNewRelicEnabled()) { + throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); + } + + if (null !== ($appName = $this->getAppName($record->context))) { + $this->setNewRelicAppName($appName); + } + + if (null !== ($transactionName = $this->getTransactionName($record->context))) { + $this->setNewRelicTransactionName($transactionName); + unset($record->formatted['context']['transaction_name']); + } + + if (isset($record->context['exception']) && $record->context['exception'] instanceof \Throwable) { + newrelic_notice_error($record->message, $record->context['exception']); + unset($record->formatted['context']['exception']); + } else { + newrelic_notice_error($record->message); + } + + if (isset($record->formatted['context']) && \is_array($record->formatted['context'])) { + foreach ($record->formatted['context'] as $key => $parameter) { + if (\is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('context_' . $key, $parameter); + } + } + } + + if (isset($record->formatted['extra']) && \is_array($record->formatted['extra'])) { + foreach ($record->formatted['extra'] as $key => $parameter) { + if (\is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('extra_' . $key, $parameter); + } + } + } + } + + /** + * Checks whether the NewRelic extension is enabled in the system. + */ + protected function isNewRelicEnabled(): bool + { + return \extension_loaded('newrelic'); + } + + /** + * Returns the appname where this log should be sent. Each log can override the default appname, set in this + * handler's constructor, by providing the appname in it's context. + * + * @param mixed[] $context + */ + protected function getAppName(array $context): ?string + { + if (isset($context['appname'])) { + return $context['appname']; + } + + return $this->appName; + } + + /** + * Returns the name of the current transaction. Each log can override the default transaction name, set in this + * handler's constructor, by providing the transaction_name in it's context + * + * @param mixed[] $context + */ + protected function getTransactionName(array $context): ?string + { + if (isset($context['transaction_name'])) { + return $context['transaction_name']; + } + + return $this->transactionName; + } + + /** + * Sets the NewRelic application that should receive this log. + */ + protected function setNewRelicAppName(string $appName): void + { + newrelic_set_appname($appName); + } + + /** + * Overwrites the name of the current transaction + */ + protected function setNewRelicTransactionName(string $transactionName): void + { + newrelic_name_transaction($transactionName); + } + + /** + * @param mixed $value + */ + protected function setNewRelicParameter(string $key, $value): void + { + if (null === $value || \is_scalar($value)) { + newrelic_add_custom_parameter($key, $value); + } else { + newrelic_add_custom_parameter($key, Utils::jsonEncode($value, null, true)); + } + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new NormalizerFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php new file mode 100644 index 0000000..d9fea18 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\LogRecord; + +/** + * No-op + * + * This handler handles anything, but does nothing, and does not stop bubbling to the rest of the stack. + * This can be used for testing, or to disable a handler when overriding a configuration without + * influencing the rest of the stack. + * + * @author Roel Harbers + */ +class NoopHandler extends Handler +{ + /** + * @inheritDoc + */ + public function isHandling(LogRecord $record): bool + { + return true; + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + return false; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php new file mode 100644 index 0000000..1aa84e4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Psr\Log\LogLevel; +use Monolog\Logger; +use Monolog\LogRecord; + +/** + * Blackhole + * + * Any record it can handle will be thrown away. This can be used + * to put on top of an existing stack to override it temporarily. + * + * @author Jordi Boggiano + */ +class NullHandler extends Handler +{ + private Level $level; + + /** + * @param string|int|Level $level The minimum logging level at which this handler will be triggered + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function __construct(string|int|Level $level = Level::Debug) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @inheritDoc + */ + public function isHandling(LogRecord $record): bool + { + return $record->level->value >= $this->level->value; + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + return $record->level->value >= $this->level->value; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php new file mode 100644 index 0000000..b213a98 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php @@ -0,0 +1,139 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Handler to only pass log messages when a certain threshold of number of messages is reached. + * + * This can be useful in cases of processing a batch of data, but you're for example only interested + * in case it fails catastrophically instead of a warning for 1 or 2 events. Worse things can happen, right? + * + * Usage example: + * + * ``` + * $log = new Logger('application'); + * $handler = new SomeHandler(...) + * + * // Pass all warnings to the handler when more than 10 & all error messages when more then 5 + * $overflow = new OverflowHandler($handler, [Level::Warning->value => 10, Level::Error->value => 5]); + * + * $log->pushHandler($overflow); + *``` + * + * @author Kris Buist + */ +class OverflowHandler extends AbstractHandler implements FormattableHandlerInterface +{ + private HandlerInterface $handler; + + /** @var array */ + private array $thresholdMap = []; + + /** + * Buffer of all messages passed to the handler before the threshold was reached + * + * @var mixed[][] + */ + private array $buffer = []; + + /** + * @param array $thresholdMap Dictionary of log level value => threshold + */ + public function __construct( + HandlerInterface $handler, + array $thresholdMap = [], + $level = Level::Debug, + bool $bubble = true + ) { + $this->handler = $handler; + foreach ($thresholdMap as $thresholdLevel => $threshold) { + $this->thresholdMap[$thresholdLevel] = $threshold; + } + parent::__construct($level, $bubble); + } + + /** + * Handles a record. + * + * All records may be passed to this method, and the handler should discard + * those that it does not want to handle. + * + * The return value of this function controls the bubbling process of the handler stack. + * Unless the bubbling is interrupted (by returning true), the Logger class will keep on + * calling further handlers in the stack with a given log record. + * + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if ($record->level->isLowerThan($this->level)) { + return false; + } + + $level = $record->level->value; + + if (!isset($this->thresholdMap[$level])) { + $this->thresholdMap[$level] = 0; + } + + if ($this->thresholdMap[$level] > 0) { + // The overflow threshold is not yet reached, so we're buffering the record and lowering the threshold by 1 + $this->thresholdMap[$level]--; + $this->buffer[$level][] = $record; + + return false === $this->bubble; + } + + if ($this->thresholdMap[$level] == 0) { + // This current message is breaking the threshold. Flush the buffer and continue handling the current record + foreach ($this->buffer[$level] ?? [] as $buffered) { + $this->handler->handle($buffered); + } + $this->thresholdMap[$level]--; + unset($this->buffer[$level]); + } + + $this->handler->handle($record); + + return false === $this->bubble; + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + if ($this->handler instanceof FormattableHandlerInterface) { + $this->handler->setFormatter($formatter); + + return $this; + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); + } + + /** + * @inheritDoc + */ + public function getFormatter(): FormatterInterface + { + if ($this->handler instanceof FormattableHandlerInterface) { + return $this->handler->getFormatter(); + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php new file mode 100644 index 0000000..8aa78e4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php @@ -0,0 +1,303 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\Level; +use Monolog\Utils; +use PhpConsole\Connector; +use PhpConsole\Handler as VendorPhpConsoleHandler; +use PhpConsole\Helper; +use Monolog\LogRecord; +use PhpConsole\Storage; + +/** + * Monolog handler for Google Chrome extension "PHP Console" + * + * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely + * + * Usage: + * 1. Install Google Chrome extension [now dead and removed from the chrome store] + * 2. See overview https://github.com/barbushin/php-console#overview + * 3. Install PHP Console library https://github.com/barbushin/php-console#installation + * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) + * + * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); + * \Monolog\ErrorHandler::register($logger); + * echo $undefinedVar; + * $logger->debug('SELECT * FROM users', array('db', 'time' => 0.012)); + * PC::debug($_SERVER); // PHP Console debugger for any type of vars + * + * @author Sergey Barbushin https://www.linkedin.com/in/barbushin + * @phpstan-type Options array{ + * enabled: bool, + * classesPartialsTraceIgnore: string[], + * debugTagsKeysInContext: array, + * useOwnErrorsHandler: bool, + * useOwnExceptionsHandler: bool, + * sourcesBasePath: string|null, + * registerHelper: bool, + * serverEncoding: string|null, + * headersLimit: int|null, + * password: string|null, + * enableSslOnlyMode: bool, + * ipMasks: string[], + * enableEvalListener: bool, + * dumperDetectCallbacks: bool, + * dumperLevelLimit: int, + * dumperItemsCountLimit: int, + * dumperItemSizeLimit: int, + * dumperDumpSizeLimit: int, + * detectDumpTraceAndSource: bool, + * dataStorage: Storage|null + * } + * @phpstan-type InputOptions array{ + * enabled?: bool, + * classesPartialsTraceIgnore?: string[], + * debugTagsKeysInContext?: array, + * useOwnErrorsHandler?: bool, + * useOwnExceptionsHandler?: bool, + * sourcesBasePath?: string|null, + * registerHelper?: bool, + * serverEncoding?: string|null, + * headersLimit?: int|null, + * password?: string|null, + * enableSslOnlyMode?: bool, + * ipMasks?: string[], + * enableEvalListener?: bool, + * dumperDetectCallbacks?: bool, + * dumperLevelLimit?: int, + * dumperItemsCountLimit?: int, + * dumperItemSizeLimit?: int, + * dumperDumpSizeLimit?: int, + * detectDumpTraceAndSource?: bool, + * dataStorage?: Storage|null + * } + * + * @deprecated Since 2.8.0 and 3.2.0, PHPConsole is abandoned and thus we will drop this handler in Monolog 4 + */ +class PHPConsoleHandler extends AbstractProcessingHandler +{ + /** + * @phpstan-var Options + */ + private array $options = [ + 'enabled' => true, // bool Is PHP Console server enabled + 'classesPartialsTraceIgnore' => ['Monolog\\'], // array Hide calls of classes started with... + 'debugTagsKeysInContext' => [0, 'tag'], // bool Is PHP Console server enabled + 'useOwnErrorsHandler' => false, // bool Enable errors handling + 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling + 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths + 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') + 'serverEncoding' => null, // string|null Server internal encoding + 'headersLimit' => null, // int|null Set headers size limit for your web-server + 'password' => null, // string|null Protect PHP Console connection by password + 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed + 'ipMasks' => [], // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') + 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) + 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings + 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level + 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number + 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item + 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON + 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug + 'dataStorage' => null, // \PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) + ]; + + private Connector $connector; + + /** + * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details + * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) + * @throws \RuntimeException + * @phpstan-param InputOptions $options + */ + public function __construct(array $options = [], ?Connector $connector = null, int|string|Level $level = Level::Debug, bool $bubble = true) + { + if (!class_exists('PhpConsole\Connector')) { + throw new \RuntimeException('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); + } + parent::__construct($level, $bubble); + $this->options = $this->initOptions($options); + $this->connector = $this->initConnector($connector); + } + + /** + * @param array $options + * @return array + * + * @phpstan-param InputOptions $options + * @phpstan-return Options + */ + private function initOptions(array $options): array + { + $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); + if (\count($wrongOptions) > 0) { + throw new \RuntimeException('Unknown options: ' . implode(', ', $wrongOptions)); + } + + return array_replace($this->options, $options); + } + + private function initConnector(?Connector $connector = null): Connector + { + if (null === $connector) { + if ($this->options['dataStorage'] instanceof Storage) { + Connector::setPostponeStorage($this->options['dataStorage']); + } + $connector = Connector::getInstance(); + } + + if ($this->options['registerHelper'] && !Helper::isRegistered()) { + Helper::register(); + } + + if ($this->options['enabled'] && $connector->isActiveClient()) { + if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { + $handler = VendorPhpConsoleHandler::getInstance(); + $handler->setHandleErrors($this->options['useOwnErrorsHandler']); + $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); + $handler->start(); + } + if (null !== $this->options['sourcesBasePath']) { + $connector->setSourcesBasePath($this->options['sourcesBasePath']); + } + if (null !== $this->options['serverEncoding']) { + $connector->setServerEncoding($this->options['serverEncoding']); + } + if (null !== $this->options['password']) { + $connector->setPassword($this->options['password']); + } + if ($this->options['enableSslOnlyMode']) { + $connector->enableSslOnlyMode(); + } + if (\count($this->options['ipMasks']) > 0) { + $connector->setAllowedIpMasks($this->options['ipMasks']); + } + if (null !== $this->options['headersLimit'] && $this->options['headersLimit'] > 0) { + $connector->setHeadersLimit($this->options['headersLimit']); + } + if ($this->options['detectDumpTraceAndSource']) { + $connector->getDebugDispatcher()->detectTraceAndSource = true; + } + $dumper = $connector->getDumper(); + $dumper->levelLimit = $this->options['dumperLevelLimit']; + $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; + $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; + $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; + $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; + if ($this->options['enableEvalListener']) { + $connector->startEvalRequestsListener(); + } + } + + return $connector; + } + + public function getConnector(): Connector + { + return $this->connector; + } + + /** + * @return array + */ + public function getOptions(): array + { + return $this->options; + } + + public function handle(LogRecord $record): bool + { + if ($this->options['enabled'] && $this->connector->isActiveClient()) { + return parent::handle($record); + } + + return !$this->bubble; + } + + /** + * Writes the record down to the log of the implementing handler + */ + protected function write(LogRecord $record): void + { + if ($record->level->isLowerThan(Level::Notice)) { + $this->handleDebugRecord($record); + } elseif (isset($record->context['exception']) && $record->context['exception'] instanceof \Throwable) { + $this->handleExceptionRecord($record); + } else { + $this->handleErrorRecord($record); + } + } + + private function handleDebugRecord(LogRecord $record): void + { + [$tags, $filteredContext] = $this->getRecordTags($record); + $message = $record->message; + if (\count($filteredContext) > 0) { + $message .= ' ' . Utils::jsonEncode($this->connector->getDumper()->dump(array_filter($filteredContext)), null, true); + } + $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); + } + + private function handleExceptionRecord(LogRecord $record): void + { + $this->connector->getErrorsDispatcher()->dispatchException($record->context['exception']); + } + + private function handleErrorRecord(LogRecord $record): void + { + $context = $record->context; + + $this->connector->getErrorsDispatcher()->dispatchError( + $context['code'] ?? null, + $context['message'] ?? $record->message, + $context['file'] ?? null, + $context['line'] ?? null, + $this->options['classesPartialsTraceIgnore'] + ); + } + + /** + * @return array{string, mixed[]} + */ + private function getRecordTags(LogRecord $record): array + { + $tags = null; + $filteredContext = []; + if ($record->context !== []) { + $filteredContext = $record->context; + foreach ($this->options['debugTagsKeysInContext'] as $key) { + if (isset($filteredContext[$key])) { + $tags = $filteredContext[$key]; + if ($key === 0) { + array_shift($filteredContext); + } else { + unset($filteredContext[$key]); + } + break; + } + } + } + + return [$tags ?? $record->level->toPsrLogLevel(), $filteredContext]; + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter('%message%'); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php new file mode 100644 index 0000000..8b68e64 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php @@ -0,0 +1,186 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Stores to STDIN of any process, specified by a command. + * + * Usage example: + *
+ * $log = new Logger('myLogger');
+ * $log->pushHandler(new ProcessHandler('/usr/bin/php /var/www/monolog/someScript.php'));
+ * 
+ * + * @author Kolja Zuelsdorf + */ +class ProcessHandler extends AbstractProcessingHandler +{ + /** + * Holds the process to receive data on its STDIN. + * + * @var resource|bool|null + */ + private $process; + + private string $command; + + private ?string $cwd; + + /** + * @var resource[] + */ + private array $pipes = []; + + /** + * @var array + */ + protected const DESCRIPTOR_SPEC = [ + 0 => ['pipe', 'r'], // STDIN is a pipe that the child will read from + 1 => ['pipe', 'w'], // STDOUT is a pipe that the child will write to + 2 => ['pipe', 'w'], // STDERR is a pipe to catch the any errors + ]; + + /** + * @param string $command Command for the process to start. Absolute paths are recommended, + * especially if you do not use the $cwd parameter. + * @param string|null $cwd "Current working directory" (CWD) for the process to be executed in. + * @throws \InvalidArgumentException + */ + public function __construct(string $command, int|string|Level $level = Level::Debug, bool $bubble = true, ?string $cwd = null) + { + if ($command === '') { + throw new \InvalidArgumentException('The command argument must be a non-empty string.'); + } + if ($cwd === '') { + throw new \InvalidArgumentException('The optional CWD argument must be a non-empty string or null.'); + } + + parent::__construct($level, $bubble); + + $this->command = $command; + $this->cwd = $cwd; + } + + /** + * Writes the record down to the log of the implementing handler + * + * @throws \UnexpectedValueException + */ + protected function write(LogRecord $record): void + { + $this->ensureProcessIsStarted(); + + $this->writeProcessInput($record->formatted); + + $errors = $this->readProcessErrors(); + if ($errors !== '') { + throw new \UnexpectedValueException(sprintf('Errors while writing to process: %s', $errors)); + } + } + + /** + * Makes sure that the process is actually started, and if not, starts it, + * assigns the stream pipes, and handles startup errors, if any. + */ + private function ensureProcessIsStarted(): void + { + if (\is_resource($this->process) === false) { + $this->startProcess(); + + $this->handleStartupErrors(); + } + } + + /** + * Starts the actual process and sets all streams to non-blocking. + */ + private function startProcess(): void + { + $this->process = proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd); + + foreach ($this->pipes as $pipe) { + stream_set_blocking($pipe, false); + } + } + + /** + * Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any. + * + * @throws \UnexpectedValueException + */ + private function handleStartupErrors(): void + { + $selected = $this->selectErrorStream(); + if (false === $selected) { + throw new \UnexpectedValueException('Something went wrong while selecting a stream.'); + } + + $errors = $this->readProcessErrors(); + + if (\is_resource($this->process) === false || $errors !== '') { + throw new \UnexpectedValueException( + sprintf('The process "%s" could not be opened: ' . $errors, $this->command) + ); + } + } + + /** + * Selects the STDERR stream. + * + * @return int|bool + */ + protected function selectErrorStream() + { + $empty = []; + $errorPipes = [$this->pipes[2]]; + + return stream_select($errorPipes, $empty, $empty, 1); + } + + /** + * Reads the errors of the process, if there are any. + * + * @codeCoverageIgnore + * @return string Empty string if there are no errors. + */ + protected function readProcessErrors(): string + { + return (string) stream_get_contents($this->pipes[2]); + } + + /** + * Writes to the input stream of the opened process. + * + * @codeCoverageIgnore + */ + protected function writeProcessInput(string $string): void + { + fwrite($this->pipes[0], $string); + } + + /** + * @inheritDoc + */ + public function close(): void + { + if (\is_resource($this->process)) { + foreach ($this->pipes as $pipe) { + fclose($pipe); + } + proc_close($this->process); + $this->process = null; + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php new file mode 100644 index 0000000..9fb290f --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Processor\ProcessorInterface; +use Monolog\LogRecord; + +/** + * Interface to describe loggers that have processors + * + * @author Jordi Boggiano + */ +interface ProcessableHandlerInterface +{ + /** + * Adds a processor in the stack. + * + * @phpstan-param ProcessorInterface|(callable(LogRecord): LogRecord) $callback + * + * @param ProcessorInterface|callable $callback + * @return HandlerInterface self + */ + public function pushProcessor(callable $callback): HandlerInterface; + + /** + * Removes the processor on top of the stack and returns it. + * + * @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord) $callback + * + * @throws \LogicException In case the processor stack is empty + * @return callable|ProcessorInterface + */ + public function popProcessor(): callable; +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php new file mode 100644 index 0000000..74eeddd --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\ResettableInterface; +use Monolog\Processor\ProcessorInterface; +use Monolog\LogRecord; + +/** + * Helper trait for implementing ProcessableInterface + * + * @author Jordi Boggiano + */ +trait ProcessableHandlerTrait +{ + /** + * @var callable[] + * @phpstan-var array<(callable(LogRecord): LogRecord)|ProcessorInterface> + */ + protected array $processors = []; + + /** + * @inheritDoc + */ + public function pushProcessor(callable $callback): HandlerInterface + { + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * @inheritDoc + */ + public function popProcessor(): callable + { + if (\count($this->processors) === 0) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + protected function processRecord(LogRecord $record): LogRecord + { + foreach ($this->processors as $processor) { + $record = $processor($record); + } + + return $record; + } + + protected function resetProcessors(): void + { + foreach ($this->processors as $processor) { + if ($processor instanceof ResettableInterface) { + $processor->reset(); + } + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php new file mode 100644 index 0000000..100e8e4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php @@ -0,0 +1,92 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Psr\Log\LoggerInterface; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Proxies log messages to an existing PSR-3 compliant logger. + * + * If a formatter is configured, the formatter's output MUST be a string and the + * formatted message will be fed to the wrapped PSR logger instead of the original + * log record's message. + * + * @author Michael Moussa + */ +class PsrHandler extends AbstractHandler implements FormattableHandlerInterface +{ + /** + * PSR-3 compliant logger + */ + protected LoggerInterface $logger; + + protected FormatterInterface|null $formatter = null; + private bool $includeExtra; + + /** + * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied + */ + public function __construct(LoggerInterface $logger, int|string|Level $level = Level::Debug, bool $bubble = true, bool $includeExtra = false) + { + parent::__construct($level, $bubble); + + $this->logger = $logger; + $this->includeExtra = $includeExtra; + } + + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if (!$this->isHandling($record)) { + return false; + } + + $message = $this->formatter !== null + ? (string) $this->formatter->format($record) + : $record->message; + + $context = $this->includeExtra + ? [...$record->extra, ...$record->context] + : $record->context; + + $this->logger->log($record->level->toPsrLogLevel(), $message, $context); + + return false === $this->bubble; + } + + /** + * Sets the formatter. + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + $this->formatter = $formatter; + + return $this; + } + + /** + * Gets the formatter. + */ + public function getFormatter(): FormatterInterface + { + if ($this->formatter === null) { + throw new \LogicException('No formatter has been set and this handler does not have a default formatter'); + } + + return $this->formatter; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php new file mode 100644 index 0000000..b2a7895 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php @@ -0,0 +1,246 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Logger; +use Monolog\Utils; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Sends notifications through the pushover api to mobile phones + * + * @author Sebastian Gรถttschkes + * @see https://www.pushover.net/api + */ +class PushoverHandler extends SocketHandler +{ + private string $token; + + /** @var array */ + private array $users; + + private string $title; + + private string|int|null $user = null; + + private int $retry; + + private int $expire; + + private Level $highPriorityLevel; + + private Level $emergencyLevel; + + private bool $useFormattedMessage = false; + + /** + * All parameters that can be sent to Pushover + * @see https://pushover.net/api + * @var array + */ + private array $parameterNames = [ + 'token' => true, + 'user' => true, + 'message' => true, + 'device' => true, + 'title' => true, + 'url' => true, + 'url_title' => true, + 'priority' => true, + 'timestamp' => true, + 'sound' => true, + 'retry' => true, + 'expire' => true, + 'callback' => true, + ]; + + /** + * Sounds the api supports by default + * @see https://pushover.net/api#sounds + * @var string[] + */ + private array $sounds = [ + 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', + 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', + 'persistent', 'echo', 'updown', 'none', + ]; + + /** + * @param string $token Pushover api token + * @param string|array $users Pushover user id or array of ids the message will be sent to + * @param string|null $title Title sent to the Pushover API + * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not + * the pushover.net app owner. OpenSSL is required for this option. + * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will + * send the same notification to the user. + * @param int $expire The expire parameter specifies how many seconds your notification will continue + * to be retried for (every retry seconds). + * + * @param int|string|Level|LogLevel::* $highPriorityLevel The minimum logging level at which this handler will start + * sending "high priority" requests to the Pushover API + * @param int|string|Level|LogLevel::* $emergencyLevel The minimum logging level at which this handler will start + * sending "emergency" requests to the Pushover API + * + * + * @phpstan-param string|array $users + * @phpstan-param value-of|value-of|Level|LogLevel::* $highPriorityLevel + * @phpstan-param value-of|value-of|Level|LogLevel::* $emergencyLevel + */ + public function __construct( + string $token, + $users, + ?string $title = null, + int|string|Level $level = Level::Critical, + bool $bubble = true, + bool $useSSL = true, + int|string|Level $highPriorityLevel = Level::Critical, + int|string|Level $emergencyLevel = Level::Emergency, + int $retry = 30, + int $expire = 25200, + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; + parent::__construct( + $connectionString, + $level, + $bubble, + $persistent, + $timeout, + $writingTimeout, + $connectionTimeout, + $chunkSize + ); + + $this->token = $token; + $this->users = (array) $users; + $this->title = $title ?? (string) gethostname(); + $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); + $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); + $this->retry = $retry; + $this->expire = $expire; + } + + protected function generateDataStream(LogRecord $record): string + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + private function buildContent(LogRecord $record): string + { + // Pushover has a limit of 512 characters on title and message combined. + $maxMessageLength = 512 - \strlen($this->title); + + $message = ($this->useFormattedMessage) ? $record->formatted : $record->message; + $message = Utils::substr($message, 0, $maxMessageLength); + + $timestamp = $record->datetime->getTimestamp(); + + $dataArray = [ + 'token' => $this->token, + 'user' => $this->user, + 'message' => $message, + 'title' => $this->title, + 'timestamp' => $timestamp, + ]; + + if ($record->level->value >= $this->emergencyLevel->value) { + $dataArray['priority'] = 2; + $dataArray['retry'] = $this->retry; + $dataArray['expire'] = $this->expire; + } elseif ($record->level->value >= $this->highPriorityLevel->value) { + $dataArray['priority'] = 1; + } + + // First determine the available parameters + $context = array_intersect_key($record->context, $this->parameterNames); + $extra = array_intersect_key($record->extra, $this->parameterNames); + + // Least important info should be merged with subsequent info + $dataArray = array_merge($extra, $context, $dataArray); + + // Only pass sounds that are supported by the API + if (isset($dataArray['sound']) && !\in_array($dataArray['sound'], $this->sounds, true)) { + unset($dataArray['sound']); + } + + return http_build_query($dataArray); + } + + private function buildHeader(string $content): string + { + $header = "POST /1/messages.json HTTP/1.1\r\n"; + $header .= "Host: api.pushover.net\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . \strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + protected function write(LogRecord $record): void + { + foreach ($this->users as $user) { + $this->user = $user; + + parent::write($record); + $this->closeSocket(); + } + + $this->user = null; + } + + /** + * @param int|string|Level|LogLevel::* $level + * @return $this + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function setHighPriorityLevel(int|string|Level $level): self + { + $this->highPriorityLevel = Logger::toMonologLevel($level); + + return $this; + } + + /** + * @param int|string|Level|LogLevel::* $level + * @return $this + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function setEmergencyLevel(int|string|Level $level): self + { + $this->emergencyLevel = Logger::toMonologLevel($level); + + return $this; + } + + /** + * Use the formatted message? + * + * @return $this + */ + public function useFormattedMessage(bool $useFormattedMessage): self + { + $this->useFormattedMessage = $useFormattedMessage; + + return $this; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php new file mode 100644 index 0000000..66cb324 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php @@ -0,0 +1,94 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\Level; +use Monolog\LogRecord; +use Predis\Client as Predis; +use Redis; + +/** + * Logs to a Redis key using rpush + * + * usage example: + * + * $log = new Logger('application'); + * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs"); + * $log->pushHandler($redis); + * + * @author Thomas Tourlourat + */ +class RedisHandler extends AbstractProcessingHandler +{ + /** @var Predis|Redis */ + private Predis|Redis $redisClient; + private string $redisKey; + protected int $capSize; + + /** + * @param Predis|Redis $redis The redis instance + * @param string $key The key name to push records to + * @param int $capSize Number of entries to limit list size to, 0 = unlimited + */ + public function __construct(Predis|Redis $redis, string $key, int|string|Level $level = Level::Debug, bool $bubble = true, int $capSize = 0) + { + $this->redisClient = $redis; + $this->redisKey = $key; + $this->capSize = $capSize; + + parent::__construct($level, $bubble); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + if ($this->capSize > 0) { + $this->writeCapped($record); + } else { + $this->redisClient->rpush($this->redisKey, $record->formatted); + } + } + + /** + * Write and cap the collection + * Writes the record to the redis list and caps its + */ + protected function writeCapped(LogRecord $record): void + { + if ($this->redisClient instanceof Redis) { + $mode = \defined('Redis::MULTI') ? Redis::MULTI : 1; + $this->redisClient->multi($mode) + ->rPush($this->redisKey, $record->formatted) + ->lTrim($this->redisKey, -$this->capSize, -1) + ->exec(); + } else { + $redisKey = $this->redisKey; + $capSize = $this->capSize; + $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { + $tx->rpush($redisKey, $record->formatted); + $tx->ltrim($redisKey, -$capSize, -1); + }); + } + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php new file mode 100644 index 0000000..fa8e9e9 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\Level; +use Monolog\LogRecord; +use Predis\Client as Predis; +use Redis; + +/** + * Sends the message to a Redis Pub/Sub channel using PUBLISH + * + * usage example: + * + * $log = new Logger('application'); + * $redis = new RedisPubSubHandler(new Predis\Client("tcp://localhost:6379"), "logs", Level::Warning); + * $log->pushHandler($redis); + * + * @author Gaรซtan Faugรจre + */ +class RedisPubSubHandler extends AbstractProcessingHandler +{ + /** @var Predis|Redis */ + private Predis|Redis $redisClient; + private string $channelKey; + + /** + * @param Predis|Redis $redis The redis instance + * @param string $key The channel key to publish records to + */ + public function __construct(Predis|Redis $redis, string $key, int|string|Level $level = Level::Debug, bool $bubble = true) + { + $this->redisClient = $redis; + $this->channelKey = $key; + + parent::__construct($level, $bubble); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->redisClient->publish($this->channelKey, $record->formatted); + } + + /** + * @inheritDoc + */ + protected function getDefaultFormatter(): FormatterInterface + { + return new LineFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php new file mode 100644 index 0000000..1d12472 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Rollbar\RollbarLogger; +use Throwable; +use Monolog\LogRecord; + +/** + * Sends errors to Rollbar + * + * If the context data contains a `payload` key, that is used as an array + * of payload options to RollbarLogger's log method. + * + * Rollbar's context info will contain the context + extra keys from the log record + * merged, and then on top of that a few keys: + * + * - level (rollbar level name) + * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) + * - channel + * - datetime (unix timestamp) + * + * @author Paul Statezny + */ +class RollbarHandler extends AbstractProcessingHandler +{ + protected RollbarLogger $rollbarLogger; + + /** + * Records whether any log records have been added since the last flush of the rollbar notifier + */ + private bool $hasRecords = false; + + protected bool $initialized = false; + + /** + * @param RollbarLogger $rollbarLogger RollbarLogger object constructed with valid token + */ + public function __construct(RollbarLogger $rollbarLogger, int|string|Level $level = Level::Error, bool $bubble = true) + { + $this->rollbarLogger = $rollbarLogger; + + parent::__construct($level, $bubble); + } + + /** + * Translates Monolog log levels to Rollbar levels. + * + * @return 'debug'|'info'|'warning'|'error'|'critical' + */ + protected function toRollbarLevel(Level $level): string + { + return match ($level) { + Level::Debug => 'debug', + Level::Info => 'info', + Level::Notice => 'info', + Level::Warning => 'warning', + Level::Error => 'error', + Level::Critical => 'critical', + Level::Alert => 'critical', + Level::Emergency => 'critical', + }; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function([$this, 'close']); + $this->initialized = true; + } + + $context = $record->context; + $context = array_merge($context, $record->extra, [ + 'level' => $this->toRollbarLevel($record->level), + 'monolog_level' => $record->level->getName(), + 'channel' => $record->channel, + 'datetime' => $record->datetime->format('U'), + ]); + + if (isset($context['exception']) && $context['exception'] instanceof Throwable) { + $exception = $context['exception']; + unset($context['exception']); + $toLog = $exception; + } else { + $toLog = $record->message; + } + + // @phpstan-ignore-next-line + $this->rollbarLogger->log($context['level'], $toLog, $context); + + $this->hasRecords = true; + } + + public function flush(): void + { + if ($this->hasRecords) { + $this->rollbarLogger->flush(); + $this->hasRecords = false; + } + } + + /** + * @inheritDoc + */ + public function close(): void + { + $this->flush(); + } + + /** + * @inheritDoc + */ + public function reset(): void + { + $this->flush(); + + parent::reset(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php new file mode 100644 index 0000000..32a496b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use InvalidArgumentException; +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Stores logs to files that are rotated every day and a limited number of files are kept. + * + * This rotation is only intended to be used as a workaround. Using logrotate to + * handle the rotation is strongly encouraged when you can use it. + * + * @author Christophe Coevoet + * @author Jordi Boggiano + */ +class RotatingFileHandler extends StreamHandler +{ + public const FILE_PER_DAY = 'Y-m-d'; + public const FILE_PER_MONTH = 'Y-m'; + public const FILE_PER_YEAR = 'Y'; + + protected string $filename; + protected int $maxFiles; + protected bool|null $mustRotate = null; + protected \DateTimeImmutable $nextRotation; + protected string $filenameFormat; + protected string $dateFormat; + + /** + * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) + * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) + * @param bool $useLocking Try to lock log file before doing any writes + */ + public function __construct(string $filename, int $maxFiles = 0, int|string|Level $level = Level::Debug, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false, string $dateFormat = self::FILE_PER_DAY, string $filenameFormat = '{filename}-{date}') + { + $this->filename = Utils::canonicalizePath($filename); + $this->maxFiles = $maxFiles; + $this->setFilenameFormat($filenameFormat, $dateFormat); + $this->nextRotation = $this->getNextRotation(); + + parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); + } + + /** + * @inheritDoc + */ + public function close(): void + { + parent::close(); + + if (true === $this->mustRotate) { + $this->rotate(); + } + } + + /** + * @inheritDoc + */ + public function reset(): void + { + parent::reset(); + + if (true === $this->mustRotate) { + $this->rotate(); + } + } + + /** + * @return $this + */ + public function setFilenameFormat(string $filenameFormat, string $dateFormat): self + { + $this->setDateFormat($dateFormat); + if (substr_count($filenameFormat, '{date}') === 0) { + throw new InvalidArgumentException( + 'Invalid filename format - format must contain at least `{date}`, because otherwise rotating is impossible.' + ); + } + $this->filenameFormat = $filenameFormat; + $this->url = $this->getTimedFilename(); + $this->close(); + + return $this; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + // on the first record written, if the log is new, we should rotate (once per day) + if (null === $this->mustRotate) { + $this->mustRotate = null === $this->url || !file_exists($this->url); + } + + if ($this->nextRotation <= $record->datetime) { + $this->mustRotate = true; + $this->close(); + } + + parent::write($record); + } + + /** + * Rotates the files. + */ + protected function rotate(): void + { + // update filename + $this->url = $this->getTimedFilename(); + $this->nextRotation = $this->getNextRotation(); + + // skip GC of old logs if files are unlimited + if (0 === $this->maxFiles) { + return; + } + + $logFiles = glob($this->getGlobPattern()); + if (false === $logFiles) { + // failed to glob + return; + } + + if ($this->maxFiles >= \count($logFiles)) { + // no files to remove + return; + } + + // Sorting the files by name to remove the older ones + usort($logFiles, function ($a, $b) { + return strcmp($b, $a); + }); + + foreach (\array_slice($logFiles, $this->maxFiles) as $file) { + if (is_writable($file)) { + // suppress errors here as unlink() might fail if two processes + // are cleaning up/rotating at the same time + set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool { + return false; + }); + unlink($file); + restore_error_handler(); + } + } + + $this->mustRotate = false; + } + + protected function getTimedFilename(): string + { + $fileInfo = pathinfo($this->filename); + $timedFilename = str_replace( + ['{filename}', '{date}'], + [$fileInfo['filename'], date($this->dateFormat)], + ($fileInfo['dirname'] ?? '') . '/' . $this->filenameFormat + ); + + if (isset($fileInfo['extension'])) { + $timedFilename .= '.'.$fileInfo['extension']; + } + + return $timedFilename; + } + + protected function getGlobPattern(): string + { + $fileInfo = pathinfo($this->filename); + $glob = str_replace( + ['{filename}', '{date}'], + [$fileInfo['filename'], str_replace( + ['Y', 'y', 'm', 'd'], + ['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'], + $this->dateFormat + )], + ($fileInfo['dirname'] ?? '') . '/' . $this->filenameFormat + ); + if (isset($fileInfo['extension'])) { + $glob .= '.'.$fileInfo['extension']; + } + + return $glob; + } + + protected function setDateFormat(string $dateFormat): void + { + if (0 === preg_match('{^[Yy](([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { + throw new InvalidArgumentException( + 'Invalid date format - format must be one of '. + 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. + 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. + 'date formats using slashes, underscores and/or dots instead of dashes.' + ); + } + $this->dateFormat = $dateFormat; + } + + protected function getNextRotation(): \DateTimeImmutable + { + return match (str_replace(['/','_','.'], '-', $this->dateFormat)) { + self::FILE_PER_MONTH => (new \DateTimeImmutable('first day of next month'))->setTime(0, 0, 0), + self::FILE_PER_YEAR => (new \DateTimeImmutable('first day of January next year'))->setTime(0, 0, 0), + default => (new \DateTimeImmutable('tomorrow'))->setTime(0, 0, 0), + }; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php new file mode 100644 index 0000000..1b10580 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Closure; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Sampling handler + * + * A sampled event stream can be useful for logging high frequency events in + * a production environment where you only need an idea of what is happening + * and are not concerned with capturing every occurrence. Since the decision to + * handle or not handle a particular event is determined randomly, the + * resulting sampled log is not guaranteed to contain 1/N of the events that + * occurred in the application, but based on the Law of large numbers, it will + * tend to be close to this ratio with a large number of attempts. + * + * @author Bryan Davis + * @author Kunal Mehta + */ +class SamplingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface +{ + use ProcessableHandlerTrait; + + /** + * Handler or factory Closure($record, $this) + * + * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface + */ + protected Closure|HandlerInterface $handler; + + protected int $factor; + + /** + * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler + * + * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $samplingHandler). + * @param int $factor Sample factor (e.g. 10 means every ~10th record is sampled) + */ + public function __construct(Closure|HandlerInterface $handler, int $factor) + { + parent::__construct(); + $this->handler = $handler; + $this->factor = $factor; + } + + public function isHandling(LogRecord $record): bool + { + return $this->getHandler($record)->isHandling($record); + } + + public function handle(LogRecord $record): bool + { + if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + $this->getHandler($record)->handle($record); + } + + return false === $this->bubble; + } + + /** + * Return the nested handler + * + * If the handler was provided as a factory, this will trigger the handler's instantiation. + */ + public function getHandler(LogRecord|null $record = null): HandlerInterface + { + if (!$this->handler instanceof HandlerInterface) { + $handler = ($this->handler)($record, $this); + if (!$handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory Closure should return a HandlerInterface"); + } + $this->handler = $handler; + } + + return $this->handler; + } + + /** + * @inheritDoc + */ + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + $handler = $this->getHandler(); + if ($handler instanceof FormattableHandlerInterface) { + $handler->setFormatter($formatter); + + return $this; + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); + } + + /** + * @inheritDoc + */ + public function getFormatter(): FormatterInterface + { + $handler = $this->getHandler(); + if ($handler instanceof FormattableHandlerInterface) { + return $handler->getFormatter(); + } + + throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php new file mode 100644 index 0000000..0a6fe40 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; + +/** + * SendGridrHandler uses the SendGrid API v2 function to send Log emails, more information in https://sendgrid.com/docs/API_Reference/Web_API/mail.html + * + * @author Ricardo Fontanelli + */ +class SendGridHandler extends MailHandler +{ + /** + * The SendGrid API User + */ + protected string $apiUser; + + /** + * The SendGrid API Key + */ + protected string $apiKey; + + /** + * The email addresses to which the message will be sent + */ + protected string $from; + + /** + * The email addresses to which the message will be sent + * @var string[] + */ + protected array $to; + + /** + * The subject of the email + */ + protected string $subject; + + /** + * @param string $apiUser The SendGrid API User + * @param string $apiKey The SendGrid API Key + * @param string $from The sender of the email + * @param string|string[] $to The recipients of the email + * @param string $subject The subject of the mail + * + * @throws MissingExtensionException If the curl extension is missing + */ + public function __construct(string $apiUser, string $apiKey, string $from, string|array $to, string $subject, int|string|Level $level = Level::Error, bool $bubble = true) + { + if (!\extension_loaded('curl')) { + throw new MissingExtensionException('The curl extension is needed to use the SendGridHandler'); + } + + parent::__construct($level, $bubble); + $this->apiUser = $apiUser; + $this->apiKey = $apiKey; + $this->from = $from; + $this->to = (array) $to; + $this->subject = $subject; + } + + /** + * @inheritDoc + */ + protected function send(string $content, array $records): void + { + $message = []; + $message['api_user'] = $this->apiUser; + $message['api_key'] = $this->apiKey; + $message['from'] = $this->from; + foreach ($this->to as $recipient) { + $message['to[]'] = $recipient; + } + $message['subject'] = $this->subject; + $message['date'] = date('r'); + + if ($this->isHtmlBody($content)) { + $message['html'] = $content; + } else { + $message['text'] = $content; + } + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json'); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($message)); + Curl\Util::execute($ch, 2); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php new file mode 100644 index 0000000..a10d6d6 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php @@ -0,0 +1,381 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Slack; + +use Monolog\Level; +use Monolog\Utils; +use Monolog\Formatter\NormalizerFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\LogRecord; + +/** + * Slack record utility helping to log to Slack webhooks or API. + * + * @author Greg Kedzierski + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + * @see https://api.slack.com/docs/message-attachments + */ +class SlackRecord +{ + public const COLOR_DANGER = 'danger'; + + public const COLOR_WARNING = 'warning'; + + public const COLOR_GOOD = 'good'; + + public const COLOR_DEFAULT = '#e3e4e6'; + + /** + * Slack channel (encoded ID or name) + */ + private string|null $channel; + + /** + * Name of a bot + */ + private string|null $username; + + /** + * User icon e.g. 'ghost', 'http://example.com/user.png' + */ + private string|null $userIcon; + + /** + * Whether the message should be added to Slack as attachment (plain text otherwise) + */ + private bool $useAttachment; + + /** + * Whether the the context/extra messages added to Slack as attachments are in a short style + */ + private bool $useShortAttachment; + + /** + * Whether the attachment should include context and extra data + */ + private bool $includeContextAndExtra; + + /** + * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * @var string[] + */ + private array $excludeFields; + + private FormatterInterface|null $formatter; + + private NormalizerFormatter $normalizerFormatter; + + /** + * @param string[] $excludeFields + */ + public function __construct( + ?string $channel = null, + ?string $username = null, + bool $useAttachment = true, + ?string $userIcon = null, + bool $useShortAttachment = false, + bool $includeContextAndExtra = false, + array $excludeFields = [], + FormatterInterface|null $formatter = null + ) { + $this + ->setChannel($channel) + ->setUsername($username) + ->useAttachment($useAttachment) + ->setUserIcon($userIcon) + ->useShortAttachment($useShortAttachment) + ->includeContextAndExtra($includeContextAndExtra) + ->excludeFields($excludeFields) + ->setFormatter($formatter); + + if ($this->includeContextAndExtra) { + $this->normalizerFormatter = new NormalizerFormatter(); + } + } + + /** + * Returns required data in format that Slack + * is expecting. + * + * @phpstan-return mixed[] + */ + public function getSlackData(LogRecord $record): array + { + $dataArray = []; + + if ($this->username !== null) { + $dataArray['username'] = $this->username; + } + + if ($this->channel !== null) { + $dataArray['channel'] = $this->channel; + } + + if ($this->formatter !== null && !$this->useAttachment) { + $message = $this->formatter->format($record); + } else { + $message = $record->message; + } + + $recordData = $this->removeExcludedFields($record); + + if ($this->useAttachment) { + $attachment = [ + 'fallback' => $message, + 'text' => $message, + 'color' => $this->getAttachmentColor($record->level), + 'fields' => [], + 'mrkdwn_in' => ['fields'], + 'ts' => $recordData['datetime']->getTimestamp(), + 'footer' => $this->username, + 'footer_icon' => $this->userIcon, + ]; + + if ($this->useShortAttachment) { + $attachment['title'] = $recordData['level_name']; + } else { + $attachment['title'] = 'Message'; + $attachment['fields'][] = $this->generateAttachmentField('Level', $recordData['level_name']); + } + + if ($this->includeContextAndExtra) { + foreach (['extra', 'context'] as $key) { + if (!isset($recordData[$key]) || \count($recordData[$key]) === 0) { + continue; + } + + if ($this->useShortAttachment) { + $attachment['fields'][] = $this->generateAttachmentField( + $key, + $recordData[$key] + ); + } else { + // Add all extra fields as individual fields in attachment + $attachment['fields'] = array_merge( + $attachment['fields'], + $this->generateAttachmentFields($recordData[$key]) + ); + } + } + } + + $dataArray['attachments'] = [$attachment]; + } else { + $dataArray['text'] = $message; + } + + if ($this->userIcon !== null) { + if (false !== ($iconUrl = filter_var($this->userIcon, FILTER_VALIDATE_URL))) { + $dataArray['icon_url'] = $iconUrl; + } else { + $dataArray['icon_emoji'] = ":{$this->userIcon}:"; + } + } + + return $dataArray; + } + + /** + * Returns a Slack message attachment color associated with + * provided level. + */ + public function getAttachmentColor(Level $level): string + { + return match ($level) { + Level::Error, Level::Critical, Level::Alert, Level::Emergency => static::COLOR_DANGER, + Level::Warning => static::COLOR_WARNING, + Level::Info, Level::Notice => static::COLOR_GOOD, + Level::Debug => static::COLOR_DEFAULT + }; + } + + /** + * Stringifies an array of key/value pairs to be used in attachment fields + * + * @param mixed[] $fields + */ + public function stringify(array $fields): string + { + /** @var array $normalized */ + $normalized = $this->normalizerFormatter->normalizeValue($fields); + + $hasSecondDimension = \count(array_filter($normalized, 'is_array')) > 0; + $hasOnlyNonNumericKeys = \count(array_filter(array_keys($normalized), 'is_numeric')) === 0; + + return $hasSecondDimension || $hasOnlyNonNumericKeys + ? Utils::jsonEncode($normalized, JSON_PRETTY_PRINT|Utils::DEFAULT_JSON_FLAGS) + : Utils::jsonEncode($normalized, Utils::DEFAULT_JSON_FLAGS); + } + + /** + * Channel used by the bot when posting + * + * @param ?string $channel + * @return $this + */ + public function setChannel(?string $channel = null): self + { + $this->channel = $channel; + + return $this; + } + + /** + * Username used by the bot when posting + * + * @param ?string $username + * @return $this + */ + public function setUsername(?string $username = null): self + { + $this->username = $username; + + return $this; + } + + /** + * @return $this + */ + public function useAttachment(bool $useAttachment = true): self + { + $this->useAttachment = $useAttachment; + + return $this; + } + + /** + * @return $this + */ + public function setUserIcon(?string $userIcon = null): self + { + $this->userIcon = $userIcon; + + if (\is_string($userIcon)) { + $this->userIcon = trim($userIcon, ':'); + } + + return $this; + } + + /** + * @return $this + */ + public function useShortAttachment(bool $useShortAttachment = false): self + { + $this->useShortAttachment = $useShortAttachment; + + return $this; + } + + /** + * @return $this + */ + public function includeContextAndExtra(bool $includeContextAndExtra = false): self + { + $this->includeContextAndExtra = $includeContextAndExtra; + + if ($this->includeContextAndExtra) { + $this->normalizerFormatter = new NormalizerFormatter(); + } + + return $this; + } + + /** + * @param string[] $excludeFields + * @return $this + */ + public function excludeFields(array $excludeFields = []): self + { + $this->excludeFields = $excludeFields; + + return $this; + } + + /** + * @return $this + */ + public function setFormatter(?FormatterInterface $formatter = null): self + { + $this->formatter = $formatter; + + return $this; + } + + /** + * Generates attachment field + * + * @param string|mixed[] $value + * + * @return array{title: string, value: string, short: false} + */ + private function generateAttachmentField(string $title, $value): array + { + $value = \is_array($value) + ? sprintf('```%s```', substr($this->stringify($value), 0, 1990)) + : $value; + + return [ + 'title' => ucfirst($title), + 'value' => $value, + 'short' => false, + ]; + } + + /** + * Generates a collection of attachment fields from array + * + * @param mixed[] $data + * + * @return array + */ + private function generateAttachmentFields(array $data): array + { + /** @var array $normalized */ + $normalized = $this->normalizerFormatter->normalizeValue($data); + + $fields = []; + foreach ($normalized as $key => $value) { + $fields[] = $this->generateAttachmentField((string) $key, $value); + } + + return $fields; + } + + /** + * Get a copy of record with fields excluded according to $this->excludeFields + * + * @return mixed[] + */ + private function removeExcludedFields(LogRecord $record): array + { + $recordData = $record->toArray(); + foreach ($this->excludeFields as $field) { + $keys = explode('.', $field); + $node = &$recordData; + $lastKey = end($keys); + foreach ($keys as $key) { + if (!isset($node[$key])) { + break; + } + if ($lastKey === $key) { + unset($node[$key]); + break; + } + $node = &$node[$key]; + } + } + + return $recordData; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php new file mode 100644 index 0000000..2a34dda --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php @@ -0,0 +1,267 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Level; +use Monolog\Utils; +use Monolog\Handler\Slack\SlackRecord; +use Monolog\LogRecord; + +/** + * Sends notifications through Slack API + * + * @author Greg Kedzierski + * @see https://api.slack.com/ + */ +class SlackHandler extends SocketHandler +{ + /** + * Slack API token + */ + private string $token; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + */ + private SlackRecord $slackRecord; + + /** + * @param string $token Slack API token + * @param string $channel Slack channel (encoded ID or name) + * @param string|null $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @param bool $useShortAttachment Whether the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * @throws MissingExtensionException If no OpenSSL PHP extension configured + */ + public function __construct( + string $token, + string $channel, + ?string $username = null, + bool $useAttachment = true, + ?string $iconEmoji = null, + $level = Level::Critical, + bool $bubble = true, + bool $useShortAttachment = false, + bool $includeContextAndExtra = false, + array $excludeFields = [], + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + if (!\extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); + } + + parent::__construct( + 'ssl://slack.com:443', + $level, + $bubble, + $persistent, + $timeout, + $writingTimeout, + $connectionTimeout, + $chunkSize + ); + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $excludeFields + ); + + $this->token = $token; + } + + public function getSlackRecord(): SlackRecord + { + return $this->slackRecord; + } + + public function getToken(): string + { + return $this->token; + } + + /** + * @inheritDoc + */ + protected function generateDataStream(LogRecord $record): string + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + */ + private function buildContent(LogRecord $record): string + { + $dataArray = $this->prepareContentData($record); + + return http_build_query($dataArray); + } + + /** + * @return string[] + */ + protected function prepareContentData(LogRecord $record): array + { + $dataArray = $this->slackRecord->getSlackData($record); + $dataArray['token'] = $this->token; + + if (isset($dataArray['attachments']) && \is_array($dataArray['attachments']) && \count($dataArray['attachments']) > 0) { + $dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']); + } + + return $dataArray; + } + + /** + * Builds the header of the API Call + */ + private function buildHeader(string $content): string + { + $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; + $header .= "Host: slack.com\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . \strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + parent::write($record); + $this->finalizeWrite(); + } + + /** + * Finalizes the request by reading some bytes and then closing the socket + * + * If we do not read some but close the socket too early, slack sometimes + * drops the request entirely. + */ + protected function finalizeWrite(): void + { + $res = $this->getResource(); + if (\is_resource($res)) { + @fread($res, 2048); + } + $this->closeSocket(); + } + + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter(): FormatterInterface + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } + + /** + * Channel used by the bot when posting + * + * @return $this + */ + public function setChannel(string $channel): self + { + $this->slackRecord->setChannel($channel); + + return $this; + } + + /** + * Username used by the bot when posting + * + * @return $this + */ + public function setUsername(string $username): self + { + $this->slackRecord->setUsername($username); + + return $this; + } + + /** + * @return $this + */ + public function useAttachment(bool $useAttachment): self + { + $this->slackRecord->useAttachment($useAttachment); + + return $this; + } + + /** + * @return $this + */ + public function setIconEmoji(string $iconEmoji): self + { + $this->slackRecord->setUserIcon($iconEmoji); + + return $this; + } + + /** + * @return $this + */ + public function useShortAttachment(bool $useShortAttachment): self + { + $this->slackRecord->useShortAttachment($useShortAttachment); + + return $this; + } + + /** + * @return $this + */ + public function includeContextAndExtra(bool $includeContextAndExtra): self + { + $this->slackRecord->includeContextAndExtra($includeContextAndExtra); + + return $this; + } + + /** + * @param string[] $excludeFields + * @return $this + */ + public function excludeFields(array $excludeFields): self + { + $this->slackRecord->excludeFields($excludeFields); + + return $this; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php new file mode 100644 index 0000000..eac51cc --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Level; +use Monolog\Utils; +use Monolog\Handler\Slack\SlackRecord; +use Monolog\LogRecord; + +/** + * Sends notifications through Slack Webhooks + * + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + */ +class SlackWebhookHandler extends AbstractProcessingHandler +{ + /** + * Slack Webhook token + */ + private string $webhookUrl; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + */ + private SlackRecord $slackRecord; + + /** + * @param string $webhookUrl Slack Webhook URL + * @param string|null $channel Slack channel (encoded ID or name) + * @param string|null $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * + * @throws MissingExtensionException If the curl extension is missing + */ + public function __construct( + string $webhookUrl, + ?string $channel = null, + ?string $username = null, + bool $useAttachment = true, + ?string $iconEmoji = null, + bool $useShortAttachment = false, + bool $includeContextAndExtra = false, + $level = Level::Critical, + bool $bubble = true, + array $excludeFields = [] + ) { + if (!\extension_loaded('curl')) { + throw new MissingExtensionException('The curl extension is needed to use the SlackWebhookHandler'); + } + + parent::__construct($level, $bubble); + + $this->webhookUrl = $webhookUrl; + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $excludeFields + ); + } + + public function getSlackRecord(): SlackRecord + { + return $this->slackRecord; + } + + public function getWebhookUrl(): string + { + return $this->webhookUrl; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $postData = $this->slackRecord->getSlackData($record); + $postString = Utils::jsonEncode($postData); + + $ch = curl_init(); + $options = [ + CURLOPT_URL => $this->webhookUrl, + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => ['Content-type: application/json'], + CURLOPT_POSTFIELDS => $postString, + ]; + + curl_setopt_array($ch, $options); + + Curl\Util::execute($ch); + } + + public function setFormatter(FormatterInterface $formatter): HandlerInterface + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter(): FormatterInterface + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php new file mode 100644 index 0000000..69a036f --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php @@ -0,0 +1,436 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Stores to any socket - uses fsockopen() or pfsockopen(). + * + * @author Pablo de Leon Belloc + * @see http://php.net/manual/en/function.fsockopen.php + */ +class SocketHandler extends AbstractProcessingHandler +{ + private string $connectionString; + private float $connectionTimeout; + /** @var resource|null */ + private $resource; + private float $timeout; + private float $writingTimeout; + private int|null $lastSentBytes = null; + private int|null $chunkSize; + private bool $persistent; + private int|null $errno = null; + private string|null $errstr = null; + private float|null $lastWritingAt = null; + + /** + * @param string $connectionString Socket connection string + * @param bool $persistent Flag to enable/disable persistent connections + * @param float $timeout Socket timeout to wait until the request is being aborted + * @param float $writingTimeout Socket timeout to wait until the request should've been sent/written + * @param float|null $connectionTimeout Socket connect timeout to wait until the connection should've been + * established + * @param int|null $chunkSize Sets the chunk size. Only has effect during connection in the writing cycle + * + * @throws \InvalidArgumentException If an invalid timeout value (less than 0) is passed. + */ + public function __construct( + string $connectionString, + $level = Level::Debug, + bool $bubble = true, + bool $persistent = false, + float $timeout = 0.0, + float $writingTimeout = 10.0, + ?float $connectionTimeout = null, + ?int $chunkSize = null + ) { + parent::__construct($level, $bubble); + $this->connectionString = $connectionString; + + if ($connectionTimeout !== null) { + $this->validateTimeout($connectionTimeout); + } + + $this->connectionTimeout = $connectionTimeout ?? (float) \ini_get('default_socket_timeout'); + $this->persistent = $persistent; + $this->validateTimeout($timeout); + $this->timeout = $timeout; + $this->validateTimeout($writingTimeout); + $this->writingTimeout = $writingTimeout; + $this->chunkSize = $chunkSize; + } + + /** + * Connect (if necessary) and write to the socket + * + * @inheritDoc + * + * @throws \UnexpectedValueException + * @throws \RuntimeException + */ + protected function write(LogRecord $record): void + { + $this->connectIfNotConnected(); + $data = $this->generateDataStream($record); + $this->writeToSocket($data); + } + + /** + * We will not close a PersistentSocket instance so it can be reused in other requests. + */ + public function close(): void + { + if (!$this->isPersistent()) { + $this->closeSocket(); + } + } + + /** + * Close socket, if open + */ + public function closeSocket(): void + { + if (\is_resource($this->resource)) { + fclose($this->resource); + $this->resource = null; + } + } + + /** + * Set socket connection to be persistent. It only has effect before the connection is initiated. + * + * @return $this + */ + public function setPersistent(bool $persistent): self + { + $this->persistent = $persistent; + + return $this; + } + + /** + * Set connection timeout. Only has effect before we connect. + * + * @see http://php.net/manual/en/function.fsockopen.php + * @return $this + */ + public function setConnectionTimeout(float $seconds): self + { + $this->validateTimeout($seconds); + $this->connectionTimeout = $seconds; + + return $this; + } + + /** + * Set write timeout. Only has effect before we connect. + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + * @return $this + */ + public function setTimeout(float $seconds): self + { + $this->validateTimeout($seconds); + $this->timeout = $seconds; + + return $this; + } + + /** + * Set writing timeout. Only has effect during connection in the writing cycle. + * + * @param float $seconds 0 for no timeout + * @return $this + */ + public function setWritingTimeout(float $seconds): self + { + $this->validateTimeout($seconds); + $this->writingTimeout = $seconds; + + return $this; + } + + /** + * Set chunk size. Only has effect during connection in the writing cycle. + * + * @return $this + */ + public function setChunkSize(int $bytes): self + { + $this->chunkSize = $bytes; + + return $this; + } + + /** + * Get current connection string + */ + public function getConnectionString(): string + { + return $this->connectionString; + } + + /** + * Get persistent setting + */ + public function isPersistent(): bool + { + return $this->persistent; + } + + /** + * Get current connection timeout setting + */ + public function getConnectionTimeout(): float + { + return $this->connectionTimeout; + } + + /** + * Get current in-transfer timeout + */ + public function getTimeout(): float + { + return $this->timeout; + } + + /** + * Get current local writing timeout + */ + public function getWritingTimeout(): float + { + return $this->writingTimeout; + } + + /** + * Get current chunk size + */ + public function getChunkSize(): ?int + { + return $this->chunkSize; + } + + /** + * Check to see if the socket is currently available. + * + * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. + */ + public function isConnected(): bool + { + return \is_resource($this->resource) + && !feof($this->resource); // on TCP - other party can close connection. + } + + /** + * Wrapper to allow mocking + * + * @return resource|false + */ + protected function pfsockopen() + { + return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + * + * @return resource|false + */ + protected function fsockopen() + { + return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + */ + protected function streamSetTimeout(): bool + { + $seconds = floor($this->timeout); + $microseconds = round(($this->timeout - $seconds) * 1e6); + + if (!\is_resource($this->resource)) { + throw new \LogicException('streamSetTimeout called but $this->resource is not a resource'); + } + + return stream_set_timeout($this->resource, (int) $seconds, (int) $microseconds); + } + + /** + * Wrapper to allow mocking + * + * @see http://php.net/manual/en/function.stream-set-chunk-size.php + * + * @return int|false + */ + protected function streamSetChunkSize(): int|bool + { + if (!\is_resource($this->resource)) { + throw new \LogicException('streamSetChunkSize called but $this->resource is not a resource'); + } + + if (null === $this->chunkSize) { + throw new \LogicException('streamSetChunkSize called but $this->chunkSize is not set'); + } + + return stream_set_chunk_size($this->resource, $this->chunkSize); + } + + /** + * Wrapper to allow mocking + * + * @return int|false + */ + protected function fwrite(string $data): int|bool + { + if (!\is_resource($this->resource)) { + throw new \LogicException('fwrite called but $this->resource is not a resource'); + } + + return @fwrite($this->resource, $data); + } + + /** + * Wrapper to allow mocking + * + * @return mixed[]|bool + */ + protected function streamGetMetadata(): array|bool + { + if (!\is_resource($this->resource)) { + throw new \LogicException('streamGetMetadata called but $this->resource is not a resource'); + } + + return stream_get_meta_data($this->resource); + } + + private function validateTimeout(float $value): void + { + if ($value < 0) { + throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); + } + } + + private function connectIfNotConnected(): void + { + if ($this->isConnected()) { + return; + } + $this->connect(); + } + + protected function generateDataStream(LogRecord $record): string + { + return (string) $record->formatted; + } + + /** + * @return resource|null + */ + protected function getResource() + { + return $this->resource; + } + + private function connect(): void + { + $this->createSocketResource(); + $this->setSocketTimeout(); + $this->setStreamChunkSize(); + } + + private function createSocketResource(): void + { + if ($this->isPersistent()) { + $resource = $this->pfsockopen(); + } else { + $resource = $this->fsockopen(); + } + if (\is_bool($resource)) { + throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); + } + $this->resource = $resource; + } + + private function setSocketTimeout(): void + { + if (!$this->streamSetTimeout()) { + throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); + } + } + + private function setStreamChunkSize(): void + { + if (null !== $this->chunkSize && false === $this->streamSetChunkSize()) { + throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); + } + } + + private function writeToSocket(string $data): void + { + $length = \strlen($data); + $sent = 0; + $this->lastSentBytes = $sent; + while ($this->isConnected() && $sent < $length) { + if (0 == $sent) { + $chunk = $this->fwrite($data); + } else { + $chunk = $this->fwrite(substr($data, $sent)); + } + if ($chunk === false) { + throw new \RuntimeException("Could not write to socket"); + } + $sent += $chunk; + $socketInfo = $this->streamGetMetadata(); + if (\is_array($socketInfo) && (bool) $socketInfo['timed_out']) { + throw new \RuntimeException("Write timed-out"); + } + + if ($this->writingIsTimedOut($sent)) { + throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); + } + } + if (!$this->isConnected() && $sent < $length) { + throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); + } + } + + private function writingIsTimedOut(int $sent): bool + { + // convert to ms + if (0.0 == $this->writingTimeout) { + return false; + } + + if ($sent !== $this->lastSentBytes) { + $this->lastWritingAt = microtime(true); + $this->lastSentBytes = $sent; + + return false; + } else { + usleep(100); + } + + if ((microtime(true) - (float) $this->lastWritingAt) >= $this->writingTimeout) { + $this->closeSocket(); + + return true; + } + + return false; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php new file mode 100644 index 0000000..1d28b65 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Aws\Sqs\SqsClient; +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Writes to any sqs queue. + * + * @author Martijn van Calker + */ +class SqsHandler extends AbstractProcessingHandler +{ + /** 256 KB in bytes - maximum message size in SQS */ + protected const MAX_MESSAGE_SIZE = 262144; + /** 100 KB in bytes - head message size for new error log */ + protected const HEAD_MESSAGE_SIZE = 102400; + + private SqsClient $client; + private string $queueUrl; + + public function __construct(SqsClient $sqsClient, string $queueUrl, int|string|Level $level = Level::Debug, bool $bubble = true) + { + parent::__construct($level, $bubble); + + $this->client = $sqsClient; + $this->queueUrl = $queueUrl; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + if (!isset($record->formatted) || 'string' !== \gettype($record->formatted)) { + throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string' . Utils::getRecordMessageForException($record)); + } + + $messageBody = $record->formatted; + if (\strlen($messageBody) >= static::MAX_MESSAGE_SIZE) { + $messageBody = Utils::substr($messageBody, 0, static::HEAD_MESSAGE_SIZE); + } + + $this->client->sendMessage([ + 'QueueUrl' => $this->queueUrl, + 'MessageBody' => $messageBody, + ]); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php new file mode 100644 index 0000000..4169095 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -0,0 +1,210 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Stores to any stream resource + * + * Can be used to store into php://stderr, remote and local files, etc. + * + * @author Jordi Boggiano + */ +class StreamHandler extends AbstractProcessingHandler +{ + protected const MAX_CHUNK_SIZE = 2147483647; + /** 10MB */ + protected const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024; + protected int $streamChunkSize; + /** @var resource|null */ + protected $stream; + protected string|null $url = null; + private string|null $errorMessage = null; + protected int|null $filePermission; + protected bool $useLocking; + /** @var true|null */ + private bool|null $dirCreated = null; + + /** + * @param resource|string $stream If a missing path can't be created, an UnexpectedValueException will be thrown on first write + * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) + * @param bool $useLocking Try to lock log file before doing any writes + * + * @throws \InvalidArgumentException If stream is not a resource or string + */ + public function __construct($stream, int|string|Level $level = Level::Debug, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false) + { + parent::__construct($level, $bubble); + + if (($phpMemoryLimit = Utils::expandIniShorthandBytes(\ini_get('memory_limit'))) !== false) { + if ($phpMemoryLimit > 0) { + // use max 10% of allowed memory for the chunk size, and at least 100KB + $this->streamChunkSize = min(static::MAX_CHUNK_SIZE, max((int) ($phpMemoryLimit / 10), 100 * 1024)); + } else { + // memory is unlimited, set to the default 10MB + $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; + } + } else { + // no memory limit information, set to the default 10MB + $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; + } + + if (\is_resource($stream)) { + $this->stream = $stream; + + stream_set_chunk_size($this->stream, $this->streamChunkSize); + } elseif (\is_string($stream)) { + $this->url = Utils::canonicalizePath($stream); + } else { + throw new \InvalidArgumentException('A stream must either be a resource or a string.'); + } + + $this->filePermission = $filePermission; + $this->useLocking = $useLocking; + } + + /** + * @inheritDoc + */ + public function close(): void + { + if (null !== $this->url && \is_resource($this->stream)) { + fclose($this->stream); + } + $this->stream = null; + $this->dirCreated = null; + } + + /** + * Return the currently active stream if it is open + * + * @return resource|null + */ + public function getStream() + { + return $this->stream; + } + + /** + * Return the stream URL if it was configured with a URL and not an active resource + */ + public function getUrl(): ?string + { + return $this->url; + } + + public function getStreamChunkSize(): int + { + return $this->streamChunkSize; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + if (!\is_resource($this->stream)) { + $url = $this->url; + if (null === $url || '' === $url) { + throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().' . Utils::getRecordMessageForException($record)); + } + $this->createDir($url); + $this->errorMessage = null; + set_error_handler(function (...$args) { + return $this->customErrorHandler(...$args); + }); + + try { + $stream = fopen($url, 'a'); + if ($this->filePermission !== null) { + @chmod($url, $this->filePermission); + } + } finally { + restore_error_handler(); + } + if (!\is_resource($stream)) { + $this->stream = null; + + throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $url) . Utils::getRecordMessageForException($record)); + } + stream_set_chunk_size($stream, $this->streamChunkSize); + $this->stream = $stream; + } + + $stream = $this->stream; + if ($this->useLocking) { + // ignoring errors here, there's not much we can do about them + flock($stream, LOCK_EX); + } + + $this->streamWrite($stream, $record); + + if ($this->useLocking) { + flock($stream, LOCK_UN); + } + } + + /** + * Write to stream + * @param resource $stream + */ + protected function streamWrite($stream, LogRecord $record): void + { + fwrite($stream, (string) $record->formatted); + } + + private function customErrorHandler(int $code, string $msg): bool + { + $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); + + return true; + } + + private function getDirFromStream(string $stream): ?string + { + $pos = strpos($stream, '://'); + if ($pos === false) { + return \dirname($stream); + } + + if ('file://' === substr($stream, 0, 7)) { + return \dirname(substr($stream, 7)); + } + + return null; + } + + private function createDir(string $url): void + { + // Do not try to create dir if it has already been tried. + if (true === $this->dirCreated) { + return; + } + + $dir = $this->getDirFromStream($url); + if (null !== $dir && !is_dir($dir)) { + $this->errorMessage = null; + set_error_handler(function (...$args) { + return $this->customErrorHandler(...$args); + }); + $status = mkdir($dir, 0777, true); + restore_error_handler(); + if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) { + throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir)); + } + } + $this->dirCreated = true; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php new file mode 100644 index 0000000..33aa4fd --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php @@ -0,0 +1,109 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Closure; +use Monolog\Level; +use Monolog\LogRecord; +use Monolog\Utils; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; +use Symfony\Component\Mailer\MailerInterface; +use Symfony\Component\Mailer\Transport\TransportInterface; +use Symfony\Component\Mime\Email; + +/** + * SymfonyMailerHandler uses Symfony's Mailer component to send the emails + * + * @author Jordi Boggiano + */ +class SymfonyMailerHandler extends MailHandler +{ + protected MailerInterface|TransportInterface $mailer; + /** @var Email|Closure(string, LogRecord[]): Email */ + private Email|Closure $emailTemplate; + + /** + * @phpstan-param Email|Closure(string, LogRecord[]): Email $email + * + * @param MailerInterface|TransportInterface $mailer The mailer to use + * @param Closure|Email $email An email template, the subject/body will be replaced + */ + public function __construct($mailer, Email|Closure $email, int|string|Level $level = Level::Error, bool $bubble = true) + { + parent::__construct($level, $bubble); + + $this->mailer = $mailer; + $this->emailTemplate = $email; + } + + /** + * {@inheritDoc} + */ + protected function send(string $content, array $records): void + { + $this->mailer->send($this->buildMessage($content, $records)); + } + + /** + * Gets the formatter for the Swift_Message subject. + * + * @param string|null $format The format of the subject + */ + protected function getSubjectFormatter(?string $format): FormatterInterface + { + return new LineFormatter($format); + } + + /** + * Creates instance of Email to be sent + * + * @param string $content formatted email body to be sent + * @param LogRecord[] $records Log records that formed the content + */ + protected function buildMessage(string $content, array $records): Email + { + $message = null; + if ($this->emailTemplate instanceof Email) { + $message = clone $this->emailTemplate; + } elseif (\is_callable($this->emailTemplate)) { + $message = ($this->emailTemplate)($content, $records); + } + + if (!$message instanceof Email) { + $record = reset($records); + + throw new \InvalidArgumentException('Could not resolve message as instance of Email or a callable returning it' . ($record instanceof LogRecord ? Utils::getRecordMessageForException($record) : '')); + } + + if (\count($records) > 0) { + $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); + $message->subject($subjectFormatter->format($this->getHighestRecord($records))); + } + + if ($this->isHtmlBody($content)) { + if (null !== ($charset = $message->getHtmlCharset())) { + $message->html($content, $charset); + } else { + $message->html($content); + } + } else { + if (null !== ($charset = $message->getTextCharset())) { + $message->text($content, $charset); + } else { + $message->text($content); + } + } + + return $message->date(new \DateTimeImmutable()); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php new file mode 100644 index 0000000..f3d7674 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Logs to syslog service. + * + * usage example: + * + * $log = new Logger('application'); + * $syslog = new SyslogHandler('myfacility', 'local6'); + * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); + * $syslog->setFormatter($formatter); + * $log->pushHandler($syslog); + * + * @author Sven Paulus + */ +class SyslogHandler extends AbstractSyslogHandler +{ + protected string $ident; + protected int $logopts; + + /** + * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant + * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID + */ + public function __construct(string $ident, string|int $facility = LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true, int $logopts = LOG_PID) + { + parent::__construct($facility, $level, $bubble); + + $this->ident = $ident; + $this->logopts = $logopts; + } + + /** + * @inheritDoc + */ + public function close(): void + { + closelog(); + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + openlog($this->ident, $this->logopts, $this->facility); + syslog($this->toSyslogPriority($record->level), (string) $record->formatted); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php new file mode 100644 index 0000000..3ff0bce --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\SyslogUdp; + +use Monolog\Utils; +use Socket; + +class UdpSocket +{ + protected const DATAGRAM_MAX_LENGTH = 65023; + + protected string $ip; + protected int $port; + protected ?Socket $socket = null; + + public function __construct(string $ip, int $port = 514) + { + $this->ip = $ip; + $this->port = $port; + } + + public function write(string $line, string $header = ""): void + { + $this->send($this->assembleMessage($line, $header)); + } + + public function close(): void + { + if ($this->socket instanceof Socket) { + socket_close($this->socket); + $this->socket = null; + } + } + + protected function getSocket(): Socket + { + if (null !== $this->socket) { + return $this->socket; + } + + $domain = AF_INET; + $protocol = SOL_UDP; + // Check if we are using unix sockets. + if ($this->port === 0) { + $domain = AF_UNIX; + $protocol = IPPROTO_IP; + } + + $socket = socket_create($domain, SOCK_DGRAM, $protocol); + if ($socket instanceof Socket) { + return $this->socket = $socket; + } + + throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' could not be opened via socket_create'); + } + + protected function send(string $chunk): void + { + socket_sendto($this->getSocket(), $chunk, \strlen($chunk), $flags = 0, $this->ip, $this->port); + } + + protected function assembleMessage(string $line, string $header): string + { + $chunkSize = static::DATAGRAM_MAX_LENGTH - \strlen($header); + + return $header . Utils::substr($line, 0, $chunkSize); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php new file mode 100644 index 0000000..e8db4cd --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use DateTimeInterface; +use Monolog\Handler\SyslogUdp\UdpSocket; +use Monolog\Level; +use Monolog\LogRecord; +use Monolog\Utils; + +/** + * A Handler for logging to a remote syslogd server. + * + * @author Jesper Skovgaard Nielsen + * @author Dominik Kukacka + */ +class SyslogUdpHandler extends AbstractSyslogHandler +{ + const RFC3164 = 0; + const RFC5424 = 1; + const RFC5424e = 2; + + /** @var array */ + private array $dateFormats = [ + self::RFC3164 => 'M d H:i:s', + self::RFC5424 => \DateTime::RFC3339, + self::RFC5424e => \DateTime::RFC3339_EXTENDED, + ]; + + protected UdpSocket $socket; + protected string $ident; + /** @var self::RFC* */ + protected int $rfc; + + /** + * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then) + * @param int $port Port number, or 0 if $host is a unix socket + * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $ident Program name or tag for each log message. + * @param int $rfc RFC to format the message for. + * @throws MissingExtensionException when there is no socket extension + * + * @phpstan-param self::RFC* $rfc + */ + public function __construct(string $host, int $port = 514, string|int $facility = LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true, string $ident = 'php', int $rfc = self::RFC5424) + { + if (!\extension_loaded('sockets')) { + throw new MissingExtensionException('The sockets extension is required to use the SyslogUdpHandler'); + } + + parent::__construct($facility, $level, $bubble); + + $this->ident = $ident; + $this->rfc = $rfc; + + $this->socket = new UdpSocket($host, $port); + } + + protected function write(LogRecord $record): void + { + $lines = $this->splitMessageIntoLines($record->formatted); + + $header = $this->makeCommonSyslogHeader($this->toSyslogPriority($record->level), $record->datetime); + + foreach ($lines as $line) { + $this->socket->write($line, $header); + } + } + + public function close(): void + { + $this->socket->close(); + } + + /** + * @param string|string[] $message + * @return string[] + */ + private function splitMessageIntoLines($message): array + { + if (\is_array($message)) { + $message = implode("\n", $message); + } + + $lines = preg_split('/$\R?^/m', (string) $message, -1, PREG_SPLIT_NO_EMPTY); + if (false === $lines) { + $pcreErrorCode = preg_last_error(); + + throw new \RuntimeException('Could not preg_split: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); + } + + return $lines; + } + + /** + * Make common syslog header (see rfc5424 or rfc3164) + */ + protected function makeCommonSyslogHeader(int $severity, DateTimeInterface $datetime): string + { + $priority = $severity + $this->facility; + + $pid = getmypid(); + if (false === $pid) { + $pid = '-'; + } + + $hostname = gethostname(); + if (false === $hostname) { + $hostname = '-'; + } + + if ($this->rfc === self::RFC3164) { + // see https://github.com/phpstan/phpstan/issues/5348 + // @phpstan-ignore-next-line + $dateNew = $datetime->setTimezone(new \DateTimeZone('UTC')); + $date = $dateNew->format($this->dateFormats[$this->rfc]); + + return "<$priority>" . + $date . " " . + $hostname . " " . + $this->ident . "[" . $pid . "]: "; + } + + $date = $datetime->format($this->dateFormats[$this->rfc]); + + return "<$priority>1 " . + $date . " " . + $hostname . " " . + $this->ident . " " . + $pid . " - - "; + } + + /** + * Inject your own socket, mainly used for testing + * + * @return $this + */ + public function setSocket(UdpSocket $socket): self + { + $this->socket = $socket; + + return $this; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php new file mode 100644 index 0000000..e4f69a9 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php @@ -0,0 +1,297 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use RuntimeException; +use Monolog\Level; +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Handler sends logs to Telegram using Telegram Bot API. + * + * How to use: + * 1) Create a Telegram bot with https://telegram.me/BotFather; + * 2) Create a Telegram channel or a group where logs will be recorded; + * 3) Add the created bot from step 1 to the created channel/group from step 2. + * + * In order to create an instance of TelegramBotHandler use + * 1. The Telegram bot API key from step 1 + * 2. The channel name with the `@` prefix if you created a public channel (e.g. `@my_public_channel`), + * or the channel ID with the `-100` prefix if you created a private channel (e.g. `-1001234567890`), + * or the group ID from step 2 (e.g. `-1234567890`). + * + * @link https://core.telegram.org/bots/api + * + * @author Mazur Alexandr + */ +class TelegramBotHandler extends AbstractProcessingHandler +{ + private const BOT_API = 'https://api.telegram.org/bot'; + + /** + * The available values of parseMode according to the Telegram api documentation + */ + private const AVAILABLE_PARSE_MODES = [ + 'HTML', + 'MarkdownV2', + 'Markdown', // legacy mode without underline and strikethrough, use MarkdownV2 instead + ]; + + /** + * The maximum number of characters allowed in a message according to the Telegram api documentation + */ + private const MAX_MESSAGE_LENGTH = 4096; + + /** + * Telegram bot access token provided by BotFather. + * Create telegram bot with https://telegram.me/BotFather and use access token from it. + */ + private string $apiKey; + + /** + * Telegram channel name. + * Since to start with '@' symbol as prefix. + */ + private string $channel; + + /** + * The kind of formatting that is used for the message. + * See available options at https://core.telegram.org/bots/api#formatting-options + * or in AVAILABLE_PARSE_MODES + */ + private string|null $parseMode; + + /** + * Disables link previews for links in the message. + */ + private bool|null $disableWebPagePreview; + + /** + * Sends the message silently. Users will receive a notification with no sound. + */ + private bool|null $disableNotification; + + /** + * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. + * False - truncates a message that is too long. + */ + private bool $splitLongMessages; + + /** + * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). + */ + private bool $delayBetweenMessages; + + /** + * Telegram message thread id, unique identifier for the target message thread (topic) of the forum; for forum supergroups only + * See how to get the `message_thread_id` https://stackoverflow.com/a/75178418 + */ + private int|null $topic; + + /** + * @param string $apiKey Telegram bot access token provided by BotFather + * @param string $channel Telegram channel name + * @param bool $splitLongMessages Split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages + * @param bool $delayBetweenMessages Adds delay between sending a split message according to Telegram API + * @param int $topic Telegram message thread id, unique identifier for the target message thread (topic) of the forum + * @throws MissingExtensionException If the curl extension is missing + */ + public function __construct( + string $apiKey, + string $channel, + $level = Level::Debug, + bool $bubble = true, + ?string $parseMode = null, + ?bool $disableWebPagePreview = null, + ?bool $disableNotification = null, + bool $splitLongMessages = false, + bool $delayBetweenMessages = false, + int $topic = null + ) { + if (!\extension_loaded('curl')) { + throw new MissingExtensionException('The curl extension is needed to use the TelegramBotHandler'); + } + + parent::__construct($level, $bubble); + + $this->apiKey = $apiKey; + $this->channel = $channel; + $this->setParseMode($parseMode); + $this->disableWebPagePreview($disableWebPagePreview); + $this->disableNotification($disableNotification); + $this->splitLongMessages($splitLongMessages); + $this->delayBetweenMessages($delayBetweenMessages); + $this->setTopic($topic); + } + + /** + * @return $this + */ + public function setParseMode(string|null $parseMode = null): self + { + if ($parseMode !== null && !\in_array($parseMode, self::AVAILABLE_PARSE_MODES, true)) { + throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . implode(', ', self::AVAILABLE_PARSE_MODES) . '.'); + } + + $this->parseMode = $parseMode; + + return $this; + } + + /** + * @return $this + */ + public function disableWebPagePreview(bool|null $disableWebPagePreview = null): self + { + $this->disableWebPagePreview = $disableWebPagePreview; + + return $this; + } + + /** + * @return $this + */ + public function disableNotification(bool|null $disableNotification = null): self + { + $this->disableNotification = $disableNotification; + + return $this; + } + + /** + * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. + * False - truncates a message that is too long. + * + * @return $this + */ + public function splitLongMessages(bool $splitLongMessages = false): self + { + $this->splitLongMessages = $splitLongMessages; + + return $this; + } + + /** + * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). + * + * @return $this + */ + public function delayBetweenMessages(bool $delayBetweenMessages = false): self + { + $this->delayBetweenMessages = $delayBetweenMessages; + + return $this; + } + + /** + * @return $this + */ + public function setTopic(int $topic = null): self + { + $this->topic = $topic; + + return $this; + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + $messages = []; + + foreach ($records as $record) { + if (!$this->isHandling($record)) { + continue; + } + + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + $messages[] = $record; + } + + if (\count($messages) > 0) { + $this->send((string) $this->getFormatter()->formatBatch($messages)); + } + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->send($record->formatted); + } + + /** + * Send request to @link https://api.telegram.org/bot on SendMessage action. + */ + protected function send(string $message): void + { + $messages = $this->handleMessageLength($message); + + foreach ($messages as $key => $msg) { + if ($this->delayBetweenMessages && $key > 0) { + sleep(1); + } + + $this->sendCurl($msg); + } + } + + protected function sendCurl(string $message): void + { + $ch = curl_init(); + $url = self::BOT_API . $this->apiKey . '/SendMessage'; + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + $params = [ + 'text' => $message, + 'chat_id' => $this->channel, + 'parse_mode' => $this->parseMode, + 'disable_web_page_preview' => $this->disableWebPagePreview, + 'disable_notification' => $this->disableNotification, + ]; + if ($this->topic !== null) { + $params['message_thread_id'] = $this->topic; + } + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); + + $result = Curl\Util::execute($ch); + if (!\is_string($result)) { + throw new RuntimeException('Telegram API error. Description: No response'); + } + $result = json_decode($result, true); + + if ($result['ok'] === false) { + throw new RuntimeException('Telegram API error. Description: ' . $result['description']); + } + } + + /** + * Handle a message that is too long: truncates or splits into several + * @return string[] + */ + private function handleMessageLength(string $message): array + { + $truncatedMarker = ' (...truncated)'; + if (!$this->splitLongMessages && \strlen($message) > self::MAX_MESSAGE_LENGTH) { + return [Utils::substr($message, 0, self::MAX_MESSAGE_LENGTH - \strlen($truncatedMarker)) . $truncatedMarker]; + } + + return str_split($message, self::MAX_MESSAGE_LENGTH); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php new file mode 100644 index 0000000..a98389b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php @@ -0,0 +1,195 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Level; +use Monolog\Logger; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Used for testing purposes. + * + * It records all records and gives you access to them for verification. + * + * @author Jordi Boggiano + * + * @method bool hasEmergency(string|array $recordAssertions) + * @method bool hasAlert(string|array $recordAssertions) + * @method bool hasCritical(string|array $recordAssertions) + * @method bool hasError(string|array $recordAssertions) + * @method bool hasWarning(string|array $recordAssertions) + * @method bool hasNotice(string|array $recordAssertions) + * @method bool hasInfo(string|array $recordAssertions) + * @method bool hasDebug(string|array $recordAssertions) + * + * @method bool hasEmergencyRecords() + * @method bool hasAlertRecords() + * @method bool hasCriticalRecords() + * @method bool hasErrorRecords() + * @method bool hasWarningRecords() + * @method bool hasNoticeRecords() + * @method bool hasInfoRecords() + * @method bool hasDebugRecords() + * + * @method bool hasEmergencyThatContains(string $message) + * @method bool hasAlertThatContains(string $message) + * @method bool hasCriticalThatContains(string $message) + * @method bool hasErrorThatContains(string $message) + * @method bool hasWarningThatContains(string $message) + * @method bool hasNoticeThatContains(string $message) + * @method bool hasInfoThatContains(string $message) + * @method bool hasDebugThatContains(string $message) + * + * @method bool hasEmergencyThatMatches(string $regex) + * @method bool hasAlertThatMatches(string $regex) + * @method bool hasCriticalThatMatches(string $regex) + * @method bool hasErrorThatMatches(string $regex) + * @method bool hasWarningThatMatches(string $regex) + * @method bool hasNoticeThatMatches(string $regex) + * @method bool hasInfoThatMatches(string $regex) + * @method bool hasDebugThatMatches(string $regex) + * + * @method bool hasEmergencyThatPasses(callable $predicate) + * @method bool hasAlertThatPasses(callable $predicate) + * @method bool hasCriticalThatPasses(callable $predicate) + * @method bool hasErrorThatPasses(callable $predicate) + * @method bool hasWarningThatPasses(callable $predicate) + * @method bool hasNoticeThatPasses(callable $predicate) + * @method bool hasInfoThatPasses(callable $predicate) + * @method bool hasDebugThatPasses(callable $predicate) + */ +class TestHandler extends AbstractProcessingHandler +{ + /** @var LogRecord[] */ + protected array $records = []; + /** @phpstan-var array, LogRecord[]> */ + protected array $recordsByLevel = []; + private bool $skipReset = false; + + /** + * @return array + */ + public function getRecords(): array + { + return $this->records; + } + + public function clear(): void + { + $this->records = []; + $this->recordsByLevel = []; + } + + public function reset(): void + { + if (!$this->skipReset) { + $this->clear(); + } + } + + public function setSkipReset(bool $skipReset): void + { + $this->skipReset = $skipReset; + } + + /** + * @param int|string|Level|LogLevel::* $level Logging level value or name + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function hasRecords(int|string|Level $level): bool + { + return isset($this->recordsByLevel[Logger::toMonologLevel($level)->value]); + } + + /** + * @param string|array $recordAssertions Either a message string or an array containing message and optionally context keys that will be checked against all records + * + * @phpstan-param array{message: string, context?: mixed[]}|string $recordAssertions + */ + public function hasRecord(string|array $recordAssertions, Level $level): bool + { + if (\is_string($recordAssertions)) { + $recordAssertions = ['message' => $recordAssertions]; + } + + return $this->hasRecordThatPasses(function (LogRecord $rec) use ($recordAssertions) { + if ($rec->message !== $recordAssertions['message']) { + return false; + } + if (isset($recordAssertions['context']) && $rec->context !== $recordAssertions['context']) { + return false; + } + + return true; + }, $level); + } + + public function hasRecordThatContains(string $message, Level $level): bool + { + return $this->hasRecordThatPasses(fn (LogRecord $rec) => str_contains($rec->message, $message), $level); + } + + public function hasRecordThatMatches(string $regex, Level $level): bool + { + return $this->hasRecordThatPasses(fn (LogRecord $rec) => preg_match($regex, $rec->message) > 0, $level); + } + + /** + * @phpstan-param callable(LogRecord, int): mixed $predicate + */ + public function hasRecordThatPasses(callable $predicate, Level $level): bool + { + $level = Logger::toMonologLevel($level); + + if (!isset($this->recordsByLevel[$level->value])) { + return false; + } + + foreach ($this->recordsByLevel[$level->value] as $i => $rec) { + if ((bool) $predicate($rec, $i)) { + return true; + } + } + + return false; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->recordsByLevel[$record->level->value][] = $record; + $this->records[] = $record; + } + + /** + * @param mixed[] $args + */ + public function __call(string $method, array $args): bool + { + if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { + $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; + $level = \constant(Level::class.'::' . $matches[2]); + $callback = [$this, $genericMethod]; + if (\is_callable($callback)) { + $args[] = $level; + + return \call_user_func_array($callback, $args); + } + } + + throw new \BadMethodCallException('Call to undefined method ' . \get_class($this) . '::' . $method . '()'); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php new file mode 100644 index 0000000..9c12c3d --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +trait WebRequestRecognizerTrait +{ + /** + * Checks if PHP's serving a web request + */ + protected function isWebRequest(): bool + { + return 'cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php new file mode 100644 index 0000000..932fa70 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\LogRecord; +use Throwable; + +/** + * Forwards records to multiple handlers suppressing failures of each handler + * and continuing through to give every handler a chance to succeed. + * + * @author Craig D'Amelio + */ +class WhatFailureGroupHandler extends GroupHandler +{ + /** + * @inheritDoc + */ + public function handle(LogRecord $record): bool + { + if (\count($this->processors) > 0) { + $record = $this->processRecord($record); + } + + foreach ($this->handlers as $handler) { + try { + $handler->handle(clone $record); + } catch (Throwable) { + // What failure? + } + } + + return false === $this->bubble; + } + + /** + * @inheritDoc + */ + public function handleBatch(array $records): void + { + if (\count($this->processors) > 0) { + $processed = []; + foreach ($records as $record) { + $processed[] = $this->processRecord($record); + } + $records = $processed; + } + + foreach ($this->handlers as $handler) { + try { + $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); + } catch (Throwable) { + // What failure? + } + } + } + + /** + * {@inheritDoc} + */ + public function close(): void + { + foreach ($this->handlers as $handler) { + try { + $handler->close(); + } catch (\Throwable $e) { + // What failure? + } + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php new file mode 100644 index 0000000..8841f2f --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\NormalizerFormatter; +use Monolog\Level; +use Monolog\LogRecord; + +/** + * Handler sending logs to Zend Monitor + * + * @author Christian Bergau + * @author Jason Davis + */ +class ZendMonitorHandler extends AbstractProcessingHandler +{ + /** + * @throws MissingExtensionException + */ + public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) + { + if (!\function_exists('zend_monitor_custom_event')) { + throw new MissingExtensionException( + 'You must have Zend Server installed with Zend Monitor enabled in order to use this handler' + ); + } + + parent::__construct($level, $bubble); + } + + /** + * Translates Monolog log levels to ZendMonitor levels. + */ + protected function toZendMonitorLevel(Level $level): int + { + return match ($level) { + Level::Debug => \ZEND_MONITOR_EVENT_SEVERITY_INFO, + Level::Info => \ZEND_MONITOR_EVENT_SEVERITY_INFO, + Level::Notice => \ZEND_MONITOR_EVENT_SEVERITY_INFO, + Level::Warning => \ZEND_MONITOR_EVENT_SEVERITY_WARNING, + Level::Error => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + Level::Critical => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + Level::Alert => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + Level::Emergency => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, + }; + } + + /** + * @inheritDoc + */ + protected function write(LogRecord $record): void + { + $this->writeZendMonitorCustomEvent( + $record->level->getName(), + $record->message, + $record->formatted, + $this->toZendMonitorLevel($record->level) + ); + } + + /** + * Write to Zend Monitor Events + * @param string $type Text displayed in "Class Name (custom)" field + * @param string $message Text displayed in "Error String" + * @param array $formatted Displayed in Custom Variables tab + * @param int $severity Set the event severity level (-1,0,1) + */ + protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity): void + { + zend_monitor_custom_event($type, $message, $formatted, $severity); + } + + /** + * @inheritDoc + */ + public function getDefaultFormatter(): FormatterInterface + { + return new NormalizerFormatter(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Level.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Level.php new file mode 100644 index 0000000..5620bc4 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Level.php @@ -0,0 +1,209 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Psr\Log\LogLevel; + +/** + * Represents the log levels + * + * Monolog supports the logging levels described by RFC 5424 {@see https://datatracker.ietf.org/doc/html/rfc5424} + * but due to BC the severity values used internally are not 0-7. + * + * To get the level name/value out of a Level there are several options: + * + * - Use ->getName() to get the standard Monolog name which is full uppercased (e.g. "DEBUG") + * - Use ->toPsrLogLevel() to get the standard PSR-3 name which is full lowercased (e.g. "debug") + * - Use ->toRFC5424Level() to get the standard RFC 5424 value (e.g. 7 for debug, 0 for emergency) + * - Use ->name to get the enum case's name which is capitalized (e.g. "Debug") + * + * To get the internal value for filtering, if the includes/isLowerThan/isHigherThan methods are + * not enough, you can use ->value to get the enum case's integer value. + */ +enum Level: int +{ + /** + * Detailed debug information + */ + case Debug = 100; + + /** + * Interesting events + * + * Examples: User logs in, SQL logs. + */ + case Info = 200; + + /** + * Uncommon events + */ + case Notice = 250; + + /** + * Exceptional occurrences that are not errors + * + * Examples: Use of deprecated APIs, poor use of an API, + * undesirable things that are not necessarily wrong. + */ + case Warning = 300; + + /** + * Runtime errors + */ + case Error = 400; + + /** + * Critical conditions + * + * Example: Application component unavailable, unexpected exception. + */ + case Critical = 500; + + /** + * Action must be taken immediately + * + * Example: Entire website down, database unavailable, etc. + * This should trigger the SMS alerts and wake you up. + */ + case Alert = 550; + + /** + * Urgent alert. + */ + case Emergency = 600; + + /** + * @param value-of|LogLevel::*|'Debug'|'Info'|'Notice'|'Warning'|'Error'|'Critical'|'Alert'|'Emergency' $name + * @return static + */ + public static function fromName(string $name): self + { + return match ($name) { + 'debug', 'Debug', 'DEBUG' => self::Debug, + 'info', 'Info', 'INFO' => self::Info, + 'notice', 'Notice', 'NOTICE' => self::Notice, + 'warning', 'Warning', 'WARNING' => self::Warning, + 'error', 'Error', 'ERROR' => self::Error, + 'critical', 'Critical', 'CRITICAL' => self::Critical, + 'alert', 'Alert', 'ALERT' => self::Alert, + 'emergency', 'Emergency', 'EMERGENCY' => self::Emergency, + }; + } + + /** + * @param value-of $value + * @return static + */ + public static function fromValue(int $value): self + { + return self::from($value); + } + + /** + * Returns true if the passed $level is higher or equal to $this + */ + public function includes(Level $level): bool + { + return $this->value <= $level->value; + } + + public function isHigherThan(Level $level): bool + { + return $this->value > $level->value; + } + + public function isLowerThan(Level $level): bool + { + return $this->value < $level->value; + } + + /** + * Returns the monolog standardized all-capitals name of the level + * + * Use this instead of $level->name which returns the enum case name (e.g. Debug vs DEBUG if you use getName()) + * + * @return value-of + */ + public function getName(): string + { + return match ($this) { + self::Debug => 'DEBUG', + self::Info => 'INFO', + self::Notice => 'NOTICE', + self::Warning => 'WARNING', + self::Error => 'ERROR', + self::Critical => 'CRITICAL', + self::Alert => 'ALERT', + self::Emergency => 'EMERGENCY', + }; + } + + /** + * Returns the PSR-3 level matching this instance + * + * @phpstan-return \Psr\Log\LogLevel::* + */ + public function toPsrLogLevel(): string + { + return match ($this) { + self::Debug => LogLevel::DEBUG, + self::Info => LogLevel::INFO, + self::Notice => LogLevel::NOTICE, + self::Warning => LogLevel::WARNING, + self::Error => LogLevel::ERROR, + self::Critical => LogLevel::CRITICAL, + self::Alert => LogLevel::ALERT, + self::Emergency => LogLevel::EMERGENCY, + }; + } + + /** + * Returns the RFC 5424 level matching this instance + * + * @phpstan-return int<0, 7> + */ + public function toRFC5424Level(): int + { + return match ($this) { + self::Debug => 7, + self::Info => 6, + self::Notice => 5, + self::Warning => 4, + self::Error => 3, + self::Critical => 2, + self::Alert => 1, + self::Emergency => 0, + }; + } + + public const VALUES = [ + 100, + 200, + 250, + 300, + 400, + 500, + 550, + 600, + ]; + + public const NAMES = [ + 'DEBUG', + 'INFO', + 'NOTICE', + 'WARNING', + 'ERROR', + 'CRITICAL', + 'ALERT', + 'EMERGENCY', + ]; +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/LogRecord.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/LogRecord.php new file mode 100644 index 0000000..14c82f3 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/LogRecord.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use ArrayAccess; + +/** + * Monolog log record + * + * @author Jordi Boggiano + * @template-implements ArrayAccess<'message'|'level'|'context'|'level_name'|'channel'|'datetime'|'extra'|'formatted', int|string|\DateTimeImmutable|array> + */ +class LogRecord implements ArrayAccess +{ + private const MODIFIABLE_FIELDS = [ + 'extra' => true, + 'formatted' => true, + ]; + + public function __construct( + public readonly \DateTimeImmutable $datetime, + public readonly string $channel, + public readonly Level $level, + public readonly string $message, + /** @var array */ + public readonly array $context = [], + /** @var array */ + public array $extra = [], + public mixed $formatted = null, + ) { + } + + public function offsetSet(mixed $offset, mixed $value): void + { + if ($offset === 'extra') { + if (!\is_array($value)) { + throw new \InvalidArgumentException('extra must be an array'); + } + + $this->extra = $value; + + return; + } + + if ($offset === 'formatted') { + $this->formatted = $value; + + return; + } + + throw new \LogicException('Unsupported operation: setting '.$offset); + } + + public function offsetExists(mixed $offset): bool + { + if ($offset === 'level_name') { + return true; + } + + return isset($this->{$offset}); + } + + public function offsetUnset(mixed $offset): void + { + throw new \LogicException('Unsupported operation'); + } + + public function &offsetGet(mixed $offset): mixed + { + // handle special cases for the level enum + if ($offset === 'level_name') { + // avoid returning readonly props by ref as this is illegal + $copy = $this->level->getName(); + + return $copy; + } + if ($offset === 'level') { + // avoid returning readonly props by ref as this is illegal + $copy = $this->level->value; + + return $copy; + } + + if (isset(self::MODIFIABLE_FIELDS[$offset])) { + return $this->{$offset}; + } + + // avoid returning readonly props by ref as this is illegal + $copy = $this->{$offset}; + + return $copy; + } + + /** + * @phpstan-return array{message: string, context: mixed[], level: value-of, level_name: value-of, channel: string, datetime: \DateTimeImmutable, extra: mixed[]} + */ + public function toArray(): array + { + return [ + 'message' => $this->message, + 'context' => $this->context, + 'level' => $this->level->value, + 'level_name' => $this->level->getName(), + 'channel' => $this->channel, + 'datetime' => $this->datetime, + 'extra' => $this->extra, + ]; + } + + public function with(mixed ...$args): self + { + foreach (['message', 'context', 'level', 'channel', 'datetime', 'extra'] as $prop) { + $args[$prop] ??= $this->{$prop}; + } + + return new self(...$args); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Logger.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Logger.php new file mode 100644 index 0000000..edc62f3 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Logger.php @@ -0,0 +1,750 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Closure; +use DateTimeZone; +use Fiber; +use Monolog\Handler\HandlerInterface; +use Monolog\Processor\ProcessorInterface; +use Psr\Log\LoggerInterface; +use Psr\Log\InvalidArgumentException; +use Psr\Log\LogLevel; +use Throwable; +use Stringable; +use WeakMap; + +/** + * Monolog log channel + * + * It contains a stack of Handlers and a stack of Processors, + * and uses them to store records that are added to it. + * + * @author Jordi Boggiano + * @final + */ +class Logger implements LoggerInterface, ResettableInterface +{ + /** + * Detailed debug information + * + * @deprecated Use \Monolog\Level::Debug + */ + public const DEBUG = 100; + + /** + * Interesting events + * + * Examples: User logs in, SQL logs. + * + * @deprecated Use \Monolog\Level::Info + */ + public const INFO = 200; + + /** + * Uncommon events + * + * @deprecated Use \Monolog\Level::Notice + */ + public const NOTICE = 250; + + /** + * Exceptional occurrences that are not errors + * + * Examples: Use of deprecated APIs, poor use of an API, + * undesirable things that are not necessarily wrong. + * + * @deprecated Use \Monolog\Level::Warning + */ + public const WARNING = 300; + + /** + * Runtime errors + * + * @deprecated Use \Monolog\Level::Error + */ + public const ERROR = 400; + + /** + * Critical conditions + * + * Example: Application component unavailable, unexpected exception. + * + * @deprecated Use \Monolog\Level::Critical + */ + public const CRITICAL = 500; + + /** + * Action must be taken immediately + * + * Example: Entire website down, database unavailable, etc. + * This should trigger the SMS alerts and wake you up. + * + * @deprecated Use \Monolog\Level::Alert + */ + public const ALERT = 550; + + /** + * Urgent alert. + * + * @deprecated Use \Monolog\Level::Emergency + */ + public const EMERGENCY = 600; + + /** + * Monolog API version + * + * This is only bumped when API breaks are done and should + * follow the major version of the library + */ + public const API = 3; + + /** + * Mapping between levels numbers defined in RFC 5424 and Monolog ones + * + * @phpstan-var array $rfc_5424_levels + */ + private const RFC_5424_LEVELS = [ + 7 => Level::Debug, + 6 => Level::Info, + 5 => Level::Notice, + 4 => Level::Warning, + 3 => Level::Error, + 2 => Level::Critical, + 1 => Level::Alert, + 0 => Level::Emergency, + ]; + + protected string $name; + + /** + * The handler stack + * + * @var list + */ + protected array $handlers; + + /** + * Processors that will process all log records + * + * To process records of a single handler instead, add the processor on that specific handler + * + * @var array<(callable(LogRecord): LogRecord)|ProcessorInterface> + */ + protected array $processors; + + protected bool $microsecondTimestamps = true; + + protected DateTimeZone $timezone; + + protected Closure|null $exceptionHandler = null; + + /** + * Keeps track of depth to prevent infinite logging loops + */ + private int $logDepth = 0; + + /** + * @var WeakMap, int> Keeps track of depth inside fibers to prevent infinite logging loops + */ + private WeakMap $fiberLogDepth; + + /** + * Whether to detect infinite logging loops + * This can be disabled via {@see useLoggingLoopDetection} if you have async handlers that do not play well with this + */ + private bool $detectCycles = true; + + /** + * @param string $name The logging channel, a simple descriptive name that is attached to all log records + * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. + * @param callable[] $processors Optional array of processors + * @param DateTimeZone|null $timezone Optional timezone, if not provided date_default_timezone_get() will be used + * + * @phpstan-param array<(callable(LogRecord): LogRecord)|ProcessorInterface> $processors + */ + public function __construct(string $name, array $handlers = [], array $processors = [], DateTimeZone|null $timezone = null) + { + $this->name = $name; + $this->setHandlers($handlers); + $this->processors = $processors; + $this->timezone = $timezone ?? new DateTimeZone(date_default_timezone_get()); + $this->fiberLogDepth = new \WeakMap(); + } + + public function getName(): string + { + return $this->name; + } + + /** + * Return a new cloned instance with the name changed + * + * @return static + */ + public function withName(string $name): self + { + $new = clone $this; + $new->name = $name; + + return $new; + } + + /** + * Pushes a handler on to the stack. + * + * @return $this + */ + public function pushHandler(HandlerInterface $handler): self + { + array_unshift($this->handlers, $handler); + + return $this; + } + + /** + * Pops a handler from the stack + * + * @throws \LogicException If empty handler stack + */ + public function popHandler(): HandlerInterface + { + if (0 === \count($this->handlers)) { + throw new \LogicException('You tried to pop from an empty handler stack.'); + } + + return array_shift($this->handlers); + } + + /** + * Set handlers, replacing all existing ones. + * + * If a map is passed, keys will be ignored. + * + * @param list $handlers + * @return $this + */ + public function setHandlers(array $handlers): self + { + $this->handlers = []; + foreach (array_reverse($handlers) as $handler) { + $this->pushHandler($handler); + } + + return $this; + } + + /** + * @return list + */ + public function getHandlers(): array + { + return $this->handlers; + } + + /** + * Adds a processor on to the stack. + * + * @phpstan-param ProcessorInterface|(callable(LogRecord): LogRecord) $callback + * @return $this + */ + public function pushProcessor(ProcessorInterface|callable $callback): self + { + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * Removes the processor on top of the stack and returns it. + * + * @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord) + * @throws \LogicException If empty processor stack + */ + public function popProcessor(): callable + { + if (0 === \count($this->processors)) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * @return callable[] + * @phpstan-return array + */ + public function getProcessors(): array + { + return $this->processors; + } + + /** + * Control the use of microsecond resolution timestamps in the 'datetime' + * member of new records. + * + * As of PHP7.1 microseconds are always included by the engine, so + * there is no performance penalty and Monolog 2 enabled microseconds + * by default. This function lets you disable them though in case you want + * to suppress microseconds from the output. + * + * @param bool $micro True to use microtime() to create timestamps + * @return $this + */ + public function useMicrosecondTimestamps(bool $micro): self + { + $this->microsecondTimestamps = $micro; + + return $this; + } + + /** + * @return $this + */ + public function useLoggingLoopDetection(bool $detectCycles): self + { + $this->detectCycles = $detectCycles; + + return $this; + } + + /** + * Adds a log record. + * + * @param int $level The logging level (a Monolog or RFC 5424 level) + * @param string $message The log message + * @param mixed[] $context The log context + * @param DateTimeImmutable|null $datetime Optional log date to log into the past or future + * @return bool Whether the record has been processed + * + * @phpstan-param value-of|Level $level + */ + public function addRecord(int|Level $level, string $message, array $context = [], DateTimeImmutable|null $datetime = null): bool + { + if (\is_int($level) && isset(self::RFC_5424_LEVELS[$level])) { + $level = self::RFC_5424_LEVELS[$level]; + } + + if ($this->detectCycles) { + if (null !== ($fiber = Fiber::getCurrent())) { + $logDepth = $this->fiberLogDepth[$fiber] = ($this->fiberLogDepth[$fiber] ?? 0) + 1; + } else { + $logDepth = ++$this->logDepth; + } + } else { + $logDepth = 0; + } + + if ($logDepth === 3) { + $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); + + return false; + } elseif ($logDepth >= 5) { // log depth 4 is let through, so we can log the warning above + return false; + } + + try { + $recordInitialized = \count($this->processors) === 0; + + $record = new LogRecord( + datetime: $datetime ?? new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), + channel: $this->name, + level: self::toMonologLevel($level), + message: $message, + context: $context, + extra: [], + ); + $handled = false; + + foreach ($this->handlers as $handler) { + if (false === $recordInitialized) { + // skip initializing the record as long as no handler is going to handle it + if (!$handler->isHandling($record)) { + continue; + } + + try { + foreach ($this->processors as $processor) { + $record = $processor($record); + } + $recordInitialized = true; + } catch (Throwable $e) { + $this->handleException($e, $record); + + return true; + } + } + + // once the record is initialized, send it to all handlers as long as the bubbling chain is not interrupted + try { + $handled = true; + if (true === $handler->handle(clone $record)) { + break; + } + } catch (Throwable $e) { + $this->handleException($e, $record); + + return true; + } + } + + return $handled; + } finally { + if ($this->detectCycles) { + if (isset($fiber)) { + $this->fiberLogDepth[$fiber]--; + } else { + $this->logDepth--; + } + } + } + } + + /** + * Ends a log cycle and frees all resources used by handlers. + * + * Closing a Handler means flushing all buffers and freeing any open resources/handles. + * Handlers that have been closed should be able to accept log records again and re-open + * themselves on demand, but this may not always be possible depending on implementation. + * + * This is useful at the end of a request and will be called automatically on every handler + * when they get destructed. + */ + public function close(): void + { + foreach ($this->handlers as $handler) { + $handler->close(); + } + } + + /** + * Ends a log cycle and resets all handlers and processors to their initial state. + * + * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal + * state, and getting it back to a state in which it can receive log records again. + * + * This is useful in case you want to avoid logs leaking between two requests or jobs when you + * have a long running process like a worker or an application server serving multiple requests + * in one process. + */ + public function reset(): void + { + foreach ($this->handlers as $handler) { + if ($handler instanceof ResettableInterface) { + $handler->reset(); + } + } + + foreach ($this->processors as $processor) { + if ($processor instanceof ResettableInterface) { + $processor->reset(); + } + } + } + + /** + * Gets the name of the logging level as a string. + * + * This still returns a string instead of a Level for BC, but new code should not rely on this method. + * + * @throws \Psr\Log\InvalidArgumentException If level is not defined + * + * @phpstan-param value-of|Level $level + * @phpstan-return value-of + * + * @deprecated Since 3.0, use {@see toMonologLevel} or {@see \Monolog\Level->getName()} instead + */ + public static function getLevelName(int|Level $level): string + { + return self::toMonologLevel($level)->getName(); + } + + /** + * Converts PSR-3 levels to Monolog ones if necessary + * + * @param int|string|Level|LogLevel::* $level Level number (monolog) or name (PSR-3) + * @throws \Psr\Log\InvalidArgumentException If level is not defined + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public static function toMonologLevel(string|int|Level $level): Level + { + if ($level instanceof Level) { + return $level; + } + + if (\is_string($level)) { + if (is_numeric($level)) { + $levelEnum = Level::tryFrom((int) $level); + if ($levelEnum === null) { + throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); + } + + return $levelEnum; + } + + // Contains first char of all log levels and avoids using strtoupper() which may have + // strange results depending on locale (for example, "i" will become "ฤฐ" in Turkish locale) + $upper = strtr(substr($level, 0, 1), 'dinweca', 'DINWECA') . strtolower(substr($level, 1)); + if (\defined(Level::class.'::'.$upper)) { + return \constant(Level::class . '::' . $upper); + } + + throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); + } + + $levelEnum = Level::tryFrom($level); + if ($levelEnum === null) { + throw new InvalidArgumentException('Level "'.var_export($level, true).'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); + } + + return $levelEnum; + } + + /** + * Checks whether the Logger has a handler that listens on the given level + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function isHandling(int|string|Level $level): bool + { + $record = new LogRecord( + datetime: new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), + channel: $this->name, + message: '', + level: self::toMonologLevel($level), + ); + + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * Set a custom exception handler that will be called if adding a new record fails + * + * The Closure will receive an exception object and the record that failed to be logged + * + * @return $this + */ + public function setExceptionHandler(Closure|null $callback): self + { + $this->exceptionHandler = $callback; + + return $this; + } + + public function getExceptionHandler(): Closure|null + { + return $this->exceptionHandler; + } + + /** + * Adds a log record at an arbitrary level. + * + * This method allows for compatibility with common interfaces. + * + * @param mixed $level The log level (a Monolog, PSR-3 or RFC 5424 level) + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + * + * @phpstan-param Level|LogLevel::* $level + */ + public function log($level, string|\Stringable $message, array $context = []): void + { + if (!$level instanceof Level) { + if (!\is_string($level) && !\is_int($level)) { + throw new \InvalidArgumentException('$level is expected to be a string, int or '.Level::class.' instance'); + } + + if (isset(self::RFC_5424_LEVELS[$level])) { + $level = self::RFC_5424_LEVELS[$level]; + } + + $level = static::toMonologLevel($level); + } + + $this->addRecord($level, (string) $message, $context); + } + + /** + * Adds a log record at the DEBUG level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function debug(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Debug, (string) $message, $context); + } + + /** + * Adds a log record at the INFO level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function info(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Info, (string) $message, $context); + } + + /** + * Adds a log record at the NOTICE level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function notice(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Notice, (string) $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function warning(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Warning, (string) $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function error(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Error, (string) $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function critical(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Critical, (string) $message, $context); + } + + /** + * Adds a log record at the ALERT level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function alert(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Alert, (string) $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * This method allows for compatibility with common interfaces. + * + * @param string|Stringable $message The log message + * @param mixed[] $context The log context + */ + public function emergency(string|\Stringable $message, array $context = []): void + { + $this->addRecord(Level::Emergency, (string) $message, $context); + } + + /** + * Sets the timezone to be used for the timestamp of log records. + * + * @return $this + */ + public function setTimezone(DateTimeZone $tz): self + { + $this->timezone = $tz; + + return $this; + } + + /** + * Returns the timezone to be used for the timestamp of log records. + */ + public function getTimezone(): DateTimeZone + { + return $this->timezone; + } + + /** + * Delegates exception management to the custom exception handler, + * or throws the exception if no custom handler is set. + */ + protected function handleException(Throwable $e, LogRecord $record): void + { + if (null === $this->exceptionHandler) { + throw $e; + } + + ($this->exceptionHandler)($e, $record); + } + + /** + * @return array + */ + public function __serialize(): array + { + return [ + 'name' => $this->name, + 'handlers' => $this->handlers, + 'processors' => $this->processors, + 'microsecondTimestamps' => $this->microsecondTimestamps, + 'timezone' => $this->timezone, + 'exceptionHandler' => $this->exceptionHandler, + 'logDepth' => $this->logDepth, + 'detectCycles' => $this->detectCycles, + ]; + } + + /** + * @param array $data + */ + public function __unserialize(array $data): void + { + foreach (['name', 'handlers', 'processors', 'microsecondTimestamps', 'timezone', 'exceptionHandler', 'logDepth', 'detectCycles'] as $property) { + if (isset($data[$property])) { + $this->$property = $data[$property]; + } + } + + $this->fiberLogDepth = new \WeakMap(); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ClosureContextProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ClosureContextProcessor.php new file mode 100644 index 0000000..514b354 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ClosureContextProcessor.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * Generates a context from a Closure if the Closure is the only value + * in the context + * + * It helps reduce the performance impact of debug logs if they do + * need to create lots of context information. If this processor is added + * on the correct handler the context data will only be generated + * when the logs are actually logged to that handler, which is useful when + * using FingersCrossedHandler or other filtering handlers to conditionally + * log records. + */ +class ClosureContextProcessor implements ProcessorInterface +{ + public function __invoke(LogRecord $record): LogRecord + { + $context = $record->context; + if (isset($context[0]) && 1 === \count($context) && $context[0] instanceof \Closure) { + try { + $context = $context[0](); + } catch (\Throwable $e) { + $context = [ + 'error_on_context_generation' => $e->getMessage(), + 'exception' => $e, + ]; + } + + if (!\is_array($context)) { + $context = [$context]; + } + + $record = $record->with(context: $context); + } + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php new file mode 100644 index 0000000..6b25505 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Level; +use Monolog\Logger; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Injects Git branch and Git commit SHA in all records + * + * @author Nick Otter + * @author Jordi Boggiano + */ +class GitProcessor implements ProcessorInterface +{ + private Level $level; + /** @var array{branch: string, commit: string}|array|null */ + private static $cache = null; + + /** + * @param int|string|Level|LogLevel::* $level The minimum logging level at which this Processor will be triggered + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function __construct(int|string|Level $level = Level::Debug) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + // return if the level is not high enough + if ($record->level->isLowerThan($this->level)) { + return $record; + } + + $record->extra['git'] = self::getGitInfo(); + + return $record; + } + + /** + * @return array{branch: string, commit: string}|array + */ + private static function getGitInfo(): array + { + if (self::$cache !== null) { + return self::$cache; + } + + $branches = shell_exec('git branch -v --no-abbrev'); + if (\is_string($branches) && 1 === preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { + return self::$cache = [ + 'branch' => $matches[1], + 'commit' => $matches[2], + ]; + } + + return self::$cache = []; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php new file mode 100644 index 0000000..cba6e09 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * Injects value of gethostname in all records + */ +class HostnameProcessor implements ProcessorInterface +{ + private static string $host; + + public function __construct() + { + self::$host = (string) gethostname(); + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + $record->extra['hostname'] = self::$host; + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php new file mode 100644 index 0000000..efc2f50 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php @@ -0,0 +1,122 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Level; +use Monolog\Logger; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Injects line/file:class/function where the log message came from + * + * Warning: This only works if the handler processes the logs directly. + * If you put the processor on a handler that is behind a FingersCrossedHandler + * for example, the processor will only be called once the trigger level is reached, + * and all the log records will have the same file/line/.. data from the call that + * triggered the FingersCrossedHandler. + * + * @author Jordi Boggiano + */ +class IntrospectionProcessor implements ProcessorInterface +{ + private Level $level; + + /** @var string[] */ + private array $skipClassesPartials; + + private int $skipStackFramesCount; + + private const SKIP_FUNCTIONS = [ + 'call_user_func', + 'call_user_func_array', + ]; + + /** + * @param string|int|Level $level The minimum logging level at which this Processor will be triggered + * @param string[] $skipClassesPartials + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function __construct(int|string|Level $level = Level::Debug, array $skipClassesPartials = [], int $skipStackFramesCount = 0) + { + $this->level = Logger::toMonologLevel($level); + $this->skipClassesPartials = array_merge(['Monolog\\'], $skipClassesPartials); + $this->skipStackFramesCount = $skipStackFramesCount; + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + // return if the level is not high enough + if ($record->level->isLowerThan($this->level)) { + return $record; + } + + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + + // skip first since it's always the current method + array_shift($trace); + // the call_user_func call is also skipped + array_shift($trace); + + $i = 0; + + while ($this->isTraceClassOrSkippedFunction($trace, $i)) { + if (isset($trace[$i]['class'])) { + foreach ($this->skipClassesPartials as $part) { + if (strpos($trace[$i]['class'], $part) !== false) { + $i++; + + continue 2; + } + } + } elseif (\in_array($trace[$i]['function'], self::SKIP_FUNCTIONS, true)) { + $i++; + + continue; + } + + break; + } + + $i += $this->skipStackFramesCount; + + // we should have the call source now + $record->extra = array_merge( + $record->extra, + [ + 'file' => $trace[$i - 1]['file'] ?? null, + 'line' => $trace[$i - 1]['line'] ?? null, + 'class' => $trace[$i]['class'] ?? null, + 'callType' => $trace[$i]['type'] ?? null, + 'function' => $trace[$i]['function'] ?? null, + ] + ); + + return $record; + } + + /** + * @param array $trace + */ + private function isTraceClassOrSkippedFunction(array $trace, int $index): bool + { + if (!isset($trace[$index])) { + return false; + } + + return isset($trace[$index]['class']) || \in_array($trace[$index]['function'], self::SKIP_FUNCTIONS, true); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/LoadAverageProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/LoadAverageProcessor.php new file mode 100644 index 0000000..762ed91 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/LoadAverageProcessor.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * Injects sys_getloadavg in all records @see https://www.php.net/manual/en/function.sys-getloadavg.php + * + * @author Johan Vlaar + */ +class LoadAverageProcessor implements ProcessorInterface +{ + public const LOAD_1_MINUTE = 0; + public const LOAD_5_MINUTE = 1; + public const LOAD_15_MINUTE = 2; + + private const AVAILABLE_LOAD = [ + self::LOAD_1_MINUTE, + self::LOAD_5_MINUTE, + self::LOAD_15_MINUTE, + ]; + + /** + * @var int + */ + protected $avgSystemLoad; + + /** + * @param self::LOAD_* $avgSystemLoad + */ + public function __construct(int $avgSystemLoad = self::LOAD_1_MINUTE) + { + if (!\in_array($avgSystemLoad, self::AVAILABLE_LOAD, true)) { + throw new \InvalidArgumentException(sprintf('Invalid average system load: `%s`', $avgSystemLoad)); + } + $this->avgSystemLoad = $avgSystemLoad; + } + + /** + * {@inheritDoc} + */ + public function __invoke(LogRecord $record): LogRecord + { + if (!\function_exists('sys_getloadavg')) { + return $record; + } + $usage = sys_getloadavg(); + if (false === $usage) { + return $record; + } + + $record->extra['load_average'] = $usage[$this->avgSystemLoad]; + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php new file mode 100644 index 0000000..adc32c6 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * Injects memory_get_peak_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryPeakUsageProcessor extends MemoryProcessor +{ + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + $usage = memory_get_peak_usage($this->realUsage); + + if ($this->useFormatting) { + $usage = $this->formatBytes($usage); + } + + $record->extra['memory_peak_usage'] = $usage; + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php new file mode 100644 index 0000000..f808e51 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Some methods that are common for all memory processors + * + * @author Rob Jensen + */ +abstract class MemoryProcessor implements ProcessorInterface +{ + /** + * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. + */ + protected bool $realUsage; + + /** + * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + protected bool $useFormatting; + + /** + * @param bool $realUsage Set this to true to get the real size of memory allocated from system. + * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + public function __construct(bool $realUsage = true, bool $useFormatting = true) + { + $this->realUsage = $realUsage; + $this->useFormatting = $useFormatting; + } + + /** + * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is + * + * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as int + */ + protected function formatBytes(int $bytes) + { + if (!$this->useFormatting) { + return $bytes; + } + + if ($bytes > 1024 * 1024) { + return round($bytes / 1024 / 1024, 2).' MB'; + } elseif ($bytes > 1024) { + return round($bytes / 1024, 2).' KB'; + } + + return $bytes . ' B'; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php new file mode 100644 index 0000000..a814b1d --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * Injects memory_get_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryUsageProcessor extends MemoryProcessor +{ + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + $usage = memory_get_usage($this->realUsage); + + if ($this->useFormatting) { + $usage = $this->formatBytes($usage); + } + + $record->extra['memory_usage'] = $usage; + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php new file mode 100644 index 0000000..a48a785 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Level; +use Monolog\Logger; +use Psr\Log\LogLevel; +use Monolog\LogRecord; + +/** + * Injects Hg branch and Hg revision number in all records + * + * @author Jonathan A. Schweder + */ +class MercurialProcessor implements ProcessorInterface +{ + private Level $level; + /** @var array{branch: string, revision: string}|array|null */ + private static $cache = null; + + /** + * @param int|string|Level $level The minimum logging level at which this Processor will be triggered + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function __construct(int|string|Level $level = Level::Debug) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + // return if the level is not high enough + if ($record->level->isLowerThan($this->level)) { + return $record; + } + + $record->extra['hg'] = self::getMercurialInfo(); + + return $record; + } + + /** + * @return array{branch: string, revision: string}|array + */ + private static function getMercurialInfo(): array + { + if (self::$cache !== null) { + return self::$cache; + } + + $result = explode(' ', trim((string) shell_exec('hg id -nb'))); + + if (\count($result) >= 3) { + return self::$cache = [ + 'branch' => $result[1], + 'revision' => $result[2], + ]; + } + + return self::$cache = []; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php new file mode 100644 index 0000000..bb9a522 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * Adds value of getmypid into records + * + * @author Andreas Hรถrnicke + */ +class ProcessIdProcessor implements ProcessorInterface +{ + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + $record->extra['process_id'] = getmypid(); + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php new file mode 100644 index 0000000..ebe41fc --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * An optional interface to allow labelling Monolog processors. + * + * @author Nicolas Grekas + */ +interface ProcessorInterface +{ + /** + * @return LogRecord The processed record + */ + public function __invoke(LogRecord $record); +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php new file mode 100644 index 0000000..76adf25 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -0,0 +1,87 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Utils; +use Monolog\LogRecord; + +/** + * Processes a record's message according to PSR-3 rules + * + * It replaces {foo} with the value from $context['foo'] + * + * @author Jordi Boggiano + */ +class PsrLogMessageProcessor implements ProcessorInterface +{ + public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; + + private ?string $dateFormat; + + private bool $removeUsedContextFields; + + /** + * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format + * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset + */ + public function __construct(?string $dateFormat = null, bool $removeUsedContextFields = false) + { + $this->dateFormat = $dateFormat; + $this->removeUsedContextFields = $removeUsedContextFields; + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + if (false === strpos($record->message, '{')) { + return $record; + } + + $replacements = []; + $context = $record->context; + + foreach ($context as $key => $val) { + $placeholder = '{' . $key . '}'; + if (strpos($record->message, $placeholder) === false) { + continue; + } + + if (null === $val || \is_scalar($val) || (\is_object($val) && method_exists($val, "__toString"))) { + $replacements[$placeholder] = $val; + } elseif ($val instanceof \DateTimeInterface) { + if (null === $this->dateFormat && $val instanceof \Monolog\DateTimeImmutable) { + // handle monolog dates using __toString if no specific dateFormat was asked for + // so that it follows the useMicroseconds flag + $replacements[$placeholder] = (string) $val; + } else { + $replacements[$placeholder] = $val->format($this->dateFormat ?? static::SIMPLE_DATE); + } + } elseif ($val instanceof \UnitEnum) { + $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; + } elseif (\is_object($val)) { + $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; + } elseif (\is_array($val)) { + $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); + } else { + $replacements[$placeholder] = '['.\gettype($val).']'; + } + + if ($this->removeUsedContextFields) { + unset($context[$key]); + } + } + + return $record->with(message: strtr($record->message, $replacements), context: $context); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php new file mode 100644 index 0000000..f4e41ce --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\LogRecord; + +/** + * Adds a tags array into record + * + * @author Martijn Riemers + */ +class TagProcessor implements ProcessorInterface +{ + /** @var string[] */ + private array $tags; + + /** + * @param string[] $tags + */ + public function __construct(array $tags = []) + { + $this->setTags($tags); + } + + /** + * @param string[] $tags + * @return $this + */ + public function addTags(array $tags = []): self + { + $this->tags = array_merge($this->tags, $tags); + + return $this; + } + + /** + * @param string[] $tags + * @return $this + */ + public function setTags(array $tags = []): self + { + $this->tags = $tags; + + return $this; + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + $record->extra['tags'] = $this->tags; + + return $record; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php new file mode 100644 index 0000000..261e653 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\ResettableInterface; +use Monolog\LogRecord; + +/** + * Adds a unique identifier into records + * + * @author Simon Mรถnch + */ +class UidProcessor implements ProcessorInterface, ResettableInterface +{ + /** @var non-empty-string */ + private string $uid; + + /** + * @param int<1, 32> $length + */ + public function __construct(int $length = 7) + { + if ($length > 32 || $length < 1) { + throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); + } + + $this->uid = $this->generateUid($length); + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + $record->extra['uid'] = $this->uid; + + return $record; + } + + public function getUid(): string + { + return $this->uid; + } + + public function reset(): void + { + $this->uid = $this->generateUid(\strlen($this->uid)); + } + + /** + * @param positive-int $length + * @return non-empty-string + */ + private function generateUid(int $length): string + { + return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php new file mode 100644 index 0000000..b78385e --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use ArrayAccess; +use Monolog\LogRecord; + +/** + * Injects url/method and remote IP of the current web request in all records + * + * @author Jordi Boggiano + */ +class WebProcessor implements ProcessorInterface +{ + /** + * @var array|ArrayAccess + */ + protected array|ArrayAccess $serverData; + + /** + * Default fields + * + * Array is structured as [key in record.extra => key in $serverData] + * + * @var array + */ + protected array $extraFields = [ + 'url' => 'REQUEST_URI', + 'ip' => 'REMOTE_ADDR', + 'http_method' => 'REQUEST_METHOD', + 'server' => 'SERVER_NAME', + 'referrer' => 'HTTP_REFERER', + 'user_agent' => 'HTTP_USER_AGENT', + ]; + + /** + * @param array|ArrayAccess|null $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data + * @param array|array|null $extraFields Field names and the related key inside $serverData to be added (or just a list of field names to use the default configured $serverData mapping). If not provided it defaults to: [url, ip, http_method, server, referrer] + unique_id if present in server data + */ + public function __construct(array|ArrayAccess|null $serverData = null, array|null $extraFields = null) + { + if (null === $serverData) { + $this->serverData = &$_SERVER; + } else { + $this->serverData = $serverData; + } + + $defaultEnabled = ['url', 'ip', 'http_method', 'server', 'referrer']; + if (isset($this->serverData['UNIQUE_ID'])) { + $this->extraFields['unique_id'] = 'UNIQUE_ID'; + $defaultEnabled[] = 'unique_id'; + } + + if (null === $extraFields) { + $extraFields = $defaultEnabled; + } + if (isset($extraFields[0])) { + foreach (array_keys($this->extraFields) as $fieldName) { + if (!\in_array($fieldName, $extraFields, true)) { + unset($this->extraFields[$fieldName]); + } + } + } else { + $this->extraFields = $extraFields; + } + } + + /** + * @inheritDoc + */ + public function __invoke(LogRecord $record): LogRecord + { + // skip processing if for some reason request data + // is not present (CLI or wonky SAPIs) + if (!isset($this->serverData['REQUEST_URI'])) { + return $record; + } + + $record->extra = $this->appendExtraFields($record->extra); + + return $record; + } + + /** + * @return $this + */ + public function addExtraField(string $extraName, string $serverName): self + { + $this->extraFields[$extraName] = $serverName; + + return $this; + } + + /** + * @param mixed[] $extra + * @return mixed[] + */ + private function appendExtraFields(array $extra): array + { + foreach ($this->extraFields as $extraName => $serverName) { + $extra[$extraName] = $this->serverData[$serverName] ?? null; + } + + return $extra; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Registry.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Registry.php new file mode 100644 index 0000000..2ef2edc --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Registry.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use InvalidArgumentException; + +/** + * Monolog log registry + * + * Allows to get `Logger` instances in the global scope + * via static method calls on this class. + * + * + * $application = new Monolog\Logger('application'); + * $api = new Monolog\Logger('api'); + * + * Monolog\Registry::addLogger($application); + * Monolog\Registry::addLogger($api); + * + * function testLogger() + * { + * Monolog\Registry::api()->error('Sent to $api Logger instance'); + * Monolog\Registry::application()->error('Sent to $application Logger instance'); + * } + * + * + * @author Tomas Tatarko + */ +class Registry +{ + /** + * List of all loggers in the registry (by named indexes) + * + * @var Logger[] + */ + private static array $loggers = []; + + /** + * Adds new logging channel to the registry + * + * @param Logger $logger Instance of the logging channel + * @param string|null $name Name of the logging channel ($logger->getName() by default) + * @param bool $overwrite Overwrite instance in the registry if the given name already exists? + * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists + */ + public static function addLogger(Logger $logger, ?string $name = null, bool $overwrite = false): void + { + $name = $name ?? $logger->getName(); + + if (isset(self::$loggers[$name]) && !$overwrite) { + throw new InvalidArgumentException('Logger with the given name already exists'); + } + + self::$loggers[$name] = $logger; + } + + /** + * Checks if such logging channel exists by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function hasLogger($logger): bool + { + if ($logger instanceof Logger) { + $index = array_search($logger, self::$loggers, true); + + return false !== $index; + } + + return isset(self::$loggers[$logger]); + } + + /** + * Removes instance from registry by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function removeLogger($logger): void + { + if ($logger instanceof Logger) { + if (false !== ($idx = array_search($logger, self::$loggers, true))) { + unset(self::$loggers[$idx]); + } + } else { + unset(self::$loggers[$logger]); + } + } + + /** + * Clears the registry + */ + public static function clear(): void + { + self::$loggers = []; + } + + /** + * Gets Logger instance from the registry + * + * @param string $name Name of the requested Logger instance + * @throws \InvalidArgumentException If named Logger instance is not in the registry + */ + public static function getInstance(string $name): Logger + { + if (!isset(self::$loggers[$name])) { + throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); + } + + return self::$loggers[$name]; + } + + /** + * Gets Logger instance from the registry via static method call + * + * @param string $name Name of the requested Logger instance + * @param mixed[] $arguments Arguments passed to static method call + * @throws \InvalidArgumentException If named Logger instance is not in the registry + * @return Logger Requested instance of Logger + */ + public static function __callStatic(string $name, array $arguments): Logger + { + return self::getInstance($name); + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/ResettableInterface.php new file mode 100644 index 0000000..4983a6b --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/ResettableInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +/** + * Handler or Processor implementing this interface will be reset when Logger::reset() is called. + * + * Resetting ends a log cycle gets them back to their initial state. + * + * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal + * state, and getting it back to a state in which it can receive log records again. + * + * This is useful in case you want to avoid logs leaking between two requests or jobs when you + * have a long running process like a worker or an application server serving multiple requests + * in one process. + * + * @author Grรฉgoire Pineau + */ +interface ResettableInterface +{ + public function reset(): void; +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/SignalHandler.php new file mode 100644 index 0000000..b6a69fc --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/SignalHandler.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; +use ReflectionExtension; + +/** + * Monolog POSIX signal handler + * + * @author Robert Gust-Bardon + */ +class SignalHandler +{ + private LoggerInterface $logger; + + /** @var array SIG_DFL, SIG_IGN or previous callable */ + private array $previousSignalHandler = []; + /** @var array */ + private array $signalLevelMap = []; + /** @var array */ + private array $signalRestartSyscalls = []; + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; + } + + /** + * @param int|string|Level $level Level or level name + * @return $this + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + public function registerSignalHandler(int $signo, int|string|Level $level = LogLevel::CRITICAL, bool $callPrevious = true, bool $restartSyscalls = true, ?bool $async = true): self + { + if (!\extension_loaded('pcntl') || !\function_exists('pcntl_signal')) { + return $this; + } + + $level = Logger::toMonologLevel($level)->toPsrLogLevel(); + + if ($callPrevious) { + $handler = pcntl_signal_get_handler($signo); + $this->previousSignalHandler[$signo] = $handler; + } else { + unset($this->previousSignalHandler[$signo]); + } + $this->signalLevelMap[$signo] = $level; + $this->signalRestartSyscalls[$signo] = $restartSyscalls; + + if ($async !== null) { + pcntl_async_signals($async); + } + + pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); + + return $this; + } + + /** + * @param mixed $siginfo + */ + public function handleSignal(int $signo, $siginfo = null): void + { + /** @var array $signals */ + static $signals = []; + + if (\count($signals) === 0 && \extension_loaded('pcntl')) { + $pcntl = new ReflectionExtension('pcntl'); + foreach ($pcntl->getConstants() as $name => $value) { + if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && \is_int($value)) { + $signals[$value] = $name; + } + } + } + + $level = $this->signalLevelMap[$signo] ?? LogLevel::CRITICAL; + $signal = $signals[$signo] ?? $signo; + $context = $siginfo ?? []; + $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); + + if (!isset($this->previousSignalHandler[$signo])) { + return; + } + + if ($this->previousSignalHandler[$signo] === SIG_DFL) { + if (\extension_loaded('pcntl') && \function_exists('pcntl_signal') && \function_exists('pcntl_sigprocmask') && \function_exists('pcntl_signal_dispatch') + && \extension_loaded('posix') && \function_exists('posix_getpid') && \function_exists('posix_kill') + ) { + $restartSyscalls = $this->signalRestartSyscalls[$signo] ?? true; + pcntl_signal($signo, SIG_DFL, $restartSyscalls); + pcntl_sigprocmask(SIG_UNBLOCK, [$signo], $oldset); + posix_kill(posix_getpid(), $signo); + pcntl_signal_dispatch(); + pcntl_sigprocmask(SIG_SETMASK, $oldset); + pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); + } + } elseif (\is_callable($this->previousSignalHandler[$signo])) { + $this->previousSignalHandler[$signo]($signo, $siginfo); + } + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Test/TestCase.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Test/TestCase.php new file mode 100644 index 0000000..29ec7c9 --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Test/TestCase.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Test; + +use Monolog\Level; +use Monolog\Logger; +use Monolog\LogRecord; +use Monolog\DateTimeImmutable; +use Monolog\Formatter\FormatterInterface; +use Psr\Log\LogLevel; + +/** + * Lets you easily generate log records and a dummy formatter for testing purposes + * + * @author Jordi Boggiano + * + * @internal feel free to reuse this to test your own handlers, this is marked internal to avoid issues with PHPStorm https://github.com/Seldaek/monolog/issues/1677 + */ +class TestCase extends \PHPUnit\Framework\TestCase +{ + public function tearDown(): void + { + parent::tearDown(); + + if (isset($this->handler)) { + unset($this->handler); + } + } + + /** + * @param array $context + * @param array $extra + * + * @phpstan-param value-of|value-of|Level|LogLevel::* $level + */ + protected function getRecord(int|string|Level $level = Level::Warning, string|\Stringable $message = 'test', array $context = [], string $channel = 'test', \DateTimeImmutable $datetime = new DateTimeImmutable(true), array $extra = []): LogRecord + { + return new LogRecord( + message: (string) $message, + context: $context, + level: Logger::toMonologLevel($level), + channel: $channel, + datetime: $datetime, + extra: $extra, + ); + } + + /** + * @phpstan-return list + */ + protected function getMultipleRecords(): array + { + return [ + $this->getRecord(Level::Debug, 'debug message 1'), + $this->getRecord(Level::Debug, 'debug message 2'), + $this->getRecord(Level::Info, 'information'), + $this->getRecord(Level::Warning, 'warning'), + $this->getRecord(Level::Error, 'error'), + ]; + } + + protected function getIdentityFormatter(): FormatterInterface + { + $formatter = $this->createMock(FormatterInterface::class); + $formatter->expects(self::any()) + ->method('format') + ->willReturnCallback(function ($record) { + return $record->message; + }); + + return $formatter; + } +} diff --git a/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Utils.php b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Utils.php new file mode 100644 index 0000000..79ea96c --- /dev/null +++ b/tests/php_test_files/vendor/monolog/monolog/src/Monolog/Utils.php @@ -0,0 +1,274 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +final class Utils +{ + const DEFAULT_JSON_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PARTIAL_OUTPUT_ON_ERROR; + + public static function getClass(object $object): string + { + $class = \get_class($object); + + if (false === ($pos = strpos($class, "@anonymous\0"))) { + return $class; + } + + if (false === ($parent = get_parent_class($class))) { + return substr($class, 0, $pos + 10); + } + + return $parent . '@anonymous'; + } + + public static function substr(string $string, int $start, ?int $length = null): string + { + if (\extension_loaded('mbstring')) { + return mb_strcut($string, $start, $length); + } + + return substr($string, $start, (null === $length) ? \strlen($string) : $length); + } + + /** + * Makes sure if a relative path is passed in it is turned into an absolute path + * + * @param string $streamUrl stream URL or path without protocol + */ + public static function canonicalizePath(string $streamUrl): string + { + $prefix = ''; + if ('file://' === substr($streamUrl, 0, 7)) { + $streamUrl = substr($streamUrl, 7); + $prefix = 'file://'; + } + + // other type of stream, not supported + if (false !== strpos($streamUrl, '://')) { + return $streamUrl; + } + + // already absolute + if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { + return $prefix.$streamUrl; + } + + $streamUrl = getcwd() . '/' . $streamUrl; + + return $prefix.$streamUrl; + } + + /** + * Return the JSON representation of a value + * + * @param mixed $data + * @param int $encodeFlags flags to pass to json encode, defaults to DEFAULT_JSON_FLAGS + * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null + * @throws \RuntimeException if encoding fails and errors are not ignored + * @return string when errors are ignored and the encoding fails, "null" is returned which is valid json for null + */ + public static function jsonEncode($data, ?int $encodeFlags = null, bool $ignoreErrors = false): string + { + if (null === $encodeFlags) { + $encodeFlags = self::DEFAULT_JSON_FLAGS; + } + + if ($ignoreErrors) { + $json = @json_encode($data, $encodeFlags); + if (false === $json) { + return 'null'; + } + + return $json; + } + + $json = json_encode($data, $encodeFlags); + if (false === $json) { + $json = self::handleJsonError(json_last_error(), $data); + } + + return $json; + } + + /** + * Handle a json_encode failure. + * + * If the failure is due to invalid string encoding, try to clean the + * input and encode again. If the second encoding attempt fails, the + * initial error is not encoding related or the input can't be cleaned then + * raise a descriptive exception. + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION + * @throws \RuntimeException if failure can't be corrected + * @return string JSON encoded data after error correction + */ + public static function handleJsonError(int $code, $data, ?int $encodeFlags = null): string + { + if ($code !== JSON_ERROR_UTF8) { + self::throwEncodeError($code, $data); + } + + if (\is_string($data)) { + self::detectAndCleanUtf8($data); + } elseif (\is_array($data)) { + array_walk_recursive($data, ['Monolog\Utils', 'detectAndCleanUtf8']); + } else { + self::throwEncodeError($code, $data); + } + + if (null === $encodeFlags) { + $encodeFlags = self::DEFAULT_JSON_FLAGS; + } + + $json = json_encode($data, $encodeFlags); + + if ($json === false) { + self::throwEncodeError(json_last_error(), $data); + } + + return $json; + } + + /** + * @internal + */ + public static function pcreLastErrorMessage(int $code): string + { + if (PHP_VERSION_ID >= 80000) { + return preg_last_error_msg(); + } + + $constants = (get_defined_constants(true))['pcre']; + $constants = array_filter($constants, function ($key) { + return substr($key, -6) == '_ERROR'; + }, ARRAY_FILTER_USE_KEY); + + $constants = array_flip($constants); + + return $constants[$code] ?? 'UNDEFINED_ERROR'; + } + + /** + * Throws an exception according to a given code with a customized message + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @throws \RuntimeException + */ + private static function throwEncodeError(int $code, $data): never + { + $msg = match ($code) { + JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', + JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch', + JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', + JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded', + default => 'Unknown error', + }; + + throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); + } + + /** + * Detect invalid UTF-8 string characters and convert to valid UTF-8. + * + * Valid UTF-8 input will be left unmodified, but strings containing + * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed + * original encoding of ISO-8859-15. This conversion may result in + * incorrect output if the actual encoding was not ISO-8859-15, but it + * will be clean UTF-8 output and will not rely on expensive and fragile + * detection algorithms. + * + * Function converts the input in place in the passed variable so that it + * can be used as a callback for array_walk_recursive. + * + * @param mixed $data Input to check and convert if needed, passed by ref + */ + private static function detectAndCleanUtf8(&$data): void + { + if (\is_string($data) && preg_match('//u', $data) !== 1) { + $data = preg_replace_callback( + '/[\x80-\xFF]+/', + function (array $m): string { + return \function_exists('mb_convert_encoding') ? mb_convert_encoding($m[0], 'UTF-8', 'ISO-8859-1') : utf8_encode($m[0]); + }, + $data + ); + if (!\is_string($data)) { + $pcreErrorCode = preg_last_error(); + + throw new \RuntimeException('Failed to preg_replace_callback: ' . $pcreErrorCode . ' / ' . self::pcreLastErrorMessage($pcreErrorCode)); + } + $data = str_replace( + ['ยค', 'ยฆ', 'ยจ', 'ยด', 'ยธ', 'ยผ', 'ยฝ', 'ยพ'], + ['โ‚ฌ', 'ล ', 'ลก', 'ลฝ', 'ลพ', 'ล’', 'ล“', 'ลธ'], + $data + ); + } + } + + /** + * Converts a string with a valid 'memory_limit' format, to bytes. + * + * @param string|false $val + * @return int|false Returns an integer representing bytes. Returns FALSE in case of error. + */ + public static function expandIniShorthandBytes($val) + { + if (!\is_string($val)) { + return false; + } + + // support -1 + if ((int) $val < 0) { + return (int) $val; + } + + if (preg_match('/^\s*(?\d+)(?:\.\d+)?\s*(?[gmk]?)\s*$/i', $val, $match) !== 1) { + return false; + } + + $val = (int) $match['val']; + switch (strtolower($match['unit'] ?? '')) { + case 'g': + $val *= 1024; + // no break + case 'm': + $val *= 1024; + // no break + case 'k': + $val *= 1024; + } + + return $val; + } + + public static function getRecordMessageForException(LogRecord $record): string + { + $context = ''; + $extra = ''; + + try { + if (\count($record->context) > 0) { + $context = "\nContext: " . json_encode($record->context, JSON_THROW_ON_ERROR); + } + if (\count($record->extra) > 0) { + $extra = "\nExtra: " . json_encode($record->extra, JSON_THROW_ON_ERROR); + } + } catch (\Throwable $e) { + // noop + } + + return "\nThe exception occurred while attempting to log: " . $record->message . $context . $extra; + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/CHANGELOG.md b/tests/php_test_files/vendor/nyholm/dsn/CHANGELOG.md new file mode 100644 index 0000000..7286117 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/CHANGELOG.md @@ -0,0 +1,51 @@ +# Change Log + +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. + +## 2.0.1 + +### Fixed + +* Improve parsing of nested functions + +## 2.0.0 + +No changes since beta2. + +## 2.0.0@beta2 + +### Added + +* DsnParser::parseUrl(string $dsn): Url +* DsnParser::parsePath(string $dsn): Path + +## 2.0.0@beta1 + +Version 2 comes with a new definition was a DSN really is. It supports functions +and a greater variety of DSN formats. + +### Changed + +The `Nyholm\Dsn` class has been replaced with `Nyholm\Dsn\DsnParser`. To get a `Dsn` +object: + +```php + +// Before +$dsn = new \Nyholm\DSN('mysql://localhost'); + +// After +$dsn = new \Nyholm\Dsn\DsnParser::parse('mysql://localhost'); +``` + +## 1.0.0 + +No changes since 0.1.1. + +## 0.1.1 + +Support for PHP 7.3. + +## 0.1.0 + +Initial release. diff --git a/tests/php_test_files/vendor/nyholm/dsn/LICENSE b/tests/php_test_files/vendor/nyholm/dsn/LICENSE new file mode 100644 index 0000000..4698a2c --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/LICENSE @@ -0,0 +1,19 @@ +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/nyholm/dsn/README.md b/tests/php_test_files/vendor/nyholm/dsn/README.md new file mode 100644 index 0000000..8f0af12 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/README.md @@ -0,0 +1,266 @@ +# DSN parser + +[![Latest Version](https://img.shields.io/github/release/Nyholm/dsn.svg?style=flat-square)](https://github.com/Nyholm/dsn/releases) +[![Quality Score](https://img.shields.io/scrutinizer/g/Nyholm/dsn.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/dsn) +[![SymfonyInsight](https://insight.symfony.com/projects/fe1a70b7-6ba9-424d-9217-53833e47b07f/mini.svg)](https://insight.symfony.com/projects/fe1a70b7-6ba9-424d-9217-53833e47b07f) +[![Total Downloads](https://img.shields.io/packagist/dt/nyholm/dsn.svg?style=flat-square)](https://packagist.org/packages/nyholm/dsn) + +Parse DSN strings into value objects to make them easier to use, pass around and +manipulate. + +## Install + +Via Composer + +``` bash +composer require nyholm/dsn +``` + +## Quick usage + +```php +use Nyholm\Dsn\DsnParser; + +$dsn = DsnParser::parse('http://127.0.0.1/foo/bar?key=value'); +echo get_class($dsn); // "Nyholm\Dsn\Configuration\Url" +echo $dsn->getHost(); // "127.0.0.1" +echo $dsn->getPath(); // "/foo/bar" +echo $dsn->getPort(); // null +``` + +## The DSN string format +A DSN is a string used to configure many services. A common DSN may look like a +URL, other look like a file path. + +```text +memcached://127.0.0.1 +mysql://user:password@127.0.0.1:3306/my_table +memcached:///var/local/run/memcached.socket?weight=25 +``` + +Both types can have parameters, user, password. The exact definition we are using +is found [at the bottom of the page](#definition). + +### DSN Functions + +A DSN may contain zero or more functions. The DSN parser supports a function syntax +but not functionality itself. The function arguments must be separated with space +or comma. Here are some example functions. + +``` +failover(dummy://a dummy://a) +failover(dummy://a,dummy://a) +failover:(dummy://a,dummy://a) +roundrobin(dummy://a failover(dummy://b dummy://a) dummy://b) +``` + +## Parsing + +There are two methods for parsing; `DsnParser::parse()` and `DsnParser::parseFunc()`. +The latter is for situations where DSN functions are supported. + +```php +use Nyholm\Dsn\DsnParser; + +$dsn = DsnParser::parse('scheme://127.0.0.1/foo/bar?key=value'); +echo get_class($dsn); // "Nyholm\Dsn\Configuration\Url" +echo $dsn->getHost(); // "127.0.0.1" +echo $dsn->getPath(); // "/foo/bar" +echo $dsn->getPort(); // null +``` + +If functions are supported (like in the Symfony Mailer component) we can use `DsnParser::parseFunc()`: + +```php +use Nyholm\Dsn\DsnParser; + +$func = DsnParser::parseFunc('failover(sendgrid://KEY@default smtp://127.0.0.1)'); +echo $func->getName(); // "failover" +echo get_class($func->first()); // "Nyholm\Dsn\Configuration\Url" +echo $func->first()->getHost(); // "default" +echo $func->first()->getUser(); // "KEY" +``` + +```php +use Nyholm\Dsn\DsnParser; + +$func = DsnParser::parseFunc('foo(udp://localhost failover:(tcp://localhost:61616,tcp://remotehost:61616)?initialReconnectDelay=100)?start=now'); +echo $func->getName(); // "foo" +echo $func->getParameters()['start']; // "now" + +$args = $func->getArguments(); +echo get_class($args[0]); // "Nyholm\Dsn\Configuration\Url" +echo $args[0]->getScheme(); // "udp" +echo $args[0]->getHost(); // "localhost" + +echo get_class($args[1]); // "Nyholm\Dsn\Configuration\DsnFunction" +``` + +When using `DsnParser::parseFunc()` on a string that does not contain any DSN functions, +the parser will automatically add a default "dsn" function. This is added to provide +a consistent return type of the method. + +The string `redis://127.0.0.1` will automatically be converted to `dsn(redis://127.0.0.1)` +when using `DsnParser::parseFunc()`. + +```php +use Nyholm\Dsn\DsnParser; + +$func = DsnParser::parseFunc('smtp://127.0.0.1'); +echo $func->getName(); // "dsn" +echo get_class($func->first()); // "Nyholm\Dsn\Configuration\Url" +echo $func->first()->getHost(); // "127.0.0.1" + + +$func = DsnParser::parseFunc('dsn(smtp://127.0.0.1)'); +echo $func->getName(); // "dsn" +echo get_class($func->first()); // "Nyholm\Dsn\Configuration\Url" +echo $func->first()->getHost(); // "127.0.0.1" +``` + +### Parsing invalid DSN + +If you try to parse an invalid DSN string a `InvalidDsnException` will be thrown. + +```php +use Nyholm\Dsn\DsnParser; +use Nyholm\Dsn\Exception\InvalidDsnException; + +try { + DsnParser::parse('foobar'); +} catch (InvalidDsnException $e) { + echo $e->getMessage(); +} +``` + +## Consuming + +The result of parsing a DSN string is a `DsnFunction` or `Dsn`. A `DsnFunction` has +a `name`, `argument` and may have `parameters`. An argument is either a `DsnFunction` +or a `Dsn`. + +A `Dsn` could be a `Path` or `Url`. All 3 objects has methods for getting parts of +the DSN string. + +- `getScheme()` +- `getUser()` +- `getPassword()` +- `getHost()` +- `getPort()` +- `getPath()` +- `getParameters()` + +You may also replace parts of the DSN with the `with*` methods. A DSN is immutable +and you will get a new object back. + +```php +use Nyholm\Dsn\DsnParser; + +$dsn = DsnParser::parse('scheme://127.0.0.1/foo/bar?key=value'); + +echo $dsn->getHost(); // "127.0.0.1" +$new = $dsn->withHost('nyholm.tech'); + +echo $dsn->getHost(); // "127.0.0.1" +echo $new->getHost(); // "nyholm.tech" +``` + +## Not supported + +### Smart merging of options + +The current DSN is valid, but it is up to the consumer to make sure both host1 and +host2 has `global_option`. + +``` +redis://(host1:1234,host2:1234?node2_option=a)?global_option=b +``` + +### Special DSN + +The following DSN syntax are not supported. + +``` +// Rust +pgsql://user:pass@tcp(localhost:5555)/dbname + +// Java +jdbc:informix-sqli://[:]/:informixserver= + +``` + +We do not support DSN strings for ODBC connections like: + +``` +Driver={ODBC Driver 13 for SQL Server};server=localhost;database=WideWorldImporters;trusted_connection=Yes; +``` + +However, we do support "only parameters": + +``` +ocdb://?Driver=ODBC+Driver+13+for+SQL+Server&server=localhost&database=WideWorldImporters&trusted_connection=Yes +``` + +## Definition + +There is no official DSN RFC. We have defined a DSN configuration string as +using the following definition. The "URL looking" parts of a DSN is based from +[RFC 3986](https://tools.ietf.org/html/rfc3986). + + +``` +configuration: + { function | dsn } + +function: + function_name[:](configuration[,configuration])[?query] + +function_name: + REGEX: [a-zA-Z0-9\+-]+ + +dsn: + { scheme:[//]authority[path][?query] | scheme:[//][userinfo]path[?query] | host:port[path][?query] } + +scheme: + REGEX: [a-zA-Z0-9\+-\.]+ + +authority: + [userinfo@]host[:port] + +userinfo: + { user[:password] | :password } + +path: + "Normal" URL path according to RFC3986 section 3.3. + REGEX: (/? | (/[a-zA-Z0-9-\._~%!\$&'\(\}\*\+,;=:@]+)+) + +query: + "Normal" URL query according to RFC3986 section 3.4. + REGEX: [a-zA-Z0-9-\._~%!\$&'\(\}\*\+,;=:@]+ + +user: + This value can be URL encoded. + REGEX: [a-zA-Z0-9-\._~%!\$&'\(\}\*\+,;=]+ + +password: + This value can be URL encoded. + REGEX: [a-zA-Z0-9-\._~%!\$&'\(\}\*\+,;=]+ + +host: + REGEX: [a-zA-Z0-9-\._~%!\$&'\(\}\*\+,;=]+ + +post: + REGEX: [0-9]+ + +``` + +Example of formats that are supported: + +- scheme://127.0.0.1/foo/bar?key=value +- scheme://user:pass@127.0.0.1/foo/bar?key=value +- scheme:///var/local/run/memcached.socket?weight=25 +- scheme://user:pass@/var/local/run/memcached.socket?weight=25 +- scheme:?host[localhost]&host[localhost:12345]=3 +- scheme://a +- scheme:// +- server:80 diff --git a/tests/php_test_files/vendor/nyholm/dsn/composer.json b/tests/php_test_files/vendor/nyholm/dsn/composer.json new file mode 100644 index 0000000..f70f9ac --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/composer.json @@ -0,0 +1,40 @@ +{ + "name": "nyholm/dsn", + "type": "library", + "description": "Parse your DSN strings in a powerful and flexible way", + "keywords": [ + "dsn", + "parser", + "dsn parser", + "database" + ], + "homepage": "http://tnyholm.se", + "license": "MIT", + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + } + ], + "require": { + "php": ">=7.1" + }, + "require-dev": { + "symfony/phpunit-bridge": "^5.1" + }, + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Nyholm\\Dsn\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Nyholm\\Dsn\\Test\\": "tests/" + } + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Dsn.php b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Dsn.php new file mode 100644 index 0000000..aba4992 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Dsn.php @@ -0,0 +1,124 @@ + + */ +class Dsn +{ + /** + * @var string|null + */ + private $scheme; + + /** + * @var array + */ + private $parameters = []; + + public function __construct(?string $scheme, array $parameters = []) + { + $this->scheme = $scheme; + $this->parameters = $parameters; + } + + public function getScheme(): ?string + { + return $this->scheme; + } + + /** + * @return static + */ + public function withScheme(?string $scheme) + { + $new = clone $this; + $new->scheme = $scheme; + + return $new; + } + + public function getParameters(): array + { + return $this->parameters; + } + + /** + * @param mixed|null $default + * + * @return mixed + */ + public function getParameter(string $key, $default = null) + { + return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; + } + + /** + * @param mixed $value + * + * @return static + */ + public function withParameter(string $key, $value) + { + $new = clone $this; + $new->parameters[$key] = $value; + + return $new; + } + + /** + * @return static + */ + public function withoutParameter(string $key) + { + $new = clone $this; + unset($new->parameters[$key]); + + return $new; + } + + public function getHost(): ?string + { + return null; + } + + public function getPort(): ?int + { + return null; + } + + public function getPath(): ?string + { + return null; + } + + public function getUser(): ?string + { + return null; + } + + public function getPassword(): ?string + { + return null; + } + + /** + * @var string + */ + public function __toString() + { + $parameters = $this->getParameters(); + $scheme = $this->getScheme(); + + return + (empty($scheme) ? '' : $scheme.'://'). + (empty($parameters) ? '' : '?'.http_build_query($parameters)); + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/DsnFunction.php b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/DsnFunction.php new file mode 100644 index 0000000..7ce7843 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/DsnFunction.php @@ -0,0 +1,109 @@ + + */ +class DsnFunction +{ + /** + * @var string + */ + private $name; + + /** + * @var array + */ + private $arguments; + + /** + * @var array + */ + private $parameters; + + public function __construct(string $name, array $arguments, array $parameters = []) + { + $this->name = $name; + $this->arguments = $arguments; + $this->parameters = $parameters; + } + + public function getName(): string + { + return $this->name; + } + + /** + * @return array + */ + public function getArguments(): array + { + return $this->arguments; + } + + public function getParameters(): array + { + return $this->parameters; + } + + /** + * @param mixed|null $default + * + * @return mixed + */ + public function getParameter(string $key, $default = null) + { + return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; + } + + /** + * @param mixed $value + * + * @return static + */ + public function withParameter(string $key, $value) + { + $new = clone $this; + $new->parameters[$key] = $value; + + return $new; + } + + /** + * @return static + */ + public function withoutParameter(string $key) + { + $new = clone $this; + unset($new->parameters[$key]); + + return $new; + } + + /** + * @return DsnFunction|Dsn + */ + public function first() + { + return reset($this->arguments); + } + + /** + * @return string + */ + public function __toString() + { + return sprintf('%s(%s)%s', $this->getName(), implode(' ', $this->getArguments()), empty($this->parameters) ? '' : '?'.http_build_query($this->parameters)); + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Path.php b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Path.php new file mode 100644 index 0000000..e7f7381 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Path.php @@ -0,0 +1,82 @@ + + */ +class Path extends Dsn +{ + use UserPasswordTrait; + /** + * @var string + */ + private $path; + + /** + * @param array{ user?: string|null, password?: string|null, } $authentication + */ + public function __construct(string $scheme, string $path, array $parameters = [], array $authentication = []) + { + $this->path = $path; + $this->setAuthentication($authentication); + parent::__construct($scheme, $parameters); + } + + public function getScheme(): string + { + return parent::getScheme(); + } + + /** + * @return static + */ + public function withScheme(?string $scheme) + { + if (null === $scheme || '' === $scheme) { + throw new InvalidArgumentException('A Path must have a schema'); + } + + return parent::withScheme($scheme); + } + + public function getPath(): string + { + return $this->path; + } + + /** + * @return static + */ + public function withPath(string $path) + { + $new = clone $this; + $new->path = $path; + + return $new; + } + + /** + * @return string + */ + public function __toString() + { + $parameters = $this->getParameters(); + + return + $this->getScheme().'://'. + $this->getUserInfoString(). + $this->getPath(). + (empty($parameters) ? '' : '?'.http_build_query($parameters)); + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Url.php b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Url.php new file mode 100644 index 0000000..364b56a --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/Url.php @@ -0,0 +1,112 @@ + + */ +class Url extends Dsn +{ + use UserPasswordTrait; + + /** + * @var string + */ + private $host; + + /** + * @var int|null + */ + private $port; + + /** + * @var string|null + */ + private $path; + + /** + * @param array{ user?: string|null, password?: string|null, } $authentication + */ + public function __construct(?string $scheme, string $host, ?int $port = null, ?string $path = null, array $parameters = [], array $authentication = []) + { + $this->host = $host; + $this->port = $port; + $this->path = $path; + $this->setAuthentication($authentication); + parent::__construct($scheme, $parameters); + } + + public function getHost(): string + { + return $this->host; + } + + /** + * @return static + */ + public function withHost(string $host) + { + $new = clone $this; + $new->host = $host; + + return $new; + } + + public function getPort(): ?int + { + return $this->port; + } + + /** + * @return static + */ + public function withPort(?int $port) + { + $new = clone $this; + $new->port = $port; + + return $new; + } + + public function getPath(): ?string + { + return $this->path; + } + + /** + * @return static + */ + public function withPath(?string $path) + { + $new = clone $this; + $new->path = $path; + + return $new; + } + + /** + * @return string + */ + public function __toString() + { + $parameters = $this->getParameters(); + $scheme = $this->getScheme(); + + return + (empty($scheme) ? '' : $scheme.'://'). + $this->getUserInfoString(). + $this->getHost(). + (empty($this->port) ? '' : ':'.$this->port). + ($this->getPath() ?? ''). + (empty($parameters) ? '' : '?'.http_build_query($parameters)); + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/UserPasswordTrait.php b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/UserPasswordTrait.php new file mode 100644 index 0000000..b8fe59a --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Configuration/UserPasswordTrait.php @@ -0,0 +1,73 @@ + null, 'password' => null]; + + public function getAuthentication(): array + { + return $this->authentication; + } + + /** + * @param array{ user?: string|null, password?: string|null, } $authentication + */ + private function setAuthentication(array $authentication): void + { + if (!empty($authentication)) { + $this->authentication['user'] = $authentication['user'] ?? null; + $this->authentication['password'] = $authentication['password'] ?? null; + } + } + + public function getUser(): ?string + { + return $this->authentication['user'] ?? null; + } + + /** + * @return static + */ + public function withUser(?string $user) + { + $new = clone $this; + $new->authentication['user'] = $user; + + return $new; + } + + public function getPassword(): ?string + { + return $this->authentication['password'] ?? null; + } + + /** + * @return static + */ + public function withPassword(?string $password) + { + $new = clone $this; + $new->authentication['password'] = $password; + + return $new; + } + + private function getUserInfoString(): string + { + $user = $this->getUser() ?? ''; + $password = $this->getPassword() ?? ''; + + if ('' === $password && '' === $user) { + return ''; + } + + return $user.('' === $password ? '' : ':'.$password).'@'; + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/DsnParser.php b/tests/php_test_files/vendor/nyholm/dsn/src/DsnParser.php new file mode 100644 index 0000000..433964f --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/DsnParser.php @@ -0,0 +1,184 @@ + + */ +class DsnParser +{ + private const FUNCTION_REGEX = '#^([a-zA-Z0-9\+-]+):?\((.*)\)(?:\?(.*))?$#'; + private const ARGUMENTS_REGEX = '#([^\s,]+\([^)]+\)(?:\?[^\s,]*)?|[^\s,]+)#'; + private const UNRESERVED = 'a-zA-Z0-9-\._~'; + private const SUB_DELIMS = '!\$&\'\(\}\*\+,;='; + + /** + * Parse A DSN thay may contain functions. If no function is present in the + * string, then a "dsn()" function will be added. + * + * @throws SyntaxException + */ + public static function parseFunc(string $dsn): DsnFunction + { + // Detect a function or add default function + $parameters = []; + if (1 === preg_match(self::FUNCTION_REGEX, $dsn, $matches)) { + $functionName = $matches[1]; + $arguments = $matches[2]; + parse_str($matches[3] ?? '', $parameters); + } else { + $functionName = 'dsn'; + $arguments = $dsn; + } + + if (empty($arguments)) { + throw new SyntaxException($dsn, 'dsn' === $functionName ? 'The DSN is empty' : 'A function must have arguments, an empty string was provided.'); + } + + // explode arguments and respect function parentheses + if (preg_match_all(self::ARGUMENTS_REGEX, $arguments, $matches)) { + $arguments = $matches[1]; + } + + return new DsnFunction($functionName, array_map(\Closure::fromCallable([self::class, 'parseArguments']), $arguments), $parameters); + } + + /** + * Parse a DSN without functions. + * + * @throws FunctionsNotAllowedException if the DSN contains a function + * @throws SyntaxException + */ + public static function parse(string $dsn): Dsn + { + if (1 === preg_match(self::FUNCTION_REGEX, $dsn, $matches)) { + if ('dsn' === $matches[1]) { + return self::parse($matches[2]); + } + throw new FunctionsNotAllowedException($dsn); + } + + return self::getDsn($dsn); + } + + public static function parseUrl(string $dsn): Url + { + $dsn = self::parse($dsn); + if (!$dsn instanceof Url) { + throw DsnTypeNotSupported::onlyUrl($dsn); + } + + return $dsn; + } + + public static function parsePath(string $dsn): Path + { + $dsn = self::parse($dsn); + if (!$dsn instanceof Path) { + throw DsnTypeNotSupported::onlyPath($dsn); + } + + return $dsn; + } + + /** + * @return DsnFunction|Dsn + */ + private static function parseArguments(string $dsn) + { + // Detect a function exists + if (1 === preg_match(self::FUNCTION_REGEX, $dsn)) { + return self::parseFunc($dsn); + } + + // Assert: $dsn does not contain any functions. + return self::getDsn($dsn); + } + + /** + * @throws SyntaxException + */ + private static function getDsn(string $dsn): Dsn + { + // Find the scheme if it exists and trim the double slash. + if (!preg_match('#^(?:(?['.self::UNRESERVED.self::SUB_DELIMS.'%]+:[0-9]+(?:[/?].*)?)|(?[a-zA-Z0-9\+-\.]+):(?://)?(?.*))$#', $dsn, $matches)) { + throw new SyntaxException($dsn, 'A DSN must contain a scheme [a-zA-Z0-9\+-\.]+ and a colon.'); + } + $scheme = null; + $dsn = $matches['alt']; + if (!empty($matches['scheme'])) { + $scheme = $matches['scheme']; + $dsn = $matches['dsn']; + } + + if ('' === $dsn) { + return new Dsn($scheme); + } + + // Parse user info + if (!preg_match('#^(?:(['.self::UNRESERVED.self::SUB_DELIMS.'%]+)?(?::(['.self::UNRESERVED.self::SUB_DELIMS.'%]*))?@)?([^\s@]+)$#', $dsn, $matches)) { + throw new SyntaxException($dsn, 'The provided DSN is not valid. Maybe you need to url-encode the user/password?'); + } + + $authentication = [ + 'user' => empty($matches[1]) ? null : urldecode($matches[1]), + 'password' => empty($matches[2]) ? null : urldecode($matches[2]), + ]; + + if ('?' === $matches[3][0]) { + $parts = self::explodeUrl('http://localhost'.$matches[3], $dsn); + + return new Dsn($scheme, self::getQuery($parts)); + } + + if ('/' === $matches[3][0]) { + $parts = self::explodeUrl($matches[3], $dsn); + + return new Path($scheme, $parts['path'], self::getQuery($parts), $authentication); + } + + $parts = self::explodeUrl('http://'.$matches[3], $dsn); + + return new Url($scheme, $parts['host'], $parts['port'] ?? null, $parts['path'] ?? null, self::getQuery($parts), $authentication); + } + + /** + * Parse URL and throw exception if the URL is not valid. + * + * @throws SyntaxException + */ + private static function explodeUrl(string $url, string $dsn): array + { + $url = parse_url($url); + if (false === $url) { + throw new SyntaxException($dsn, 'The provided DSN is not valid.'); + } + + return $url; + } + + /** + * Parse query params into an array. + */ + private static function getQuery(array $parts): array + { + $query = []; + if (isset($parts['query'])) { + parse_str($parts['query'], $query); + } + + return $query; + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Exception/DsnTypeNotSupported.php b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/DsnTypeNotSupported.php new file mode 100644 index 0000000..b1d13f2 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/DsnTypeNotSupported.php @@ -0,0 +1,29 @@ + + */ +class DsnTypeNotSupported extends InvalidDsnException +{ + /** + * @param Dsn|string $dsn + */ + public static function onlyUrl($dsn): self + { + return new self((string) $dsn, 'Only DSNs of type "URL" is supported.'); + } + + /** + * @param Dsn|string $dsn + */ + public static function onlyPath($dsn): self + { + return new self((string) $dsn, 'Only DSNs of type "path" is supported.'); + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Exception/ExceptionInterface.php b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/ExceptionInterface.php new file mode 100644 index 0000000..76cf225 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/ExceptionInterface.php @@ -0,0 +1,14 @@ + + */ +interface ExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Exception/FunctionNotSupportedException.php b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/FunctionNotSupportedException.php new file mode 100644 index 0000000..df3d88f --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/FunctionNotSupportedException.php @@ -0,0 +1,29 @@ + + */ +class FunctionNotSupportedException extends InvalidDsnException +{ + /** + * @var string + */ + private $function; + + public function __construct(string $dsn, string $function, ?string $message = null) + { + parent::__construct($dsn, $message ?? sprintf('Function "%s" is not supported', $function)); + $this->function = $function; + } + + public function getFunction(): string + { + return $this->function; + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Exception/FunctionsNotAllowedException.php b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/FunctionsNotAllowedException.php new file mode 100644 index 0000000..d90ef41 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/FunctionsNotAllowedException.php @@ -0,0 +1,18 @@ + + */ +class FunctionsNotAllowedException extends InvalidDsnException +{ + public function __construct(string $dsn) + { + parent::__construct($dsn, 'Function are not allowed in this DSN'); + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Exception/InvalidArgumentException.php b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..687b018 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/InvalidArgumentException.php @@ -0,0 +1,12 @@ + + */ +class InvalidDsnException extends InvalidArgumentException +{ + /** + * @var string + */ + private $dsn; + + public function __construct(string $dsn, string $message) + { + $this->dsn = $dsn; + parent::__construct(sprintf('%s (%s)', $message, $dsn)); + } + + public function getDsn(): string + { + return $this->dsn; + } +} diff --git a/tests/php_test_files/vendor/nyholm/dsn/src/Exception/SyntaxException.php b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/SyntaxException.php new file mode 100644 index 0000000..20c96a0 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/dsn/src/Exception/SyntaxException.php @@ -0,0 +1,14 @@ + + */ +class SyntaxException extends InvalidDsnException +{ +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/.php-cs-fixer.dist.php b/tests/php_test_files/vendor/nyholm/psr7/.php-cs-fixer.dist.php new file mode 100644 index 0000000..04765de --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/.php-cs-fixer.dist.php @@ -0,0 +1,25 @@ +in(__DIR__.'/src') + ->in(__DIR__.'/tests'); + +$config = new PhpCsFixer\Config(); + +return $config->setRules([ + '@Symfony' => true, + '@Symfony:risky' => true, + 'native_function_invocation' => ['include'=> ['@all']], + 'native_constant_invocation' => true, + 'ordered_imports' => true, + 'declare_strict_types' => false, + 'linebreak_after_opening_tag' => false, + 'single_import_per_statement' => false, + 'blank_line_after_opening_tag' => false, + 'concat_space' => ['spacing'=>'one'], + 'phpdoc_align' => ['align'=>'left'], +]) + ->setRiskyAllowed(true) + ->setFinder($finder); diff --git a/tests/php_test_files/vendor/nyholm/psr7/CHANGELOG.md b/tests/php_test_files/vendor/nyholm/psr7/CHANGELOG.md new file mode 100644 index 0000000..cddd363 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/CHANGELOG.md @@ -0,0 +1,164 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 1.8.0 + +- Deprecate HttplugFactory, use Psr17Factory instead +- Make depencendy on php-http/message-factory optional + +## 1.7.0 + +- Bump to PHP 7.2 minimum +- Allow psr/http-message v2 +- Use copy-on-write for streams created from strings + +## 1.6.1 + +- Security fix: CVE-2023-29197 + +## 1.6.0 + +### Changed + +- Seek to the begining of the string when using Stream::create() +- Populate ServerRequest::getQueryParams() on instantiation +- Encode [reserved characters](https://www.rfc-editor.org/rfc/rfc3986#appendix-A) in userinfo in Uri +- Normalize leading slashes for Uri::getPath() +- Make Stream's constructor public +- Add some missing type checks on arguments + +## 1.5.1 + +### Fixed + +- Fixed deprecations on PHP 8.1 + +## 1.5.0 + +### Added + +- Add explicit `@return mixed` +- Add explicit return types to HttplugFactory + +### Fixed + +- Improve error handling with streams + +## 1.4.1 + +### Fixed + +- `Psr17Factory::createStreamFromFile`, `UploadedFile::moveTo`, and + `UploadedFile::getStream` no longer throw `ValueError` in PHP 8. + +## 1.4.0 + +### Removed + +The `final` keyword was replaced by `@final` annotation. + +## 1.3.2 + +### Fixed + +- `Stream::read()` must not return boolean. +- Improved exception message when using wrong HTTP status code. + +## 1.3.1 + +### Fixed + +- Allow installation on PHP8 + +## 1.3.0 + +### Added + +- Make Stream::__toString() compatible with throwing exceptions on PHP 7.4. + +### Fixed + +- Support for UTF-8 hostnames +- Support for numeric header names + +## 1.2.1 + +### Changed + +- Added `.github` and `phpstan.neon.dist` to `.gitattributes`. + +## 1.2.0 + +### Changed + +- Change minimal port number to 0 (unix socket) +- Updated `Psr17Factory::createResponse` to respect the specification. If second + argument is not used, a standard reason phrase. If an empty string is passed, + then the reason phrase will be empty. + +### Fixed + +- Check for seekable on the stream resource. +- Fixed the `Response::$reason` should never be null. + +## 1.1.0 + +### Added + +- Improved performance +- More tests for `UploadedFile` and `HttplugFactory` + +### Removed + +- Dead code + +## 1.0.1 + +### Fixed + +- Handle `fopen` failing in createStreamFromFile according to PSR-7. +- Reduce execution path to speed up performance. +- Fixed typos. +- Code style. + +## 1.0.0 + +### Added + +- Support for final PSR-17 (HTTP factories). (`Psr17Factory`) +- Support for numeric header values. +- Support for empty header values. +- All classes are final +- `HttplugFactory` that implements factory interfaces from HTTPlug. + +### Changed + +- `ServerRequest` does not extend `Request`. + +### Removed + +- The HTTPlug discovery strategy was removed since it is included in php-http/discovery 1.4. +- `UploadedFileFactory()` was removed in favor for `Psr17Factory`. +- `ServerRequestFactory()` was removed in favor for `Psr17Factory`. +- `StreamFactory`, `UriFactory`, abd `MessageFactory`. Use `HttplugFactory` instead. +- `ServerRequestFactory::createServerRequestFromArray`, `ServerRequestFactory::createServerRequestFromArrays` and + `ServerRequestFactory::createServerRequestFromGlobals`. Please use the new `nyholm/psr7-server` instead. + +## 0.3.0 + +### Added + +- Return types. +- Many `InvalidArgumentException`s are thrown when you use invalid arguments. +- Integration tests for `UploadedFile` and `ServerRequest`. + +### Changed + +- We dropped PHP7.0 support. +- PSR-17 factories have been marked as internal. They do not fall under our BC promise until PSR-17 is accepted. +- `UploadedFileFactory::createUploadedFile` does not accept a string file path. + +## 0.2.3 + +No changelog before this release diff --git a/tests/php_test_files/vendor/nyholm/psr7/LICENSE b/tests/php_test_files/vendor/nyholm/psr7/LICENSE new file mode 100644 index 0000000..d6c5231 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 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/nyholm/psr7/README.md b/tests/php_test_files/vendor/nyholm/psr7/README.md new file mode 100644 index 0000000..7fc30bc --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/README.md @@ -0,0 +1,108 @@ +# PSR-7 implementation + +[![Latest Version](https://img.shields.io/github/release/Nyholm/psr7.svg?style=flat-square)](https://github.com/Nyholm/psr7/releases) +[![Total Downloads](https://poser.pugx.org/nyholm/psr7/downloads)](https://packagist.org/packages/nyholm/psr7) +[![Monthly Downloads](https://poser.pugx.org/nyholm/psr7/d/monthly.png)](https://packagist.org/packages/nyholm/psr7) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +[![Static analysis](https://github.com/Nyholm/psr7/actions/workflows/static.yml/badge.svg?branch=master)](https://github.com/Nyholm/psr7/actions/workflows/static.yml?query=branch%3Amaster) +[![Tests](https://github.com/Nyholm/psr7/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/Nyholm/psr7/actions/workflows/tests.yml?query=branch%3Amaster) + +A super lightweight PSR-7 implementation. Very strict and very fast. + +| Description | Guzzle | Laminas | Slim | Nyholm | +| ---- | ------ | ---- | ---- | ------ | +| Lines of code | 3.300 | 3.100 | 1.900 | 1.000 | +| PSR-7* | 66% | 100% | 75% | 100% | +| PSR-17 | No | Yes | Yes | Yes | +| HTTPlug | No | No | No | Yes | +| Performance (runs per second)** | 14.553 | 14.703 | 13.416 | 17.734 | + +\* Percent of completed tests in https://github.com/php-http/psr7-integration-tests + +\** Benchmark with 50.000 runs. See https://github.com/devanych/psr-http-benchmark (higher is better) + +## Installation + +```bash +composer require nyholm/psr7 +``` + +If you are using Symfony Flex then you get all message factories registered as services. + +## Usage + +The PSR-7 objects do not contain any other public methods than those defined in +the [PSR-7 specification](https://www.php-fig.org/psr/psr-7/). + +### Create objects + +Use the PSR-17 factory to create requests, streams, URIs etc. + +```php +$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); +$request = $psr17Factory->createRequest('GET', 'http://tnyholm.se'); +$stream = $psr17Factory->createStream('foobar'); +``` + +### Sending a request + +With [HTTPlug](http://httplug.io/) or any other PSR-18 (HTTP client) you may send +requests like: + +```bash +composer require kriswallsmith/buzz +``` + +```php +$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); +$psr18Client = new \Buzz\Client\Curl($psr17Factory); + +$request = $psr17Factory->createRequest('GET', 'http://tnyholm.se'); +$response = $psr18Client->sendRequest($request); +``` + +### Create server requests + +The [`nyholm/psr7-server`](https://github.com/Nyholm/psr7-server) package can be used +to create server requests from PHP superglobals. + +```bash +composer require nyholm/psr7-server +``` + +```php +$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); + +$creator = new \Nyholm\Psr7Server\ServerRequestCreator( + $psr17Factory, // ServerRequestFactory + $psr17Factory, // UriFactory + $psr17Factory, // UploadedFileFactory + $psr17Factory // StreamFactory +); + +$serverRequest = $creator->fromGlobals(); +``` + +### Emitting a response + +```bash +composer require laminas/laminas-httphandlerrunner +``` + +```php +$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); + +$responseBody = $psr17Factory->createStream('Hello world'); +$response = $psr17Factory->createResponse(200)->withBody($responseBody); +(new \Laminas\HttpHandlerRunner\Emitter\SapiEmitter())->emit($response); +``` + +## Our goal + +This package is currently maintained by [Tobias Nyholm](http://nyholm.se) and +[Martijn van der Ven](https://vanderven.se/martijn/). They have decided that the +goal of this library should be to provide a super strict implementation of +[PSR-7](https://www.php-fig.org/psr/psr-7/) that is blazing fast. + +The package will never include any extra features nor helper methods. All our classes +and functions exist because they are required to fulfill the PSR-7 specification. diff --git a/tests/php_test_files/vendor/nyholm/psr7/composer.json b/tests/php_test_files/vendor/nyholm/psr7/composer.json new file mode 100644 index 0000000..c607615 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/composer.json @@ -0,0 +1,49 @@ +{ + "name": "nyholm/psr7", + "description": "A fast PHP7 implementation of PSR-7", + "license": "MIT", + "keywords": ["psr-7", "psr-17"], + "homepage": "https://tnyholm.se", + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + }, + { + "name": "Martijn van der Ven", + "email": "martijn@vanderven.se" + } + ], + "require": { + "php": ">=7.2", + "psr/http-message": "^1.1 || ^2.0", + "psr/http-factory": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", + "php-http/message-factory": "^1.0", + "php-http/psr7-integration-tests": "^1.0", + "http-interop/http-factory-tests": "^0.9", + "symfony/error-handler": "^4.4" + }, + "provide": { + "php-http/message-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0", + "psr/http-factory-implementation": "1.0" + }, + "autoload": { + "psr-4": { + "Nyholm\\Psr7\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\Nyholm\\Psr7\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/phpstan-baseline.neon b/tests/php_test_files/vendor/nyholm/psr7/phpstan-baseline.neon new file mode 100644 index 0000000..9a0cf11 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/phpstan-baseline.neon @@ -0,0 +1,36 @@ +parameters: + ignoreErrors: + - + message: "#^Result of && is always false\\.$#" + count: 1 + path: src/Response.php + + - + message: "#^Strict comparison using \\=\\=\\= between null and string will always evaluate to false\\.$#" + count: 1 + path: src/Response.php + + - + message: "#^Result of && is always false\\.$#" + count: 1 + path: src/ServerRequest.php + + - + message: "#^Strict comparison using \\!\\=\\= between null and null will always evaluate to false\\.$#" + count: 1 + path: src/ServerRequest.php + + - + message: "#^Result of && is always false\\.$#" + count: 1 + path: src/Stream.php + + - + message: "#^Result of && is always false\\.$#" + count: 2 + path: src/UploadedFile.php + + - + message: "#^Strict comparison using \\=\\=\\= between false and true will always evaluate to false\\.$#" + count: 2 + path: src/UploadedFile.php diff --git a/tests/php_test_files/vendor/nyholm/psr7/psalm.baseline.xml b/tests/php_test_files/vendor/nyholm/psr7/psalm.baseline.xml new file mode 100644 index 0000000..fe5b92e --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/psalm.baseline.xml @@ -0,0 +1,8 @@ + + + + + return \trigger_error((string) $e, \E_USER_ERROR); + + + diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/Factory/HttplugFactory.php b/tests/php_test_files/vendor/nyholm/psr7/src/Factory/HttplugFactory.php new file mode 100644 index 0000000..cc9285d --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/Factory/HttplugFactory.php @@ -0,0 +1,53 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + * + * @deprecated since version 1.8, use Psr17Factory instead + */ +class HttplugFactory implements MessageFactory, StreamFactory, UriFactory +{ + public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1'): RequestInterface + { + return new Request($method, $uri, $headers, $body, $protocolVersion); + } + + public function createResponse($statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $version = '1.1'): ResponseInterface + { + return new Response((int) $statusCode, $headers, $body, $version, $reasonPhrase); + } + + public function createStream($body = null): StreamInterface + { + return Stream::create($body ?? ''); + } + + public function createUri($uri = ''): UriInterface + { + if ($uri instanceof UriInterface) { + return $uri; + } + + return new Uri($uri); + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/Factory/Psr17Factory.php b/tests/php_test_files/vendor/nyholm/psr7/src/Factory/Psr17Factory.php new file mode 100644 index 0000000..440bec3 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/Factory/Psr17Factory.php @@ -0,0 +1,78 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + */ +class Psr17Factory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface +{ + public function createRequest(string $method, $uri): RequestInterface + { + return new Request($method, $uri); + } + + public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface + { + if (2 > \func_num_args()) { + // This will make the Response class to use a custom reasonPhrase + $reasonPhrase = null; + } + + return new Response($code, [], null, '1.1', $reasonPhrase); + } + + public function createStream(string $content = ''): StreamInterface + { + return Stream::create($content); + } + + public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface + { + if ('' === $filename) { + throw new \RuntimeException('Path cannot be empty'); + } + + if (false === $resource = @\fopen($filename, $mode)) { + if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) { + throw new \InvalidArgumentException(\sprintf('The mode "%s" is invalid.', $mode)); + } + + throw new \RuntimeException(\sprintf('The file "%s" cannot be opened: %s', $filename, \error_get_last()['message'] ?? '')); + } + + return Stream::create($resource); + } + + public function createStreamFromResource($resource): StreamInterface + { + return Stream::create($resource); + } + + public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null): UploadedFileInterface + { + if (null === $size) { + $size = $stream->getSize(); + } + + return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); + } + + public function createUri(string $uri = ''): UriInterface + { + return new Uri($uri); + } + + public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface + { + return new ServerRequest($method, $uri, [], null, '1.1', $serverParams); + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/MessageTrait.php b/tests/php_test_files/vendor/nyholm/psr7/src/MessageTrait.php new file mode 100644 index 0000000..7d02383 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/MessageTrait.php @@ -0,0 +1,235 @@ + + * @author Martijn van der Ven + * + * @internal should not be used outside of Nyholm/Psr7 as it does not fall under our BC promise + */ +trait MessageTrait +{ + /** @var array Map of all registered headers, as original name => 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(): string + { + return $this->protocol; + } + + /** + * @return static + */ + public function withProtocolVersion($version): MessageInterface + { + if (!\is_scalar($version)) { + throw new \InvalidArgumentException('Protocol version must be a string'); + } + + if ($this->protocol === $version) { + return $this; + } + + $new = clone $this; + $new->protocol = (string) $version; + + return $new; + } + + public function getHeaders(): array + { + return $this->headers; + } + + public function hasHeader($header): bool + { + return isset($this->headerNames[\strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')]); + } + + public function getHeader($header): array + { + if (!\is_string($header)) { + throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string'); + } + + $header = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); + if (!isset($this->headerNames[$header])) { + return []; + } + + $header = $this->headerNames[$header]; + + return $this->headers[$header]; + } + + public function getHeaderLine($header): string + { + return \implode(', ', $this->getHeader($header)); + } + + /** + * @return static + */ + public function withHeader($header, $value): MessageInterface + { + $value = $this->validateAndTrimHeader($header, $value); + $normalized = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + unset($new->headers[$new->headerNames[$normalized]]); + } + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + + return $new; + } + + /** + * @return static + */ + public function withAddedHeader($header, $value): MessageInterface + { + if (!\is_string($header) || '' === $header) { + throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string'); + } + + $new = clone $this; + $new->setHeaders([$header => $value]); + + return $new; + } + + /** + * @return static + */ + public function withoutHeader($header): MessageInterface + { + if (!\is_string($header)) { + throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string'); + } + + $normalized = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); + 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(): StreamInterface + { + if (null === $this->stream) { + $this->stream = Stream::create(''); + } + + return $this->stream; + } + + /** + * @return static + */ + public function withBody(StreamInterface $body): MessageInterface + { + if ($body === $this->stream) { + return $this; + } + + $new = clone $this; + $new->stream = $body; + + return $new; + } + + private function setHeaders(array $headers): void + { + foreach ($headers as $header => $value) { + if (\is_int($header)) { + // If a header name was set to a numeric string, PHP will cast the key to an int. + // We must cast it back to a string in order to comply with validation. + $header = (string) $header; + } + $value = $this->validateAndTrimHeader($header, $value); + $normalized = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); + 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; + } + } + } + + /** + * Make sure the header complies with RFC 7230. + * + * Header names must be a non-empty string consisting of token characters. + * + * Header values must be strings consisting of visible characters with all optional + * leading and trailing whitespace stripped. This method will always strip such + * optional whitespace. Note that the method does not allow folding whitespace within + * the values as this was deprecated for almost all instances by the RFC. + * + * header-field = field-name ":" OWS field-value OWS + * field-name = 1*( "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" + * / "_" / "`" / "|" / "~" / %x30-39 / ( %x41-5A / %x61-7A ) ) + * OWS = *( SP / HTAB ) + * field-value = *( ( %x21-7E / %x80-FF ) [ 1*( SP / HTAB ) ( %x21-7E / %x80-FF ) ] ) + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 + */ + private function validateAndTrimHeader($header, $values): array + { + if (!\is_string($header) || 1 !== \preg_match("@^[!#$%&'*+.^_`|~0-9A-Za-z-]+$@D", $header)) { + throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string'); + } + + if (!\is_array($values)) { + // This is simple, just one value. + if ((!\is_numeric($values) && !\is_string($values)) || 1 !== \preg_match("@^[ \t\x21-\x7E\x80-\xFF]*$@", (string) $values)) { + throw new \InvalidArgumentException('Header values must be RFC 7230 compatible strings'); + } + + return [\trim((string) $values, " \t")]; + } + + if (empty($values)) { + throw new \InvalidArgumentException('Header values must be a string or an array of strings, empty array given'); + } + + // Assert Non empty array + $returnValues = []; + foreach ($values as $v) { + if ((!\is_numeric($v) && !\is_string($v)) || 1 !== \preg_match("@^[ \t\x21-\x7E\x80-\xFF]*$@D", (string) $v)) { + throw new \InvalidArgumentException('Header values must be RFC 7230 compatible strings'); + } + + $returnValues[] = \trim((string) $v, " \t"); + } + + return $returnValues; + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/Request.php b/tests/php_test_files/vendor/nyholm/psr7/src/Request.php new file mode 100644 index 0000000..d50744e --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/Request.php @@ -0,0 +1,47 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + */ +class Request implements RequestInterface +{ + use MessageTrait; + use RequestTrait; + + /** + * @param string $method HTTP method + * @param string|UriInterface $uri URI + * @param array $headers Request headers + * @param string|resource|StreamInterface|null $body Request body + * @param string $version Protocol version + */ + public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1') + { + if (!($uri instanceof UriInterface)) { + $uri = new Uri($uri); + } + + $this->method = $method; + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + + if (!$this->hasHeader('Host')) { + $this->updateHostFromUri(); + } + + // If we got no body, defer initialization of the stream until Request::getBody() + if ('' !== $body && null !== $body) { + $this->stream = Stream::create($body); + } + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/RequestTrait.php b/tests/php_test_files/vendor/nyholm/psr7/src/RequestTrait.php new file mode 100644 index 0000000..2dbb3ab --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/RequestTrait.php @@ -0,0 +1,127 @@ + + * @author Martijn van der Ven + * + * @internal should not be used outside of Nyholm/Psr7 as it does not fall under our BC promise + */ +trait RequestTrait +{ + /** @var string */ + private $method; + + /** @var string|null */ + private $requestTarget; + + /** @var UriInterface|null */ + private $uri; + + public function getRequestTarget(): string + { + if (null !== $this->requestTarget) { + return $this->requestTarget; + } + + if ('' === $target = $this->uri->getPath()) { + $target = '/'; + } + if ('' !== $this->uri->getQuery()) { + $target .= '?' . $this->uri->getQuery(); + } + + return $target; + } + + /** + * @return static + */ + public function withRequestTarget($requestTarget): RequestInterface + { + if (!\is_string($requestTarget)) { + throw new \InvalidArgumentException('Request target must be a string'); + } + + 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(): string + { + return $this->method; + } + + /** + * @return static + */ + public function withMethod($method): RequestInterface + { + if (!\is_string($method)) { + throw new \InvalidArgumentException('Method must be a string'); + } + + $new = clone $this; + $new->method = $method; + + return $new; + } + + public function getUri(): UriInterface + { + return $this->uri; + } + + /** + * @return static + */ + public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface + { + if ($uri === $this->uri) { + return $this; + } + + $new = clone $this; + $new->uri = $uri; + + if (!$preserveHost || !$this->hasHeader('Host')) { + $new->updateHostFromUri(); + } + + return $new; + } + + private function updateHostFromUri(): void + { + if ('' === $host = $this->uri->getHost()) { + return; + } + + if (null !== ($port = $this->uri->getPort())) { + $host .= ':' . $port; + } + + if (isset($this->headerNames['host'])) { + $header = $this->headerNames['host']; + } else { + $this->headerNames['host'] = $header = 'Host'; + } + + // Ensure Host is the first header. + // See: http://tools.ietf.org/html/rfc7230#section-5.4 + $this->headers = [$header => [$host]] + $this->headers; + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/Response.php b/tests/php_test_files/vendor/nyholm/psr7/src/Response.php new file mode 100644 index 0000000..f3e2097 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/Response.php @@ -0,0 +1,93 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + */ +class Response implements ResponseInterface +{ + use MessageTrait; + + /** @var array Map of standard HTTP status code/reason phrases */ + private const PHRASES = [ + 100 => '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; + + /** + * @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(int $status = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null) + { + // If we got no body, defer initialization of the stream until Response::getBody() + if ('' !== $body && null !== $body) { + $this->stream = Stream::create($body); + } + + $this->statusCode = $status; + $this->setHeaders($headers); + if (null === $reason && isset(self::PHRASES[$this->statusCode])) { + $this->reasonPhrase = self::PHRASES[$status]; + } else { + $this->reasonPhrase = $reason ?? ''; + } + + $this->protocol = $version; + } + + public function getStatusCode(): int + { + return $this->statusCode; + } + + public function getReasonPhrase(): string + { + return $this->reasonPhrase; + } + + /** + * @return static + */ + public function withStatus($code, $reasonPhrase = ''): ResponseInterface + { + if (!\is_int($code) && !\is_string($code)) { + throw new \InvalidArgumentException('Status code has to be an integer'); + } + + $code = (int) $code; + if ($code < 100 || $code > 599) { + throw new \InvalidArgumentException(\sprintf('Status code has to be an integer between 100 and 599. A status code of %d was given', $code)); + } + + $new = clone $this; + $new->statusCode = $code; + if ((null === $reasonPhrase || '' === $reasonPhrase) && isset(self::PHRASES[$new->statusCode])) { + $reasonPhrase = self::PHRASES[$new->statusCode]; + } + $new->reasonPhrase = $reasonPhrase; + + return $new; + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/ServerRequest.php b/tests/php_test_files/vendor/nyholm/psr7/src/ServerRequest.php new file mode 100644 index 0000000..a3c5ba9 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/ServerRequest.php @@ -0,0 +1,201 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + */ +class ServerRequest implements ServerRequestInterface +{ + use MessageTrait; + use RequestTrait; + + /** @var array */ + private $attributes = []; + + /** @var array */ + private $cookieParams = []; + + /** @var array|object|null */ + private $parsedBody; + + /** @var array */ + private $queryParams = []; + + /** @var array */ + private $serverParams; + + /** @var UploadedFileInterface[] */ + private $uploadedFiles = []; + + /** + * @param string $method HTTP method + * @param string|UriInterface $uri URI + * @param array $headers Request headers + * @param string|resource|StreamInterface|null $body Request body + * @param string $version Protocol version + * @param array $serverParams Typically the $_SERVER superglobal + */ + public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1', array $serverParams = []) + { + $this->serverParams = $serverParams; + + if (!($uri instanceof UriInterface)) { + $uri = new Uri($uri); + } + + $this->method = $method; + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + \parse_str($uri->getQuery(), $this->queryParams); + + if (!$this->hasHeader('Host')) { + $this->updateHostFromUri(); + } + + // If we got no body, defer initialization of the stream until ServerRequest::getBody() + if ('' !== $body && null !== $body) { + $this->stream = Stream::create($body); + } + } + + public function getServerParams(): array + { + return $this->serverParams; + } + + public function getUploadedFiles(): array + { + return $this->uploadedFiles; + } + + /** + * @return static + */ + public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface + { + $new = clone $this; + $new->uploadedFiles = $uploadedFiles; + + return $new; + } + + public function getCookieParams(): array + { + return $this->cookieParams; + } + + /** + * @return static + */ + public function withCookieParams(array $cookies): ServerRequestInterface + { + $new = clone $this; + $new->cookieParams = $cookies; + + return $new; + } + + public function getQueryParams(): array + { + return $this->queryParams; + } + + /** + * @return static + */ + public function withQueryParams(array $query): ServerRequestInterface + { + $new = clone $this; + $new->queryParams = $query; + + return $new; + } + + /** + * @return array|object|null + */ + public function getParsedBody() + { + return $this->parsedBody; + } + + /** + * @return static + */ + public function withParsedBody($data): ServerRequestInterface + { + if (!\is_array($data) && !\is_object($data) && null !== $data) { + throw new \InvalidArgumentException('First parameter to withParsedBody MUST be object, array or null'); + } + + $new = clone $this; + $new->parsedBody = $data; + + return $new; + } + + public function getAttributes(): array + { + return $this->attributes; + } + + /** + * @return mixed + */ + public function getAttribute($attribute, $default = null) + { + if (!\is_string($attribute)) { + throw new \InvalidArgumentException('Attribute name must be a string'); + } + + if (false === \array_key_exists($attribute, $this->attributes)) { + return $default; + } + + return $this->attributes[$attribute]; + } + + /** + * @return static + */ + public function withAttribute($attribute, $value): ServerRequestInterface + { + if (!\is_string($attribute)) { + throw new \InvalidArgumentException('Attribute name must be a string'); + } + + $new = clone $this; + $new->attributes[$attribute] = $value; + + return $new; + } + + /** + * @return static + */ + public function withoutAttribute($attribute): ServerRequestInterface + { + if (!\is_string($attribute)) { + throw new \InvalidArgumentException('Attribute name must be a string'); + } + + 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/nyholm/psr7/src/Stream.php b/tests/php_test_files/vendor/nyholm/psr7/src/Stream.php new file mode 100644 index 0000000..63b7d6d --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/Stream.php @@ -0,0 +1,399 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + */ +class Stream implements StreamInterface +{ + use StreamTrait; + + /** @var resource|null A resource reference */ + private $stream; + + /** @var bool */ + private $seekable; + + /** @var bool */ + private $readable; + + /** @var bool */ + private $writable; + + /** @var array|mixed|void|bool|null */ + private $uri; + + /** @var int|null */ + private $size; + + /** @var array Hash of readable and writable stream types */ + private const READ_WRITE_HASH = [ + 'read' => [ + 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, + 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, + 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true, + 'x+t' => true, 'c+t' => true, 'a+' => true, + ], + 'write' => [ + 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, + 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, + 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true, + 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true, + ], + ]; + + /** + * @param resource $body + */ + public function __construct($body) + { + if (!\is_resource($body)) { + throw new \InvalidArgumentException('First argument to Stream::__construct() must be resource'); + } + + $this->stream = $body; + $meta = \stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable'] && 0 === \fseek($this->stream, 0, \SEEK_CUR); + $this->readable = isset(self::READ_WRITE_HASH['read'][$meta['mode']]); + $this->writable = isset(self::READ_WRITE_HASH['write'][$meta['mode']]); + } + + /** + * Creates a new PSR-7 stream. + * + * @param string|resource|StreamInterface $body + * + * @throws \InvalidArgumentException + */ + public static function create($body = ''): StreamInterface + { + if ($body instanceof StreamInterface) { + return $body; + } + + if (\is_string($body)) { + if (200000 <= \strlen($body)) { + $body = self::openZvalStream($body); + } else { + $resource = \fopen('php://memory', 'r+'); + \fwrite($resource, $body); + \fseek($resource, 0); + $body = $resource; + } + } + + if (!\is_resource($body)) { + throw new \InvalidArgumentException('First argument to Stream::create() must be a string, resource or StreamInterface'); + } + + return new self($body); + } + + /** + * Closes the stream when the destructed. + */ + public function __destruct() + { + $this->close(); + } + + public function close(): void + { + 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; + } + + private function getUri() + { + if (false !== $this->uri) { + $this->uri = $this->getMetadata('uri') ?? false; + } + + return $this->uri; + } + + public function getSize(): ?int + { + if (null !== $this->size) { + return $this->size; + } + + if (!isset($this->stream)) { + return null; + } + + // Clear the stat cache if the stream has a URI + if ($uri = $this->getUri()) { + \clearstatcache(true, $uri); + } + + $stats = \fstat($this->stream); + if (isset($stats['size'])) { + $this->size = $stats['size']; + + return $this->size; + } + + return null; + } + + public function tell(): int + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + if (false === $result = @\ftell($this->stream)) { + throw new \RuntimeException('Unable to determine stream position: ' . (\error_get_last()['message'] ?? '')); + } + + return $result; + } + + public function eof(): bool + { + return !isset($this->stream) || \feof($this->stream); + } + + public function isSeekable(): bool + { + return $this->seekable; + } + + public function seek($offset, $whence = \SEEK_SET): void + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } + + if (-1 === \fseek($this->stream, $offset, $whence)) { + throw new \RuntimeException('Unable to seek to stream position "' . $offset . '" with whence ' . \var_export($whence, true)); + } + } + + public function rewind(): void + { + $this->seek(0); + } + + public function isWritable(): bool + { + return $this->writable; + } + + public function write($string): int + { + 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; + + if (false === $result = @\fwrite($this->stream, $string)) { + throw new \RuntimeException('Unable to write to stream: ' . (\error_get_last()['message'] ?? '')); + } + + return $result; + } + + public function isReadable(): bool + { + return $this->readable; + } + + public function read($length): string + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + + if (false === $result = @\fread($this->stream, $length)) { + throw new \RuntimeException('Unable to read from stream: ' . (\error_get_last()['message'] ?? '')); + } + + return $result; + } + + public function getContents(): string + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $exception = null; + + \set_error_handler(static function ($type, $message) use (&$exception) { + throw $exception = new \RuntimeException('Unable to read stream contents: ' . $message); + }); + + try { + return \stream_get_contents($this->stream); + } catch (\Throwable $e) { + throw $e === $exception ? $e : new \RuntimeException('Unable to read stream contents: ' . $e->getMessage(), 0, $e); + } finally { + \restore_error_handler(); + } + } + + /** + * @return mixed + */ + public function getMetadata($key = null) + { + if (null !== $key && !\is_string($key)) { + throw new \InvalidArgumentException('Metadata key must be a string'); + } + + if (!isset($this->stream)) { + return $key ? null : []; + } + + $meta = \stream_get_meta_data($this->stream); + + if (null === $key) { + return $meta; + } + + return $meta[$key] ?? null; + } + + private static function openZvalStream(string $body) + { + static $wrapper; + + $wrapper ?? \stream_wrapper_register('Nyholm-Psr7-Zval', $wrapper = \get_class(new class() { + public $context; + + private $data; + private $position = 0; + + public function stream_open(): bool + { + $this->data = \stream_context_get_options($this->context)['Nyholm-Psr7-Zval']['data']; + \stream_context_set_option($this->context, 'Nyholm-Psr7-Zval', 'data', null); + + return true; + } + + public function stream_read(int $count): string + { + $result = \substr($this->data, $this->position, $count); + $this->position += \strlen($result); + + return $result; + } + + public function stream_write(string $data): int + { + $this->data = \substr_replace($this->data, $data, $this->position, \strlen($data)); + $this->position += \strlen($data); + + return \strlen($data); + } + + public function stream_tell(): int + { + return $this->position; + } + + public function stream_eof(): bool + { + return \strlen($this->data) <= $this->position; + } + + public function stream_stat(): array + { + return [ + 'mode' => 33206, // POSIX_S_IFREG | 0666 + 'nlink' => 1, + 'rdev' => -1, + 'size' => \strlen($this->data), + 'blksize' => -1, + 'blocks' => -1, + ]; + } + + public function stream_seek(int $offset, int $whence): bool + { + if (\SEEK_SET === $whence && (0 <= $offset && \strlen($this->data) >= $offset)) { + $this->position = $offset; + } elseif (\SEEK_CUR === $whence && 0 <= $offset) { + $this->position += $offset; + } elseif (\SEEK_END === $whence && (0 > $offset && 0 <= $offset = \strlen($this->data) + $offset)) { + $this->position = $offset; + } else { + return false; + } + + return true; + } + + public function stream_set_option(): bool + { + return true; + } + + public function stream_truncate(int $new_size): bool + { + if ($new_size) { + $this->data = \substr($this->data, 0, $new_size); + $this->position = \min($this->position, $new_size); + } else { + $this->data = ''; + $this->position = 0; + } + + return true; + } + })); + + $context = \stream_context_create(['Nyholm-Psr7-Zval' => ['data' => $body]]); + + if (!$stream = @\fopen('Nyholm-Psr7-Zval://', 'r+', false, $context)) { + \stream_wrapper_register('Nyholm-Psr7-Zval', $wrapper); + $stream = \fopen('Nyholm-Psr7-Zval://', 'r+', false, $context); + } + + return $stream; + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/StreamTrait.php b/tests/php_test_files/vendor/nyholm/psr7/src/StreamTrait.php new file mode 100644 index 0000000..41a3f9d --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/StreamTrait.php @@ -0,0 +1,57 @@ += 70400 || (new \ReflectionMethod(StreamInterface::class, '__toString'))->hasReturnType()) { + /** + * @internal + */ + trait StreamTrait + { + public function __toString(): string + { + if ($this->isSeekable()) { + $this->seek(0); + } + + return $this->getContents(); + } + } +} else { + /** + * @internal + */ + trait StreamTrait + { + /** + * @return string + */ + public function __toString() + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + + return $this->getContents(); + } catch (\Throwable $e) { + if (\is_array($errorHandler = \set_error_handler('var_dump'))) { + $errorHandler = $errorHandler[0] ?? null; + } + \restore_error_handler(); + + if ($e instanceof \Error || $errorHandler instanceof SymfonyErrorHandler || $errorHandler instanceof SymfonyLegacyErrorHandler) { + return \trigger_error((string) $e, \E_USER_ERROR); + } + + return ''; + } + } + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/UploadedFile.php b/tests/php_test_files/vendor/nyholm/psr7/src/UploadedFile.php new file mode 100644 index 0000000..c77dca4 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/UploadedFile.php @@ -0,0 +1,179 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + */ +class UploadedFile implements UploadedFileInterface +{ + /** @var array */ + private const ERRORS = [ + \UPLOAD_ERR_OK => 1, + \UPLOAD_ERR_INI_SIZE => 1, + \UPLOAD_ERR_FORM_SIZE => 1, + \UPLOAD_ERR_PARTIAL => 1, + \UPLOAD_ERR_NO_FILE => 1, + \UPLOAD_ERR_NO_TMP_DIR => 1, + \UPLOAD_ERR_CANT_WRITE => 1, + \UPLOAD_ERR_EXTENSION => 1, + ]; + + /** @var string */ + private $clientFilename; + + /** @var string */ + private $clientMediaType; + + /** @var int */ + private $error; + + /** @var string|null */ + private $file; + + /** @var bool */ + private $moved = false; + + /** @var int */ + private $size; + + /** @var StreamInterface|null */ + private $stream; + + /** + * @param StreamInterface|string|resource $streamOrFile + * @param int $size + * @param int $errorStatus + * @param string|null $clientFilename + * @param string|null $clientMediaType + */ + public function __construct($streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null) + { + if (false === \is_int($errorStatus) || !isset(self::ERRORS[$errorStatus])) { + throw new \InvalidArgumentException('Upload file error status must be an integer value and one of the "UPLOAD_ERR_*" constants'); + } + + if (false === \is_int($size)) { + throw new \InvalidArgumentException('Upload file size must be an integer'); + } + + if (null !== $clientFilename && !\is_string($clientFilename)) { + throw new \InvalidArgumentException('Upload file client filename must be a string or null'); + } + + if (null !== $clientMediaType && !\is_string($clientMediaType)) { + throw new \InvalidArgumentException('Upload file client media type must be a string or null'); + } + + $this->error = $errorStatus; + $this->size = $size; + $this->clientFilename = $clientFilename; + $this->clientMediaType = $clientMediaType; + + if (\UPLOAD_ERR_OK === $this->error) { + // Depending on the value set file or stream variable. + if (\is_string($streamOrFile) && '' !== $streamOrFile) { + $this->file = $streamOrFile; + } elseif (\is_resource($streamOrFile)) { + $this->stream = Stream::create($streamOrFile); + } elseif ($streamOrFile instanceof StreamInterface) { + $this->stream = $streamOrFile; + } else { + throw new \InvalidArgumentException('Invalid stream or file provided for UploadedFile'); + } + } + } + + /** + * @throws \RuntimeException if is moved or not ok + */ + private function validateActive(): void + { + if (\UPLOAD_ERR_OK !== $this->error) { + throw new \RuntimeException('Cannot retrieve stream due to upload error'); + } + + if ($this->moved) { + throw new \RuntimeException('Cannot retrieve stream after it has already been moved'); + } + } + + public function getStream(): StreamInterface + { + $this->validateActive(); + + if ($this->stream instanceof StreamInterface) { + return $this->stream; + } + + if (false === $resource = @\fopen($this->file, 'r')) { + throw new \RuntimeException(\sprintf('The file "%s" cannot be opened: %s', $this->file, \error_get_last()['message'] ?? '')); + } + + return Stream::create($resource); + } + + public function moveTo($targetPath): void + { + $this->validateActive(); + + if (!\is_string($targetPath) || '' === $targetPath) { + throw new \InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string'); + } + + if (null !== $this->file) { + $this->moved = 'cli' === \PHP_SAPI ? @\rename($this->file, $targetPath) : @\move_uploaded_file($this->file, $targetPath); + + if (false === $this->moved) { + throw new \RuntimeException(\sprintf('Uploaded file could not be moved to "%s": %s', $targetPath, \error_get_last()['message'] ?? '')); + } + } else { + $stream = $this->getStream(); + if ($stream->isSeekable()) { + $stream->rewind(); + } + + if (false === $resource = @\fopen($targetPath, 'w')) { + throw new \RuntimeException(\sprintf('The file "%s" cannot be opened: %s', $targetPath, \error_get_last()['message'] ?? '')); + } + + $dest = Stream::create($resource); + + while (!$stream->eof()) { + if (!$dest->write($stream->read(1048576))) { + break; + } + } + + $this->moved = true; + } + } + + public function getSize(): int + { + return $this->size; + } + + public function getError(): int + { + return $this->error; + } + + public function getClientFilename(): ?string + { + return $this->clientFilename; + } + + public function getClientMediaType(): ?string + { + return $this->clientMediaType; + } +} diff --git a/tests/php_test_files/vendor/nyholm/psr7/src/Uri.php b/tests/php_test_files/vendor/nyholm/psr7/src/Uri.php new file mode 100644 index 0000000..621e2e7 --- /dev/null +++ b/tests/php_test_files/vendor/nyholm/psr7/src/Uri.php @@ -0,0 +1,356 @@ + + * @author Martijn van der Ven + * + * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md + */ +class Uri implements UriInterface +{ + private const SCHEMES = ['http' => 80, 'https' => 443]; + + private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; + + private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;='; + + private const CHAR_GEN_DELIMS = ':\/\?#\[\]@'; + + /** @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 = ''; + + public function __construct(string $uri = '') + { + if ('' !== $uri) { + if (false === $parts = \parse_url($uri)) { + throw new \InvalidArgumentException(\sprintf('Unable to parse URI: "%s"', $uri)); + } + + // Apply parse_url parts to a URI. + $this->scheme = isset($parts['scheme']) ? \strtr($parts['scheme'], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') : ''; + $this->userInfo = $parts['user'] ?? ''; + $this->host = isset($parts['host']) ? \strtr($parts['host'], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') : ''; + $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 .= ':' . $parts['pass']; + } + } + } + + public function __toString(): string + { + return self::createUriString($this->scheme, $this->getAuthority(), $this->path, $this->query, $this->fragment); + } + + public function getScheme(): string + { + return $this->scheme; + } + + public function getAuthority(): string + { + if ('' === $this->host) { + return ''; + } + + $authority = $this->host; + if ('' !== $this->userInfo) { + $authority = $this->userInfo . '@' . $authority; + } + + if (null !== $this->port) { + $authority .= ':' . $this->port; + } + + return $authority; + } + + public function getUserInfo(): string + { + return $this->userInfo; + } + + public function getHost(): string + { + return $this->host; + } + + public function getPort(): ?int + { + return $this->port; + } + + public function getPath(): string + { + $path = $this->path; + + if ('' !== $path && '/' !== $path[0]) { + if ('' !== $this->host) { + // If the path is rootless and an authority is present, the path MUST be prefixed by "/" + $path = '/' . $path; + } + } elseif (isset($path[1]) && '/' === $path[1]) { + // If the path is starting with more than one "/", the + // starting slashes MUST be reduced to one. + $path = '/' . \ltrim($path, '/'); + } + + return $path; + } + + public function getQuery(): string + { + return $this->query; + } + + public function getFragment(): string + { + return $this->fragment; + } + + /** + * @return static + */ + public function withScheme($scheme): UriInterface + { + if (!\is_string($scheme)) { + throw new \InvalidArgumentException('Scheme must be a string'); + } + + if ($this->scheme === $scheme = \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) { + return $this; + } + + $new = clone $this; + $new->scheme = $scheme; + $new->port = $new->filterPort($new->port); + + return $new; + } + + /** + * @return static + */ + public function withUserInfo($user, $password = null): UriInterface + { + if (!\is_string($user)) { + throw new \InvalidArgumentException('User must be a string'); + } + + $info = \preg_replace_callback('/[' . self::CHAR_GEN_DELIMS . self::CHAR_SUB_DELIMS . ']++/', [__CLASS__, 'rawurlencodeMatchZero'], $user); + if (null !== $password && '' !== $password) { + if (!\is_string($password)) { + throw new \InvalidArgumentException('Password must be a string'); + } + + $info .= ':' . \preg_replace_callback('/[' . self::CHAR_GEN_DELIMS . self::CHAR_SUB_DELIMS . ']++/', [__CLASS__, 'rawurlencodeMatchZero'], $password); + } + + if ($this->userInfo === $info) { + return $this; + } + + $new = clone $this; + $new->userInfo = $info; + + return $new; + } + + /** + * @return static + */ + public function withHost($host): UriInterface + { + if (!\is_string($host)) { + throw new \InvalidArgumentException('Host must be a string'); + } + + if ($this->host === $host = \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) { + return $this; + } + + $new = clone $this; + $new->host = $host; + + return $new; + } + + /** + * @return static + */ + public function withPort($port): UriInterface + { + if ($this->port === $port = $this->filterPort($port)) { + return $this; + } + + $new = clone $this; + $new->port = $port; + + return $new; + } + + /** + * @return static + */ + public function withPath($path): UriInterface + { + if ($this->path === $path = $this->filterPath($path)) { + return $this; + } + + $new = clone $this; + $new->path = $path; + + return $new; + } + + /** + * @return static + */ + public function withQuery($query): UriInterface + { + if ($this->query === $query = $this->filterQueryAndFragment($query)) { + return $this; + } + + $new = clone $this; + $new->query = $query; + + return $new; + } + + /** + * @return static + */ + public function withFragment($fragment): UriInterface + { + if ($this->fragment === $fragment = $this->filterQueryAndFragment($fragment)) { + return $this; + } + + $new = clone $this; + $new->fragment = $fragment; + + return $new; + } + + /** + * Create a URI string from its various parts. + */ + private static function createUriString(string $scheme, string $authority, string $path, string $query, string $fragment): string + { + $uri = ''; + if ('' !== $scheme) { + $uri .= $scheme . ':'; + } + + if ('' !== $authority) { + $uri .= '//' . $authority; + } + + if ('' !== $path) { + if ('/' !== $path[0]) { + if ('' !== $authority) { + // If the path is rootless and an authority is present, the path MUST be prefixed by "/" + $path = '/' . $path; + } + } elseif (isset($path[1]) && '/' === $path[1]) { + if ('' === $authority) { + // If the path is starting with more than one "/" and no authority is present, the + // starting slashes MUST be reduced to one. + $path = '/' . \ltrim($path, '/'); + } + } + + $uri .= $path; + } + + if ('' !== $query) { + $uri .= '?' . $query; + } + + if ('' !== $fragment) { + $uri .= '#' . $fragment; + } + + return $uri; + } + + /** + * Is a given port non-standard for the current scheme? + */ + private static function isNonStandardPort(string $scheme, int $port): bool + { + return !isset(self::SCHEMES[$scheme]) || $port !== self::SCHEMES[$scheme]; + } + + private function filterPort($port): ?int + { + if (null === $port) { + 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 self::isNonStandardPort($this->scheme, $port) ? $port : null; + } + + private function filterPath($path): string + { + if (!\is_string($path)) { + throw new \InvalidArgumentException('Path must be a string'); + } + + return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path); + } + + private function filterQueryAndFragment($str): string + { + if (!\is_string($str)) { + throw new \InvalidArgumentException('Query and fragment must be a string'); + } + + return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str); + } + + private static function rawurlencodeMatchZero(array $match): string + { + return \rawurlencode($match[0]); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Baggage/Baggage.php b/tests/php_test_files/vendor/open-telemetry/api/Baggage/Baggage.php new file mode 100644 index 0000000..2886656 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Baggage/Baggage.php @@ -0,0 +1,102 @@ +get(BaggageContextKey::instance())) { + return $baggage; + } + + return self::getEmpty(); + } + + /** @inheritDoc */ + public static function getBuilder(): BaggageBuilderInterface + { + return new BaggageBuilder(); + } + + /** @inheritDoc */ + public static function getCurrent(): BaggageInterface + { + return self::fromContext(Context::getCurrent()); + } + + /** @inheritDoc */ + public static function getEmpty(): BaggageInterface + { + if (null === self::$emptyBaggage) { + self::$emptyBaggage = new self(); + } + + return self::$emptyBaggage; + } + + /** @var array */ + private array $entries; + + /** @param array $entries */ + public function __construct(array $entries = []) + { + $this->entries = $entries; + } + + /** @inheritDoc */ + public function activate(): ScopeInterface + { + return Context::getCurrent()->withContextValue($this)->activate(); + } + + /** @inheritDoc */ + public function getEntry(string $key): ?Entry + { + return $this->entries[$key] ?? null; + } + + /** @inheritDoc */ + public function getValue(string $key) + { + if ($entry = $this->getEntry($key)) { + return $entry->getValue(); + } + + return null; + } + + /** @inheritDoc */ + public function getAll(): iterable + { + foreach ($this->entries as $key => $entry) { + yield $key => $entry; + } + } + + /** @inheritDoc */ + public function isEmpty(): bool + { + return empty($this->entries); + } + + /** @inheritDoc */ + public function toBuilder(): BaggageBuilderInterface + { + return new BaggageBuilder($this->entries); + } + + /** @inheritDoc */ + public function storeInContext(Context $context): Context + { + return $context->with(BaggageContextKey::instance(), $this); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Baggage/BaggageBuilder.php b/tests/php_test_files/vendor/open-telemetry/api/Baggage/BaggageBuilder.php new file mode 100644 index 0000000..f1aecf2 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Baggage/BaggageBuilder.php @@ -0,0 +1,40 @@ + */ + private array $entries; + + /** @param array $entries */ + public function __construct(array $entries = []) + { + $this->entries = $entries; + } + + /** @inheritDoc */ + public function remove(string $key): BaggageBuilderInterface + { + unset($this->entries[$key]); + + return $this; + } + + /** @inheritDoc */ + public function set(string $key, $value, MetadataInterface $metadata = null): BaggageBuilderInterface + { + $metadata = $metadata ?? Metadata::getEmpty(); + + $this->entries[$key] = new Entry($value, $metadata); + + return $this; + } + + public function build(): BaggageInterface + { + return new Baggage($this->entries); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php new file mode 100644 index 0000000..9bdaf9b --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php @@ -0,0 +1,22 @@ +value = $value; + $this->metadata = $metadata; + } + + public function getValue() + { + return $this->value; + } + + public function getMetadata(): MetadataInterface + { + return $this->metadata; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Baggage/Metadata.php b/tests/php_test_files/vendor/open-telemetry/api/Baggage/Metadata.php new file mode 100644 index 0000000..08bfe2b --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Baggage/Metadata.php @@ -0,0 +1,31 @@ +metadata = $metadata; + } + + public function getValue(): string + { + return $this->metadata; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Baggage/MetadataInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Baggage/MetadataInterface.php new file mode 100644 index 0000000..cd0a6d1 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Baggage/MetadataInterface.php @@ -0,0 +1,13 @@ +isEmpty()) { + return; + } + + $headerString = ''; + + /** @var Entry $entry */ + foreach ($baggage->getAll() as $key => $entry) { + $value = urlencode($entry->getValue()); + $headerString.= "{$key}={$value}"; + + if ($metadata = $entry->getMetadata()->getValue()) { + $headerString .= ";{$metadata}"; + } + + $headerString .= ','; + } + + if ($headerString) { + $headerString = rtrim($headerString, ','); + $setter->set($carrier, self::BAGGAGE, $headerString); + } + } + + public function extract($carrier, PropagationGetterInterface $getter = null, Context $context = null): Context + { + $getter = $getter ?? ArrayAccessGetterSetter::getInstance(); + $context = $context ?? Context::getCurrent(); + + if (!$baggageHeader = $getter->get($carrier, self::BAGGAGE)) { + return $context; + } + + $baggageBuilder = Baggage::getBuilder(); + $this->extractValue($baggageHeader, $baggageBuilder); + + return $context->withContextValue($baggageBuilder->build()); + } + + private function extractValue(string $baggageHeader, BaggageBuilderInterface $baggageBuilder): void + { + (new Parser($baggageHeader))->parseInto($baggageBuilder); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Baggage/Propagation/Parser.php b/tests/php_test_files/vendor/open-telemetry/api/Baggage/Propagation/Parser.php new file mode 100644 index 0000000..ae276d2 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Baggage/Propagation/Parser.php @@ -0,0 +1,72 @@ +', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}']; + private const EXCLUDED_VALUE_CHARS = [' ', '"', ',', ';', '\\']; + private const EQUALS = '='; + + /** @readonly */ + private string $baggageHeader; + + public function __construct(string $baggageHeader) + { + $this->baggageHeader = $baggageHeader; + } + + /** + * @todo: Make this algorithm more robust/performant. + */ + public function parseInto(BaggageBuilderInterface $baggageBuilder): void + { + foreach (explode(',', $this->baggageHeader) as $baggageString) { + if (empty(trim($baggageString))) { + continue; + } + + $explodedString = explode(';', $baggageString, 2); + + $keyValue = trim($explodedString[0]); + + if (empty($keyValue) || mb_strpos($keyValue, self::EQUALS) === false) { + continue; + } + + $metadataString = $explodedString[1] ?? null; + + if ($metadataString && !empty(trim(($metadataString)))) { + $metadata = new Metadata(trim($metadataString)); + } else { + $metadata = null; + } + + [$key, $value] = explode(self::EQUALS, $keyValue, 2); + + $key = urldecode($key); + $value = urldecode($value); + + $key = str_replace(self::EXCLUDED_KEY_CHARS, '', trim($key), $invalidKeyCharacters); + if (empty($key) || $invalidKeyCharacters > 0) { + continue; + } + + $value = str_replace(self::EXCLUDED_VALUE_CHARS, '', trim($value), $invalidValueCharacters); + if (empty($value) || $invalidValueCharacters > 0) { + continue; + } + + $baggageBuilder->set($key, $value, $metadata); + } + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Metrics/CounterInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Metrics/CounterInterface.php new file mode 100644 index 0000000..286c8ad --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Metrics/CounterInterface.php @@ -0,0 +1,33 @@ + $metrics + * @return int + * + * todo Should we pass a result callback in the 2nd parameter like in JavaScript implementation? + */ + public function export(iterable $metrics): int; +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Metrics/LabelableMetricInterfaceInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Metrics/LabelableMetricInterfaceInterface.php new file mode 100644 index 0000000..4671366 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Metrics/LabelableMetricInterfaceInterface.php @@ -0,0 +1,32 @@ + + */ + public function getLabels(): array; + + /** + * Set $labels + * + * @param array $labels + * @return self + */ + public function setLabels(array $labels); + + /** + * Set $labels + * + * @param string $label + * @return self + */ + public function addLabel(string $label); +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Metrics/MeterInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Metrics/MeterInterface.php new file mode 100644 index 0000000..e0186b7 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Metrics/MeterInterface.php @@ -0,0 +1,52 @@ +get(SpanContextKey::instance())) { + return $span; + } + + return NonRecordingSpan::getInvalid(); + } + + /** @inheritDoc */ + final public static function getCurrent(): SpanInterface + { + return self::fromContext(Context::getCurrent()); + } + + /** @inheritDoc */ + final public static function getInvalid(): SpanInterface + { + if (null === self::$invalidSpan) { + self::$invalidSpan = new NonRecordingSpan(SpanContext::getInvalid()); + } + + return self::$invalidSpan; + } + + /** @inheritDoc */ + final public static function wrap(SpanContextInterface $spanContext): SpanInterface + { + if (!$spanContext->isValid()) { + return self::getInvalid(); + } + + return new NonRecordingSpan($spanContext); + } + + /** @inheritDoc */ + final public function activate(): ScopeInterface + { + return Context::getCurrent()->withContextValue($this)->activate(); + } + + /** @inheritDoc */ + final public function storeInContext(Context $context): Context + { + return $context->with(SpanContextKey::instance(), $this); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Trace/NonRecordingSpan.php b/tests/php_test_files/vendor/open-telemetry/api/Trace/NonRecordingSpan.php new file mode 100644 index 0000000..aed4f1d --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Trace/NonRecordingSpan.php @@ -0,0 +1,77 @@ +context = $context; + } + + /** @inheritDoc */ + public function getContext(): SpanContextInterface + { + return $this->context; + } + + /** @inheritDoc */ + public function isRecording(): bool + { + return false; + } + + /** @inheritDoc */ + public function setAttribute(string $key, $value): SpanInterface + { + return $this; + } + + /** @inheritDoc */ + public function setAttributes(iterable $attributes): SpanInterface + { + return $this; + } + + /** @inheritDoc */ + public function addEvent(string $name, iterable $attributes = [], int $timestamp = null): SpanInterface + { + return $this; + } + + /** @inheritDoc */ + public function recordException(Throwable $exception, iterable $attributes = []): SpanInterface + { + return $this; + } + + /** @inheritDoc */ + public function updateName(string $name): SpanInterface + { + return $this; + } + + /** @inheritDoc */ + public function setStatus(string $code, string $description = null): SpanInterface + { + return $this; + } + + /** @inheritDoc */ + public function end(int $endEpochNanos = null): void + { + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php b/tests/php_test_files/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php new file mode 100644 index 0000000..8c79ce9 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php @@ -0,0 +1,69 @@ +contextStorage = $contextStorage; + } + + public function setParent(Context $parentContext): SpanBuilderInterface + { + $this->parent = $parentContext; + + return $this; + } + + public function setNoParent(): SpanBuilderInterface + { + $this->parent = Context::getRoot(); + + return $this; + } + + public function addLink(SpanContextInterface $context, iterable $attributes = []): SpanBuilderInterface + { + return $this; + } + + public function setAttribute(string $key, $value): SpanBuilderInterface + { + return $this; + } + + public function setAttributes(iterable $attributes): SpanBuilderInterface + { + return $this; + } + + public function setStartTimestamp(int $timestamp): SpanBuilderInterface + { + return $this; + } + + public function setSpanKind(int $spanKind): SpanBuilderInterface + { + return $this; + } + + public function startSpan(): SpanInterface + { + $span = AbstractSpan::fromContext($this->parent ?? $this->contextStorage->current()); + if ($span->isRecording()) { + $span = AbstractSpan::wrap($span->getContext()); + } + + return $span; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Trace/NoopTracer.php b/tests/php_test_files/vendor/open-telemetry/api/Trace/NoopTracer.php new file mode 100644 index 0000000..bc50248 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Trace/NoopTracer.php @@ -0,0 +1,26 @@ +getContext(); + + if (!$spanContext->isValid()) { + return; + } + + // Build and inject the traceparent header + $traceparent = self::VERSION . '-' . $spanContext->getTraceId() . '-' . $spanContext->getSpanId() . '-' . ($spanContext->isSampled() ? '01' : '00'); + $setter->set($carrier, self::TRACEPARENT, $traceparent); + + // Build and inject the tracestate header + // Spec says to avoid sending empty tracestate headers + if ($tracestate = (string) $spanContext->getTraceState()) { + $setter->set($carrier, self::TRACESTATE, $tracestate); + } + } + + /** {@inheritdoc} */ + public function extract($carrier, PropagationGetterInterface $getter = null, Context $context = null): Context + { + $getter = $getter ?? ArrayAccessGetterSetter::getInstance(); + $context = $context ?? Context::getCurrent(); + + $spanContext = self::extractImpl($carrier, $getter); + if (!$spanContext->isValid()) { + return $context; + } + + return $context->withContextValue(AbstractSpan::wrap($spanContext)); + } + + private static function extractImpl($carrier, PropagationGetterInterface $getter): SpanContextInterface + { + $traceparent = $getter->get($carrier, self::TRACEPARENT); + if ($traceparent === null) { + return SpanContext::getInvalid(); + } + + // Traceparent = {version}-{trace-id}-{parent-id}-{trace-flags} + $pieces = explode('-', $traceparent); + + // Unable to extract traceparent. Expected 4 values + if (count($pieces) !== 4) { + return SpanContext::getInvalid(); + } + + [$version, $traceId, $spanId, $traceFlags] = $pieces; + + // Validates the version, traceId, spanId and traceFlags + // Returns an invalid spanContext if any of the checks fail + if ($version !== self::VERSION || !SpanContext::isValidTraceId($traceId) || + !SpanContext::isValidSpanId($spanId) || !SpanContext::isValidTraceFlag($traceFlags)) { + return SpanContext::getInvalid(); + } + + // Only the sampled flag is extracted from the traceFlags (00000001) + $convertedTraceFlags = hexdec($traceFlags); + $isSampled = ($convertedTraceFlags & SpanContext::SAMPLED_FLAG) === SpanContext::SAMPLED_FLAG; + + // Tracestate = 'Vendor1=Value1,...,VendorN=ValueN' + $rawTracestate = $getter->get($carrier, self::TRACESTATE); + if ($rawTracestate !== null) { + $tracestate = new TraceState($rawTracestate); + + return SpanContext::createFromRemoteParent( + $traceId, + $spanId, + $isSampled ? SpanContextInterface::TRACE_FLAG_SAMPLED : SpanContextInterface::TRACE_FLAG_DEFAULT, + $tracestate + ); + } + + // Only traceparent header is extracted. No tracestate. + return SpanContext::createFromRemoteParent( + $traceId, + $spanId, + $isSampled ? SpanContextInterface::TRACE_FLAG_SAMPLED : SpanContextInterface::TRACE_FLAG_DEFAULT + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php new file mode 100644 index 0000000..8a57c1d --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php @@ -0,0 +1,57 @@ +traceId = $traceId; + $this->spanId = $spanId; + $this->traceState = $traceState; + $this->isRemote = $isRemote; + $this->isSampled = ($traceFlags & self::SAMPLED_FLAG) === self::SAMPLED_FLAG; + $this->traceFlags = $traceFlags; + $this->isValid = self::isValidTraceId($this->traceId) && self::isValidSpanId($this->spanId); + } + + public function getTraceId(): string + { + return $this->traceId; + } + + public function getSpanId(): string + { + return $this->spanId; + } + + public function getTraceState(): ?API\TraceStateInterface + { + return $this->traceState; + } + + public function isSampled(): bool + { + return $this->isSampled; + } + + public function isValid(): bool + { + return $this->isValid; + } + + public function isRemote(): bool + { + return $this->isRemote; + } + + public function getTraceFlags(): int + { + return $this->traceFlags; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Trace/SpanContextInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Trace/SpanContextInterface.php new file mode 100644 index 0000000..f049bb3 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Trace/SpanContextInterface.php @@ -0,0 +1,34 @@ +traceState = $this->parse($rawTracestate); + } + } + + /** + * {@inheritdoc} + */ + public function with(string $key, string $value): TraceStateInterface + { + $clonedTracestate = clone $this; + + //TODO: Log if we can't set the value + if ($this->validateKey($key) && $this->validateValue($value)) { + + /* + * Only one entry per key is allowed. In this case we need to overwrite the vendor entry + * upon reentry to the tracing system and ensure the updated entry is at the beginning of + * the list. This means we place it the back for now and it will be at the beginning once + * we reverse the order back during __toString(). + */ + if (array_key_exists($key, $clonedTracestate->traceState)) { + unset($clonedTracestate->traceState[$key]); + } + + // Add new or updated entry to the back of the list. + $clonedTracestate->traceState[$key] = $value; + } + + return $clonedTracestate; + } + + /** + * {@inheritdoc} + */ + public function without(string $key): TraceStateInterface + { + $clonedTracestate = clone $this; + + //TODO: Log if we can't unset the value + if ($key !== '') { + unset($clonedTracestate->traceState[$key]); + } + + return $clonedTracestate; + } + + /** + * {@inheritdoc} + */ + public function get(string $key): ?string + { + return $this->traceState[$key] ?? null; + } + + /** + * {@inheritdoc} + */ + public function getListMemberCount(): int + { + return count($this->traceState); + } + + /** + * {@inheritdoc} + */ + public function __toString(): string + { + if (!empty($this->traceState)) { + $clonedTracestate = clone $this; + + // Reverse the order back to the original to ensure new entries are at the beginning. + $clonedTracestate->traceState = array_reverse($clonedTracestate->traceState); + + array_walk( + $clonedTracestate->traceState, + static function (&$v, $k) { + $v = $k . self::LIST_MEMBER_KEY_VALUE_SPLITTER . $v; + } + ); + + return implode(self::LIST_MEMBERS_SEPARATOR, $clonedTracestate->traceState); + } + + return ''; + } + + /** + * Parse the raw tracestate header into the TraceState object. Since new or updated entries must + * be added to the beginning of the list, the key-value pairs in the TraceState object will be + * stored in reverse order. This ensures new entries added to the TraceState object are at the + * beginning when we reverse the order back again while building the final tracestate header. + * + * Ex: + * tracestate = 'vendor1=value1,vendor2=value2' + * + * || + * \/ + * + * $this->tracestate = ['vendor2' => 'value2' ,'vendor1' => 'value1'] + * + */ + private function parse(string $rawTracestate): array + { + $parsedTracestate = []; + + if (\strlen($rawTracestate) <= self::MAX_TRACESTATE_LENGTH) { + $listMembers = explode(self::LIST_MEMBERS_SEPARATOR, $rawTracestate); + + if (count($listMembers) > self::MAX_TRACESTATE_LIST_MEMBERS) { + + // Truncate the tracestate if it exceeds the maximum list-members allowed + // TODO: Log a message when truncation occurs + $listMembers = array_slice($listMembers, 0, self::MAX_TRACESTATE_LIST_MEMBERS); + } + + foreach ($listMembers as $listMember) { + $vendor = explode(self::LIST_MEMBER_KEY_VALUE_SPLITTER, trim($listMember)); + + // There should only be one list-member per vendor separated by '=' + if (count($vendor) === 2) { + + // TODO: Log if we can't validate the key and value + if ($this->validateKey($vendor[0]) && $this->validateValue($vendor[1])) { + $parsedTracestate[$vendor[0]] = $vendor[1]; + } + } + } + } + + /* + * Reversing the tracestate ensures the new entries added to the TraceState object are at + * the beginning when we reverse it back during __toString(). + */ + return array_reverse($parsedTracestate); + } + + /** + * The Key is opaque string that is an identifier for a vendor. It can be up + * to 256 characters and MUST begin with a lowercase letter or a digit, and can + * only contain lowercase letters (a-z), digits (0-9), underscores (_), dashes (-), + * asterisks (*), and forward slashes (/). For multi-tenant vendor scenarios, an at + * sign (@) can be used to prefix the vendor name. Vendors SHOULD set the tenant ID + * at the beginning of the key. + * + * @see https://www.w3.org/TR/trace-context/#key + */ + private function validateKey(string $key): bool + { + return preg_match(self::VALID_KEY_REGEX, $key) !== 0; + } + + /** + * The value is an opaque string containing up to 256 printable ASCII [RFC0020] + * characters (i.e., the range 0x20 to 0x7E) except comma (,) and (=). Note that + * this also excludes tabs, newlines, carriage returns, etc. + * + * @see https://www.w3.org/TR/trace-context/#value + */ + private function validateValue(string $key): bool + { + return (preg_match(self::VALID_VALUE_BASE_REGEX, $key) !== 0) + && (preg_match(self::INVALID_VALUE_COMMA_EQUAL_REGEX, $key) === 0); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/api/Trace/TraceStateInterface.php b/tests/php_test_files/vendor/open-telemetry/api/Trace/TraceStateInterface.php new file mode 100644 index 0000000..79d4e02 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/api/Trace/TraceStateInterface.php @@ -0,0 +1,61 @@ +attach($ctx); + } + + /** + * @param non-empty-string $key + * + * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/context.md#create-a-key + */ + public static function createKey(string $key): ContextKey + { + return new ContextKey($key); + } + + /** + * Given a token, the current context will be set back to the one prior to the token being generated. + */ + public static function detach(ScopeInterface $token): Context + { + $token->detach(); + + return self::getCurrent(); + } + + public static function getCurrent(): Context + { + return self::storage()->current(); + } + + public static function getRoot(): self + { + if (null === self::$root) { + self::$root = new self(); + } + + return self::$root; + } + + /** + * Static version of get() + * This is primarily useful when the caller doesn't already have a reference to the Context that they want to mutate. + * This will operate on the "current" global context in that scenario. + * + * There are two ways to call this function: + * 1) With a $ctx value: + * Context::getValue($key, $ctx) is functionally equivalent to $ctx->get($key) + * 2) Without a $ctx value: + * This will fetch the "current" Context if one exists or create one if not, then attempt to get the value from it. + * + * @param ContextKey $key + * @param Context|null $ctx + * + * @return mixed + */ + public static function getValue(ContextKey $key, $ctx=null) + { + $ctx = $ctx ?? static::getCurrent(); + + return $ctx->get($key); + } + + /** + * This is a static version of set(). + * This is primarily useful when the caller doesn't already have a reference to a Context that they want to mutate. + * + * There are two ways to call this function. + * 1) With a $parent parameter: + * Context::setValue($key, $value, $ctx) is functionally equivalent to $ctx->set($key, $value) + * 2) Without a $parent parameter: + * In this scenario, setValue() will use the `$current_context` reference as supplied by `getCurrent()` + * `getCurrent()` will always return a valid Context. If one does not exist at the global scope, + * an "empty" context will be created. + * + * @param ContextKey $key + * @param mixed $value + * @param Context|null $parent + * + * @return Context a new Context containing the k/v + */ + public static function withValue(ContextKey $key, $value, $parent=null) + { + if (null === $parent) { + // TODO This should not attach, leads to a context that cannot be detached + self::storage()->attach(new self($key, $value, self::getCurrent())); + + return self::getCurrent(); + } + + return new self($key, $value, $parent); + } + + protected ?ContextKey $key; + + /** + * @var mixed|null + */ + protected $value; + + protected ?\OpenTelemetry\Context\Context $parent; + + /** + * This is a general purpose read-only key-value store. Read-only in the sense that adding a new value does not + * mutate the existing context, but returns a new Context which has the new value added. + * + * In practical terms, this is implemented as a linked list of Context instances, with each one holding a reference + * to the key object, the value that corresponds to the key, and an optional reference to the parent Context + * (i.e. the next link in the linked list chain) + * + * If you inherit from this class, you should "shadow" $parent into your subclass so that all operations give + * you back an instance of the same type that you are interacting with and different subclasses should NOT be + * treated as interoperable. i.e. you should NOT have a Context object chain with both Context instances interleaved + * with Baggage instances. + * + * @param ContextKey|null $key The key object. Should only be null when creating an "empty" context + * @param mixed|null $value + * @param self|null $parent Reference to the parent object + */ + final public function __construct(?ContextKey $key=null, $value=null, $parent=null) + { + $this->key = $key; + $this->value = $value; + $this->parent = $parent; + } + + /** + * This adds a k/v pair to this Context. We do this by instantiating a new Context instance with the k/v and pass + * a reference to $this as the "parent" creating the linked list chain. + * + * @param ContextKey $key + * @param mixed $value + * + * @return Context a new Context containing the k/v + */ + public function with(ContextKey $key, $value) + { + return new self($key, $value, $this); + } + + /** + * @todo: Implement this on the API side + */ + public function withContextValue(ImplicitContextKeyedInterface $value): Context + { + return $value->storeInContext($this); + } + + /** + * Makes `$this` the currently active {@see Context}. + * + * @todo: Implement this on the API side + */ + public function activate(): ScopeInterface + { + return self::attach($this); + } + + /** + * Fetch a value from the Context given a key value. + * + * @return mixed|null + */ + public function get(ContextKey $key) + { + if ($this->key === $key) { + return $this->value; + } + + if (null === $this->parent) { + return null; + } + + return $this->parent->get($key); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/ContextKey.php b/tests/php_test_files/vendor/open-telemetry/context/ContextKey.php new file mode 100644 index 0000000..40dfbd2 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/ContextKey.php @@ -0,0 +1,20 @@ +name = $name; + } + + public function name(): ?string + { + return $this->name; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/ContextStorage.php b/tests/php_test_files/vendor/open-telemetry/context/ContextStorage.php new file mode 100644 index 0000000..d70011d --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/ContextStorage.php @@ -0,0 +1,51 @@ + */ + private array $forks = []; + + public function __construct(Context $context) + { + $this->current = $this->main = new ContextStorageHead($this); + $this->current->node = new ContextStorageNode($context, $this->current); + } + + public function fork(int $id): void + { + $this->forks[$id] = clone $this->current; + } + + public function switch(int $id): void + { + $this->current = $this->forks[$id] ?? $this->main; + } + + public function destroy(int $id): void + { + unset($this->forks[$id]); + } + + public function current(): Context + { + return $this->current->node->context; + } + + public function attach(Context $context): ScopeInterface + { + return $this->current->node = new ContextStorageNode($context, $this->current, $this->current->node); + } + + private function __clone() + { + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/ContextStorageHead.php b/tests/php_test_files/vendor/open-telemetry/context/ContextStorageHead.php new file mode 100644 index 0000000..d7bd3b3 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/ContextStorageHead.php @@ -0,0 +1,19 @@ +storage = $storage; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/ContextStorageInterface.php b/tests/php_test_files/vendor/open-telemetry/context/ContextStorageInterface.php new file mode 100644 index 0000000..a3d7158 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/ContextStorageInterface.php @@ -0,0 +1,18 @@ +context = $context; + $this->head = $head; + $this->previous = $previous; + } + + public function detach(): int + { + $flags = 0; + if ($this->head !== $this->head->storage->current) { + $flags |= ScopeInterface::INACTIVE; + } + + if ($this === $this->head->node) { + assert($this->previous !== null); + $this->head->node = $this->previous; + $this->previous = null; + + return $flags; + } + + if (!$this->previous) { + return $flags | ScopeInterface::DETACHED; + } + + for ($n = $this->head->node, $depth = 1; + $n->previous !== $this; + $n = $n->previous, $depth++) { + assert($n->previous !== null); + } + $n->previous = $this->previous; + $this->previous = null; + + return $flags | ScopeInterface::MISMATCH | $depth; + } + + private function __clone() + { + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/FiberNotSupportedContextStorage.php b/tests/php_test_files/vendor/open-telemetry/context/FiberNotSupportedContextStorage.php new file mode 100644 index 0000000..26ef8ca --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/FiberNotSupportedContextStorage.php @@ -0,0 +1,64 @@ +storage = $storage; + } + + public function fork(int $id): void + { + $this->storage->fork($id); + } + + public function switch(int $id): void + { + $this->storage->switch($id); + } + + public function destroy(int $id): void + { + $this->storage->destroy($id); + } + + public function current(): Context + { + assert(class_exists(Fiber::class)); + if (Fiber::getCurrent()) { + trigger_error('Fiber context switching not supported', E_USER_WARNING); + } + + return $this->storage->current(); + } + + public function attach(Context $context): ScopeInterface + { + assert(class_exists(Fiber::class)); + if (Fiber::getCurrent()) { + trigger_error('Fiber context switching not supported', E_USER_WARNING); + } + + return $this->storage->attach($context); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php b/tests/php_test_files/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php new file mode 100644 index 0000000..cb86788 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php @@ -0,0 +1,33 @@ +keys(); + } + + throw new InvalidArgumentException( + sprintf( + 'Unsupported carrier type: %s.', + is_object($carrier) ? get_class($carrier) : gettype($carrier), + ) + ); + } + + /** {@inheritdoc} */ + public function get($carrier, string $key): ?string + { + $lKey = strtolower($key); + if ($carrier instanceof ArrayAccess) { + return $carrier->offsetExists($lKey) ? $carrier->offsetGet($lKey) : null; + } + + if (is_array($carrier)) { + if (empty($carrier)) { + return null; + } + + foreach ($carrier as $k => $value) { + // Ensure traceparent and tracestate header keys are lowercase + if (is_string($k)) { + if (strtolower($k) === $lKey) { + if (is_array($value)) { + return empty($value) ? null : $value[0]; + } + + return $value; + } + } + } + + return null; + } + + throw new InvalidArgumentException( + sprintf( + 'Unsupported carrier type: %s. Unable to get value associated with key:%s', + is_object($carrier) ? get_class($carrier) : gettype($carrier), + $key + ) + ); + } + + /** {@inheritdoc} */ + public function set(&$carrier, string $key, string $value): void + { + if ($key === '') { + throw new InvalidArgumentException('Unable to set value with an empty key'); + } + + if ($carrier instanceof ArrayAccess || is_array($carrier)) { + $carrier[strtolower($key)] = $value; + + return; + } + + throw new InvalidArgumentException( + sprintf( + 'Unsupported carrier type: %s. Unable to set value associated with key:%s', + is_object($carrier) ? get_class($carrier) : gettype($carrier), + $key + ) + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/Propagation/KeyedArrayAccessInterface.php b/tests/php_test_files/vendor/open-telemetry/context/Propagation/KeyedArrayAccessInterface.php new file mode 100644 index 0000000..0d585ee --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/Propagation/KeyedArrayAccessInterface.php @@ -0,0 +1,16 @@ + */ + public function keys(): array; +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php b/tests/php_test_files/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php new file mode 100644 index 0000000..93e5506 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php @@ -0,0 +1,82 @@ + + */ + private array $propagators = []; + + /** + * @readonly + * + * @var list + */ + private array $fields; + + /** + * @no-named-arguments + * + * @param list $propagators + */ + public function __construct(array $propagators) + { + $this->propagators = $propagators; + $this->fields = $this->extractFields($propagators); + } + + public function fields(): array + { + return $this->fields; + } + + public function inject(&$carrier, PropagationSetterInterface $setter = null, Context $context = null): void + { + foreach ($this->propagators as $propagator) { + $propagator->inject($carrier, $setter, $context); + } + } + + public function extract($carrier, PropagationGetterInterface $getter = null, Context $context = null): Context + { + $context = $context ?? Context::getRoot(); + + foreach ($this->propagators as $propagator) { + $context = $propagator->extract($carrier, $getter, $context); + } + + return $context; + } + + /** + * @param list $propagators + * @return list + */ + private function extractFields(array $propagators): array + { + return array_values( + array_unique( + // Phan seems to struggle here with the variadic argument + // @phan-suppress-next-line PhanParamTooFewInternalUnpack + array_merge( + ...array_map( + static fn (TextMapPropagatorInterface $propagator) => $propagator->fields(), + $propagators + ) + ) + ) + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php b/tests/php_test_files/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php new file mode 100644 index 0000000..9599034 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php @@ -0,0 +1,35 @@ + + */ + public function keys($carrier): array; + + /** + * Gets the value of a given key from a carrier. + */ + public function get($carrier, string $key) : ?string; +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php b/tests/php_test_files/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php new file mode 100644 index 0000000..75e2056 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php @@ -0,0 +1,16 @@ + + */ + public function fields() : array; + + /** + * Injects specific values from the provided {@see Context} into the provided carrier + * via an {@see PropagationSetterInterface}. + * + * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-inject + * + * @param mixed $carrier + */ + public function inject(&$carrier, PropagationSetterInterface $setter = null, Context $context = null): void; + + /** + * Extracts specific values from the provided carrier into the provided {@see Context} + * via an {@see PropagationGetterInterface}. + * + * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-extract + */ + public function extract($carrier, PropagationGetterInterface $getter = null, Context $context = null): Context; +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/ScopeInterface.php b/tests/php_test_files/vendor/open-telemetry/context/ScopeInterface.php new file mode 100644 index 0000000..ebe0171 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/ScopeInterface.php @@ -0,0 +1,29 @@ += 80100 && + (in_array(getenv('OTEL_PHP_FIBERS_ENABLED'), ['true', 'on', '1'])) && + class_exists(FFI::class) + ); + } + + /** + * @psalm-suppress UndefinedClass + */ + public function init(): bool + { + if (null === self::$fibers) { + try { + $fibers = FFI::scope('OTEL_ZEND_OBSERVER_FIBER'); + } catch (Exception $e) { + try { + $fibers = FFI::load(__DIR__ . '/fiber/zend_observer_fiber.h'); + } catch (Exception $e) { + return false; + } + } + $fibers->zend_observer_fiber_init_register(fn (int $initializing) => Context::storage()->fork($initializing)); //@phpstan-ignore-line + $fibers->zend_observer_fiber_switch_register(fn (int $from, int $to) => Context::storage()->switch($to)); //@phpstan-ignore-line + $fibers->zend_observer_fiber_destroy_register(fn (int $destroying) => Context::storage()->destroy($destroying)); //@phpstan-ignore-line + self::$fibers = $fibers; + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/composer.json b/tests/php_test_files/vendor/open-telemetry/context/composer.json new file mode 100644 index 0000000..df9be9b --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/composer.json @@ -0,0 +1,24 @@ +{ + "name": "open-telemetry/context", + "description": "Context implementation for OpenTelemetry PHP.", + "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "context"], + "type": "library", + "license": "Apache-2.0", + "authors": [ + { + "name": "opentelemetry-php contributors", + "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" + } + ], + "require": { + "php": "^7.4 || ^8.0" + }, + "autoload": { + "psr-4": { + "OpenTelemetry\\Context\\": "" + } + }, + "suggest": { + "ext-ffi": "To allow context switching in Fibers" + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php b/tests/php_test_files/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php new file mode 100644 index 0000000..9487a8f --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php @@ -0,0 +1,22 @@ +isEnabled() && $observer->init()) { + // ffi fiber support enabled +} else { + Context::setStorage(new FiberNotSupportedContextStorage(Context::storage())); +} diff --git a/tests/php_test_files/vendor/open-telemetry/context/fiber/zend_observer_fiber.h b/tests/php_test_files/vendor/open-telemetry/context/fiber/zend_observer_fiber.h new file mode 100644 index 0000000..6a8e4e9 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/context/fiber/zend_observer_fiber.h @@ -0,0 +1,9 @@ +#define FFI_SCOPE "OTEL_ZEND_OBSERVER_FIBER" + +typedef void (*zend_observer_fiber_init_handler)(intptr_t initializing); +typedef void (*zend_observer_fiber_switch_handler)(intptr_t from, intptr_t to); +typedef void (*zend_observer_fiber_destroy_handler)(intptr_t destroying); + +void zend_observer_fiber_init_register(zend_observer_fiber_init_handler handler); +void zend_observer_fiber_switch_register(zend_observer_fiber_switch_handler handler); +void zend_observer_fiber_destroy_register(zend_observer_fiber_destroy_handler handler); diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Behavior/LogsMessagesTrait.php b/tests/php_test_files/vendor/open-telemetry/sdk/Behavior/LogsMessagesTrait.php new file mode 100644 index 0000000..23b3fb7 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Behavior/LogsMessagesTrait.php @@ -0,0 +1,42 @@ +log($level, $message, $context); + } + + protected static function logDebug(string $message, array $context = []): void + { + self::doLog(LogLevel::DEBUG, $message, $context); + } + + protected static function logInfo(string $message, array $context = []): void + { + self::doLog(LogLevel::INFO, $message, $context); + } + + protected static function logNotice(string $message, array $context = []): void + { + self::doLog(LogLevel::NOTICE, $message, $context); + } + + protected static function logWarning(string $message, array $context = []): void + { + self::doLog(LogLevel::WARNING, $message, $context); + } + + protected static function logError(string $message, array $context = []): void + { + self::doLog(LogLevel::ERROR, $message, $context); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributeLimits.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributeLimits.php new file mode 100644 index 0000000..e476ca6 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributeLimits.php @@ -0,0 +1,32 @@ +attributeCountLimit = $attributeCountLimit; + $this->attributeValueLengthLimit = $attributeValueLengthLimit; + } + + /** @return int Maximum allowed attribute count */ + public function getAttributeCountLimit(): int + { + return $this->attributeCountLimit; + } + + /** @return int Maximum allowed attribute value length */ + public function getAttributeValueLengthLimit(): int + { + return $this->attributeValueLengthLimit; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributeLimitsInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributeLimitsInterface.php new file mode 100644 index 0000000..2327c22 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributeLimitsInterface.php @@ -0,0 +1,17 @@ +attributeLimits = $attributeLimits ?? new AttributeLimits(); + foreach ($attributes as $key => $value) { + $this->setAttribute((string) $key, $value); + } + } + + /** @return Attributes Returns a new instance of Attributes with the limits applied */ + public static function withLimits(iterable $attributes, AttributeLimitsInterface $attributeLimits): Attributes + { + return new self($attributes, $attributeLimits); + } + + public function hasAttribute(string $name): bool + { + return isset($this->attributes[$name]); + } + + public function setAttribute(string $name, $value): AttributesInterface + { + // unset the attribute when null value is passed + if ($value === null) { + return $this->unsetAttribute($name); + } + + $this->totalAddedAttributes++; + + // drop attribute when limit is reached + if (!$this->hasAttribute($name) && $this->isLimitReached()) { + return $this; + } + + $this->attributes[$name] = $this->normalizeValue($value); + + return $this; + } + + public function unsetAttribute(string $name): AttributesInterface + { + if ($this->hasAttribute($name)) { + unset($this->attributes[$name]); + + $this->totalAddedAttributes--; + } + + return $this; + } + + public function get(string $name) + { + return $this->attributes[$name] ?? null; + } + + /** @psalm-mutation-free */ + public function count(): int + { + return \count($this->attributes); + } + + public function getIterator(): Traversable + { + foreach ($this->attributes as $key => $value) { + yield (string) $key => $value; + } + } + + public function toArray(): array + { + return $this->attributes; + } + + public function getTotalAddedValues(): int + { + return $this->totalAddedAttributes; + } + + public function getDroppedAttributesCount(): int + { + return $this->totalAddedAttributes - count($this); + } + + public function isLimitReached(): bool + { + return count($this) >= $this->attributeLimits->getAttributeCountLimit(); + } + + private function truncateStringValue(string $value): string + { + return mb_substr($value, 0, $this->attributeLimits->getAttributeValueLengthLimit()); + } + + private function normalizeValue($value) + { + if (is_string($value)) { + return $this->truncateStringValue($value); + } + + if (is_array($value)) { + return array_map(function ($value) { + return $this->normalizeValue($value); + }, $value); + } + + return $value; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php new file mode 100644 index 0000000..700daa2 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php @@ -0,0 +1,25 @@ +adapted = new Moved( + $attributeCountLimit, + $attributeValueLengthLimit + ); + Util::triggerClassDeprecationNotice( + OpenTelemetry_SDK_AttributeLimits, + Moved::class + ); + } + + public function getAttributeCountLimit(): int + { + return $this->adapted->getAttributeCountLimit(); + } + + public function getAttributeValueLengthLimit(): int + { + return $this->adapted->getAttributeValueLengthLimit(); + } +} + +class_alias(AttributeLimits::class, OpenTelemetry_SDK_AttributeLimits); +/** + * @codeCoverageIgnoreEnd + */ diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/BC/AttributeLimitsInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/BC/AttributeLimitsInterface.php new file mode 100644 index 0000000..a2e6506 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/BC/AttributeLimitsInterface.php @@ -0,0 +1,19 @@ +adapted = new Moved($name, $version, $schemaUrl); + + Util::triggerClassDeprecationNotice( + OpenTelemetry_SDK_InstrumentationLibrary, + Moved::class + ); + } + + public function getName(): string + { + return $this->adapted->getName(); + } + + public function getVersion(): ?string + { + return $this->adapted->getVersion(); + } + + public function getSchemaUrl(): ?string + { + return $this->adapted->getSchemaUrl(); + } +} + +class_alias(InstrumentationLibrary::class, OpenTelemetry_SDK_InstrumentationLibrary); +/** + * @codeCoverageIgnoreEnd + */ diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/BC/InstrumentationScopeInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/BC/InstrumentationScopeInterface.php new file mode 100644 index 0000000..5a69a4c --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/BC/InstrumentationScopeInterface.php @@ -0,0 +1,19 @@ +adapted = new Moved(); + Util::triggerClassDeprecationNotice( + OpenTelemetry_SDK_SystemClock, + Moved::class + ); + } + + public static function getInstance(): self + { + return new self(); + } + + public function now(): int + { + return $this->adapted->now(); + } + + public function nanoTime(): int + { + return $this->adapted->now(); + } +} + +class_alias(SystemClock::class, OpenTelemetry_SDK_SystemClock); +/** + * @codeCoverageIgnoreEnd + */ diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php new file mode 100644 index 0000000..bb24887 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php @@ -0,0 +1,93 @@ + trim($value), + explode(self::DEFAULT_SEPARATOR, $value), + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Environment/Parser/MapParser.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Environment/Parser/MapParser.php new file mode 100644 index 0000000..11611b9 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Environment/Parser/MapParser.php @@ -0,0 +1,42 @@ + self::MAX_VALUE || $result < self::MIN_VALUE) { + throw new RangeException( + sprintf( + 'Value must not be lower than %s or higher than %s. Given: %s', + self::MIN_VALUE, + self::MAX_VALUE, + $value + ) + ); + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Environment/Resolver.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Environment/Resolver.php new file mode 100644 index 0000000..5ddfcd1 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Environment/Resolver.php @@ -0,0 +1,70 @@ +name = $name; + $this->version = $version; + $this->schemaUrl = $schemaUrl; + } + + /** + * @internal + * @psalm-internal OpenTelemetry + */ + public static function getEmpty(): InstrumentationScope + { + return self::$empty ?? self::$empty = new self('', null, null); + } + + public function getName(): string + { + return $this->name; + } + + public function getVersion(): ?string + { + return $this->version; + } + + public function getSchemaUrl(): ?string + { + return $this->schemaUrl; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php new file mode 100644 index 0000000..8060994 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php @@ -0,0 +1,14 @@ +build(); + } + + public static function setDefault(?ClockInterface $clock): void + { + self::$default = $clock; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php new file mode 100644 index 0000000..6d9afde --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php @@ -0,0 +1,16 @@ +clock = $clock; + $this->initialStartTime = $initialStartTime; + } + + public function isRunning(): bool + { + return $this->running; + } + + public function start(): void + { + // resolve start time as early as possible + $startTime = $this->time(); + + if ($this->isRunning()) { + return; + } + + $this->startTime = $startTime; + if (!$this->hasBeenStarted()) { + $this->initialStartTime = $startTime; + } + $this->running = true; + } + + public function stop(): void + { + if (!$this->isRunning()) { + return; + } + + $this->stopTime = $this->time(); + $this->running = false; + } + + public function reset(): void + { + $this->startTime = $this->initialStartTime = $this->isRunning() ? $this->time() : null; + } + + public function getElapsedTime(): int + { + if (!$this->hasBeenStarted()) { + return self::INITIAL_ELAPSED_TIME; + } + + return $this->calculateElapsedTime(); + } + + public function getLastElapsedTime(): int + { + if (!$this->hasBeenStarted()) { + return self::INITIAL_ELAPSED_TIME; + } + + return $this->calculateLastElapsedTime(); + } + + private function time(): int + { + return $this->clock->now(); + } + + private function hasBeenStarted(): bool + { + return $this->initialStartTime !== null; + } + + private function calculateElapsedTime(): int + { + $referenceTime = $this->isRunning() + ? $this->time() + : $this->getStopTime(); + + return $referenceTime - $this->getInitialStartTime(); + } + + private function calculateLastElapsedTime(): int + { + $referenceTime = $this->isRunning() + ? $this->time() + : $this->getStopTime(); + + return $referenceTime - $this->getStartTime(); + } + + private function getInitialStartTime(): ?int + { + return $this->initialStartTime; + } + + private function getStartTime(): ?int + { + return $this->startTime; + } + + private function getStopTime(): ?int + { + return $this->stopTime; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php new file mode 100644 index 0000000..65e083c --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php @@ -0,0 +1,44 @@ +clock = $clock ?? ClockFactory::getDefault(); + $this->initialStartTime = $initialStartTime; + } + + public static function create(?ClockInterface $clock = null, ?int $initialStartTime = null): self + { + return new self($clock, $initialStartTime); + } + + public static function fromClockFactory(ClockFactoryInterface $factory, ?int $initialStartTime = null): self + { + return self::create($factory->build(), $initialStartTime); + } + + public function build(): StopWatch + { + return new StopWatch($this->clock, $this->initialStartTime); + } + + public static function getDefault(): StopWatchInterface + { + return self::$default ?? self::$default = self::create()->build(); + } + + public static function setDefault(?StopWatchInterface $default): void + { + self::$default = $default; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php new file mode 100644 index 0000000..9750f57 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php @@ -0,0 +1,18 @@ +now(); + } + + private static function init(): void + { + if (self::$referenceTime > 0) { + return; + } + + self::$referenceTime = self::calculateReferenceTime( + microtime(true), + hrtime(true) + ); + } + + /** + * Calculates the reference time which is later used to calculate the current wall clock time in nanoseconds by adding the current uptime. + */ + private static function calculateReferenceTime(float $wallClockMicroTime, int $upTime): int + { + return ((int) ($wallClockMicroTime * ClockInterface::NANOS_PER_SECOND)) - $upTime; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/Util.php b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/Util.php new file mode 100644 index 0000000..e1be1f7 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Common/Time/Util.php @@ -0,0 +1,32 @@ + 7, + // Interesting events. Examples: User logs in, SQL logs. + PsrLogLevel::INFO => 6, + // Normal but significant events. + PsrLogLevel::NOTICE => 5, + // Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, + // undesirable things that are not necessarily wrong. + PsrLogLevel::WARNING => 4, + // Runtime errors that do not require immediate action but should typically be logged and monitored. + PsrLogLevel::ERROR => 3, + // Critical conditions. Example: Application component unavailable, unexpected exception. + PsrLogLevel::CRITICAL => 2, + // Action must be taken immediately. Example: Entire website down, database unavailable, etc. + // This should trigger the alerts and wake you up. + PsrLogLevel::ALERT => 1, + // Emergency: system is unusable. + PsrLogLevel::EMERGENCY => 0, + ]; + + /** + * Mappig of OpenTelemetry SeverityNumber to PsrLogLevel. + * @see: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/logs/data-model.md#field-severitynumber + */ + public const SEVERITY_NUMBER = [ + PsrLogLevel::DEBUG => 5, + PsrLogLevel::INFO => 9, + PsrLogLevel::NOTICE => 10, + PsrLogLevel::WARNING => 13, + PsrLogLevel::ERROR => 17, + PsrLogLevel::CRITICAL => 18, + PsrLogLevel::ALERT => 21, + PsrLogLevel::EMERGENCY => 22, + ]; +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php b/tests/php_test_files/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php new file mode 100644 index 0000000..5c24bc4 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php @@ -0,0 +1,86 @@ +filename = $filename; + $this->loggerName = $loggerName; + } + + /** + * @param string $level + * @param mixed $message + * @param array $context + * @psalm-suppress MoreSpecificImplementedParamType + */ + public function log($level, $message, array $context = []): void + { + $level = strtolower($level); + + if (!in_array($level, self::getLogLevels(), true)) { + throw new InvalidArgumentException( + sprintf('Invalid Log level: "%s"', $level) + ); + } + + file_put_contents($this->filename, $this->formatLog((string) $level, (string) $message, $context), FILE_APPEND); + } + + /** + * @param string $level + * @param string $message + * @param array $context + * @return string + */ + private function formatLog(string $level, string $message, array $context = []): string + { + try { + $encodedContext = json_encode($context, JSON_THROW_ON_ERROR); + } catch (Throwable $t) { + $encodedContext = sprintf('(Could not encode context: %s)', $t->getMessage()); + } + + return sprintf( + '[%s] %s %s: %s %s%s', + date(DATE_RFC3339_EXTENDED), + $this->loggerName, + $level, + $message, + $encodedContext, + PHP_EOL + ); + } + + /** + * @return array + */ + private static function getLogLevels(): array + { + return self::$logLevels ?? self::$logLevels = (new ReflectionClass(LogLevel::class))->getConstants(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/AbstractMetric.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/AbstractMetric.php new file mode 100644 index 0000000..8e30ddf --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/AbstractMetric.php @@ -0,0 +1,36 @@ +name = $name; + $this->description = $description; + } + + /** + * {@inheritDoc} + */ + public function getName(): string + { + return $this->name; + } + + /** + * {@inheritDoc} + */ + public function getDescription(): string + { + return $this->description; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Counter.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Counter.php new file mode 100644 index 0000000..b3eec17 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Counter.php @@ -0,0 +1,66 @@ +value; + } + + /** + * Increments the current value + * + * @access public + * @return self + */ + public function increment(): API\CounterInterface + { + $this->value++; + + return $this; + } + + /** + * Adds the specified value to the current counter's value + * + * @access public + * @return self + */ + public function add(int $value): API\CounterInterface + { + if ($value <= 0) { + throw new InvalidArgumentException('Only positive numbers can be added to the Counter'); + } + + $this->value += $value; + + return $this; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Exceptions/CantBeExported.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Exceptions/CantBeExported.php new file mode 100644 index 0000000..10c37df --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Exceptions/CantBeExported.php @@ -0,0 +1,9 @@ +doExport($metrics); + + return API\ExporterInterface::SUCCESS; + } catch (RetryableExportException $exception) { + return API\ExporterInterface::FAILED_RETRYABLE; + } catch (Exception $exception) { + return API\ExporterInterface::FAILED_NOT_RETRYABLE; + } + } + + /** + * Sends metrics to the destination system + * + * @access protected + * @param iterable $metrics + * @return void + */ + abstract protected function doExport(iterable $metrics): void; +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/HasLabelsTrait.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/HasLabelsTrait.php new file mode 100644 index 0000000..71bd262 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/HasLabelsTrait.php @@ -0,0 +1,49 @@ + + */ + protected $labels = []; + + /** + * @return array + */ + public function getLabels(): array + { + return $this->labels; + } + + /** + * {@inheritDoc} + */ + public function setLabels(array $labels) + { + foreach ($labels as $label) { + if (! is_string($label)) { + throw new InvalidArgumentException('The label is expected to be a string'); + } + } + + $this->labels = $labels; + + return $this; + } + + /** + * {@inheritDoc} + */ + public function addLabel(string $label) + { + $this->labels[] = $label; + + return $this; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Meter.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Meter.php new file mode 100644 index 0000000..7612dc9 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Meter.php @@ -0,0 +1,59 @@ +name = $name; + $this->version = (string) $version; + } + + /** + * {@inheritdoc} + */ + public function getName(): string + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function getVersion(): string + { + return $this->version; + } + + /** + * {@inheritdoc} + */ + public function newCounter(string $name, string $description = ''): API\CounterInterface + { + return new Counter($name, $description); + } + + /** + * {@inheritdoc} + */ + public function newUpDownCounter(string $name, string $description = ''): API\UpDownCounterInterface + { + return new UpDownCounter($name, $description); + } + + /** + * {@inheritdoc} + */ + public function newValueRecorder(string $name, string $description = ''): API\ValueRecorderInterface + { + return new ValueRecorder($name, $description); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Providers/GlobalMeterProvider.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Providers/GlobalMeterProvider.php new file mode 100644 index 0000000..b6adedb --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Providers/GlobalMeterProvider.php @@ -0,0 +1,49 @@ +$name(...$arguments); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Providers/MeterProvider.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Providers/MeterProvider.php new file mode 100644 index 0000000..99eef79 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/Providers/MeterProvider.php @@ -0,0 +1,39 @@ +meters[$name . $version])) { + $this->meters[$name . $version] = $this->getCreatedMeter($name, $version); + } + + return $this->meters[$name . $version]; + } + + /** + * Creates a new Meter instance + * + * @access protected + * @param string $name + * @param string|null $version Default: null + * @return API\MeterInterface + */ + protected function getCreatedMeter(string $name, string $version = null): API\MeterInterface + { + // todo: once the Meter interface and an implementation are done, change this + return new Meter($name, $version); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php new file mode 100644 index 0000000..d98886f --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php @@ -0,0 +1,78 @@ +value; + } + + /** + * Updates the UpDownCounter's value with the specified increment then returns the current value. + * + * @access public + * + * @param int|float $increment, accepts INTs or FLOATs. If increment is a float, it is truncated. + * + * @return int $value + */ + + public function add($increment): int + { + if (is_float($increment)) { + /* + * + * todo: send the following message to the log when logger is implemented: + * Floating point detected, ignoring the fractional decimal places. + */ + $increment = (int) $increment; + } + if (!is_int($increment)) { + throw new InvalidArgumentException('Only numerical values can be used to update the UpDownCounter.'); + } + $this->value += $increment; + + return $this->value; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/ValueRecorder.php b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/ValueRecorder.php new file mode 100644 index 0000000..bde98ad --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Metrics/ValueRecorder.php @@ -0,0 +1,131 @@ +valueSum; + } + + /** + * Returns the min of the values + * + * @access public + */ + public function getMin(): float + { + return $this->valueMin; + } + + /** + * Returns the max of the values + * + * @access public + */ + public function getMax(): float + { + return $this->valueMax; + } + + /** + * Returns the mean of the values + * + * @access public + */ + public function getMean(): float + { + if (0 == $this->valueCount) { + return 0; + } + + return ($this->valueSum/$this->valueCount); + } + + /** + * Returns the count of the values + * + * @access public + */ + public function getCount(): int + { + return $this->valueCount; + } + + /** + * Updates the ValueRecorder's value with the specified value. + * + * @access public + */ + public function record(float $value): void + { + $value = round($value, $this->decimalPointPrecision); + + $this->valueSum += $value; + $this->valueMin = min($this->valueMin, $value); + $this->valueMax = max($this->valueMax, $value); + $this->valueCount++; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php new file mode 100644 index 0000000..cec61ac --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php @@ -0,0 +1,30 @@ + InstalledVersions::getRootPackage()['name'], + ResourceAttributes::SERVICE_VERSION => InstalledVersions::getRootPackage()['pretty_version'], + ]; + + return ResourceInfo::create(new Attributes($attributes), ResourceAttributes::SCHEMA_URL); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php new file mode 100644 index 0000000..6c34dba --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php @@ -0,0 +1,32 @@ + $resourceDetectors + */ + public function __construct(iterable $resourceDetectors) + { + $this->resourceDetectors = $resourceDetectors; + } + + public function getResource(): ResourceInfo + { + $resources = []; + foreach ($this->resourceDetectors as $resourceDetector) { + $resources[] = $resourceDetector->getResource(); + } + + return ResourceInfoFactory::merge(...$resources); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php new file mode 100644 index 0000000..7ff9d19 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php @@ -0,0 +1,23 @@ +resourceInfo = $resourceInfo; + } + + public function getResource(): ResourceInfo + { + return $this->resourceInfo; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php new file mode 100644 index 0000000..0b2d202 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php @@ -0,0 +1,35 @@ +getMapFromEnvironment(Env::OTEL_RESOURCE_ATTRIBUTES, ''); + + //@see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#general-sdk-configuration + $serviceName = $this->hasEnvironmentVariable(Env::OTEL_SERVICE_NAME) ? + $this->getStringFromEnvironment(Env::OTEL_SERVICE_NAME) : + null; + if ($serviceName) { + $attributes[ResourceAttributes::SERVICE_NAME] = $serviceName; + } + + return ResourceInfo::create(new Attributes($attributes), ResourceAttributes::SCHEMA_URL); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Host.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Host.php new file mode 100644 index 0000000..cf7f2d8 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Host.php @@ -0,0 +1,27 @@ + php_uname('n'), + ResourceAttributes::HOST_ARCH => php_uname('m'), + ]; + + return ResourceInfo::create(new Attributes($attributes), ResourceAttributes::SCHEMA_URL); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php new file mode 100644 index 0000000..74a7d98 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php @@ -0,0 +1,32 @@ + strtolower(PHP_OS_FAMILY), + ResourceAttributes::OS_DESCRIPTION => php_uname('r'), + ResourceAttributes::OS_NAME => PHP_OS, + ResourceAttributes::OS_VERSION => php_uname('v'), + ]; + + return ResourceInfo::create(new Attributes($attributes), ResourceAttributes::SCHEMA_URL); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Process.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Process.php new file mode 100644 index 0000000..49ecb41 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Process.php @@ -0,0 +1,36 @@ + php_sapi_name(), + ResourceAttributes::PROCESS_RUNTIME_VERSION => PHP_VERSION, + ]; + + return ResourceInfo::create(new Attributes($attributes), ResourceAttributes::SCHEMA_URL); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php new file mode 100644 index 0000000..2548fa6 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php @@ -0,0 +1,48 @@ + 'opentelemetry', + ResourceAttributes::TELEMETRY_SDK_LANGUAGE => 'php', + ]; + + if (class_exists(InstalledVersions::class)) { + foreach (self::PACKAGES as $package) { + if (!InstalledVersions::isInstalled($package)) { + continue; + } + if (($version = InstalledVersions::getPrettyVersion($package)) === null) { + continue; + } + + $attributes[ResourceAttributes::TELEMETRY_SDK_VERSION] = $version; + + break; + } + } + + return ResourceInfo::create(new Attributes($attributes), ResourceAttributes::SCHEMA_URL); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php new file mode 100644 index 0000000..509256c --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php @@ -0,0 +1,25 @@ + 'unknown_service', + ]; + + return ResourceInfo::create(new Attributes($attributes), ResourceAttributes::SCHEMA_URL); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/ResourceConstants.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/ResourceConstants.php new file mode 100644 index 0000000..2371ab8 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/ResourceConstants.php @@ -0,0 +1,85 @@ +attributes = $attributes; + $this->schemaUrl = $schemaUrl; + } + + public static function create(AttributesInterface $attributes, ?string $schemaUrl = null): self + { + return new ResourceInfo(clone $attributes, $schemaUrl); + } + + public function getAttributes(): AttributesInterface + { + return $this->attributes; + } + + public function getSchemaUrl(): ?string + { + return $this->schemaUrl; + } + + public function serialize(): string + { + $copyOfAttributesAsArray = array_slice($this->attributes->toArray(), 0); //This may be overly cautious (in trying to avoid mutating the source array) + ksort($copyOfAttributesAsArray); //sort the associative array by keys since the serializer will consider equal arrays different otherwise + + //The exact return value doesn't matter, as long as it can distingusih between instances that represent the same/different resources + return serialize([ + 'schemaUrl' => $this->schemaUrl, + 'attributes' => $copyOfAttributesAsArray, + ]); + } + + /** + * Backward compatibility methods + * + * @codeCoverageIgnore + */ + public static function merge(ResourceInfo ...$resources): ResourceInfo + { + BcUtil::triggerMethodDeprecationNotice( + __METHOD__, + 'merge', + ResourceInfoFactory::class + ); + + return ResourceInfoFactory::merge(...$resources); + } + + /** + * @codeCoverageIgnore + */ + public static function defaultResource(): ResourceInfo + { + BcUtil::triggerMethodDeprecationNotice( + __METHOD__, + 'defaultResource', + ResourceInfoFactory::class + ); + + return ResourceInfoFactory::defaultResource(); + } + + /** + * @codeCoverageIgnore + */ + public static function emptyResource(): ResourceInfo + { + BcUtil::triggerMethodDeprecationNotice( + __METHOD__, + 'emptyResource', + ResourceInfoFactory::class + ); + + return ResourceInfoFactory::emptyResource(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php new file mode 100644 index 0000000..6618d5e --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php @@ -0,0 +1,110 @@ +getAttributes()->toArray(); + } + + $schemaUrl = self::mergeSchemaUrl(...$resources); + + return ResourceInfo::create(new Attributes($attributes), $schemaUrl); + } + + public static function defaultResource(): ResourceInfo + { + $detectors = Accessor::getList(Env::OTEL_PHP_DETECTORS); + + if (in_array(Values::VALUE_ALL, $detectors)) { + return (new Detectors\Composite([ + new Detectors\Environment(), + new Detectors\Host(), + new Detectors\OperatingSystem(), + new Detectors\Process(), + new Detectors\ProcessRuntime(), + new Detectors\Sdk(), + new Detectors\SdkProvided(), + ]))->getResource(); + } + + $resourceDetectors = []; + + foreach ($detectors as $detector) { + switch ($detector) { + case Values::VALUE_DETECTORS_ENVIRONMENT: + $resourceDetectors[] = new Detectors\Environment(); + + break; + case Values::VALUE_DETECTORS_HOST: + $resourceDetectors[] = new Detectors\Host(); + + break; + case Values::VALUE_DETECTORS_OS: + $resourceDetectors[] = new Detectors\OperatingSystem(); + + break; + case Values::VALUE_DETECTORS_PROCESS: + $resourceDetectors[] = new Detectors\Process(); + + break; + case Values::VALUE_DETECTORS_PROCESS_RUNTIME: + $resourceDetectors[] = new Detectors\ProcessRuntime(); + + break; + case Values::VALUE_DETECTORS_SDK: + $resourceDetectors[] = new Detectors\Sdk(); + + break; + case Values::VALUE_DETECTORS_SDK_PROVIDED: + $resourceDetectors[] = new Detectors\SdkProvided(); + + break; + default: + } + } + + return (new Detectors\Composite($resourceDetectors))->getResource(); + } + + public static function emptyResource(): ResourceInfo + { + return ResourceInfo::create(new Attributes()); + } + + private static function mergeSchemaUrl(ResourceInfo ...$resources): ?string + { + $schemaUrl = null; + foreach ($resources as $resource) { + if ($schemaUrl !== null && $resource->getSchemaUrl() !== null && $schemaUrl !== $resource->getSchemaUrl()) { + // stop the merging if non-empty conflicting schemas are detected + return null; + } + $schemaUrl ??= $resource->getSchemaUrl(); + } + + return $schemaUrl; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/HttpSpanExporterTrait.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/HttpSpanExporterTrait.php new file mode 100644 index 0000000..4fcda9f --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/HttpSpanExporterTrait.php @@ -0,0 +1,150 @@ +dispatchSpans($spans); + } catch (ClientExceptionInterface $e) { + return $e instanceof RequestExceptionInterface + ? SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE + : SpanExporterInterface::STATUS_FAILED_RETRYABLE; + } catch (Throwable $e) { + return SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE; + } + + if ($response->getStatusCode() >= 400) { + return $response->getStatusCode() < 500 + ? SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE + : SpanExporterInterface::STATUS_FAILED_RETRYABLE; + } + + return SpanExporterInterface::STATUS_SUCCESS; + } + + /** + * @throws ClientExceptionInterface + * @throws JsonException + */ + private function dispatchSpans(iterable $spans): ResponseInterface + { + return $this->sendRequest( + $this->marshallRequest($spans) + ); + } + + private function validateEndpointUrl(string $endpointUrl): void + { + /** Temporarily replacing assert with hard exception + try { + assert(filter_var($endpointUrl, FILTER_VALIDATE_URL)); + } catch (Throwable $e) { + throw new InvalidArgumentException('Invalid Endpoint URL given: ' . $endpointUrl, E_WARNING, $e); + } + */ + if (filter_var($endpointUrl, FILTER_VALIDATE_URL) === false) { + throw new InvalidArgumentException('Invalid Endpoint URL given: ' . $endpointUrl); + } + } + + protected function createRequest(string $method, $uri = null): RequestInterface + { + return $this->getRequestFactory() + ->createRequest($method, $uri ?: $this->getEndpointUrl()); + } + + /** + * @throws ClientExceptionInterface + */ + protected function sendRequest(RequestInterface $request): ResponseInterface + { + return $this->getClient()->sendRequest($request); + } + + protected function createStream(string $content = ''): StreamInterface + { + return $this->getStreamFactory()->createStream($content); + } + + public function getClient(): ClientInterface + { + return $this->client; + } + + protected function setClient(ClientInterface $client): void + { + $this->client = $client; + } + + public function getEndpointUrl(): string + { + return $this->endpointUrl; + } + + protected function setEndpointUrl(string $endpointUrl): void + { + $this->validateEndpointUrl($endpointUrl); + + $this->endpointUrl = $endpointUrl; + } + + public function getRequestFactory(): RequestFactoryInterface + { + return $this->requestFactory; + } + + protected function setRequestFactory(RequestFactoryInterface $requestFactory): void + { + $this->requestFactory = $requestFactory; + } + + public function getStreamFactory(): StreamFactoryInterface + { + return $this->streamFactory; + } + + protected function setStreamFactory(StreamFactoryInterface $streamFactory): void + { + $this->streamFactory = $streamFactory; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php new file mode 100644 index 0000000..017391f --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php @@ -0,0 +1,44 @@ +defaultLogLevel = $logLevel; + } + + /** + * @param string $message + * @param array $context + * @param string|null $level + */ + protected function log(string $message, array $context = [], ?string $level = null): void + { + $this->getLogger()->log( + $level ?? $this->defaultLogLevel, + $message, + $context + ); + } + + protected function getLogger(): LoggerInterface + { + return $this->logger instanceof LoggerInterface ? $this->logger : $this->logger = new NullLogger(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php new file mode 100644 index 0000000..d1fc31a --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php @@ -0,0 +1,47 @@ + $spans + * @return int + * @psalm-return SpanExporterInterface::STATUS_* + */ + public function export(iterable $spans): int + { + $response = $this->decorated->export( + $this->beforeExport($spans) + ); + $this->afterExport($spans, $response); + + return $response; + } + + abstract protected function beforeExport(iterable $spans): iterable; + + abstract protected function afterExport(iterable $spans, int $exporterResponse): void; + + public function shutdown(): bool + { + return $this->decorated->shutdown(); + } + + public function forceFlush(): bool + { + return $this->decorated->forceFlush(); + } + + public function setDecorated(SpanExporterInterface $decorated): void + { + $this->decorated = $decorated; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php new file mode 100644 index 0000000..226469a --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php @@ -0,0 +1,56 @@ +running = false; + + return true; + } + + /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-2 */ + public function forceFlush(): bool + { + return true; + } + + abstract public static function fromConnectionString(string $endpointUrl, string $name, string $args); + + /** + * @param iterable $spans Batch of spans to export + * + * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#exportbatch + * + * @psalm-return SpanExporterInterface::STATUS_* + */ + public function export(iterable $spans): int + { + if (!$this->running) { + return SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE; + } + + if (empty($spans)) { + return SpanExporterInterface::STATUS_SUCCESS; + } + + return $this->doExport($spans); /** @phpstan-ignore-line */ + } + + /** + * @param iterable $spans Batch of spans to export + * + * @psalm-return SpanExporterInterface::STATUS_* + */ + abstract protected function doExport(iterable $spans): int; /** @phpstan-ignore-line */ +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php new file mode 100644 index 0000000..4802cd1 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php @@ -0,0 +1,41 @@ +converter = $converter; + } + + public function getSpanConverter(): SpanConverterInterface + { + if (null === $this->converter) { + $this->converter = new NullSpanConverter(); + } + + return $this->converter; + } + + /** + * @param SpanDataInterface $span + * @return array + * @psalm-suppress PossiblyNullReference + */ + protected function convertSpan(SpanDataInterface $span): array + { + return $this->getSpanConverter()->convert([$span]); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Event.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Event.php new file mode 100644 index 0000000..d1d9d96 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Event.php @@ -0,0 +1,48 @@ +name = $name; + $this->timestamp = $timestamp; + $this->attributes = $attributes ?? new Attributes(); + } + + public function getAttributes(): AttributesInterface + { + return $this->attributes; + } + + public function getName(): string + { + return $this->name; + } + + public function getEpochNanos(): int + { + return $this->timestamp; + } + + public function getTotalAttributeCount(): int + { + return count($this->attributes); + } + + public function getDroppedAttributesCount(): int + { + return $this->attributes->getDroppedAttributesCount(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/EventInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/EventInterface.php new file mode 100644 index 0000000..8b5ee2a --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/EventInterface.php @@ -0,0 +1,15 @@ + '\OpenTelemetry\SDK\Trace\SpanExporter\ConsoleSpanExporter', + 'logger+file' => '\OpenTelemetry\SDK\Trace\SpanExporter\LoggerExporter', + 'jaeger+http' => '\OpenTelemetry\Contrib\Jaeger\Exporter', + 'zipkin+http' => '\OpenTelemetry\Contrib\Zipkin\Exporter', + 'otlp+grpc' => '\OpenTelemetry\Contrib\OtlpGrpc\Exporter', + 'otlp+http' => '\OpenTelemetry\Contrib\OtlpHttp\Exporter', + 'newrelic+http' => '\OpenTelemetry\Contrib\Newrelic\Exporter', + 'zipkintonewrelic+http' => '\OpenTelemetry\Contrib\ZipkinToNewrelic\Exporter', + // this entry exists only for testing purposes + 'test+http' => '\OpenTelemetry\Contrib\Test\Exporter', + ]; + + private const DEFAULT_SERVICE_NAME = 'unknown_service'; + + private string $serviceName; + + public function __construct(string $serviceName = self::DEFAULT_SERVICE_NAME) + { + $this->serviceName = $serviceName; + } + + /** + * Returns the corresponding Exporter via the configuration string + * + * @param string $connectionString String containing information for Exporter creation + * Should follow the format: type+baseUri?option1=a + * Query string is optional and based on the Exporter + */ + public function fromConnectionString(string $connectionString): SpanExporterInterface + { + if (in_array($connectionString, ['console', 'otlp+http'])) { + return self::buildExporter($connectionString); + } + + $dsn = DsnParser::parseUrl($connectionString); + + self::validateScheme((string) $dsn->getScheme()); + + $endpoint = self::getEndpointFromDsn($dsn); + $serviceName = $this->resolveServiceName($dsn); + + if (in_array(self::normalizeScheme((string) $dsn->getScheme()), ['newrelic+http', 'zipkintonewrelic+http'])) { + return self::buildExporter( + (string) $dsn->getScheme(), + $endpoint, + $serviceName, + self::getParameterFromDsn($dsn, 'licenseKey') + ); + } + + return self::buildExporter( + (string) $dsn->getScheme(), + $endpoint, + $serviceName + ); + } + + public function fromEnvironment(): ?SpanExporterInterface + { + $envValue = $this->getStringFromEnvironment(Env::OTEL_TRACES_EXPORTER, ''); + $exporters = explode(',', $envValue); + //TODO "The SDK MAY accept a comma-separated list to enable setting multiple exporters" + if (1 !== count($exporters)) { + throw new InvalidArgumentException(sprintf('Env Var %s requires exactly 1 exporter', Env::OTEL_TRACES_EXPORTER)); + } + $exporter = $exporters[0]; + switch ($exporter) { + case Values::VALUE_NONE: + return null; + case Values::VALUE_JAEGER: + case Values::VALUE_ZIPKIN: + case Values::VALUE_NEWRELIC: + case 'zipkintonewrelic': + throw new InvalidArgumentException(sprintf('Exporter %s cannot be created from environment', $exporter)); + case Values::VALUE_OTLP: + $protocol = $this->getEnumFromEnvironment( + Env::OTEL_EXPORTER_OTLP_PROTOCOL, + $this->getEnumFromEnvironment(Env::OTEL_EXPORTER_OTLP_TRACES_PROTOCOL, '') + ); + switch ($protocol) { + case Values::VALUE_GRPC: + return self::buildExporter('otlp+grpc'); + case Values::VALUE_HTTP_PROTOBUF: + return self::buildExporter('otlp+http'); + case Values::VALUE_HTTP_JSON: + throw new InvalidArgumentException('otlp+http/json not implemented'); + default: + throw new InvalidArgumentException('Unknown protocol: ' . $protocol); + } + // no break + case 'console': + return self::buildExporter('console'); + default: + throw new InvalidArgumentException(sprintf('Invalid exporter name "%s"', $exporter)); + } + } + + private function resolveServiceName(Dsn $dsn): string + { + return self::getParameterFromDsn($dsn, 'serviceName') ?? $this->serviceName; + } + + private static function getParameterFromDsn(Dsn $dsn, string $parameter): ?string + { + $parameters = $dsn->getParameters(); + + foreach ([$parameter, strtolower($parameter)] as $name) { + if (array_key_exists($name, $parameters)) { + return $parameters[$name]; + } + } + + return null; + } + + private static function getEndpointFromDsn(Url $dsn): string + { + return (string) new Url( + self::getProtocolFromScheme((string) $dsn->getScheme()), + $dsn->getHost(), + $dsn->getPort(), + $dsn->getPath(), + [], + $dsn->getAuthentication() + ); + } + + private static function buildExporter(string $scheme, string $endpoint = null, string $name = null, $args = null): SpanExporterInterface + { + $exporterClass = self::KNOWN_EXPORTERS[self::normalizeScheme($scheme)]; + self::validateExporterClass($exporterClass); + + return call_user_func([$exporterClass, 'fromConnectionString'], $endpoint, $name, $args); + } + + private static function validateScheme(string $scheme) + { + if (!array_key_exists(self::normalizeScheme($scheme), self::KNOWN_EXPORTERS)) { + throw new InvalidArgumentException('Invalid exporter scheme: ' . $scheme); + } + } + + private static function validateExporterClass(string $class) + { + if (!class_exists($class)) { + throw new InvalidArgumentException('Could not find exporter class: ' . $class); + } + } + + private static function getProtocolFromScheme(string $scheme): string + { + $components = explode('+', $scheme); + + return count($components) === 1 ? $components[0] : $components[1]; + } + + private static function normalizeScheme(string $scheme): string + { + return str_replace('https', 'http', $scheme); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php new file mode 100644 index 0000000..ad622dc --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php @@ -0,0 +1,12 @@ + */ + private array $events; + + /** @var list */ + private array $links; + + private AttributesInterface $attributes; + private int $totalAttributeCount; + private int $totalRecordedEvents; + private StatusDataInterface $status; + private int $endEpochNanos; + private bool $hasEnded; + + /** + * @param non-empty-string $name + * @param list $links + * @param list $events + */ + public function __construct( + Span $span, + string $name, + array $links, + array $events, + AttributesInterface $attributes, + int $totalAttributeCount, + int $totalRecordedEvents, + StatusDataInterface $status, + int $endEpochNanos, + bool $hasEnded + ) { + $this->span = $span; + $this->name = $name; + $this->links = $links; + $this->events = $events; + $this->attributes = $attributes; + $this->totalAttributeCount = $totalAttributeCount; + $this->totalRecordedEvents = $totalRecordedEvents; + $this->status = $status; + $this->endEpochNanos = $endEpochNanos; + $this->hasEnded = $hasEnded; + } + + public function getKind(): int + { + return $this->span->getKind(); + } + + public function getContext(): API\SpanContextInterface + { + return $this->span->getContext(); + } + + public function getParentContext(): API\SpanContextInterface + { + return $this->span->getParentContext(); + } + + public function getTraceId(): string + { + return $this->getContext()->getTraceId(); + } + + public function getSpanId(): string + { + return $this->getContext()->getSpanId(); + } + + public function getParentSpanId(): string + { + return $this->getParentContext()->getSpanId(); + } + + public function getStartEpochNanos(): int + { + return $this->span->getStartEpochNanos(); + } + + public function getEndEpochNanos(): int + { + return $this->endEpochNanos; + } + + public function getInstrumentationScope(): InstrumentationScopeInterface + { + return $this->span->getInstrumentationScope(); + } + + public function getResource(): ResourceInfo + { + return $this->span->getResource(); + } + + public function getName(): string + { + return $this->name; + } + + /** @inheritDoc */ + public function getLinks(): array + { + return $this->links; + } + + /** @inheritDoc */ + public function getEvents(): array + { + return $this->events; + } + + public function getAttributes(): AttributesInterface + { + return $this->attributes; + } + + public function getTotalDroppedAttributes(): int + { + return max(0, $this->totalAttributeCount - count($this->attributes)); + } + + public function getTotalDroppedEvents(): int + { + return max(0, $this->totalRecordedEvents - count($this->events)); + } + + public function getTotalDroppedLinks(): int + { + return max(0, $this->span->getTotalRecordedLinks() - count($this->links)); + } + + public function getStatus(): StatusDataInterface + { + return $this->status; + } + + public function hasEnded(): bool + { + return $this->hasEnded; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Link.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Link.php new file mode 100644 index 0000000..75e4dec --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Link.php @@ -0,0 +1,39 @@ +context = $context; + $this->attributes = $attributes ?? new Attributes(); + $this->totalAttributeCount = count($this->attributes); + } + + public function getSpanContext(): API\SpanContextInterface + { + return $this->context; + } + + public function getAttributes(): AttributesInterface + { + return $this->attributes; + } + + public function getTotalAttributeCount(): int + { + return $this->totalAttributeCount; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/LinkInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/LinkInterface.php new file mode 100644 index 0000000..382bc5a --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/LinkInterface.php @@ -0,0 +1,15 @@ +randomHex(self::TRACE_ID_HEX_LENGTH); + } + + public function generateSpanId(): string + { + return $this->randomHex(self::SPAN_ID_HEX_LENGTH); + } + + /** + * @psalm-suppress ArgumentTypeCoercion $hexLength is always a positive integer + */ + private function randomHex(int $hexLength): string + { + try { + return bin2hex(random_bytes(intdiv($hexLength, 2))); + } catch (Throwable $e) { + return $this->fallbackAlgorithm($hexLength); + } + } + + private function fallbackAlgorithm(int $hexLength): string + { + return substr(str_shuffle(str_repeat('0123456789abcdef', $hexLength)), 1, $hexLength); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php new file mode 100644 index 0000000..60940ac --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php @@ -0,0 +1,11 @@ +getContext(); + $traceState = $parentSpanContext->getTraceState(); + + return new SamplingResult( + SamplingResult::DROP, + null, + $traceState + ); + } + + public function getDescription(): string + { + return 'AlwaysOffSampler'; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php new file mode 100644 index 0000000..6ac9189 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php @@ -0,0 +1,50 @@ +getContext(); + $traceState = $parentSpanContext->getTraceState(); + + return new SamplingResult( + SamplingResult::RECORD_AND_SAMPLE, + $attributes, + $traceState + ); + } + + public function getDescription(): string + { + return 'AlwaysOnSampler'; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php new file mode 100644 index 0000000..ff21235 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php @@ -0,0 +1,100 @@ +root = $root; + $this->remoteParentSampler = $remoteParentSampler ?? new AlwaysOnSampler(); + $this->remoteParentNotSampler = $remoteParentNotSampler ?? new AlwaysOffSampler(); + $this->localParentSampler = $localParentSampler ?? new AlwaysOnSampler(); + $this->localParentNotSampler = $localParentNotSampler ?? new AlwaysOffSampler(); + } + + /** + * Invokes the respective delegate sampler when parent is set or uses root sampler for the root span. + * {@inheritdoc} + */ + public function shouldSample( + Context $parentContext, + string $traceId, + string $spanName, + int $spanKind, + ?AttributesInterface $attributes = null, + array $links = [] + ): SamplingResult { + $parentSpan = Span::fromContext($parentContext); + $parentSpanContext = $parentSpan->getContext(); + + // Invalid parent SpanContext indicates root span is being created + if (!$parentSpanContext->isValid()) { + return $this->root->shouldSample(...func_get_args()); + } + + if ($parentSpanContext->isRemote()) { + return $parentSpanContext->isSampled() + ? $this->remoteParentSampler->shouldSample(...func_get_args()) + : $this->remoteParentNotSampler->shouldSample(...func_get_args()); + } + + return $parentSpanContext->isSampled() + ? $this->localParentSampler->shouldSample(...func_get_args()) + : $this->localParentNotSampler->shouldSample(...func_get_args()); + } + + public function getDescription(): string + { + return 'ParentBased+' . $this->root->getDescription(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php new file mode 100644 index 0000000..430cb87 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php @@ -0,0 +1,70 @@ + 1.0) { + throw new InvalidArgumentException('probability should be be between 0.0 and 1.0.'); + } + $this->probability = $probability; + } + + /** + * Returns `SamplingResult` based on probability. Respects the parent `SampleFlag` + * {@inheritdoc} + */ + public function shouldSample( + Context $parentContext, + string $traceId, + string $spanName, + int $spanKind, + ?AttributesInterface $attributes = null, + array $links = [] + ): SamplingResult { + // TODO: Add config to adjust which spans get sampled (only default from specification is implemented) + $parentSpan = Span::fromContext($parentContext); + $parentSpanContext = $parentSpan->getContext(); + $traceState = $parentSpanContext->getTraceState(); + + /** + * Since php can only store up to 63 bit positive integers + */ + $traceIdLimit = (1 << 60) - 1; + $lowerOrderBytes = hexdec(substr($traceId, strlen($traceId) - 15, 15)); + $traceIdCondition = $lowerOrderBytes < round($this->probability * $traceIdLimit); + $decision = $traceIdCondition ? SamplingResult::RECORD_AND_SAMPLE : SamplingResult::DROP; + + return new SamplingResult($decision, $attributes, $traceState); + } + + public function getDescription(): string + { + return sprintf('%s{%.6F}', 'TraceIdRatioBasedSampler', $this->probability); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplerFactory.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplerFactory.php new file mode 100644 index 0000000..ae46b37 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplerFactory.php @@ -0,0 +1,50 @@ +getStringFromEnvironment(Env::OTEL_TRACES_SAMPLER); + + if (strpos($name, self::TRACEIDRATIO_PREFIX) !== false) { + $arg = $this->getRatioFromEnvironment(Env::OTEL_TRACES_SAMPLER_ARG); + + switch ($name) { + case Values::VALUE_TRACE_ID_RATIO: + return new TraceIdRatioBasedSampler($arg); + case Values::VALUE_PARENT_BASED_TRACE_ID_RATIO: + return new ParentBased(new TraceIdRatioBasedSampler($arg)); + } + } + + switch ($name) { + case Values::VALUE_ALWAYS_ON: + return new AlwaysOnSampler(); + case Values::VALUE_ALWAYS_OFF: + return new AlwaysOffSampler(); + case Values::VALUE_PARENT_BASED_ALWAYS_ON: + return new ParentBased(new AlwaysOnSampler()); + case Values::VALUE_PARENT_BASED_ALWAYS_OFF: + return new ParentBased(new AlwaysOffSampler()); + default: + throw new InvalidArgumentException(sprintf('Unknown sampler: %s', $name)); + } + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplerInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplerInterface.php new file mode 100644 index 0000000..ecfc430 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplerInterface.php @@ -0,0 +1,46 @@ + $links Collection of links that will be associated with the Span to be created. + * Typically, useful for batch operations. + * @see https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#links-between-spans + * @return SamplingResult + */ + public function shouldSample( + Context $parentContext, + string $traceId, + string $spanName, + int $spanKind, + ?AttributesInterface $attributes = null, + array $links = [] + ): SamplingResult; + + /** + * Returns the sampler name or short description with the configuration. + * This may be displayed on debug pages or in the logs. + * Example: "TraceIdRatioBasedSampler{0.000100}" + */ + public function getDescription(): string; +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplingResult.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplingResult.php new file mode 100644 index 0000000..4371087 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SamplingResult.php @@ -0,0 +1,72 @@ +decision = $decision; + $this->attributes = $attributes; + $this->traceState = $traceState; + } + + /** + * Return sampling decision whether span should be recorded or not. + */ + public function getDecision(): int + { + return $this->decision; + } + + /** + * Return attributes which will be attached to the span. + */ + public function getAttributes(): ?AttributesInterface + { + return $this->attributes; + } + + /** + * Return a collection of links that will be associated with the Span to be created. + */ + public function getTraceState(): ?API\TraceStateInterface + { + return $this->traceState; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Span.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Span.php new file mode 100644 index 0000000..2711970 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/Span.php @@ -0,0 +1,417 @@ + + */ + private array $links; + + /** @readonly */ + private int $totalRecordedLinks; + + /** @readonly */ + private int $kind; + + /** @readonly */ + private ResourceInfo $resource; + + /** @readonly */ + private InstrumentationScopeInterface $instrumentationScope; + + /** @readonly */ + private int $startEpochNanos; + + /** @var non-empty-string */ + private string $name; + + /** @var list */ + private array $events = []; + + private ?AttributesInterface $attributes; + private int $totalRecordedEvents = 0; + private StatusDataInterface $status; + private int $endEpochNanos = 0; + private bool $hasEnded = false; + + /** + * @param non-empty-string $name + * @param list $links + */ + private function __construct( + string $name, + API\SpanContextInterface $context, + InstrumentationScopeInterface $instrumentationScope, + int $kind, + API\SpanContextInterface $parentSpanContext, + SpanLimits $spanLimits, + SpanProcessorInterface $spanProcessor, + ResourceInfo $resource, + ?AttributesInterface $attributes, + array $links, + int $totalRecordedLinks, + int $startEpochNanos + ) { + $this->context = $context; + $this->instrumentationScope = $instrumentationScope; + $this->parentSpanContext = $parentSpanContext; + $this->links = $links; + $this->totalRecordedLinks = $totalRecordedLinks; + $this->name = $name; + $this->kind = $kind; + $this->spanProcessor = $spanProcessor; + $this->resource = $resource; + $this->startEpochNanos = $startEpochNanos; + $this->attributes = Attributes::withLimits($attributes ?? new Attributes(), $spanLimits->getAttributeLimits()); + $this->status = StatusData::unset(); + $this->spanLimits = $spanLimits; + } + + /** + * This method _MUST_ not be used directly. + * End users should use a {@see API\TracerInterface} in order to create spans. + * + * @param non-empty-string $name + * @psalm-param API\SpanKind::KIND_* $kind + * @param list $links + * + * @internal + * @psalm-internal OpenTelemetry + */ + public static function startSpan( + string $name, + API\SpanContextInterface $context, + InstrumentationScopeInterface $instrumentationScope, + int $kind, + API\SpanInterface $parentSpan, + Context $parentContext, + SpanLimits $spanLimits, + SpanProcessorInterface $spanProcessor, + ResourceInfo $resource, + ?AttributesInterface $attributes, + array $links, + int $totalRecordedLinks, + int $startEpochNanos + ): self { + $span = new self( + $name, + $context, + $instrumentationScope, + $kind, + $parentSpan->getContext(), + $spanLimits, + $spanProcessor, + $resource, + $attributes, + $links, + $totalRecordedLinks, + $startEpochNanos !== 0 ? $startEpochNanos : ClockFactory::getDefault()->now() + ); + + // Call onStart here to ensure the span is fully initialized. + $spanProcessor->onStart($span, $parentContext); + + return $span; + } + + /** + * This function provides a more java-like stacktrace + * that supports exception chaining and provides exact + * lines of where exceptions are thrown + * + * Example: + * Exception: Thrown from grandparent + * at grandparent_func(test.php:56) + * at parent_func(test.php:51) + * at child_func(test.php:44) + * at (main)(test.php:62) + * + * Credit: https://www.php.net/manual/en/exception.gettraceasstring.php#114980 + */ + public static function formatStackTrace(Throwable $e, array &$seen = null): string + { + $starter = $seen ? 'Caused by: ' : ''; + $result = []; + if (!$seen) { + $seen = []; + } + $trace = $e->getTrace(); + $prev = $e->getPrevious(); + $result[] = sprintf('%s%s: %s', $starter, get_class($e), $e->getMessage()); + $file = $e->getFile(); + $line = $e->getLine(); + while (true) { + $current = "$file:$line"; + if (in_array($current, $seen, true)) { + $result[] = sprintf(' ... %d more', count($trace)+1); + + break; + } + $result[] = sprintf( + ' at %s%s%s(%s%s%s)', + count($trace) && array_key_exists('class', $trace[0]) ? str_replace('\\', '.', $trace[0]['class']) : '', + count($trace) && array_key_exists('class', $trace[0]) && array_key_exists('function', $trace[0]) ? '.' : '', + count($trace) && array_key_exists('function', $trace[0]) ? str_replace('\\', '.', $trace[0]['function']) : 'main', + $line === null ? $file : basename($file), + $line === null ? '' : ':', + $line ?? '' + ); + $seen[] = "$file:$line"; + if (!count($trace)) { + break; + } + $file = array_key_exists('file', $trace[0]) ? $trace[0]['file'] : 'Unknown Source'; + $line = array_key_exists('file', $trace[0]) && array_key_exists('line', $trace[0]) && $trace[0]['line'] ? $trace[0]['line'] : null; + array_shift($trace); + } + $result = implode("\n", $result); + if ($prev) { + $result .= "\n" . self::formatStackTrace($prev, $seen); + } + + return $result; + } + + /** @inheritDoc */ + public function getContext(): API\SpanContextInterface + { + return $this->context; + } + + /** @inheritDoc */ + public function isRecording(): bool + { + return !$this->hasEnded; + } + + /** @inheritDoc */ + public function setAttribute(string $key, $value): self + { + if ($this->hasEnded || ctype_space($key)) { + return $this; + } + + if (null === $this->attributes) { + $this->attributes = Attributes::withLimits(new Attributes(), $this->spanLimits->getAttributeLimits()); + } + + $this->attributes->setAttribute($key, $value); + + return $this; + } + + /** @inheritDoc */ + public function setAttributes(iterable $attributes): self + { + foreach ($attributes as $key => $value) { + $this->setAttribute($key, $value); + } + + return $this; + } + + /** @inheritDoc */ + public function addEvent(string $name, iterable $attributes = [], int $timestamp = null): self + { + if ($this->hasEnded) { + return $this; + } + + if (count($this->events) < $this->spanLimits->getEventCountLimit()) { + $this->events[] = new Event( + $name, + $timestamp ?? ClockFactory::getDefault()->now(), + Attributes::withLimits( + $attributes, + new AttributeLimits( + $this->spanLimits->getAttributePerEventCountLimit(), + $this->spanLimits->getAttributeLimits()->getAttributeValueLengthLimit() + ) + ), + ); + } + + $this->totalRecordedEvents++; + + return $this; + } + + /** @inheritDoc */ + public function recordException(Throwable $exception, iterable $attributes = []): self + { + $timestamp = ClockFactory::getDefault()->now(); + $eventAttributes = new Attributes([ + 'exception.type' => get_class($exception), + 'exception.message' => $exception->getMessage(), + 'exception.stacktrace' => self::formatStackTrace($exception), + ]); + + foreach ($attributes as $key => $value) { + $eventAttributes->setAttribute($key, $value); + } + + return $this->addEvent('exception', $eventAttributes, $timestamp); + } + + /** @inheritDoc */ + public function updateName(string $name): self + { + if ($this->hasEnded) { + return $this; + } + $this->name = $name; + + return $this; + } + + /** @inheritDoc */ + public function setStatus(string $code, string $description = null): self + { + if ($this->hasEnded) { + return $this; + } + + $this->status = StatusData::create($code, $description); + + return $this; + } + + /** @inheritDoc */ + public function end(int $endEpochNanos = null): void + { + if ($this->hasEnded) { + return; + } + + $this->endEpochNanos = $endEpochNanos ?? ClockFactory::getDefault()->now(); + $this->hasEnded = true; + + $this->spanProcessor->onEnd($this); + } + + /** @inheritDoc */ + public function getName(): string + { + return $this->name; + } + + public function getParentContext(): API\SpanContextInterface + { + return $this->parentSpanContext; + } + + public function getInstrumentationScope(): InstrumentationScopeInterface + { + return $this->instrumentationScope; + } + + public function hasEnded(): bool + { + return $this->hasEnded; + } + + public function toSpanData(): SpanDataInterface + { + return new ImmutableSpan( + $this, + $this->name, + $this->links, + $this->events, + $this->getImmutableAttributes(), + (null === $this->attributes) ? 0 : $this->attributes->getTotalAddedValues(), + $this->totalRecordedEvents, + $this->status, + $this->endEpochNanos, + $this->hasEnded + ); + } + + /** @inheritDoc */ + public function getDuration(): int + { + return ($this->hasEnded ? $this->endEpochNanos : ClockFactory::getDefault()->now()) - $this->startEpochNanos; + } + + /** @inheritDoc */ + public function getKind(): int + { + return $this->kind; + } + + /** @inheritDoc */ + public function getAttribute(string $key) + { + if (null === $this->attributes) { + return null; + } + + return $this->attributes->get($key); + } + + public function getStartEpochNanos(): int + { + return $this->startEpochNanos; + } + + public function getTotalRecordedLinks(): int + { + return $this->totalRecordedLinks; + } + + public function getTotalRecordedEvents(): int + { + return $this->totalRecordedEvents; + } + + public function getResource(): ResourceInfo + { + return $this->resource; + } + + private function getImmutableAttributes(): AttributesInterface + { + if (null === $this->attributes) { + return new Attributes(); + } + + return clone $this->attributes; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanBuilder.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanBuilder.php new file mode 100644 index 0000000..4caaefe --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanBuilder.php @@ -0,0 +1,222 @@ +|null */ + private ?array $links = null; + + private ?AttributesInterface $attributes = null; + private int $totalNumberOfLinksAdded = 0; + private int $startEpochNanos = 0; + + /** @param non-empty-string $spanName */ + public function __construct( + string $spanName, + InstrumentationScopeInterface $instrumentationScope, + TracerSharedState $tracerSharedState, + SpanLimits $spanLimits + ) { + $this->spanName = $spanName; + $this->instrumentationScope = $instrumentationScope; + $this->tracerSharedState = $tracerSharedState; + $this->spanLimits = $spanLimits; + } + + /** @inheritDoc */ + public function setParent(Context $parentContext): API\SpanBuilderInterface + { + $this->parentContext = $parentContext; + + return $this; + } + + /** @inheritDoc */ + public function setNoParent(): API\SpanBuilderInterface + { + $this->parentContext = Context::getRoot(); + + return $this; + } + + /** @inheritDoc */ + public function addLink(API\SpanContextInterface $context, iterable $attributes = []): API\SpanBuilderInterface + { + if (!$context->isValid()) { + return $this; + } + + $this->totalNumberOfLinksAdded++; + + if (null === $this->links) { + $this->links = []; + } + + if (count($this->links) === $this->spanLimits->getLinkCountLimit()) { + return $this; + } + + $this->links[] = new Link( + $context, + Attributes::withLimits( + $attributes, + new AttributeLimits( + $this->spanLimits->getAttributePerLinkCountLimit(), + $this->spanLimits->getAttributeLimits()->getAttributeValueLengthLimit() + ) + ), + ); + + return $this; + } + + /** @inheritDoc */ + public function setAttribute(string $key, $value): API\SpanBuilderInterface + { + if (null === $this->attributes) { + $this->attributes = Attributes::withLimits(new Attributes(), $this->spanLimits->getAttributeLimits()); + } + + $this->attributes->setAttribute($key, $value); + + return $this; + } + + /** @inheritDoc */ + public function setAttributes(iterable $attributes): API\SpanBuilderInterface + { + foreach ($attributes as $key => $value) { + $this->setAttribute($key, $value); + } + + return $this; + } + + /** + * @inheritDoc + * + * @psalm-param API\SpanKind::KIND_* $spanKind + */ + public function setSpanKind(int $spanKind): API\SpanBuilderInterface + { + $this->spanKind = $spanKind; + + return $this; + } + + /** @inheritDoc */ + public function setStartTimestamp(int $timestamp): API\SpanBuilderInterface + { + if (0 > $timestamp) { + return $this; + } + + $this->startEpochNanos = $timestamp; + + return $this; + } + + /** @inheritDoc */ + public function startSpan(): API\SpanInterface + { + $parentContext = $this->parentContext ?? Context::getCurrent(); + $parentSpan = Span::fromContext($parentContext); + $parentSpanContext = $parentSpan->getContext(); + + $spanId = $this->tracerSharedState->getIdGenerator()->generateSpanId(); + + if (!$parentSpanContext->isValid()) { + $traceId = $this->tracerSharedState->getIdGenerator()->generateTraceId(); + } else { + $traceId = $parentSpanContext->getTraceId(); + } + + // Reset links and attributes back to null to prevent mutation of the started span. + $links = $this->links ?? []; + $this->links = null; + + $attributes = $this->attributes ?? new Attributes(); + $this->attributes = null; + + $samplingResult = $this + ->tracerSharedState + ->getSampler() + ->shouldSample( + $parentContext, + $traceId, + $this->spanName, + $this->spanKind, + $attributes, + $links + ); + $samplingDecision = $samplingResult->getDecision(); + $samplingResultTraceState = $samplingResult->getTraceState(); + + $spanContext = API\SpanContext::create( + $traceId, + $spanId, + SamplingResult::RECORD_AND_SAMPLE === $samplingDecision ? API\SpanContextInterface::TRACE_FLAG_SAMPLED : API\SpanContextInterface::TRACE_FLAG_DEFAULT, + $samplingResultTraceState, + ); + + if (!in_array($samplingDecision, [SamplingResult::RECORD_AND_SAMPLE, SamplingResult::RECORD_ONLY], true)) { + return Span::wrap($spanContext); + } + + $samplingAttributes = $samplingResult->getAttributes(); + if ($samplingAttributes && $samplingAttributes->count() > 0) { + foreach ($samplingAttributes as $key => $value) { + $attributes->setAttribute($key, $value); + } + } + + return Span::startSpan( + $this->spanName, + $spanContext, + $this->instrumentationScope, + $this->spanKind, + $parentSpan, + $parentContext, + $this->spanLimits, + $this->tracerSharedState->getSpanProcessor(), + $this->tracerSharedState->getResource(), + $attributes, + $links, + $this->totalNumberOfLinksAdded, + $this->startEpochNanos + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php new file mode 100644 index 0000000..40552e4 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php @@ -0,0 +1,10 @@ + */ + public function getEvents(): array; + + /** @return list */ + public function getLinks(): array; + + public function getEndEpochNanos(): int; + public function hasEnded(): bool; + public function getInstrumentationScope(): InstrumentationScopeInterface; + public function getResource(): ResourceInfo; + + /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk_exporters/non-otlp.md#dropped-events-count */ + public function getTotalDroppedEvents(): int; + + /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk_exporters/non-otlp.md#dropped-links-count */ + public function getTotalDroppedLinks(): int; + + /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk_exporters/non-otlp.md#dropped-attributes-count */ + public function getTotalDroppedAttributes(): int; +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php new file mode 100644 index 0000000..42f49e8 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php @@ -0,0 +1,12 @@ +setSpanConverter($converter ?? new FriendlySpanConverter()); + } + + /** @inheritDoc */ + public function doExport(iterable $spans): int + { + try { + foreach ($spans as $span) { + print(json_encode( + $this->getSpanConverter()->convert([$span]), + JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT + ) . PHP_EOL + ); + } + } catch (Throwable $t) { + return SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE; + } + + return SpanExporterInterface::STATUS_SUCCESS; + } + + public static function fromConnectionString(string $endpointUrl = null, string $name = null, $args = null) + { + return new self(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php new file mode 100644 index 0000000..1f8178e --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php @@ -0,0 +1,173 @@ +convertSpan($span); + } + + return $aggregate; + } + + /** + * friendlySpan does the heavy lifting converting a span into an array + * + * @param SpanDataInterface $span + * @return array + */ + private function convertSpan(SpanDataInterface $span): array + { + return [ + self::NAME_ATTR => $span->getName(), + self::CONTEXT_ATTR => $this->convertContext($span->getContext()), + self::RESOURCE_ATTR => $this->convertResource($span->getResource()), + self::PARENT_SPAN_ATTR => $this->covertParentContext($span->getParentContext()), + self::KIND_ATTR => $this->convertKind($span->getKind()), + self::START_ATTR => $span->getStartEpochNanos(), + self::END_ATTR => $span->getEndEpochNanos(), + self::ATTRIBUTES_ATTR => $this->convertAttributes($span->getAttributes()), + self::STATUS_ATTR => $this->covertStatus($span->getStatus()), + self::EVENTS_ATTR => $this->convertEvents($span->getEvents()), + self::LINKS_ATTR => $this->convertLinks($span->getLinks()), + ]; + } + + /** + * @param SpanContextInterface $context + * @return array + */ + private function convertContext(SpanContextInterface $context): array + { + return [ + self::TRACE_ID_ATTR => $context->getTraceId(), + self::SPAN_ID_ATTR => $context->getSpanId(), + self::TRACE_STATE_ATTR => (string) $context->getTraceState(), + ]; + } + + /** + * @param ResourceInfo $resource + * @return array + */ + private function convertResource(ResourceInfo $resource): array + { + return $resource->getAttributes()->toArray(); + } + + /** + * @param SpanContextInterface $context + * @return string + */ + private function covertParentContext(SpanContextInterface $context): string + { + return $context->isValid() ? $context->getSpanId() : ''; + } + + /** + * Translates SpanKind from its integer representation to a more human friendly string. + * + * @param int $kind + * @return string + */ + private function convertKind(int $kind): string + { + return array_flip( + (new ReflectionClass(SpanKind::class)) + ->getConstants() + )[$kind]; + } + + /** + * @param \OpenTelemetry\SDK\Common\Attribute\AttributesInterface $attributes + * @return array + */ + private function convertAttributes(AttributesInterface $attributes): array + { + return $attributes->toArray(); + } + + /** + * @param StatusDataInterface $status + * @return array + */ + private function covertStatus(StatusDataInterface $status): array + { + return [ + self::CODE_ATTR => $status->getCode(), + self::DESCRIPTION_ATTR => $status->getDescription(), + ]; + } + + /** + * @param array $events + * @return array + */ + private function convertEvents(array $events): array + { + $result = []; + + foreach ($events as $event) { + $result[] = [ + self::NAME_ATTR => $event->getName(), + self::TIMESTAMP_ATTR => $event->getEpochNanos(), + self::ATTRIBUTES_ATTR => $this->convertAttributes($event->getAttributes()), + ]; + } + + return $result; + } + + /** + * @param array $links + * @return array + */ + private function convertLinks(array $links): array + { + $result = []; + + foreach ($links as $link) { + $result[] = [ + self::CONTEXT_ATTR => $this->convertContext($link->getSpanContext()), + self::ATTRIBUTES_ATTR => $this->convertAttributes($link->getAttributes()), + ]; + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php new file mode 100644 index 0000000..37c2d52 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php @@ -0,0 +1,70 @@ + LogLevel::INFO, + SpanExporterInterface::STATUS_FAILED_RETRYABLE => LogLevel::ERROR, + SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE => LogLevel::ALERT, + ]; + + private const MESSAGE_MAPPING = [ + SpanExporterInterface::STATUS_SUCCESS => 'Status Success', + SpanExporterInterface::STATUS_FAILED_RETRYABLE => 'Status Failed Retryable', + SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE => 'Status Failed Not Retryable', + ]; + + public function __construct( + SpanExporterInterface $decorated, + ?LoggerInterface $logger = null, + ?SpanConverterInterface $converter = null + ) { + $this->setDecorated($decorated); + $this->setLogger($logger ?? new NullLogger()); + $this->setSpanConverter($converter ?? new FriendlySpanConverter()); + } + + public static function fromConnectionString(string $endpointUrl, string $name, string $args): void + { + throw new RuntimeException( + sprintf('%s cannot be instantiated via %s', __CLASS__, __METHOD__) + ); + } + + protected function beforeExport(iterable $spans): iterable + { + return $spans; + } + + /** + * @param iterable $spans + * @param int $exporterResponse + */ + protected function afterExport(iterable $spans, int $exporterResponse): void + { + $this->log( + self::MESSAGE_MAPPING[$exporterResponse], + $this->getSpanConverter()->convert($spans), + self::RESPONSE_MAPPING[$exporterResponse] + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php new file mode 100644 index 0000000..8695918 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php @@ -0,0 +1,112 @@ +setServiceName($serviceName); + $this->setLogger($logger ?? new NullLogger()); + $this->setDefaultLogLevel($defaultLogLevel ?? LogLevel::DEBUG); + $this->setSpanConverter($converter ?? new FriendlySpanConverter()); + $this->setGranularity($granularity); + } + + /** @inheritDoc */ + public function doExport(iterable $spans): int + { + try { + $this->doLog($spans); + } catch (Throwable $t) { + return SpanExporterInterface::STATUS_FAILED_NOT_RETRYABLE; + } + + return SpanExporterInterface::STATUS_SUCCESS; + } + + /** + * @param string $endpointUrl + * @param string $name + * @param string|null $args + * @return LoggerExporter + */ + public static function fromConnectionString(string $endpointUrl, string $name, string $args = null): self + { + return new self( + $name, + new SimplePsrFileLogger($endpointUrl) + ); + } + + /** + * @param string $serviceName + */ + private function setServiceName(string $serviceName): void + { + $this->serviceName = $serviceName; + } + + /** + * @param int $granularity + */ + public function setGranularity(int $granularity): void + { + $this->granularity = $granularity === self::GRANULARITY_SPAN + ? self::GRANULARITY_SPAN + : self::GRANULARITY_AGGREGATE; + } + + /** + * @param iterable $spans + */ + private function doLog(iterable $spans): void + { + if ($this->granularity === self::GRANULARITY_AGGREGATE) { + $this->log($this->serviceName, $this->getSpanConverter()->convert($spans)); + + return; + } + + foreach ($spans as $span) { + $this->log($this->serviceName, $this->getSpanConverter()->convert([$span])); + } + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php new file mode 100644 index 0000000..1e55431 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php @@ -0,0 +1,15 @@ + $spans Batch of spans to export + * + * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#exportbatch + * + * @psalm-return SpanExporterInterface::STATUS_* + */ + public function export(iterable $spans): int; + + /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#shutdown-2 */ + public function shutdown(): bool; + + /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-2 */ + public function forceFlush(): bool; +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanLimits.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanLimits.php new file mode 100644 index 0000000..9cdb13c --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanLimits.php @@ -0,0 +1,74 @@ +attributeLimits; + } + + /** @return int Maximum allowed span event count */ + public function getEventCountLimit(): int + { + return $this->eventCountLimit; + } + + /** @return int Maximum allowed span link count */ + public function getLinkCountLimit(): int + { + return $this->linkCountLimit; + } + + /** @return int Maximum allowed attribute per span event count */ + public function getAttributePerEventCountLimit(): int + { + return $this->attributePerEventCountLimit; + } + + /** @return int Maximum allowed attribute per span link count */ + public function getAttributePerLinkCountLimit(): int + { + return $this->attributePerLinkCountLimit; + } + + /** + * @internal Use {@see SpanLimitsBuilder} to create {@see SpanLimits} instance. + */ + public function __construct( + int $attributeCountLimit, + int $attributeValueLengthLimit, + int $eventCountLimit, + int $linkCountLimit, + int $attributePerEventCountLimit, + int $attributePerLinkCountLimit + ) { + $this->attributeLimits = new AttributeLimits($attributeCountLimit, $attributeValueLengthLimit); + $this->eventCountLimit = $eventCountLimit; + $this->linkCountLimit = $linkCountLimit; + $this->attributePerEventCountLimit = $attributePerEventCountLimit; + $this->attributePerLinkCountLimit = $attributePerLinkCountLimit; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php new file mode 100644 index 0000000..2fb9579 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php @@ -0,0 +1,112 @@ +attributeCountLimit = $attributeCountLimit; + + return $this; + } + + /** + * @param int $attributeValueLengthLimit Maximum allowed attribute value length + */ + public function setAttributeValueLengthLimit(int $attributeValueLengthLimit): SpanLimitsBuilder + { + $this->attributeValueLengthLimit = $attributeValueLengthLimit; + + return $this; + } + + /** + * @param int $eventCountLimit Maximum allowed span event count + */ + public function setEventCountLimit(int $eventCountLimit): SpanLimitsBuilder + { + $this->eventCountLimit = $eventCountLimit; + + return $this; + } + + /** + * @param int $linkCountLimit Maximum allowed span link count + */ + public function setLinkCountLimit(int $linkCountLimit): SpanLimitsBuilder + { + $this->linkCountLimit = $linkCountLimit; + + return $this; + } + + /** + * @param int $attributePerEventCountLimit Maximum allowed attribute per span event count + */ + public function setAttributePerEventCountLimit(int $attributePerEventCountLimit): SpanLimitsBuilder + { + $this->attributePerEventCountLimit = $attributePerEventCountLimit; + + return $this; + } + + /** + * @param int $attributePerLinkCountLimit Maximum allowed attribute per span link count + */ + public function setAttributePerLinkCountLimit(int $attributePerLinkCountLimit): SpanLimitsBuilder + { + $this->attributePerLinkCountLimit = $attributePerLinkCountLimit; + + return $this; + } + + /** + * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#span-limits- + */ + public function build(): SpanLimits + { + return new SpanLimits( + $this->attributeCountLimit + ?: $this->getIntFromEnvironment(Env::OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_ATTRIBUTE_COUNT_LIMIT), + $this->attributeValueLengthLimit + ?: $this->getIntFromEnvironment(Env::OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, SpanLimits::DEFAULT_SPAN_ATTRIBUTE_LENGTH_LIMIT), + $this->eventCountLimit + ?: $this->getIntFromEnvironment(Env::OTEL_SPAN_EVENT_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_EVENT_COUNT_LIMIT), + $this->linkCountLimit + ?: $this->getIntFromEnvironment(Env::OTEL_SPAN_LINK_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_LINK_COUNT_LIMIT), + $this->attributePerEventCountLimit + ?: $this->getIntFromEnvironment(Env::OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_EVENT_ATTRIBUTE_COUNT_LIMIT), + $this->attributePerLinkCountLimit + ?: $this->getIntFromEnvironment(Env::OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_LINK_ATTRIBUTE_COUNT_LIMIT), + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php new file mode 100644 index 0000000..ae8170d --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php @@ -0,0 +1,144 @@ + */ + private array $queue = []; + + public function __construct( + ?SpanExporterInterface $exporter, + ClockInterface $clock = null, + int $maxQueueSize = null, + int $scheduledDelayMillis = null, + int $exporterTimeoutMillis = null, + int $maxExportBatchSize = null + ) { + $this->exporter = $exporter; + // @todo make the stopwatch a dependency rather than using the factory? + $this->stopwatch = StopWatchFactory::create($clock ?? ClockFactory::getDefault())->build(); + $this->stopwatch->start(); + $this->maxQueueSize = $maxQueueSize + ?: $this->getIntFromEnvironment(Env::OTEL_BSP_MAX_QUEUE_SIZE, self::DEFAULT_MAX_QUEUE_SIZE); + $this->scheduledDelayMillis = $scheduledDelayMillis + ?: $this->getIntFromEnvironment(Env::OTEL_BSP_SCHEDULE_DELAY, self::DEFAULT_SCHEDULE_DELAY); + $this->exporterTimeoutMillis = $exporterTimeoutMillis + ?: $this->getIntFromEnvironment(Env::OTEL_BSP_EXPORT_TIMEOUT, self::DEFAULT_EXPORT_TIMEOUT); + $this->maxExportBatchSize = $maxExportBatchSize + ?: $this->getIntFromEnvironment(Env::OTEL_BSP_MAX_EXPORT_BATCH_SIZE, self::DEFAULT_MAX_EXPORT_BATCH_SIZE); + if ($this->maxExportBatchSize > $this->maxQueueSize) { + throw new InvalidArgumentException( + sprintf('maxExportBatchSize should be smaller or equal to %s', $this->maxQueueSize) + ); + } + } + + /** + * @inheritDoc + */ + public function onStart(ReadWriteSpanInterface $span, ?Context $parentContext = null): void + { + } + + /** + * @inheritDoc + */ + public function onEnd(ReadableSpanInterface $span): void + { + if (null === $this->exporter) { + return; + } + + if (!$this->running) { + return; + } + + if ($span->getContext()->isSampled() && !$this->queueReachedLimit()) { + $this->queue[] = $span->toSpanData(); + } + + if ($this->bufferReachedExportLimit() || $this->enoughTimeHasPassed()) { + $this->forceFlush(); + } + } + + /** @inheritDoc */ + public function forceFlush(): bool + { + if (!$this->running || $this->exporter === null) { + return true; + } + + $this->exporter->export($this->queue); + $this->queue = []; + $this->stopwatch->reset(); + $this->exporter->forceFlush(); + + return true; + } + + /** @inheritDoc */ + public function shutdown(): bool + { + if (!$this->running) { + return true; + } + + if (null !== $this->exporter) { + $this->forceFlush() && $this->exporter->shutdown(); + } + $this->running = false; + + return true; + } + + protected function bufferReachedExportLimit(): bool + { + return count($this->queue) >= $this->maxExportBatchSize; + } + + protected function queueReachedLimit(): bool + { + return count($this->queue) >= $this->maxQueueSize; + } + + protected function enoughTimeHasPassed(): bool + { + return TimeUtil::millisToNanos((int) $this->scheduledDelayMillis) < $this->stopwatch->getLastElapsedTime(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php new file mode 100644 index 0000000..367833a --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php @@ -0,0 +1,78 @@ + */ + private array $processors = []; + + public function __construct(SpanProcessorInterface ...$spanProcessors) + { + foreach ($spanProcessors as $processor) { + $this->addSpanProcessor($processor); + } + } + + public function addSpanProcessor(SpanProcessorInterface $processor): void + { + $this->processors[] = $processor; + } + + /** @return list */ + public function getSpanProcessors(): array + { + return $this->processors; + } + + /** @inheritDoc */ + public function onStart(ReadWriteSpanInterface $span, ?Context $parentContext = null): void + { + foreach ($this->processors as $processor) { + $processor->onStart($span, $parentContext); + } + } + + /** @inheritDoc */ + public function onEnd(ReadableSpanInterface $span): void + { + foreach ($this->processors as $processor) { + $processor->onEnd($span); + } + } + + /** @inheritDoc */ + public function shutdown(): bool + { + $result = true; + + foreach ($this->processors as $processor) { + $result = $result && $processor->shutdown(); + } + + return $result; + } + + /** @inheritDoc */ + public function forceFlush(): bool + { + $result = true; + + foreach ($this->processors as $processor) { + $result = $result && $processor->forceFlush(); + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php new file mode 100644 index 0000000..d6771b3 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php @@ -0,0 +1,46 @@ +forceFlush(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php new file mode 100644 index 0000000..106a1be --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php @@ -0,0 +1,65 @@ +exporter = $exporter; + } + + /** @inheritDoc */ + public function onStart(ReadWriteSpanInterface $span, ?Context $parentContext = null): void + { + } + + /** @inheritDoc */ + public function onEnd(ReadableSpanInterface $span): void + { + if (!$this->running || !$span->getContext()->isSampled()) { + return; + } + + if (null !== $this->exporter) { + $this->exporter->export([$span->toSpanData()]); + } + } + + /** @inheritDoc */ + public function forceFlush(): bool + { + return true; + } + + /** @inheritDoc */ + public function shutdown(): bool + { + if (!$this->running) { + return true; + } + + $this->running = false; + self::logDebug('Shutting down span processor'); + + if (null !== $this->exporter) { + return $this->forceFlush() && $this->exporter->shutdown(); + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php new file mode 100644 index 0000000..948b3de --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php @@ -0,0 +1,34 @@ +getEnumFromEnvironment(Env::OTEL_PHP_TRACES_PROCESSOR); + switch ($name) { + case Values::VALUE_BATCH: + return new BatchSpanProcessor($exporter); + case Values::VALUE_SIMPLE: + return new SimpleSpanProcessor($exporter); + case Values::VALUE_NOOP: + case Values::VALUE_NONE: + return NoopSpanProcessor::getInstance(); + default: + throw new InvalidArgumentException('Unknown processor: ' . $name); + } + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php new file mode 100644 index 0000000..6c95909 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php @@ -0,0 +1,37 @@ +code = $code; + $this->description = $description; + } + + /** @psalm-param API\StatusCode::STATUS_* $code */ + public static function create(string $code, ?string $description = null): self + { + if (empty($description)) { + switch ($code) { + case API\StatusCode::STATUS_UNSET: + return self::unset(); + case API\StatusCode::STATUS_ERROR: + return self::error(); + case API\StatusCode::STATUS_OK: + return self::ok(); + } + } + + // Ignore description for non Error statuses. + if (API\StatusCode::STATUS_ERROR !== $code) { + $description = ''; + } + + return new self($code, $description); /** @phan-suppress-current-line PhanTypeMismatchArgumentNullable */ + } + + public static function ok(): self + { + if (null === self::$ok) { + self::$ok = new self(API\StatusCode::STATUS_OK, ''); + } + + return self::$ok; + } + + public static function error(): self + { + if (null === self::$error) { + self::$error = new self(API\StatusCode::STATUS_ERROR, ''); + } + + return self::$error; + } + + public static function unset(): self + { + if (null === self::$unset) { + self::$unset = new self(API\StatusCode::STATUS_UNSET, ''); + } + + return self::$unset; + } + + public function getCode(): string + { + return $this->code; + } + + public function getDescription(): string + { + return $this->description; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php new file mode 100644 index 0000000..973d2b5 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php @@ -0,0 +1,18 @@ +tracerSharedState = $tracerSharedState; + $this->instrumentationScope = $instrumentationScope; + } + + /** @inheritDoc */ + public function spanBuilder(string $spanName): API\SpanBuilderInterface + { + if (ctype_space($spanName)) { + $spanName = self::FALLBACK_SPAN_NAME; + } + + if ($this->tracerSharedState->hasShutdown()) { + // TODO: Return a noop tracer + } + + return new SpanBuilder( + $spanName, + $this->instrumentationScope, + $this->tracerSharedState, + $this->tracerSharedState->getSpanLimits() + ); + } + + public function getInstrumentationScope(): InstrumentationScopeInterface + { + return $this->instrumentationScope; + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerProvider.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerProvider.php new file mode 100644 index 0000000..ddf1c0a --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerProvider.php @@ -0,0 +1,121 @@ + */ + private ?array $tracers = null; + + /** @readonly */ + private TracerSharedState $tracerSharedState; + + /** @param list|SpanProcessorInterface|null $spanProcessors */ + public function __construct( + $spanProcessors = [], + SamplerInterface $sampler = null, + ResourceInfo $resource = null, + SpanLimits $spanLimits = null, + IdGeneratorInterface $idGenerator = null + ) { + if (null === $spanProcessors) { + $spanProcessors = []; + } + + $spanProcessors = is_array($spanProcessors) ? $spanProcessors : [$spanProcessors]; + $resource = $resource ?? ResourceInfoFactory::defaultResource(); + $sampler = $sampler ?? new ParentBased(new AlwaysOnSampler()); + $idGenerator = $idGenerator ?? new RandomIdGenerator(); + $spanLimits = $spanLimits ?? (new SpanLimitsBuilder())->build(); + + $this->tracerSharedState = new TracerSharedState( + $idGenerator, + $resource, + $spanLimits, + $sampler, + $spanProcessors + ); + + register_shutdown_function([$this, 'shutdown']); + } + + public function forceFlush(): ?bool + { + return $this->tracerSharedState->getSpanProcessor()->forceFlush(); + } + + /** @inheritDoc */ + public function getTracer(string $name = self::DEFAULT_TRACER_NAME, ?string $version = null, ?string $schemaUrl = null): API\TracerInterface + { + if ($this->tracerSharedState->hasShutdown()) { + return NoopTracer::getInstance(); + } + + $key = KeyGenerator::generateInstanceKey($name, $version, $schemaUrl); + + if (isset($this->tracers[$key]) && $this->tracers[$key] instanceof API\TracerInterface) { + return $this->tracers[$key]; + } + + $instrumentationScope = new InstrumentationScope($name, $version, $schemaUrl); + + $tracer = new Tracer( + $this->tracerSharedState, + $instrumentationScope, + ); + if (null === self::$defaultTracer) { + self::$defaultTracer = $tracer; + } + + return $this->tracers[$key] = $tracer; + } + + public static function getDefaultTracer(): API\TracerInterface + { + if (null === self::$defaultTracer) { + // TODO log a warning + return NoopTracer::getInstance(); + } + + return self::$defaultTracer; + } + + public static function setDefaultTracer(API\TracerInterface $tracer): void + { + self::$defaultTracer = $tracer; + } + + public function getSampler(): SamplerInterface + { + return $this->tracerSharedState->getSampler(); + } + + /** + * Returns `false` is the provider is already shutdown, otherwise `true`. + */ + public function shutdown(): bool + { + if ($this->tracerSharedState->hasShutdown()) { + return true; + } + + return $this->tracerSharedState->shutdown(); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php new file mode 100644 index 0000000..f27410e --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php @@ -0,0 +1,57 @@ +exporterFactory = $exporterFactory ?: new ExporterFactory($name); + $this->samplerFactory = $samplerFactory ?: new SamplerFactory(); + $this->spanProcessorFactory = $spanProcessorFactory ?: new SpanProcessorFactory(); + } + + public function create(): API\TracerProviderInterface + { + try { + $exporter = $this->exporterFactory->fromEnvironment(); + } catch (\Throwable $t) { + self::logWarning('Unable to create exporter', ['error' => $t]); + $exporter = null; + } + + try { + $sampler = $this->samplerFactory->fromEnvironment(); + } catch (\Throwable $t) { + self::logWarning('Unable to create sampler', ['error' => $t]); + $sampler = null; + } + + try { + $spanProcessor = $this->spanProcessorFactory->fromEnvironment($exporter); + } catch (\Throwable $t) { + self::logWarning('Unable to create span processor', ['error' => $t]); + $spanProcessor = null; + } + + return new TracerProvider( + $spanProcessor, + $sampler, + ); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerSharedState.php b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerSharedState.php new file mode 100644 index 0000000..4c210af --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/Trace/TracerSharedState.php @@ -0,0 +1,99 @@ +idGenerator = $idGenerator; + $this->resource = $resource; + $this->spanLimits = $spanLimits; + $this->sampler = $sampler; + + switch (count($spanProcessors)) { + case 0: + $this->spanProcessor = NoopSpanProcessor::getInstance(); + + break; + case 1: + $this->spanProcessor = $spanProcessors[0]; + + break; + default: + $this->spanProcessor = new MultiSpanProcessor(...$spanProcessors); + + break; + } + } + + public function hasShutdown(): bool + { + return null !== $this->shutdownResult; + } + + public function getIdGenerator(): IdGeneratorInterface + { + return $this->idGenerator; + } + + public function getResource(): ResourceInfo + { + return $this->resource; + } + + public function getSpanLimits(): SpanLimits + { + return $this->spanLimits; + } + + public function getSampler(): SamplerInterface + { + return $this->sampler; + } + + public function getSpanProcessor(): SpanProcessorInterface + { + return $this->spanProcessor; + } + + /** + * Returns `false` is the provider is already shutdown, otherwise `true`. + */ + public function shutdown(): bool + { + return $this->shutdownResult ?? ($this->shutdownResult = $this->spanProcessor->shutdown()); + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sdk/composer.json b/tests/php_test_files/vendor/open-telemetry/sdk/composer.json new file mode 100644 index 0000000..8a913fe --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sdk/composer.json @@ -0,0 +1,34 @@ +{ + "name": "open-telemetry/sdk", + "description": "SDK for OpenTelemetry PHP.", + "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "sdk"], + "type": "library", + "license": "Apache-2.0", + "authors": [ + { + "name": "opentelemetry-php contributors", + "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" + } + ], + "require": { + "php": "^7.4 || ^8.0", + "ext-json": "*", + "nyholm/dsn": "^2.0.0", + "open-telemetry/api": "self.version", + "open-telemetry/context": "self.version", + "open-telemetry/sem-conv": "self.version", + "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" + }, + "autoload": { + "psr-4": { + "OpenTelemetry\\SDK\\": "" + } + }, + "suggest": { + "ext-mbstring": "To increase performance of string operations" + } +} diff --git a/tests/php_test_files/vendor/open-telemetry/sem-conv/ResourceAttributeValues.php b/tests/php_test_files/vendor/open-telemetry/sem-conv/ResourceAttributeValues.php new file mode 100644 index 0000000..ac3302c --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sem-conv/ResourceAttributeValues.php @@ -0,0 +1,304 @@ + + *
  • AWS Lambda: The function ARN.
  • + * + * Take care not to use the "invoked ARN" directly but replace any + * alias suffix with the resolved function version, as the same runtime instance may be invokable with multiple + * different aliases.
      + *
    • GCP: The URI of the resource
    • + *
    • Azure: The Fully Qualified Resource ID.
    • + *
    + * On some providers, it may not be possible to determine the full ID at startup, + * which is why this field cannot be made required. For example, on AWS the account ID + * part of the ARN is not available without calling another AWS API + * which may be deemed too slow for a short-running lambda function. + * As an alternative, consider setting `faas.id` as a span attribute instead. + * + * @example arn:aws:lambda:us-west-2:123456789012:function:my-function + */ + public const FAAS_ID = 'faas.id'; + + /** + * The immutable version of the function being executed. + * + * Depending on the cloud provider and platform, use:
      + *
    • AWS Lambda: The function version + * (an integer represented as a decimal string).
    • + *
    • Google Cloud Run: The revision + * (i.e., the function name plus the revision suffix).
    • + *
    • Google Cloud Functions: The value of the + * `K_REVISION` environment variable.
    • + *
    • Azure Functions: Not applicable. Do not set this attribute.
    • + *
    + * + * @example 26 + * @example pinkfroid-00002 + */ + public const FAAS_VERSION = 'faas.version'; + + /** + * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. + * + *
      + *
    • AWS Lambda: Use the (full) log stream name.
    • + *
    + * + * @example 2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de + */ + public const FAAS_INSTANCE = 'faas.instance'; + + /** + * The amount of memory available to the serverless function in MiB. + * + * It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. + * + * @example 128 + */ + public const FAAS_MAX_MEMORY = 'faas.max_memory'; + + /** + * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. + * + * @example opentelemetry-test + */ + public const HOST_ID = 'host.id'; + + /** + * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. + * + * @example opentelemetry-test + */ + public const HOST_NAME = 'host.name'; + + /** + * Type of host. For Cloud, this must be the machine type. + * + * @example n1-standard-1 + */ + public const HOST_TYPE = 'host.type'; + + /** + * The CPU architecture the host system is running on. + */ + public const HOST_ARCH = 'host.arch'; + + /** + * Name of the VM image or OS install the host was instantiated from. + * + * @example infra-ami-eks-worker-node-7d4ec78312 + * @example CentOS-8-x86_64-1905 + */ + public const HOST_IMAGE_NAME = 'host.image.name'; + + /** + * VM image ID. For Cloud, this value is from the provider. + * + * @example ami-07b06b442921831e5 + */ + public const HOST_IMAGE_ID = 'host.image.id'; + + /** + * The version string of the VM image as defined in Version Attributes. + * + * @example 0.1 + */ + public const HOST_IMAGE_VERSION = 'host.image.version'; + + /** + * The name of the cluster. + * + * @example opentelemetry-cluster + */ + public const K8S_CLUSTER_NAME = 'k8s.cluster.name'; + + /** + * The name of the Node. + * + * @example node-1 + */ + public const K8S_NODE_NAME = 'k8s.node.name'; + + /** + * The UID of the Node. + * + * @example 1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2 + */ + public const K8S_NODE_UID = 'k8s.node.uid'; + + /** + * The name of the namespace that the pod is running in. + * + * @example default + */ + public const K8S_NAMESPACE_NAME = 'k8s.namespace.name'; + + /** + * The UID of the Pod. + * + * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff + */ + public const K8S_POD_UID = 'k8s.pod.uid'; + + /** + * The name of the Pod. + * + * @example opentelemetry-pod-autoconf + */ + public const K8S_POD_NAME = 'k8s.pod.name'; + + /** + * The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). + * + * @example redis + */ + public const K8S_CONTAINER_NAME = 'k8s.container.name'; + + /** + * Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. + * + * @example 2 + */ + public const K8S_CONTAINER_RESTART_COUNT = 'k8s.container.restart_count'; + + /** + * The UID of the ReplicaSet. + * + * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff + */ + public const K8S_REPLICASET_UID = 'k8s.replicaset.uid'; + + /** + * The name of the ReplicaSet. + * + * @example opentelemetry + */ + public const K8S_REPLICASET_NAME = 'k8s.replicaset.name'; + + /** + * The UID of the Deployment. + * + * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff + */ + public const K8S_DEPLOYMENT_UID = 'k8s.deployment.uid'; + + /** + * The name of the Deployment. + * + * @example opentelemetry + */ + public const K8S_DEPLOYMENT_NAME = 'k8s.deployment.name'; + + /** + * The UID of the StatefulSet. + * + * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff + */ + public const K8S_STATEFULSET_UID = 'k8s.statefulset.uid'; + + /** + * The name of the StatefulSet. + * + * @example opentelemetry + */ + public const K8S_STATEFULSET_NAME = 'k8s.statefulset.name'; + + /** + * The UID of the DaemonSet. + * + * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff + */ + public const K8S_DAEMONSET_UID = 'k8s.daemonset.uid'; + + /** + * The name of the DaemonSet. + * + * @example opentelemetry + */ + public const K8S_DAEMONSET_NAME = 'k8s.daemonset.name'; + + /** + * The UID of the Job. + * + * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff + */ + public const K8S_JOB_UID = 'k8s.job.uid'; + + /** + * The name of the Job. + * + * @example opentelemetry + */ + public const K8S_JOB_NAME = 'k8s.job.name'; + + /** + * The UID of the CronJob. + * + * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff + */ + public const K8S_CRONJOB_UID = 'k8s.cronjob.uid'; + + /** + * The name of the CronJob. + * + * @example opentelemetry + */ + public const K8S_CRONJOB_NAME = 'k8s.cronjob.name'; + + /** + * The operating system type. + */ + public const OS_TYPE = 'os.type'; + + /** + * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. + * + * @example Microsoft Windows [Version 10.0.18363.778] + * @example Ubuntu 18.04.1 LTS + */ + public const OS_DESCRIPTION = 'os.description'; + + /** + * Human readable operating system name. + * + * @example iOS + * @example Android + * @example Ubuntu + */ + public const OS_NAME = 'os.name'; + + /** + * The version string of the operating system as defined in Version Attributes. + * + * @example 14.2.1 + * @example 18.04.1 + */ + public const OS_VERSION = 'os.version'; + + /** + * Process identifier (PID). + * + * @example 1234 + */ + public const PROCESS_PID = 'process.pid'; + + /** + * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. + * + * @example otelcol + */ + public const PROCESS_EXECUTABLE_NAME = 'process.executable.name'; + + /** + * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. + * + * @example /usr/bin/cmd/otelcol + */ + public const PROCESS_EXECUTABLE_PATH = 'process.executable.path'; + + /** + * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. + * + * @example cmd/otelcol + */ + public const PROCESS_COMMAND = 'process.command'; + + /** + * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. + * + * @example C:\cmd\otecol --config="my directory\config.yaml" + */ + public const PROCESS_COMMAND_LINE = 'process.command_line'; + + /** + * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. + * + * @example cmd/otecol + * @example --config=config.yaml + */ + public const PROCESS_COMMAND_ARGS = 'process.command_args'; + + /** + * The username of the user that owns the process. + * + * @example root + */ + public const PROCESS_OWNER = 'process.owner'; + + /** + * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. + * + * @example OpenJDK Runtime Environment + */ + public const PROCESS_RUNTIME_NAME = 'process.runtime.name'; + + /** + * The version of the runtime of this process, as returned by the runtime without modification. + * + * @example 14.0.2 + */ + public const PROCESS_RUNTIME_VERSION = 'process.runtime.version'; + + /** + * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. + * + * @example Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0 + */ + public const PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description'; + + /** + * Logical name of the service. + * + * MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with `process.executable.name`, e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. + * + * @example shoppingcart + */ + public const SERVICE_NAME = 'service.name'; + + /** + * A namespace for `service.name`. + * + * A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. + * + * @example Shop + */ + public const SERVICE_NAMESPACE = 'service.namespace'; + + /** + * The string ID of the service instance. + * + * MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). + * + * @example 627cc493-f310-47de-96bd-71410b7dec09 + */ + public const SERVICE_INSTANCE_ID = 'service.instance.id'; + + /** + * The version string of the service API or implementation. + * + * @example 2.0.0 + */ + public const SERVICE_VERSION = 'service.version'; + + /** + * The name of the telemetry SDK as defined above. + * + * @example opentelemetry + */ + public const TELEMETRY_SDK_NAME = 'telemetry.sdk.name'; + + /** + * The language of the telemetry SDK. + */ + public const TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language'; + + /** + * The version string of the telemetry SDK. + * + * @example 1.2.3 + */ + public const TELEMETRY_SDK_VERSION = 'telemetry.sdk.version'; + + /** + * The version string of the auto instrumentation agent, if used. + * + * @example 1.2.3 + */ + public const TELEMETRY_AUTO_VERSION = 'telemetry.auto.version'; + + /** + * The name of the web engine. + * + * @example WildFly + */ + public const WEBENGINE_NAME = 'webengine.name'; + + /** + * The version of the web engine. + * + * @example 21.0.0 + */ + public const WEBENGINE_VERSION = 'webengine.version'; + + /** + * Additional description of the web engine (e.g. detailed version and edition information). + * + * @example WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final + */ + public const WEBENGINE_DESCRIPTION = 'webengine.description'; +} diff --git a/tests/php_test_files/vendor/open-telemetry/sem-conv/TraceAttributeValues.php b/tests/php_test_files/vendor/open-telemetry/sem-conv/TraceAttributeValues.php new file mode 100644 index 0000000..5d8d883 --- /dev/null +++ b/tests/php_test_files/vendor/open-telemetry/sem-conv/TraceAttributeValues.php @@ -0,0 +1,716 @@ +in(__DIR__.'/src') + ->name('*.php') +; + +$config = (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + ]) + ->setFinder($finder) +; + +return $config; diff --git a/tests/php_test_files/vendor/php-http/discovery/CHANGELOG.md b/tests/php_test_files/vendor/php-http/discovery/CHANGELOG.md new file mode 100644 index 0000000..03f718c --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/CHANGELOG.md @@ -0,0 +1,386 @@ +# Change Log + +## 1.19.4 - 2024-03-29 + +- [#264](https://github.com/php-http/discovery/pull/264) - Do not report a general conflict with `sebastian/comparator` but make sure we install the correct version for our tests. + +## 1.19.3 - 2024-03-28 + +- [#261](https://github.com/php-http/discovery/pull/261) - explicitly mark nullable parameters as nullable (avoid deprecation in PHP 8.4) + +## 1.19.2 - 2023-11-30 + +- [#253](https://github.com/php-http/discovery/pull/253) - Symfony 7 dropped the deprecated PHP-HTTP `HttpClient` interface from their HTTP client, do not discover the version 7 client when looking for the old interface. + +## 1.19.1 - 2023-07-11 + +- [#250](https://github.com/php-http/discovery/pull/250) - Fix: Buzz client instantiation using deprecated Message Factory Discovery, use PSR-17 factory discovery instead. + +## 1.19.0 - 2023-06-19 + +- [#249](https://github.com/php-http/discovery/pull/249) - Have composer plugin correctly install Symfony http client when nothing explicitly requires psr 18 resp. httplug. +- [#241](https://github.com/php-http/discovery/pull/241) - Support discovering PSR-17 factories of `httpsoft/http-message` package + +## 1.18.1 - 2023-05-17 + +- [#242](https://github.com/php-http/discovery/pull/242) - Better exception message when no legacy php-http message factories can be built. Also needs php-http/message-factory package and they are deprecated in favor of PSR-17 anyways. + +## 1.18.0 - 2023-05-03 + +- [#235](https://github.com/php-http/discovery/pull/235) - Deprecate HttpClientDiscovery, use Psr18ClientDiscovery instead +- [#238](https://github.com/php-http/discovery/pull/238) - Skip requiring php-http/message-factory when installing symfony/http-client 6.3+ +- [#239](https://github.com/php-http/discovery/pull/239) - Skip auto-installing when the root package's extra.discovery is enough + +## 1.17.0 - 2023-04-26 + +- [#230](https://github.com/php-http/discovery/pull/230) - Add Psr18Client to make it straightforward to use PSR-18 +- [#232](https://github.com/php-http/discovery/pull/232) - Allow pinning the preferred implementations in composer.json +- [#233](https://github.com/php-http/discovery/pull/233) - Fix Psr17Factory::createServerRequestFromGlobals() when uploaded files have been moved + +## 1.16.0 - 2023-04-26 + +- [#225](https://github.com/php-http/discovery/pull/225) - Remove support for the abandoned Zend Diactoros which has been replaced with Laminas Diactoros; marked the zend library as conflict in composer.json to avoid confusion +- [#227](https://github.com/php-http/discovery/pull/227) - Fix handling requests with nested files + +## 1.15.3 - 2023-03-31 + +- [#224](https://github.com/php-http/discovery/pull/224) - Fix regression with Magento classloader + +## 1.15.2 - 2023-02-11 + +- [#219](https://github.com/php-http/discovery/pull/219) - Fix handling of replaced packages + +## 1.15.1 - 2023-02-10 + +- [#214](https://github.com/php-http/discovery/pull/214) - Fix resolving deps for psr/http-message-implementation +- [#216](https://github.com/php-http/discovery/pull/216) - Fix keeping platform requirements when rebooting composer +- [#217](https://github.com/php-http/discovery/pull/217) - Set extra.plugin-optional composer flag + +## 1.15.0 - 2023-02-09 + +- [#209](https://github.com/php-http/discovery/pull/209) - Add generic `Psr17Factory` class +- [#208](https://github.com/php-http/discovery/pull/208) - Add composer plugin to auto-install missing implementations. + When libraries require an http implementation but no packages providing that implementation is installed in the application, the plugin will automatically install one. + This is only done for libraries that directly require php-http/discovery to avoid unexpected dependency installation. + +## 1.14.3 - 2022-07-11 + +- [#207](https://github.com/php-http/discovery/pull/207) - Updates Exception to extend Throwable solving static analysis errors for consumers + +## 1.14.2 - 2022-05-25 + +- [#202](https://github.com/php-http/discovery/pull/202) - Avoid error when the Symfony PSR-18 client exists but its dependencies are not installed + +## 1.14.1 - 2021-09-18 + +- [#199](https://github.com/php-http/discovery/pull/199) - Fixes message factory discovery for `laminas-diactoros ^2.7` + +## 1.14.0 - 2021-06-21 + +- Deprecate puli as it has been unmaintained for a long time and is not compatible with composer 2 https://github.com/php-http/discovery/pull/195 + +## 1.13.0 - 2020-11-27 + +- Support discovering PSR-17 factories of `slim/psr7` package https://github.com/php-http/discovery/pull/192 + +## 1.12.0 - 2020-09-22 + +- Support discovering HttpClient of `php-http/guzzle7-adapter` https://github.com/php-http/discovery/pull/189 + +## 1.11.0 - 2020-09-22 + +- Use correct method name to find Uri Factory in PSR17 https://github.com/php-http/discovery/pull/181 + +## 1.10.0 - 2020-09-04 + +- Discover PSR-18 implementation of phalcon + +## 1.9.1 - 2020-07-13 + +### Fixed + +- Support PHP 7.4 and 8.0 + +## 1.9.0 - 2020-07-02 + +### Added + +- Support discovering PSR-18 factories of `guzzlehttp/guzzle` 7+ + +## 1.8.0 - 2020-06-14 + +### Added + +- Support discovering PSR-17 factories of `guzzlehttp/psr7` package +- Support discovering PSR-17 factories of `laminas/laminas-diactoros` package +- `ClassDiscovery::getStrategies()` to retrieve the list of current strategies. + +### Fixed + +- Ignore exception during discovery when Symfony HttplugClient checks if HTTPlug is available. + +## 1.7.4 - 2020-01-03 + +### Fixed + +- Improve conditions on Symfony's async HTTPlug client. + +## 1.7.3 - 2019-12-27 + +### Fixed + +- Enough conditions to only use Symfony HTTP client if all needed components are available. + +## 1.7.2 - 2019-12-27 + +### Fixed + +- Allow a condition to specify an interface and not just classes. + +## 1.7.1 - 2019-12-26 + +### Fixed + +- Better conditions to see if Symfony's HTTP clients are available. + +## 1.7.0 - 2019-06-30 + +### Added + +- Dropped support for PHP < 7.1 +- Support for `symfony/http-client` + +## 1.6.1 - 2019-02-23 + +### Fixed + +- MockClientStrategy also provides the mock client when requesting an async client + +## 1.6.0 - 2019-01-23 + +### Added + +- Support for PSR-17 factories +- Support for PSR-18 clients + +## 1.5.2 - 2018-12-31 + +Corrected mistakes in 1.5.1. The different between 1.5.2 and 1.5.0 is that +we removed some PHP 7 code. + +https://github.com/php-http/discovery/compare/1.5.0...1.5.2 + +## 1.5.1 - 2018-12-31 + +This version added new features by mistake. These are reverted in 1.5.2. + +Do not use 1.5.1. + +### Fixed + +- Removed PHP 7 code + +## 1.5.0 - 2018-12-30 + +### Added + +- Support for `nyholm/psr7` version 1.0. +- `ClassDiscovery::safeClassExists` which will help Magento users. +- Support for HTTPlug 2.0 +- Support for Buzz 1.0 +- Better error message when nothing found by introducing a new exception: `NoCandidateFoundException`. + +### Fixed + +- Fixed condition evaluation, it should stop after first invalid condition. + +## 1.4.0 - 2018-02-06 + +### Added + +- Discovery support for nyholm/psr7 + +## 1.3.0 - 2017-08-03 + +### Added + +- Discovery support for CakePHP adapter +- Discovery support for Zend adapter +- Discovery support for Artax adapter + +## 1.2.1 - 2017-03-02 + +### Fixed + +- Fixed minor issue with `MockClientStrategy`, also added more tests. + +## 1.2.0 - 2017-02-12 + +### Added + +- MockClientStrategy class. + +## 1.1.1 - 2016-11-27 + +### Changed + +- Made exception messages clearer. `StrategyUnavailableException` is no longer the previous exception to `DiscoveryFailedException`. +- `CommonClassesStrategy` is using `self` instead of `static`. Using `static` makes no sense when `CommonClassesStrategy` is final. + +## 1.1.0 - 2016-10-20 + +### Added + +- Discovery support for Slim Framework factories + +## 1.0.0 - 2016-07-18 + +### Added + +- Added back `Http\Discovery\NotFoundException` to preserve BC with 0.8 version. You may upgrade from 0.8.x and 0.9.x to 1.0.0 without any BC breaks. +- Added interface `Http\Discovery\Exception` which is implemented by all our exceptions + +### Changed + +- Puli strategy renamed to Puli Beta strategy to prevent incompatibility with a future Puli stable + +### Deprecated + +- For BC reasons, the old `Http\Discovery\NotFoundException` (extending the new exception) will be thrown until version 2.0 + + +## 0.9.1 - 2016-06-28 + +### Changed + +- Dropping PHP 5.4 support because we use the ::class constant. + + +## 0.9.0 - 2016-06-25 + +### Added + +- Discovery strategies to find classes + +### Changed + +- [Puli](http://puli.io) made optional +- Improved exceptions +- **[BC] `NotFoundException` moved to `Http\Discovery\Exception\NotFoundException`** + + +## 0.8.0 - 2016-02-11 + +### Changed + +- Puli composer plugin must be installed separately + + +## 0.7.0 - 2016-01-15 + +### Added + +- Temporary puli.phar (Beta 10) executable + +### Changed + +- Updated HTTPlug dependencies +- Updated Puli dependencies +- Local configuration to make tests passing + +### Removed + +- Puli CLI dependency + + +## 0.6.4 - 2016-01-07 + +### Fixed + +- Puli [not working](https://twitter.com/PuliPHP/status/685132540588507137) with the latest json-schema + + +## 0.6.3 - 2016-01-04 + +### Changed + +- Adjust Puli dependencies + + +## 0.6.2 - 2016-01-04 + +### Changed + +- Make Puli CLI a requirement + + +## 0.6.1 - 2016-01-03 + +### Changed + +- More flexible Puli requirement + + +## 0.6.0 - 2015-12-30 + +### Changed + +- Use [Puli](http://puli.io) for discovery +- Improved exception messages + + +## 0.5.0 - 2015-12-25 + +### Changed + +- Updated message factory dependency (php-http/message) + + +## 0.4.0 - 2015-12-17 + +### Added + +- Array condition evaluation in the Class Discovery + +### Removed + +- Message factories (moved to php-http/utils) + + +## 0.3.0 - 2015-11-18 + +### Added + +- HTTP Async Client Discovery +- Stream factories + +### Changed + +- Discoveries and Factories are final +- Message and Uri factories have the type in their names +- Diactoros Message factory uses Stream factory internally + +### Fixed + +- Improved docblocks for API documentation generation + + +## 0.2.0 - 2015-10-31 + +### Changed + +- Renamed AdapterDiscovery to ClientDiscovery + + +## 0.1.1 - 2015-06-13 + +### Fixed + +- Bad HTTP Adapter class name for Guzzle 5 + + +## 0.1.0 - 2015-06-12 + +### Added + +- Initial release diff --git a/tests/php_test_files/vendor/php-http/discovery/LICENSE b/tests/php_test_files/vendor/php-http/discovery/LICENSE new file mode 100644 index 0000000..4558d6f --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2016 PHP HTTP Team + +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/php-http/discovery/README.md b/tests/php_test_files/vendor/php-http/discovery/README.md new file mode 100644 index 0000000..2b5e8e5 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/README.md @@ -0,0 +1,122 @@ +# HTTPlug Discovery + +[![Latest Version](https://img.shields.io/github/release/php-http/discovery.svg?style=flat-square)](https://github.com/php-http/discovery/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +[![Tests](https://github.com/php-http/discovery/actions/workflows/ci.yml/badge.svg?branch=1.x)](https://github.com/php-http/discovery/actions/workflows/ci.yml?query=branch%3A1.x) +[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) +[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) +[![Total Downloads](https://img.shields.io/packagist/dt/php-http/discovery.svg?style=flat-square)](https://packagist.org/packages/php-http/discovery) + +**This library provides auto-discovery and auto-installation of well-known PSR-17, PSR-18 and HTTPlug implementations.** + + +## Install + +Via Composer + +``` bash +composer require php-http/discovery +``` + + +## Usage as a library author + +Please see the [official documentation](http://php-http.readthedocs.org/en/latest/discovery.html). + +If your library/SDK needs a PSR-18 client, here is a quick example. + +First, you need to install a PSR-18 client and a PSR-17 factory implementations. +This should be done only for dev dependencies as you don't want to force a +specific implementation on your users: + +```bash +composer require --dev symfony/http-client +composer require --dev nyholm/psr7 +``` + +Then, you can disable the Composer plugin embeded in `php-http/discovery` +because you just installed the dev dependencies you need for testing: + +```bash +composer config allow-plugins.php-http/discovery false +``` + +Finally, you need to require `php-http/discovery` and the generic implementations +that your library is going to need: + +```bash +composer require 'php-http/discovery:^1.17' +composer require 'psr/http-client-implementation:*' +composer require 'psr/http-factory-implementation:*' +``` + +Now, you're ready to make an HTTP request: + +```php +use Http\Discovery\Psr18Client; + +$client = new Psr18Client(); + +$request = $client->createRequest('GET', 'https://example.com'); +$response = $client->sendRequest($request); +``` + +Internally, this code will use whatever PSR-7, PSR-17 and PSR-18 implementations +that your users have installed. + + +## Usage as a library user + +If you use a library/SDK that requires `php-http/discovery`, you can configure +the auto-discovery mechanism to use a specific implementation when many are +available in your project. + +For example, if you have both `nyholm/psr7` and `guzzlehttp/guzzle` in your +project, you can tell `php-http/discovery` to use `guzzlehttp/guzzle` instead of +`nyholm/psr7` by running the following command: + +```bash +composer config extra.discovery.psr/http-factory-implementation GuzzleHttp\\Psr7\\HttpFactory +``` + +This will update your `composer.json` file to add the following configuration: + +```json +{ + "extra": { + "discovery": { + "psr/http-factory-implementation": "GuzzleHttp\\Psr7\\HttpFactory" + } + } +} +``` + +Don't forget to run `composer install` to apply the changes, and ensure that +the composer plugin is enabled: + +```bash +composer config allow-plugins.php-http/discovery true +composer install +``` + + +## Testing + +``` bash +composer test +``` + + +## Contributing + +Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). + + +## Security + +If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). + + +## License + +The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/tests/php_test_files/vendor/php-http/discovery/composer.json b/tests/php_test_files/vendor/php-http/discovery/composer.json new file mode 100644 index 0000000..9d718bb --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/composer.json @@ -0,0 +1,64 @@ +{ + "name": "php-http/discovery", + "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", + "type": "composer-plugin", + "license": "MIT", + "keywords": ["http", "discovery", "client", "adapter", "message", "factory", "psr7", "psr17"], + "homepage": "http://php-http.org", + "authors": [ + { + "name": "Mรกrk Sรกgi-Kazรกr", + "email": "mark.sagikazar@gmail.com" + } + ], + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", + "psr/http-message-implementation": "*" + }, + "require": { + "php": "^7.1 || ^8.0", + "composer-plugin-api": "^1.0|^2.0" + }, + "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", + "symfony/phpunit-bridge": "^6.4.4 || ^7.0.1", + "sebastian/comparator": "^3.0.5 || ^4.0.8" + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + }, + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] + }, + "autoload-dev": { + "psr-4": { + "spec\\Http\\Discovery\\": "spec/" + } + }, + "scripts": { + "test": [ + "vendor/bin/phpspec run", + "vendor/bin/simple-phpunit --group NothingInstalled" + ], + "test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" + }, + "extra": { + "class": "Http\\Discovery\\Composer\\Plugin", + "plugin-optional": true + }, + "conflict": { + "nyholm/psr7": "<1.0", + "zendframework/zend-diactoros": "*" + }, + "prefer-stable": true, + "minimum-stability": "beta" +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/ClassDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/ClassDiscovery.php new file mode 100644 index 0000000..5ea4697 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/ClassDiscovery.php @@ -0,0 +1,255 @@ + + * @author Mรกrk Sรกgi-Kazรกr + * @author Tobias Nyholm + */ +abstract class ClassDiscovery +{ + /** + * A list of strategies to find classes. + * + * @var DiscoveryStrategy[] + */ + private static $strategies = [ + Strategy\GeneratedDiscoveryStrategy::class, + Strategy\CommonClassesStrategy::class, + Strategy\CommonPsr17ClassesStrategy::class, + Strategy\PuliBetaStrategy::class, + ]; + + private static $deprecatedStrategies = [ + Strategy\PuliBetaStrategy::class => true, + ]; + + /** + * Discovery cache to make the second time we use discovery faster. + * + * @var array + */ + private static $cache = []; + + /** + * Finds a class. + * + * @param string $type + * + * @return string|\Closure + * + * @throws DiscoveryFailedException + */ + protected static function findOneByType($type) + { + // Look in the cache + if (null !== ($class = self::getFromCache($type))) { + return $class; + } + + static $skipStrategy; + $skipStrategy ?? $skipStrategy = self::safeClassExists(Strategy\GeneratedDiscoveryStrategy::class) ? false : Strategy\GeneratedDiscoveryStrategy::class; + + $exceptions = []; + foreach (self::$strategies as $strategy) { + if ($skipStrategy === $strategy) { + continue; + } + + try { + $candidates = $strategy::getCandidates($type); + } catch (StrategyUnavailableException $e) { + if (!isset(self::$deprecatedStrategies[$strategy])) { + $exceptions[] = $e; + } + + continue; + } + + foreach ($candidates as $candidate) { + if (isset($candidate['condition'])) { + if (!self::evaluateCondition($candidate['condition'])) { + continue; + } + } + + // save the result for later use + self::storeInCache($type, $candidate); + + return $candidate['class']; + } + + $exceptions[] = new NoCandidateFoundException($strategy, $candidates); + } + + throw DiscoveryFailedException::create($exceptions); + } + + /** + * Get a value from cache. + * + * @param string $type + * + * @return string|null + */ + private static function getFromCache($type) + { + if (!isset(self::$cache[$type])) { + return; + } + + $candidate = self::$cache[$type]; + if (isset($candidate['condition'])) { + if (!self::evaluateCondition($candidate['condition'])) { + return; + } + } + + return $candidate['class']; + } + + /** + * Store a value in cache. + * + * @param string $type + * @param string $class + */ + private static function storeInCache($type, $class) + { + self::$cache[$type] = $class; + } + + /** + * Set new strategies and clear the cache. + * + * @param string[] $strategies list of fully qualified class names that implement DiscoveryStrategy + */ + public static function setStrategies(array $strategies) + { + self::$strategies = $strategies; + self::clearCache(); + } + + /** + * Returns the currently configured discovery strategies as fully qualified class names. + * + * @return string[] + */ + public static function getStrategies(): iterable + { + return self::$strategies; + } + + /** + * Append a strategy at the end of the strategy queue. + * + * @param string $strategy Fully qualified class name of a DiscoveryStrategy + */ + public static function appendStrategy($strategy) + { + self::$strategies[] = $strategy; + self::clearCache(); + } + + /** + * Prepend a strategy at the beginning of the strategy queue. + * + * @param string $strategy Fully qualified class name to a DiscoveryStrategy + */ + public static function prependStrategy($strategy) + { + array_unshift(self::$strategies, $strategy); + self::clearCache(); + } + + public static function clearCache() + { + self::$cache = []; + } + + /** + * Evaluates conditions to boolean. + * + * @return bool + */ + protected static function evaluateCondition($condition) + { + if (is_string($condition)) { + // Should be extended for functions, extensions??? + return self::safeClassExists($condition); + } + if (is_callable($condition)) { + return (bool) $condition(); + } + if (is_bool($condition)) { + return $condition; + } + if (is_array($condition)) { + foreach ($condition as $c) { + if (false === static::evaluateCondition($c)) { + // Immediately stop execution if the condition is false + return false; + } + } + + return true; + } + + return false; + } + + /** + * Get an instance of the $class. + * + * @param string|\Closure $class a FQCN of a class or a closure that instantiate the class + * + * @return object + * + * @throws ClassInstantiationFailedException + */ + protected static function instantiateClass($class) + { + try { + if (is_string($class)) { + return new $class(); + } + + if (is_callable($class)) { + return $class(); + } + } catch (\Exception $e) { + throw new ClassInstantiationFailedException('Unexpected exception when instantiating class.', 0, $e); + } + + throw new ClassInstantiationFailedException('Could not instantiate class because parameter is neither a callable nor a string'); + } + + /** + * We need a "safe" version of PHP's "class_exists" because Magento has a bug + * (or they call it a "feature"). Magento is throwing an exception if you do class_exists() + * on a class that ends with "Factory" and if that file does not exits. + * + * This function catches all potential exceptions and makes sure to always return a boolean. + * + * @param string $class + * + * @return bool + */ + public static function safeClassExists($class) + { + try { + return class_exists($class) || interface_exists($class); + } catch (\Exception $e) { + return false; + } + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Composer/Plugin.php b/tests/php_test_files/vendor/php-http/discovery/src/Composer/Plugin.php new file mode 100644 index 0000000..32ef401 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Composer/Plugin.php @@ -0,0 +1,465 @@ + + * + * @internal + */ +class Plugin implements PluginInterface, EventSubscriberInterface +{ + /** + * Describes, for every supported virtual implementation, which packages + * provide said implementation and which extra dependencies each package + * requires to provide the implementation. + */ + private const PROVIDE_RULES = [ + 'php-http/async-client-implementation' => [ + 'symfony/http-client:>=6.3' => ['guzzlehttp/promises', 'psr/http-factory-implementation', 'php-http/httplug'], + 'symfony/http-client' => ['guzzlehttp/promises', 'php-http/message-factory', 'psr/http-factory-implementation', 'php-http/httplug'], + 'php-http/guzzle7-adapter' => [], + 'php-http/guzzle6-adapter' => [], + 'php-http/curl-client' => [], + 'php-http/react-adapter' => [], + ], + 'php-http/client-implementation' => [ + 'symfony/http-client:>=6.3' => ['psr/http-factory-implementation', 'php-http/httplug'], + 'symfony/http-client' => ['php-http/message-factory', 'psr/http-factory-implementation', 'php-http/httplug'], + 'php-http/guzzle7-adapter' => [], + 'php-http/guzzle6-adapter' => [], + 'php-http/cakephp-adapter' => [], + 'php-http/curl-client' => [], + 'php-http/react-adapter' => [], + 'php-http/buzz-adapter' => [], + 'php-http/artax-adapter' => [], + 'kriswallsmith/buzz:^1' => [], + ], + 'psr/http-client-implementation' => [ + 'symfony/http-client' => ['psr/http-factory-implementation', 'psr/http-client'], + 'guzzlehttp/guzzle' => [], + 'kriswallsmith/buzz:^1' => [], + ], + 'psr/http-message-implementation' => [ + 'php-http/discovery' => ['psr/http-factory-implementation'], + ], + 'psr/http-factory-implementation' => [ + 'nyholm/psr7' => [], + 'guzzlehttp/psr7:>=2' => [], + 'slim/psr7' => [], + 'laminas/laminas-diactoros' => [], + 'phalcon/cphalcon:^4' => [], + 'http-interop/http-factory-guzzle' => [], + 'http-interop/http-factory-diactoros' => [], + 'http-interop/http-factory-slim' => [], + 'httpsoft/http-message' => [], + ], + ]; + + /** + * Describes which package should be preferred on the left side + * depending on which one is already installed on the right side. + */ + private const STICKYNESS_RULES = [ + 'symfony/http-client' => 'symfony/framework-bundle', + 'php-http/guzzle7-adapter' => 'guzzlehttp/guzzle:^7', + 'php-http/guzzle6-adapter' => 'guzzlehttp/guzzle:^6', + 'php-http/guzzle5-adapter' => 'guzzlehttp/guzzle:^5', + 'php-http/cakephp-adapter' => 'cakephp/cakephp', + 'php-http/react-adapter' => 'react/event-loop', + 'php-http/buzz-adapter' => 'kriswallsmith/buzz:^0.15.1', + 'php-http/artax-adapter' => 'amphp/artax:^3', + 'http-interop/http-factory-guzzle' => 'guzzlehttp/psr7:^1', + 'http-interop/http-factory-slim' => 'slim/slim:^3', + ]; + + private const INTERFACE_MAP = [ + 'php-http/async-client-implementation' => [ + 'Http\Client\HttpAsyncClient', + ], + 'php-http/client-implementation' => [ + 'Http\Client\HttpClient', + ], + 'psr/http-client-implementation' => [ + 'Psr\Http\Client\ClientInterface', + ], + 'psr/http-factory-implementation' => [ + 'Psr\Http\Message\RequestFactoryInterface', + 'Psr\Http\Message\ResponseFactoryInterface', + 'Psr\Http\Message\ServerRequestFactoryInterface', + 'Psr\Http\Message\StreamFactoryInterface', + 'Psr\Http\Message\UploadedFileFactoryInterface', + 'Psr\Http\Message\UriFactoryInterface', + ], + ]; + + public static function getSubscribedEvents(): array + { + return [ + ScriptEvents::PRE_AUTOLOAD_DUMP => 'preAutoloadDump', + ScriptEvents::POST_UPDATE_CMD => 'postUpdate', + ]; + } + + public function activate(Composer $composer, IOInterface $io): void + { + } + + public function deactivate(Composer $composer, IOInterface $io) + { + } + + public function uninstall(Composer $composer, IOInterface $io) + { + } + + public function postUpdate(Event $event) + { + $composer = $event->getComposer(); + $repo = $composer->getRepositoryManager()->getLocalRepository(); + $requires = [ + $composer->getPackage()->getRequires(), + $composer->getPackage()->getDevRequires(), + ]; + $pinnedAbstractions = []; + $pinned = $composer->getPackage()->getExtra()['discovery'] ?? []; + foreach (self::INTERFACE_MAP as $abstraction => $interfaces) { + foreach (isset($pinned[$abstraction]) ? [] : $interfaces as $interface) { + if (!isset($pinned[$interface])) { + continue 2; + } + } + $pinnedAbstractions[$abstraction] = true; + } + + $missingRequires = $this->getMissingRequires($repo, $requires, 'project' === $composer->getPackage()->getType(), $pinnedAbstractions); + $missingRequires = [ + 'require' => array_fill_keys(array_merge([], ...array_values($missingRequires[0])), '*'), + 'require-dev' => array_fill_keys(array_merge([], ...array_values($missingRequires[1])), '*'), + 'remove' => array_fill_keys(array_merge([], ...array_values($missingRequires[2])), '*'), + ]; + + if (!$missingRequires = array_filter($missingRequires)) { + return; + } + + $composerJsonContents = file_get_contents(Factory::getComposerFile()); + $this->updateComposerJson($missingRequires, $composer->getConfig()->get('sort-packages')); + + $installer = null; + // Find the composer installer, hack borrowed from symfony/flex + foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT) as $trace) { + if (isset($trace['object']) && $trace['object'] instanceof Installer) { + $installer = $trace['object']; + break; + } + } + + if (!$installer) { + return; + } + + $event->stopPropagation(); + + $dispatcher = $composer->getEventDispatcher(); + $disableScripts = !method_exists($dispatcher, 'setRunScripts') || !((array) $dispatcher)["\0*\0runScripts"]; + $composer = Factory::create($event->getIO(), null, false, $disableScripts); + + /** @var Installer $installer */ + $installer = clone $installer; + if (method_exists($installer, 'setAudit')) { + $trace['object']->setAudit(false); + } + // we need a clone of the installer to preserve its configuration state but with our own service objects + $installer->__construct( + $event->getIO(), + $composer->getConfig(), + $composer->getPackage(), + $composer->getDownloadManager(), + $composer->getRepositoryManager(), + $composer->getLocker(), + $composer->getInstallationManager(), + $composer->getEventDispatcher(), + $composer->getAutoloadGenerator() + ); + if (method_exists($installer, 'setPlatformRequirementFilter')) { + $installer->setPlatformRequirementFilter(((array) $trace['object'])["\0*\0platformRequirementFilter"]); + } + + if (0 !== $installer->run()) { + file_put_contents(Factory::getComposerFile(), $composerJsonContents); + + return; + } + + $versionSelector = new VersionSelector(ClassDiscovery::safeClassExists(RepositorySet::class) ? new RepositorySet() : new Pool()); + $updateComposerJson = false; + + foreach ($composer->getRepositoryManager()->getLocalRepository()->getPackages() as $package) { + foreach (['require', 'require-dev'] as $key) { + if (!isset($missingRequires[$key][$package->getName()])) { + continue; + } + $updateComposerJson = true; + $missingRequires[$key][$package->getName()] = $versionSelector->findRecommendedRequireVersion($package); + } + } + + if ($updateComposerJson) { + $this->updateComposerJson($missingRequires, $composer->getConfig()->get('sort-packages')); + $this->updateComposerLock($composer, $event->getIO()); + } + } + + public function getMissingRequires(InstalledRepositoryInterface $repo, array $requires, bool $isProject, array $pinnedAbstractions): array + { + $allPackages = []; + $devPackages = method_exists($repo, 'getDevPackageNames') ? array_fill_keys($repo->getDevPackageNames(), true) : []; + + // One must require "php-http/discovery" + // to opt-in for auto-installation of virtual package implementations + if (!isset($requires[0]['php-http/discovery'])) { + $requires = [[], []]; + } + + foreach ($repo->getPackages() as $package) { + $allPackages[$package->getName()] = true; + + if (1 < \count($names = $package->getNames(false))) { + $allPackages += array_fill_keys($names, false); + + if (isset($devPackages[$package->getName()])) { + $devPackages += $names; + } + } + + if (isset($package->getRequires()['php-http/discovery'])) { + $requires[(int) isset($devPackages[$package->getName()])] += $package->getRequires(); + } + } + + $missingRequires = [[], [], []]; + $versionParser = new VersionParser(); + + if (ClassDiscovery::safeClassExists(\Phalcon\Http\Message\RequestFactory::class, false)) { + $missingRequires[0]['psr/http-factory-implementation'] = []; + $missingRequires[1]['psr/http-factory-implementation'] = []; + } + + foreach ($requires as $dev => $rules) { + $abstractions = []; + $rules = array_intersect_key(self::PROVIDE_RULES, $rules); + + while ($rules) { + $abstraction = key($rules); + + if (isset($pinnedAbstractions[$abstraction])) { + unset($rules[$abstraction]); + continue; + } + + $abstractions[] = $abstraction; + + foreach (array_shift($rules) as $candidate => $deps) { + [$candidate, $version] = explode(':', $candidate, 2) + [1 => null]; + + if (!isset($allPackages[$candidate])) { + continue; + } + if (null !== $version && !$repo->findPackage($candidate, $versionParser->parseConstraints($version))) { + continue; + } + if ($isProject && !$dev && isset($devPackages[$candidate])) { + $missingRequires[0][$abstraction] = [$candidate]; + $missingRequires[2][$abstraction] = [$candidate]; + } else { + $missingRequires[$dev][$abstraction] = []; + } + + foreach ($deps as $dep) { + if (isset(self::PROVIDE_RULES[$dep])) { + $rules[$dep] = self::PROVIDE_RULES[$dep]; + } elseif (!isset($allPackages[$dep])) { + $missingRequires[$dev][$abstraction][] = $dep; + } elseif ($isProject && !$dev && isset($devPackages[$dep])) { + $missingRequires[0][$abstraction][] = $dep; + $missingRequires[2][$abstraction][] = $dep; + } + } + break; + } + } + + while ($abstractions) { + $abstraction = array_shift($abstractions); + + if (isset($missingRequires[$dev][$abstraction])) { + continue; + } + $candidates = self::PROVIDE_RULES[$abstraction]; + + foreach ($candidates as $candidate => $deps) { + [$candidate, $version] = explode(':', $candidate, 2) + [1 => null]; + + if (null !== $version && !$repo->findPackage($candidate, $versionParser->parseConstraints($version))) { + continue; + } + if (isset($allPackages[$candidate]) && (!$isProject || $dev || !isset($devPackages[$candidate]))) { + continue 2; + } + } + + foreach (array_intersect_key(self::STICKYNESS_RULES, $candidates) as $candidate => $stickyRule) { + [$stickyName, $stickyVersion] = explode(':', $stickyRule, 2) + [1 => null]; + if (!isset($allPackages[$stickyName]) || ($isProject && !$dev && isset($devPackages[$stickyName]))) { + continue; + } + if (null !== $stickyVersion && !$repo->findPackage($stickyName, $versionParser->parseConstraints($stickyVersion))) { + continue; + } + + $candidates = [$candidate => $candidates[$candidate]]; + break; + } + + $dep = key($candidates); + [$dep] = explode(':', $dep, 2); + $missingRequires[$dev][$abstraction] = [$dep]; + + if ($isProject && !$dev && isset($devPackages[$dep])) { + $missingRequires[2][$abstraction][] = $dep; + } + } + } + + $missingRequires[1] = array_diff_key($missingRequires[1], $missingRequires[0]); + + return $missingRequires; + } + + public function preAutoloadDump(Event $event) + { + $filesystem = new Filesystem(); + // Double realpath() on purpose, see https://bugs.php.net/72738 + $vendorDir = $filesystem->normalizePath(realpath(realpath($event->getComposer()->getConfig()->get('vendor-dir')))); + $filesystem->ensureDirectoryExists($vendorDir.'/composer'); + $pinned = $event->getComposer()->getPackage()->getExtra()['discovery'] ?? []; + $candidates = []; + + $allInterfaces = array_merge(...array_values(self::INTERFACE_MAP)); + foreach ($pinned as $abstraction => $class) { + if (isset(self::INTERFACE_MAP[$abstraction])) { + $interfaces = self::INTERFACE_MAP[$abstraction]; + } elseif (false !== $k = array_search($abstraction, $allInterfaces, true)) { + $interfaces = [$allInterfaces[$k]]; + } else { + throw new \UnexpectedValueException(sprintf('Invalid "extra.discovery" pinned in composer.json: "%s" is not one of ["%s"].', $abstraction, implode('", "', array_keys(self::INTERFACE_MAP)))); + } + + foreach ($interfaces as $interface) { + $candidates[] = sprintf("case %s: return [['class' => %s]];\n", var_export($interface, true), var_export($class, true)); + } + } + + $file = $vendorDir.'/composer/GeneratedDiscoveryStrategy.php'; + + if (!$candidates) { + if (file_exists($file)) { + unlink($file); + } + + return; + } + + $candidates = implode(' ', $candidates); + $code = <<getComposer()->getPackage(); + $autoload = $rootPackage->getAutoload(); + $autoload['classmap'][] = $vendorDir.'/composer/GeneratedDiscoveryStrategy.php'; + $rootPackage->setAutoload($autoload); + } + + private function updateComposerJson(array $missingRequires, bool $sortPackages) + { + $file = Factory::getComposerFile(); + $contents = file_get_contents($file); + + $manipulator = new JsonManipulator($contents); + + foreach ($missingRequires as $key => $packages) { + foreach ($packages as $package => $constraint) { + if ('remove' === $key) { + $manipulator->removeSubNode('require-dev', $package); + } else { + $manipulator->addLink($key, $package, $constraint, $sortPackages); + } + } + } + + file_put_contents($file, $manipulator->getContents()); + } + + private function updateComposerLock(Composer $composer, IOInterface $io) + { + $lock = substr(Factory::getComposerFile(), 0, -4).'lock'; + $composerJson = file_get_contents(Factory::getComposerFile()); + $lockFile = new JsonFile($lock, null, $io); + $locker = ClassDiscovery::safeClassExists(RepositorySet::class) + ? new Locker($io, $lockFile, $composer->getInstallationManager(), $composerJson) + : new Locker($io, $lockFile, $composer->getRepositoryManager(), $composer->getInstallationManager(), $composerJson); + $lockData = $locker->getLockData(); + $lockData['content-hash'] = Locker::getContentHash($composerJson); + $lockFile->write($lockData); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Exception.php b/tests/php_test_files/vendor/php-http/discovery/src/Exception.php new file mode 100644 index 0000000..0fa8c76 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Exception.php @@ -0,0 +1,12 @@ + + */ +interface Exception extends \Throwable +{ +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php b/tests/php_test_files/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php new file mode 100644 index 0000000..e95bf5d --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php @@ -0,0 +1,14 @@ + + */ +final class ClassInstantiationFailedException extends \RuntimeException implements Exception +{ +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php b/tests/php_test_files/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php new file mode 100644 index 0000000..304b727 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php @@ -0,0 +1,51 @@ + + */ +final class DiscoveryFailedException extends \Exception implements Exception +{ + /** + * @var \Exception[] + */ + private $exceptions; + + /** + * @param string $message + * @param \Exception[] $exceptions + */ + public function __construct($message, array $exceptions = []) + { + $this->exceptions = $exceptions; + + parent::__construct($message); + } + + /** + * @param \Exception[] $exceptions + */ + public static function create($exceptions) + { + $message = 'Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors'; + foreach ($exceptions as $e) { + $message .= "\n - ".$e->getMessage(); + } + $message .= "\n\n"; + + return new self($message, $exceptions); + } + + /** + * @return \Exception[] + */ + public function getExceptions() + { + return $this->exceptions; + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php b/tests/php_test_files/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php new file mode 100644 index 0000000..32f65db --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php @@ -0,0 +1,47 @@ + + */ +final class NoCandidateFoundException extends \Exception implements Exception +{ + /** + * @param string $strategy + */ + public function __construct($strategy, array $candidates) + { + $classes = array_map( + function ($a) { + return $a['class']; + }, + $candidates + ); + + $message = sprintf( + 'No valid candidate found using strategy "%s". We tested the following candidates: %s.', + $strategy, + implode(', ', array_map([$this, 'stringify'], $classes)) + ); + + parent::__construct($message); + } + + private function stringify($mixed) + { + if (is_string($mixed)) { + return $mixed; + } + + if (is_array($mixed) && 2 === count($mixed)) { + return sprintf('%s::%s', $this->stringify($mixed[0]), $mixed[1]); + } + + return is_object($mixed) ? get_class($mixed) : gettype($mixed); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Exception/NotFoundException.php b/tests/php_test_files/vendor/php-http/discovery/src/Exception/NotFoundException.php new file mode 100644 index 0000000..ef8b9c5 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Exception/NotFoundException.php @@ -0,0 +1,16 @@ + + */ +/* final */ class NotFoundException extends \RuntimeException implements Exception +{ +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php b/tests/php_test_files/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php new file mode 100644 index 0000000..a6ade73 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php @@ -0,0 +1,12 @@ + + */ +final class PuliUnavailableException extends StrategyUnavailableException +{ +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php b/tests/php_test_files/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php new file mode 100644 index 0000000..89ecf35 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php @@ -0,0 +1,15 @@ + + */ +class StrategyUnavailableException extends \RuntimeException implements Exception +{ +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php new file mode 100644 index 0000000..a0c4d5b --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php @@ -0,0 +1,32 @@ + + */ +final class HttpAsyncClientDiscovery extends ClassDiscovery +{ + /** + * Finds an HTTP Async Client. + * + * @return HttpAsyncClient + * + * @throws Exception\NotFoundException + */ + public static function find() + { + try { + $asyncClient = static::findOneByType(HttpAsyncClient::class); + } catch (DiscoveryFailedException $e) { + throw new NotFoundException('No HTTPlug async clients found. Make sure to install a package providing "php-http/async-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e); + } + + return static::instantiateClass($asyncClient); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/HttpClientDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/HttpClientDiscovery.php new file mode 100644 index 0000000..2501e5b --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/HttpClientDiscovery.php @@ -0,0 +1,34 @@ + + * + * @deprecated This will be removed in 2.0. Consider using Psr18ClientDiscovery. + */ +final class HttpClientDiscovery extends ClassDiscovery +{ + /** + * Finds an HTTP Client. + * + * @return HttpClient + * + * @throws Exception\NotFoundException + */ + public static function find() + { + try { + $client = static::findOneByType(HttpClient::class); + } catch (DiscoveryFailedException $e) { + throw new NotFoundException('No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e); + } + + return static::instantiateClass($client); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/MessageFactoryDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/MessageFactoryDiscovery.php new file mode 100644 index 0000000..4ae104a --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/MessageFactoryDiscovery.php @@ -0,0 +1,34 @@ + + * + * @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery. + */ +final class MessageFactoryDiscovery extends ClassDiscovery +{ + /** + * Finds a Message Factory. + * + * @return MessageFactory + * + * @throws Exception\NotFoundException + */ + public static function find() + { + try { + $messageFactory = static::findOneByType(MessageFactory::class); + } catch (DiscoveryFailedException $e) { + throw new NotFoundException('No php-http message factories found. Note that the php-http message factories are deprecated in favor of the PSR-17 message factories. To use the legacy Guzzle, Diactoros or Slim Framework factories of php-http, install php-http/message and php-http/message-factory and the chosen message implementation.', 0, $e); + } + + return static::instantiateClass($messageFactory); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/NotFoundException.php b/tests/php_test_files/vendor/php-http/discovery/src/NotFoundException.php new file mode 100644 index 0000000..559afac --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/NotFoundException.php @@ -0,0 +1,16 @@ + + * + * @deprecated since since version 1.0, and will be removed in 2.0. Use {@link \Http\Discovery\Exception\NotFoundException} instead. + */ +final class NotFoundException extends RealNotFoundException +{ +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Psr17Factory.php b/tests/php_test_files/vendor/php-http/discovery/src/Psr17Factory.php new file mode 100644 index 0000000..f8fbfd1 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Psr17Factory.php @@ -0,0 +1,303 @@ + + * 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) 2016-2018 Tobias Nyholm + * + * @author Nicolas Grekas + */ +class Psr17Factory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface +{ + private $requestFactory; + private $responseFactory; + private $serverRequestFactory; + private $streamFactory; + private $uploadedFileFactory; + private $uriFactory; + + public function __construct( + ?RequestFactoryInterface $requestFactory = null, + ?ResponseFactoryInterface $responseFactory = null, + ?ServerRequestFactoryInterface $serverRequestFactory = null, + ?StreamFactoryInterface $streamFactory = null, + ?UploadedFileFactoryInterface $uploadedFileFactory = null, + ?UriFactoryInterface $uriFactory = null + ) { + $this->requestFactory = $requestFactory; + $this->responseFactory = $responseFactory; + $this->serverRequestFactory = $serverRequestFactory; + $this->streamFactory = $streamFactory; + $this->uploadedFileFactory = $uploadedFileFactory; + $this->uriFactory = $uriFactory; + + $this->setFactory($requestFactory); + $this->setFactory($responseFactory); + $this->setFactory($serverRequestFactory); + $this->setFactory($streamFactory); + $this->setFactory($uploadedFileFactory); + $this->setFactory($uriFactory); + } + + /** + * @param UriInterface|string $uri + */ + public function createRequest(string $method, $uri): RequestInterface + { + $factory = $this->requestFactory ?? $this->setFactory(Psr17FactoryDiscovery::findRequestFactory()); + + return $factory->createRequest(...\func_get_args()); + } + + public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface + { + $factory = $this->responseFactory ?? $this->setFactory(Psr17FactoryDiscovery::findResponseFactory()); + + return $factory->createResponse(...\func_get_args()); + } + + /** + * @param UriInterface|string $uri + */ + public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface + { + $factory = $this->serverRequestFactory ?? $this->setFactory(Psr17FactoryDiscovery::findServerRequestFactory()); + + return $factory->createServerRequest(...\func_get_args()); + } + + public function createServerRequestFromGlobals(?array $server = null, ?array $get = null, ?array $post = null, ?array $cookie = null, ?array $files = null, ?StreamInterface $body = null): ServerRequestInterface + { + $server = $server ?? $_SERVER; + $request = $this->createServerRequest($server['REQUEST_METHOD'] ?? 'GET', $this->createUriFromGlobals($server), $server); + + return $this->buildServerRequestFromGlobals($request, $server, $files ?? $_FILES) + ->withQueryParams($get ?? $_GET) + ->withParsedBody($post ?? $_POST) + ->withCookieParams($cookie ?? $_COOKIE) + ->withBody($body ?? $this->createStreamFromFile('php://input', 'r+')); + } + + public function createStream(string $content = ''): StreamInterface + { + $factory = $this->streamFactory ?? $this->setFactory(Psr17FactoryDiscovery::findStreamFactory()); + + return $factory->createStream($content); + } + + public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface + { + $factory = $this->streamFactory ?? $this->setFactory(Psr17FactoryDiscovery::findStreamFactory()); + + return $factory->createStreamFromFile($filename, $mode); + } + + /** + * @param resource $resource + */ + public function createStreamFromResource($resource): StreamInterface + { + $factory = $this->streamFactory ?? $this->setFactory(Psr17FactoryDiscovery::findStreamFactory()); + + return $factory->createStreamFromResource($resource); + } + + public function createUploadedFile(StreamInterface $stream, ?int $size = null, int $error = \UPLOAD_ERR_OK, ?string $clientFilename = null, ?string $clientMediaType = null): UploadedFileInterface + { + $factory = $this->uploadedFileFactory ?? $this->setFactory(Psr17FactoryDiscovery::findUploadedFileFactory()); + + return $factory->createUploadedFile(...\func_get_args()); + } + + public function createUri(string $uri = ''): UriInterface + { + $factory = $this->uriFactory ?? $this->setFactory(Psr17FactoryDiscovery::findUriFactory()); + + return $factory->createUri(...\func_get_args()); + } + + public function createUriFromGlobals(?array $server = null): UriInterface + { + return $this->buildUriFromGlobals($this->createUri(''), $server ?? $_SERVER); + } + + private function setFactory($factory) + { + if (!$this->requestFactory && $factory instanceof RequestFactoryInterface) { + $this->requestFactory = $factory; + } + if (!$this->responseFactory && $factory instanceof ResponseFactoryInterface) { + $this->responseFactory = $factory; + } + if (!$this->serverRequestFactory && $factory instanceof ServerRequestFactoryInterface) { + $this->serverRequestFactory = $factory; + } + if (!$this->streamFactory && $factory instanceof StreamFactoryInterface) { + $this->streamFactory = $factory; + } + if (!$this->uploadedFileFactory && $factory instanceof UploadedFileFactoryInterface) { + $this->uploadedFileFactory = $factory; + } + if (!$this->uriFactory && $factory instanceof UriFactoryInterface) { + $this->uriFactory = $factory; + } + + return $factory; + } + + private function buildServerRequestFromGlobals(ServerRequestInterface $request, array $server, array $files): ServerRequestInterface + { + $request = $request + ->withProtocolVersion(isset($server['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $server['SERVER_PROTOCOL']) : '1.1') + ->withUploadedFiles($this->normalizeFiles($files)); + + $headers = []; + foreach ($server as $k => $v) { + if (0 === strpos($k, 'HTTP_')) { + $k = substr($k, 5); + } elseif (!\in_array($k, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) { + continue; + } + $k = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $k)))); + + $headers[$k] = $v; + } + + if (!isset($headers['Authorization'])) { + if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { + $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; + } elseif (isset($_SERVER['PHP_AUTH_USER'])) { + $headers['Authorization'] = 'Basic '.base64_encode($_SERVER['PHP_AUTH_USER'].':'.($_SERVER['PHP_AUTH_PW'] ?? '')); + } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { + $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; + } + } + + foreach ($headers as $k => $v) { + try { + $request = $request->withHeader($k, $v); + } catch (\InvalidArgumentException $e) { + // ignore invalid headers + } + } + + return $request; + } + + private function buildUriFromGlobals(UriInterface $uri, array $server): UriInterface + { + $uri = $uri->withScheme(!empty($server['HTTPS']) && 'off' !== strtolower($server['HTTPS']) ? 'https' : 'http'); + + $hasPort = false; + if (isset($server['HTTP_HOST'])) { + $parts = parse_url('http://'.$server['HTTP_HOST']); + + $uri = $uri->withHost($parts['host'] ?? 'localhost'); + + if ($parts['port'] ?? false) { + $hasPort = true; + $uri = $uri->withPort($parts['port']); + } + } else { + $uri = $uri->withHost($server['SERVER_NAME'] ?? $server['SERVER_ADDR'] ?? 'localhost'); + } + + 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; + } + + private function normalizeFiles(array $files): array + { + foreach ($files as $k => $v) { + if ($v instanceof UploadedFileInterface) { + continue; + } + if (!\is_array($v)) { + unset($files[$k]); + } elseif (!isset($v['tmp_name'])) { + $files[$k] = $this->normalizeFiles($v); + } else { + $files[$k] = $this->createUploadedFileFromSpec($v); + } + } + + return $files; + } + + /** + * Create and return an UploadedFile instance from a $_FILES specification. + * + * @param array $value $_FILES struct + * + * @return UploadedFileInterface|UploadedFileInterface[] + */ + private function createUploadedFileFromSpec(array $value) + { + if (!is_array($tmpName = $value['tmp_name'])) { + $file = is_file($tmpName) ? $this->createStreamFromFile($tmpName, 'r') : $this->createStream(); + + return $this->createUploadedFile($file, $value['size'], $value['error'], $value['name'], $value['type']); + } + + foreach ($tmpName as $k => $v) { + $tmpName[$k] = $this->createUploadedFileFromSpec([ + 'tmp_name' => $v, + 'size' => $value['size'][$k] ?? null, + 'error' => $value['error'][$k] ?? null, + 'name' => $value['name'][$k] ?? null, + 'type' => $value['type'][$k] ?? null, + ]); + } + + return $tmpName; + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php new file mode 100644 index 0000000..e4348b4 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php @@ -0,0 +1,137 @@ + + */ +final class Psr17FactoryDiscovery extends ClassDiscovery +{ + private static function createException($type, Exception $e) + { + return new RealNotFoundException( + 'No PSR-17 '.$type.' found. Install a package from this list: https://packagist.org/providers/psr/http-factory-implementation', + 0, + $e + ); + } + + /** + * @return RequestFactoryInterface + * + * @throws RealNotFoundException + */ + public static function findRequestFactory() + { + try { + $messageFactory = static::findOneByType(RequestFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('request factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return ResponseFactoryInterface + * + * @throws RealNotFoundException + */ + public static function findResponseFactory() + { + try { + $messageFactory = static::findOneByType(ResponseFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('response factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return ServerRequestFactoryInterface + * + * @throws RealNotFoundException + */ + public static function findServerRequestFactory() + { + try { + $messageFactory = static::findOneByType(ServerRequestFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('server request factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return StreamFactoryInterface + * + * @throws RealNotFoundException + */ + public static function findStreamFactory() + { + try { + $messageFactory = static::findOneByType(StreamFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('stream factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return UploadedFileFactoryInterface + * + * @throws RealNotFoundException + */ + public static function findUploadedFileFactory() + { + try { + $messageFactory = static::findOneByType(UploadedFileFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('uploaded file factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return UriFactoryInterface + * + * @throws RealNotFoundException + */ + public static function findUriFactory() + { + try { + $messageFactory = static::findOneByType(UriFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('url factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return UriFactoryInterface + * + * @throws RealNotFoundException + * + * @deprecated This will be removed in 2.0. Consider using the findUriFactory() method. + */ + public static function findUrlFactory() + { + return static::findUriFactory(); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Psr18Client.php b/tests/php_test_files/vendor/php-http/discovery/src/Psr18Client.php new file mode 100644 index 0000000..26b6aeb --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Psr18Client.php @@ -0,0 +1,45 @@ + + */ +class Psr18Client extends Psr17Factory implements ClientInterface +{ + private $client; + + public function __construct( + ?ClientInterface $client = null, + ?RequestFactoryInterface $requestFactory = null, + ?ResponseFactoryInterface $responseFactory = null, + ?ServerRequestFactoryInterface $serverRequestFactory = null, + ?StreamFactoryInterface $streamFactory = null, + ?UploadedFileFactoryInterface $uploadedFileFactory = null, + ?UriFactoryInterface $uriFactory = null + ) { + parent::__construct($requestFactory, $responseFactory, $serverRequestFactory, $streamFactory, $uploadedFileFactory, $uriFactory); + + $this->client = $client ?? Psr18ClientDiscovery::find(); + } + + public function sendRequest(RequestInterface $request): ResponseInterface + { + return $this->client->sendRequest($request); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Psr18ClientDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/Psr18ClientDiscovery.php new file mode 100644 index 0000000..3f95418 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Psr18ClientDiscovery.php @@ -0,0 +1,33 @@ + + */ +final class Psr18ClientDiscovery extends ClassDiscovery +{ + /** + * Finds a PSR-18 HTTP Client. + * + * @return ClientInterface + * + * @throws RealNotFoundException + */ + public static function find() + { + try { + $client = static::findOneByType(ClientInterface::class); + } catch (DiscoveryFailedException $e) { + throw new RealNotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle7-adapter".', 0, $e); + } + + return static::instantiateClass($client); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php new file mode 100644 index 0000000..0fa4240 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php @@ -0,0 +1,185 @@ + + * + * Don't miss updating src/Composer/Plugin.php when adding a new supported class. + */ +final class CommonClassesStrategy implements DiscoveryStrategy +{ + /** + * @var array + */ + private static $classes = [ + MessageFactory::class => [ + ['class' => NyholmHttplugFactory::class, 'condition' => [NyholmHttplugFactory::class]], + ['class' => GuzzleMessageFactory::class, 'condition' => [GuzzleRequest::class, GuzzleMessageFactory::class]], + ['class' => DiactorosMessageFactory::class, 'condition' => [DiactorosRequest::class, DiactorosMessageFactory::class]], + ['class' => SlimMessageFactory::class, 'condition' => [SlimRequest::class, SlimMessageFactory::class]], + ], + StreamFactory::class => [ + ['class' => NyholmHttplugFactory::class, 'condition' => [NyholmHttplugFactory::class]], + ['class' => GuzzleStreamFactory::class, 'condition' => [GuzzleRequest::class, GuzzleStreamFactory::class]], + ['class' => DiactorosStreamFactory::class, 'condition' => [DiactorosRequest::class, DiactorosStreamFactory::class]], + ['class' => SlimStreamFactory::class, 'condition' => [SlimRequest::class, SlimStreamFactory::class]], + ], + UriFactory::class => [ + ['class' => NyholmHttplugFactory::class, 'condition' => [NyholmHttplugFactory::class]], + ['class' => GuzzleUriFactory::class, 'condition' => [GuzzleRequest::class, GuzzleUriFactory::class]], + ['class' => DiactorosUriFactory::class, 'condition' => [DiactorosRequest::class, DiactorosUriFactory::class]], + ['class' => SlimUriFactory::class, 'condition' => [SlimRequest::class, SlimUriFactory::class]], + ], + HttpAsyncClient::class => [ + ['class' => SymfonyHttplug::class, 'condition' => [SymfonyHttplug::class, Promise::class, [self::class, 'isPsr17FactoryInstalled']]], + ['class' => Guzzle7::class, 'condition' => Guzzle7::class], + ['class' => Guzzle6::class, 'condition' => Guzzle6::class], + ['class' => Curl::class, 'condition' => Curl::class], + ['class' => React::class, 'condition' => React::class], + ], + HttpClient::class => [ + ['class' => SymfonyHttplug::class, 'condition' => [SymfonyHttplug::class, [self::class, 'isPsr17FactoryInstalled'], [self::class, 'isSymfonyImplementingHttpClient']]], + ['class' => Guzzle7::class, 'condition' => Guzzle7::class], + ['class' => Guzzle6::class, 'condition' => Guzzle6::class], + ['class' => Guzzle5::class, 'condition' => Guzzle5::class], + ['class' => Curl::class, 'condition' => Curl::class], + ['class' => Socket::class, 'condition' => Socket::class], + ['class' => Buzz::class, 'condition' => Buzz::class], + ['class' => React::class, 'condition' => React::class], + ['class' => Cake::class, 'condition' => Cake::class], + ['class' => Artax::class, 'condition' => Artax::class], + [ + 'class' => [self::class, 'buzzInstantiate'], + 'condition' => [\Buzz\Client\FileGetContents::class, \Buzz\Message\ResponseBuilder::class], + ], + ], + Psr18Client::class => [ + [ + 'class' => [self::class, 'symfonyPsr18Instantiate'], + 'condition' => [SymfonyPsr18::class, Psr17RequestFactory::class], + ], + [ + 'class' => GuzzleHttp::class, + 'condition' => [self::class, 'isGuzzleImplementingPsr18'], + ], + [ + 'class' => [self::class, 'buzzInstantiate'], + 'condition' => [\Buzz\Client\FileGetContents::class, \Buzz\Message\ResponseBuilder::class], + ], + ], + ]; + + public static function getCandidates($type) + { + if (Psr18Client::class === $type) { + return self::getPsr18Candidates(); + } + + return self::$classes[$type] ?? []; + } + + /** + * @return array The return value is always an array with zero or more elements. Each + * element is an array with two keys ['class' => string, 'condition' => mixed]. + */ + private static function getPsr18Candidates() + { + $candidates = self::$classes[Psr18Client::class]; + + // HTTPlug 2.0 clients implements PSR18Client too. + foreach (self::$classes[HttpClient::class] as $c) { + if (!is_string($c['class'])) { + continue; + } + try { + if (ClassDiscovery::safeClassExists($c['class']) && is_subclass_of($c['class'], Psr18Client::class)) { + $candidates[] = $c; + } + } catch (\Throwable $e) { + trigger_error(sprintf('Got exception "%s (%s)" while checking if a PSR-18 Client is available', get_class($e), $e->getMessage()), E_USER_WARNING); + } + } + + return $candidates; + } + + public static function buzzInstantiate() + { + return new \Buzz\Client\FileGetContents(Psr17FactoryDiscovery::findResponseFactory()); + } + + public static function symfonyPsr18Instantiate() + { + return new SymfonyPsr18(null, Psr17FactoryDiscovery::findResponseFactory(), Psr17FactoryDiscovery::findStreamFactory()); + } + + public static function isGuzzleImplementingPsr18() + { + return defined('GuzzleHttp\ClientInterface::MAJOR_VERSION'); + } + + public static function isSymfonyImplementingHttpClient() + { + return is_subclass_of(SymfonyHttplug::class, HttpClient::class); + } + + /** + * Can be used as a condition. + * + * @return bool + */ + public static function isPsr17FactoryInstalled() + { + try { + Psr17FactoryDiscovery::findResponseFactory(); + } catch (NotFoundException $e) { + return false; + } catch (\Throwable $e) { + trigger_error(sprintf('Got exception "%s (%s)" while checking if a PSR-17 ResponseFactory is available', get_class($e), $e->getMessage()), E_USER_WARNING); + + return false; + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php new file mode 100644 index 0000000..04cf4ba --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php @@ -0,0 +1,104 @@ + + * + * Don't miss updating src/Composer/Plugin.php when adding a new supported class. + */ +final class CommonPsr17ClassesStrategy implements DiscoveryStrategy +{ + /** + * @var array + */ + private static $classes = [ + RequestFactoryInterface::class => [ + 'Phalcon\Http\Message\RequestFactory', + 'Nyholm\Psr7\Factory\Psr17Factory', + 'GuzzleHttp\Psr7\HttpFactory', + 'Http\Factory\Diactoros\RequestFactory', + 'Http\Factory\Guzzle\RequestFactory', + 'Http\Factory\Slim\RequestFactory', + 'Laminas\Diactoros\RequestFactory', + 'Slim\Psr7\Factory\RequestFactory', + 'HttpSoft\Message\RequestFactory', + ], + ResponseFactoryInterface::class => [ + 'Phalcon\Http\Message\ResponseFactory', + 'Nyholm\Psr7\Factory\Psr17Factory', + 'GuzzleHttp\Psr7\HttpFactory', + 'Http\Factory\Diactoros\ResponseFactory', + 'Http\Factory\Guzzle\ResponseFactory', + 'Http\Factory\Slim\ResponseFactory', + 'Laminas\Diactoros\ResponseFactory', + 'Slim\Psr7\Factory\ResponseFactory', + 'HttpSoft\Message\ResponseFactory', + ], + ServerRequestFactoryInterface::class => [ + 'Phalcon\Http\Message\ServerRequestFactory', + 'Nyholm\Psr7\Factory\Psr17Factory', + 'GuzzleHttp\Psr7\HttpFactory', + 'Http\Factory\Diactoros\ServerRequestFactory', + 'Http\Factory\Guzzle\ServerRequestFactory', + 'Http\Factory\Slim\ServerRequestFactory', + 'Laminas\Diactoros\ServerRequestFactory', + 'Slim\Psr7\Factory\ServerRequestFactory', + 'HttpSoft\Message\ServerRequestFactory', + ], + StreamFactoryInterface::class => [ + 'Phalcon\Http\Message\StreamFactory', + 'Nyholm\Psr7\Factory\Psr17Factory', + 'GuzzleHttp\Psr7\HttpFactory', + 'Http\Factory\Diactoros\StreamFactory', + 'Http\Factory\Guzzle\StreamFactory', + 'Http\Factory\Slim\StreamFactory', + 'Laminas\Diactoros\StreamFactory', + 'Slim\Psr7\Factory\StreamFactory', + 'HttpSoft\Message\StreamFactory', + ], + UploadedFileFactoryInterface::class => [ + 'Phalcon\Http\Message\UploadedFileFactory', + 'Nyholm\Psr7\Factory\Psr17Factory', + 'GuzzleHttp\Psr7\HttpFactory', + 'Http\Factory\Diactoros\UploadedFileFactory', + 'Http\Factory\Guzzle\UploadedFileFactory', + 'Http\Factory\Slim\UploadedFileFactory', + 'Laminas\Diactoros\UploadedFileFactory', + 'Slim\Psr7\Factory\UploadedFileFactory', + 'HttpSoft\Message\UploadedFileFactory', + ], + UriFactoryInterface::class => [ + 'Phalcon\Http\Message\UriFactory', + 'Nyholm\Psr7\Factory\Psr17Factory', + 'GuzzleHttp\Psr7\HttpFactory', + 'Http\Factory\Diactoros\UriFactory', + 'Http\Factory\Guzzle\UriFactory', + 'Http\Factory\Slim\UriFactory', + 'Laminas\Diactoros\UriFactory', + 'Slim\Psr7\Factory\UriFactory', + 'HttpSoft\Message\UriFactory', + ], + ]; + + public static function getCandidates($type) + { + $candidates = []; + if (isset(self::$classes[$type])) { + foreach (self::$classes[$type] as $class) { + $candidates[] = ['class' => $class, 'condition' => [$class]]; + } + } + + return $candidates; + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php new file mode 100644 index 0000000..1eadb14 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php @@ -0,0 +1,23 @@ + + */ +interface DiscoveryStrategy +{ + /** + * Find a resource of a specific type. + * + * @param string $type + * + * @return array The return value is always an array with zero or more elements. Each + * element is an array with two keys ['class' => string, 'condition' => mixed]. + * + * @throws StrategyUnavailableException if we cannot use this strategy + */ + public static function getCandidates($type); +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php new file mode 100644 index 0000000..77b9d27 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php @@ -0,0 +1,24 @@ + + */ +final class MockClientStrategy implements DiscoveryStrategy +{ + public static function getCandidates($type) + { + if (is_a(HttpClient::class, $type, true) || is_a(HttpAsyncClient::class, $type, true)) { + return [['class' => Mock::class, 'condition' => Mock::class]]; + } + + return []; + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php new file mode 100644 index 0000000..74b78b8 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php @@ -0,0 +1,90 @@ + + * @author Mรกrk Sรกgi-Kazรกr + */ +class PuliBetaStrategy implements DiscoveryStrategy +{ + /** + * @var GeneratedPuliFactory + */ + protected static $puliFactory; + + /** + * @var Discovery + */ + protected static $puliDiscovery; + + /** + * @return GeneratedPuliFactory + * + * @throws PuliUnavailableException + */ + private static function getPuliFactory() + { + if (null === self::$puliFactory) { + if (!defined('PULI_FACTORY_CLASS')) { + throw new PuliUnavailableException('Puli Factory is not available'); + } + + $puliFactoryClass = PULI_FACTORY_CLASS; + + if (!ClassDiscovery::safeClassExists($puliFactoryClass)) { + throw new PuliUnavailableException('Puli Factory class does not exist'); + } + + self::$puliFactory = new $puliFactoryClass(); + } + + return self::$puliFactory; + } + + /** + * Returns the Puli discovery layer. + * + * @return Discovery + * + * @throws PuliUnavailableException + */ + private static function getPuliDiscovery() + { + if (!isset(self::$puliDiscovery)) { + $factory = self::getPuliFactory(); + $repository = $factory->createRepository(); + + self::$puliDiscovery = $factory->createDiscovery($repository); + } + + return self::$puliDiscovery; + } + + public static function getCandidates($type) + { + $returnData = []; + $bindings = self::getPuliDiscovery()->findBindings($type); + + foreach ($bindings as $binding) { + $condition = true; + if ($binding->hasParameterValue('depends')) { + $condition = $binding->getParameterValue('depends'); + } + $returnData[] = ['class' => $binding->getClassName(), 'condition' => $condition]; + } + + return $returnData; + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/StreamFactoryDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/StreamFactoryDiscovery.php new file mode 100644 index 0000000..e11c49a --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/StreamFactoryDiscovery.php @@ -0,0 +1,34 @@ + + * + * @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery. + */ +final class StreamFactoryDiscovery extends ClassDiscovery +{ + /** + * Finds a Stream Factory. + * + * @return StreamFactory + * + * @throws Exception\NotFoundException + */ + public static function find() + { + try { + $streamFactory = static::findOneByType(StreamFactory::class); + } catch (DiscoveryFailedException $e) { + throw new NotFoundException('No stream factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e); + } + + return static::instantiateClass($streamFactory); + } +} diff --git a/tests/php_test_files/vendor/php-http/discovery/src/UriFactoryDiscovery.php b/tests/php_test_files/vendor/php-http/discovery/src/UriFactoryDiscovery.php new file mode 100644 index 0000000..db3add2 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/discovery/src/UriFactoryDiscovery.php @@ -0,0 +1,34 @@ + + * + * @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery. + */ +final class UriFactoryDiscovery extends ClassDiscovery +{ + /** + * Finds a URI Factory. + * + * @return UriFactory + * + * @throws Exception\NotFoundException + */ + public static function find() + { + try { + $uriFactory = static::findOneByType(UriFactory::class); + } catch (DiscoveryFailedException $e) { + throw new NotFoundException('No uri factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e); + } + + return static::instantiateClass($uriFactory); + } +} diff --git a/tests/php_test_files/vendor/php-http/guzzle6-adapter/CHANGELOG.md b/tests/php_test_files/vendor/php-http/guzzle6-adapter/CHANGELOG.md new file mode 100644 index 0000000..40a202b --- /dev/null +++ b/tests/php_test_files/vendor/php-http/guzzle6-adapter/CHANGELOG.md @@ -0,0 +1,112 @@ +# Change Log + + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [2.0.2] - 2021-03-02 + +### Added + +- Add Support for PHP 8 + +## [2.0.1] - 2018-12-16 + +### Fixed +- `\Http\Adapter\Guzzle6\Client::sendRequest` no longer throws any exceptions that do not implement + the PSR exception interface. + + Instead of `\UnexpectedValueException` we now throw `Http\Adapter\Guzzle6\Exception\UnexpectedValueException` + (which extends `\UnexpectedValueException` and implements `Psr\Http\Client\ClientExceptionInterface`). + + Instead of `\RuntimeException` we now throw `Http\Client\Exception\TransferException` + (which extends `\RuntimeException` and implements `Psr\Http\Client\ClientExceptionInterface`). + +## [2.0.0] - 2018-11-14 + +### Added + +- Support for HTTPlug 2.0 and PSR-18 + +### Changed + +- `Client` and `Promise` are both final + +### Removed + +- Support for PHP <7.1 + + +## [1.1.1] - 2016-05-10 + +### Fixed + +- Adapter can again be instantiated without a guzzle client. + + +## [1.1.0] - 2016-05-09 + +### Added + +- Factory method Client::createWithConfig to create an adapter with custom + configuration for the underlying guzzle client. + + +## [1.0.0] - 2016-01-26 + + +## [0.4.1] - 2016-01-13 + +### Changed + +- Updated integration tests + +### Removed + +- Client common dependency + + +## [0.4.0] - 2016-01-12 + +### Changed + +- Updated package files +- Updated HTTPlug to RC1 + + +## [0.3.1] - 2015-12-31 + + +## [0.3.0] - 2015-12-31 + + +## [0.2.1] - 2015-12-17 + +### Added + +- Puli configuration and bindings + +### Changed + +- Guzzle setup conforms to HTTPlug requirement now: Minimal functionality in client + + +## [0.2.0] - 2015-12-15 + +### Added + +- Async client capabalities + +### Changed + +- HTTPlug instead of HTTP Adapter + + +## 0.1.0 - 2015-06-12 + +### Added + +- Initial release + diff --git a/tests/php_test_files/vendor/php-http/guzzle6-adapter/LICENSE b/tests/php_test_files/vendor/php-http/guzzle6-adapter/LICENSE new file mode 100644 index 0000000..48741e4 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/guzzle6-adapter/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014-2015 Eric GELOEN +Copyright (c) 2015-2016 PHP HTTP Team + +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/php-http/guzzle6-adapter/README.md b/tests/php_test_files/vendor/php-http/guzzle6-adapter/README.md new file mode 100644 index 0000000..9ef1a7d --- /dev/null +++ b/tests/php_test_files/vendor/php-http/guzzle6-adapter/README.md @@ -0,0 +1,62 @@ +# Guzzle 6 HTTP Adapter + +[![Latest Version](https://img.shields.io/github/release/php-http/guzzle6-adapter.svg?style=flat-square)](https://github.com/php-http/guzzle6-adapter/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +[![Build Status](https://img.shields.io/travis/php-http/guzzle6-adapter.svg?style=flat-square)](https://travis-ci.org/php-http/guzzle6-adapter) +[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/guzzle6-adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/guzzle6-adapter) +[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/guzzle6-adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/guzzle6-adapter) +[![Total Downloads](https://img.shields.io/packagist/dt/php-http/guzzle6-adapter.svg?style=flat-square)](https://packagist.org/packages/php-http/guzzle6-adapter) + +**Guzzle 6 HTTP Adapter.** + +**Note for PHP 8**: This adapter can now be installed with PHP 8, even though Guzzle 6 is not tested on PHP 8. +If you need a PSR-18 client, use Guzzle 7 which natively implements PSR-18. +If you need the HTTPlug interfaces for asynchronous calls or for a system that still requires HTTPlug, use the [guzzle7-adapter](https://github.com/php-http/guzzle7-adapter/) instead of this repository. + +## Install + +Via Composer + +``` bash +$ composer require php-http/guzzle6-adapter +``` + + +## Documentation + +Please see the [official documentation](http://docs.php-http.org/en/latest/clients/guzzle6-adapter.html). + + +## Testing + +First launch the http server: + +```bash +$ ./vendor/bin/http_test_server > /dev/null 2>&1 & +``` + +Then the test suite: + +``` bash +$ composer test +``` + + +## Contributing + +Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). + + +## Security + +If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). + + +## Credits + +Thanks to [David de Boer](https://github.com/ddeboer) for implementing this adapter. + + +## License + +The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/tests/php_test_files/vendor/php-http/guzzle6-adapter/composer.json b/tests/php_test_files/vendor/php-http/guzzle6-adapter/composer.json new file mode 100644 index 0000000..71a3710 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/guzzle6-adapter/composer.json @@ -0,0 +1,52 @@ +{ + "name": "php-http/guzzle6-adapter", + "description": "Guzzle 6 HTTP Adapter", + "license": "MIT", + "keywords": ["guzzle", "http"], + "homepage": "http://httplug.io", + "authors": [ + { + "name": "David de Boer", + "email": "david@ddeboer.nl" + }, + { + "name": "Mรกrk Sรกgi-Kazรกr", + "email": "mark.sagikazar@gmail.com" + } + ], + "require": { + "php": "^7.1 || ^8.0", + "php-http/httplug": "^2.0", + "psr/http-client": "^1.0", + "guzzlehttp/guzzle": "^6.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^7.4 || ^8.4", + "php-http/client-integration-tests": "^2.0 || ^3.0" + }, + "provide": { + "php-http/client-implementation": "1.0", + "php-http/async-client-implementation": "1.0", + "psr/http-client-implementation": "1.0" + }, + "autoload": { + "psr-4": { + "Http\\Adapter\\Guzzle6\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Http\\Adapter\\Guzzle6\\Tests\\": "tests/" + } + }, + "scripts": { + "test": "vendor/bin/phpunit", + "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml" + }, + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + } +} diff --git a/tests/php_test_files/vendor/php-http/guzzle6-adapter/puli.json b/tests/php_test_files/vendor/php-http/guzzle6-adapter/puli.json new file mode 100644 index 0000000..bd29614 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/guzzle6-adapter/puli.json @@ -0,0 +1,16 @@ +{ + "version": "1.0", + "name": "php-http/guzzle6-adapter", + "bindings": { + "04b5a002-71a8-473d-a8df-75671551b84a": { + "_class": "Puli\\Discovery\\Binding\\ClassBinding", + "class": "Http\\Adapter\\Guzzle6\\Client", + "type": "Http\\Client\\HttpClient" + }, + "9c856476-7f6b-43df-a740-15420a5f839c": { + "_class": "Puli\\Discovery\\Binding\\ClassBinding", + "class": "Http\\Adapter\\Guzzle6\\Client", + "type": "Http\\Client\\HttpAsyncClient" + } + } +} diff --git a/tests/php_test_files/vendor/php-http/guzzle6-adapter/src/Client.php b/tests/php_test_files/vendor/php-http/guzzle6-adapter/src/Client.php new file mode 100644 index 0000000..37cb21d --- /dev/null +++ b/tests/php_test_files/vendor/php-http/guzzle6-adapter/src/Client.php @@ -0,0 +1,81 @@ + + */ +final class Client implements HttpClient, HttpAsyncClient +{ + /** + * @var ClientInterface + */ + private $client; + + /** + * If you pass a Guzzle instance as $client, make sure to configure Guzzle to not + * throw exceptions on HTTP error status codes, or this adapter will violate PSR-18. + * See also self::buildClient at the bottom of this class. + */ + public function __construct(?ClientInterface $client = null) + { + if (!$client) { + $client = self::buildClient(); + } + + $this->client = $client; + } + + /** + * Factory method to create the Guzzle 6 adapter with custom Guzzle configuration. + */ + public static function createWithConfig(array $config): Client + { + return new self(self::buildClient($config)); + } + + /** + * {@inheritdoc} + */ + public function sendRequest(RequestInterface $request): ResponseInterface + { + $promise = $this->sendAsyncRequest($request); + + return $promise->wait(); + } + + /** + * {@inheritdoc} + */ + public function sendAsyncRequest(RequestInterface $request) + { + $promise = $this->client->sendAsync($request); + + return new Promise($promise, $request); + } + + /** + * Build the Guzzle client instance. + */ + private static function buildClient(array $config = []): GuzzleClient + { + $handlerStack = new HandlerStack(\GuzzleHttp\choose_handler()); + $handlerStack->push(Middleware::prepareBody(), 'prepare_body'); + $config = array_merge(['handler' => $handlerStack], $config); + + return new GuzzleClient($config); + } +} diff --git a/tests/php_test_files/vendor/php-http/guzzle6-adapter/src/Exception/UnexpectedValueException.php b/tests/php_test_files/vendor/php-http/guzzle6-adapter/src/Exception/UnexpectedValueException.php new file mode 100644 index 0000000..e7244fe --- /dev/null +++ b/tests/php_test_files/vendor/php-http/guzzle6-adapter/src/Exception/UnexpectedValueException.php @@ -0,0 +1,9 @@ + + */ +final class Promise implements HttpPromise +{ + /** + * @var PromiseInterface + */ + private $promise; + + /** + * @var string State of the promise + */ + private $state; + + /** + * @var ResponseInterface + */ + private $response; + + /** + * @var HttplugException + */ + private $exception; + + /** + * @var RequestInterface + */ + private $request; + + public function __construct(PromiseInterface $promise, RequestInterface $request) + { + $this->request = $request; + $this->state = self::PENDING; + $this->promise = $promise->then(function ($response) { + $this->response = $response; + $this->state = self::FULFILLED; + + return $response; + }, function ($reason) use ($request) { + $this->state = self::REJECTED; + + if ($reason instanceof HttplugException) { + $this->exception = $reason; + } elseif ($reason instanceof GuzzleExceptions\GuzzleException) { + $this->exception = $this->handleException($reason, $request); + } elseif ($reason instanceof \Throwable) { + $this->exception = new HttplugException\TransferException('Invalid exception returned from Guzzle6', 0, $reason); + } else { + $this->exception = new UnexpectedValueException('Reason returned from Guzzle6 must be an Exception'); + } + + throw $this->exception; + }); + } + + /** + * {@inheritdoc} + */ + public function then(callable $onFulfilled = null, callable $onRejected = null) + { + return new static($this->promise->then($onFulfilled, $onRejected), $this->request); + } + + /** + * {@inheritdoc} + */ + public function getState() + { + return $this->state; + } + + /** + * {@inheritdoc} + */ + public function wait($unwrap = true) + { + $this->promise->wait(false); + + if ($unwrap) { + if (self::REJECTED == $this->getState()) { + throw $this->exception; + } + + return $this->response; + } + } + + /** + * Converts a Guzzle exception into an Httplug exception. + */ + private function handleException(GuzzleExceptions\GuzzleException $exception, RequestInterface $request): HttplugException + { + if ($exception instanceof GuzzleExceptions\SeekException) { + return new HttplugException\RequestException($exception->getMessage(), $request, $exception); + } + + if ($exception instanceof GuzzleExceptions\ConnectException) { + return new HttplugException\NetworkException($exception->getMessage(), $exception->getRequest(), $exception); + } + + if ($exception instanceof GuzzleExceptions\RequestException) { + // Make sure we have a response for the HttpException + if ($exception->hasResponse()) { + return new HttplugException\HttpException( + $exception->getMessage(), + $exception->getRequest(), + $exception->getResponse(), + $exception + ); + } + + return new HttplugException\RequestException($exception->getMessage(), $exception->getRequest(), $exception); + } + + return new HttplugException\TransferException($exception->getMessage(), 0, $exception); + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/.php-cs-fixer.dist.php b/tests/php_test_files/vendor/php-http/httplug/.php-cs-fixer.dist.php new file mode 100644 index 0000000..83809c2 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/.php-cs-fixer.dist.php @@ -0,0 +1,16 @@ +in(__DIR__.'/src') + ->name('*.php') +; + +$config = (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + ]) + ->setFinder($finder) +; + +return $config; diff --git a/tests/php_test_files/vendor/php-http/httplug/CHANGELOG.md b/tests/php_test_files/vendor/php-http/httplug/CHANGELOG.md new file mode 100644 index 0000000..efccd55 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/CHANGELOG.md @@ -0,0 +1,141 @@ +# Change Log + + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + +## [2.4.0] - 2023-04-14 + +### Changed + +- Allow `psr/http-message` v2 in addition to v1 +- Deprecate `Http\Client\HttpClient`, use [PSR-18](https://www.php-fig.org/psr/psr-18/) instead + +## [2.3.0] - 2022-02-21 + +### Changed + +- Enabled the `$onRejected` callback of `HttpRejectedPromise` to return a promise for implementing a retry + mechanism [#168](https://github.com/php-http/httplug/pull/168) + +## [2.2.0] - 2020-07-13 + +### Changed + +- Support PHP 7.1-8.0 + +## [2.1.0] - 2019-12-27 + +### Changed + +- `Http\Client\Exception\NetworkException` no longer extends `Http\Client\Exception\RequestException`, + in accordance with [PSR-18](https://www.php-fig.org/psr/psr-18/) + +## [2.0.0] - 2018-10-31 + +This version is no BC break for consumers using HTTPlug. However, HTTP clients that +implement HTTPlug need to adjust because we add return type declarations. + +### Added + +- Support for PSR-18 (HTTP client). + +### Changed + +- **BC Break:** `HttpClient::sendRequest(RequestInterface $request)` has a return type annotation. The new +signature is `HttpClient::sendRequest(RequestInterface $request): ResponseInterface`. +- **BC Break:** `RequestException::getRequest()` has a return type annotation. The new +signature is `RequestException::getRequest(): RequestInterface`. + +### Removed + +- PHP 5 support + + +## [1.1.0] - 2016-08-31 + +### Added + +- HttpFulfilledPromise and HttpRejectedPromise which respect the HttpAsyncClient interface + + +## [1.0.0] - 2016-01-26 + +### Removed + +- Stability configuration from composer + + +## [1.0.0-RC1] - 2016-01-12 + +### Changed + +- Updated package files +- Updated promise dependency to RC1 + + +## [1.0.0-beta] - 2015-12-17 + +### Added + +- Puli configuration and binding types + +### Changed + +- Exception concept + + +## [1.0.0-alpha3] - 2015-12-13 + +### Changed + +- Async client does not throw exceptions + +### Removed + +- Promise interface moved to its own repository: [php-http/promise](https://github.com/php-http/promise) + + +## [1.0.0-alpha2] - 2015-11-16 + +### Added + +- Async client and Promise interface + + +## [1.0.0-alpha] - 2015-10-26 + +### Added + +- Better domain exceptions. + +### Changed + +- Purpose of the library: general HTTP CLient abstraction. + +### Removed + +- Request options: they should be configured at construction time. +- Multiple request sending: should be done asynchronously using Async Client. +- `getName` method + + +## 0.1.0 - 2015-06-03 + +### Added + +- Initial release + + +[Unreleased]: https://github.com/php-http/httplug/compare/v2.0.0...HEAD +[2.0.0]: https://github.com/php-http/httplug/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/php-http/httplug/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/php-http/httplug/compare/v1.0.0-RC1...v1.0.0 +[1.0.0-RC1]: https://github.com/php-http/httplug/compare/v1.0.0-beta...v1.0.0-RC1 +[1.0.0-beta]: https://github.com/php-http/httplug/compare/v1.0.0-alpha3...v1.0.0-beta +[1.0.0-alpha3]: https://github.com/php-http/httplug/compare/v1.0.0-alpha2...v1.0.0-alpha3 +[1.0.0-alpha2]: https://github.com/php-http/httplug/compare/v1.0.0-alpha...v1.0.0-alpha2 +[1.0.0-alpha]: https://github.com/php-http/httplug/compare/v0.1.0...v1.0.0-alpha diff --git a/tests/php_test_files/vendor/php-http/httplug/LICENSE b/tests/php_test_files/vendor/php-http/httplug/LICENSE new file mode 100644 index 0000000..8cd264c --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014 Eric GELOEN +Copyright (c) 2015 PHP HTTP Team + +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/php-http/httplug/README.md b/tests/php_test_files/vendor/php-http/httplug/README.md new file mode 100644 index 0000000..a9b476a --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/README.md @@ -0,0 +1,54 @@ +# HTTPlug + +[![Latest Version](https://img.shields.io/github/release/php-http/httplug.svg?style=flat-square)](https://github.com/php-http/httplug/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +[![Build Status](https://github.com/php-http/httplug/actions/workflows/ci.yml/badge.svg)](https://github.com/php-http/httplug/actions/workflows/ci.yml) +[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) +[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) +[![Total Downloads](https://img.shields.io/packagist/dt/php-http/httplug.svg?style=flat-square)](https://packagist.org/packages/php-http/httplug) + +[![Email](https://img.shields.io/badge/email-team@httplug.io-blue.svg?style=flat-square)](mailto:team@httplug.io) + +**HTTPlug, the HTTP client abstraction for PHP.** + + +## Intro + +HTTP client standard built on [PSR-7](http://www.php-fig.org/psr/psr-7/) HTTP +messages. The HttpAsyncClient defines an asynchronous HTTP client for PHP. + +This package also provides a synchronous HttpClient interface with the same +method signature as the [PSR-18](http://www.php-fig.org/psr/psr-18/) client. +For synchronous requests, we recommend using PSR-18 directly. + + +## History + +HTTPlug is the official successor of the [ivory http adapter](https://github.com/egeloen/ivory-http-adapter). +HTTPlug is a predecessor of [PSR-18](http://www.php-fig.org/psr/psr-18/) + + +## Install + +Via Composer + +``` bash +$ composer require php-http/httplug +``` + + +## Documentation + +Please see the [official documentation](http://docs.php-http.org). + + +## Testing + +``` bash +$ composer test +``` + + +## License + +The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/tests/php_test_files/vendor/php-http/httplug/composer.json b/tests/php_test_files/vendor/php-http/httplug/composer.json new file mode 100644 index 0000000..7391770 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/composer.json @@ -0,0 +1,40 @@ +{ + "name": "php-http/httplug", + "description": "HTTPlug, the HTTP client abstraction for PHP", + "keywords": [ + "http", + "client" + ], + "homepage": "http://httplug.io", + "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" + } + ], + "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" + }, + "autoload": { + "psr-4": { + "Http\\Client\\": "src/" + } + }, + "scripts": { + "test": "vendor/bin/phpspec run", + "test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/puli.json b/tests/php_test_files/vendor/php-http/httplug/puli.json new file mode 100644 index 0000000..4168331 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/puli.json @@ -0,0 +1,12 @@ +{ + "version": "1.0", + "name": "php-http/httplug", + "binding-types": { + "Http\\Client\\HttpAsyncClient": { + "description": "Async HTTP Client" + }, + "Http\\Client\\HttpClient": { + "description": "HTTP Client" + } + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/Exception.php b/tests/php_test_files/vendor/php-http/httplug/src/Exception.php new file mode 100644 index 0000000..4df164c --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/Exception.php @@ -0,0 +1,14 @@ + + */ +interface Exception extends PsrClientException +{ +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/Exception/HttpException.php b/tests/php_test_files/vendor/php-http/httplug/src/Exception/HttpException.php new file mode 100644 index 0000000..6c2a007 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/Exception/HttpException.php @@ -0,0 +1,65 @@ + + */ +class HttpException extends RequestException +{ + /** + * @var ResponseInterface + */ + protected $response; + + /** + * @param string $message + */ + public function __construct( + $message, + RequestInterface $request, + ResponseInterface $response, + \Exception $previous = null + ) { + parent::__construct($message, $request, $previous); + + $this->response = $response; + $this->code = $response->getStatusCode(); + } + + /** + * Returns the response. + * + * @return ResponseInterface + */ + public function getResponse() + { + return $this->response; + } + + /** + * Factory method to create a new exception with a normalized error message. + */ + public static function create( + RequestInterface $request, + ResponseInterface $response, + \Exception $previous = null + ) { + $message = sprintf( + '[url] %s [http method] %s [status code] %s [reason phrase] %s', + $request->getRequestTarget(), + $request->getMethod(), + $response->getStatusCode(), + $response->getReasonPhrase() + ); + + return new static($message, $request, $response, $previous); + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/Exception/NetworkException.php b/tests/php_test_files/vendor/php-http/httplug/src/Exception/NetworkException.php new file mode 100644 index 0000000..9b4f1e8 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/Exception/NetworkException.php @@ -0,0 +1,28 @@ + + */ +class NetworkException extends TransferException implements PsrNetworkException +{ + use RequestAwareTrait; + + /** + * @param string $message + */ + public function __construct($message, RequestInterface $request, \Exception $previous = null) + { + $this->setRequest($request); + + parent::__construct($message, 0, $previous); + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/Exception/RequestAwareTrait.php b/tests/php_test_files/vendor/php-http/httplug/src/Exception/RequestAwareTrait.php new file mode 100644 index 0000000..71b4bb8 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/Exception/RequestAwareTrait.php @@ -0,0 +1,26 @@ +request = $request; + } + + /** + * {@inheritdoc} + */ + public function getRequest(): RequestInterface + { + return $this->request; + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/Exception/RequestException.php b/tests/php_test_files/vendor/php-http/httplug/src/Exception/RequestException.php new file mode 100644 index 0000000..f6c60ce --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/Exception/RequestException.php @@ -0,0 +1,29 @@ + + */ +class RequestException extends TransferException implements PsrRequestException +{ + use RequestAwareTrait; + + /** + * @param string $message + */ + public function __construct($message, RequestInterface $request, \Exception $previous = null) + { + $this->setRequest($request); + + parent::__construct($message, 0, $previous); + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/Exception/TransferException.php b/tests/php_test_files/vendor/php-http/httplug/src/Exception/TransferException.php new file mode 100644 index 0000000..a858cf5 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/Exception/TransferException.php @@ -0,0 +1,14 @@ + + */ +class TransferException extends \RuntimeException implements Exception +{ +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/HttpAsyncClient.php b/tests/php_test_files/vendor/php-http/httplug/src/HttpAsyncClient.php new file mode 100644 index 0000000..c3b9d61 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/HttpAsyncClient.php @@ -0,0 +1,25 @@ + + */ +interface HttpAsyncClient +{ + /** + * Sends a PSR-7 request in an asynchronous way. + * + * Exceptions related to processing the request are available from the returned Promise. + * + * @return Promise resolves a PSR-7 Response or fails with an Http\Client\Exception + * + * @throws \Exception If processing the request is impossible (eg. bad configuration). + */ + public function sendAsyncRequest(RequestInterface $request); +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/HttpClient.php b/tests/php_test_files/vendor/php-http/httplug/src/HttpClient.php new file mode 100644 index 0000000..22b94aa --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/HttpClient.php @@ -0,0 +1,17 @@ +response = $response; + } + + /** + * {@inheritdoc} + */ + public function then(callable $onFulfilled = null, callable $onRejected = null) + { + if (null === $onFulfilled) { + return $this; + } + + try { + return new self($onFulfilled($this->response)); + } catch (Exception $e) { + return new HttpRejectedPromise($e); + } + } + + /** + * {@inheritdoc} + */ + public function getState() + { + return Promise::FULFILLED; + } + + /** + * {@inheritdoc} + */ + public function wait($unwrap = true) + { + if ($unwrap) { + return $this->response; + } + } +} diff --git a/tests/php_test_files/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php b/tests/php_test_files/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php new file mode 100644 index 0000000..624cc8a --- /dev/null +++ b/tests/php_test_files/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php @@ -0,0 +1,58 @@ +exception = $exception; + } + + /** + * {@inheritdoc} + */ + public function then(callable $onFulfilled = null, callable $onRejected = null) + { + if (null === $onRejected) { + return $this; + } + + try { + $result = $onRejected($this->exception); + if ($result instanceof Promise) { + return $result; + } + + return new HttpFulfilledPromise($result); + } catch (Exception $e) { + return new self($e); + } + } + + /** + * {@inheritdoc} + */ + public function getState() + { + return Promise::REJECTED; + } + + /** + * {@inheritdoc} + */ + public function wait($unwrap = true) + { + if ($unwrap) { + throw $this->exception; + } + } +} diff --git a/tests/php_test_files/vendor/php-http/message-factory/CHANGELOG.md b/tests/php_test_files/vendor/php-http/message-factory/CHANGELOG.md new file mode 100644 index 0000000..25f34f4 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/CHANGELOG.md @@ -0,0 +1,72 @@ +# Change Log + + +## 1.1.0 - 2023-04-14 + +### Changed + +- Allow `psr/http-message` v2 in addition to v1 +- Deprecate all interfaces in favor of [PSR-17](https://www.php-fig.org/psr/psr-17/) + +## 1.0.2 - 2015-12-19 + +### Added + +- Request and Response factory binding types to Puli + + +## 1.0.1 - 2015-12-17 + +### Added + +- Puli configuration and binding types + + +## 1.0.0 - 2015-12-15 + +### Added + +- Response Factory in order to be reused in Message and Server Message factories +- Request Factory + +### Changed + +- Message Factory extends Request and Response factories + + +## 1.0.0-RC1 - 2015-12-14 + +### Added + +- CS check + +### Changed + +- RuntimeException is thrown when the StreamFactory cannot write to the underlying stream + + +## 0.3.0 - 2015-11-16 + +### Removed + +- Client Context Factory +- Factory Awares and Templates + + +## 0.2.0 - 2015-11-16 + +### Changed + +- Reordered the parameters when creating a message to have the protocol last, +as its the least likely to need to be changed. + + +## 0.1.0 - 2015-06-01 + +### Added + +- Initial release + +### Changed + +- Helpers are renamed to templates diff --git a/tests/php_test_files/vendor/php-http/message-factory/CONTRIBUTING b/tests/php_test_files/vendor/php-http/message-factory/CONTRIBUTING new file mode 100644 index 0000000..841914a --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/CONTRIBUTING @@ -0,0 +1 @@ +Please see http://docs.php-http.org/en/latest/development/contributing.html diff --git a/tests/php_test_files/vendor/php-http/message-factory/LICENSE b/tests/php_test_files/vendor/php-http/message-factory/LICENSE new file mode 100644 index 0000000..4558d6f --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2016 PHP HTTP Team + +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/php-http/message-factory/README.md b/tests/php_test_files/vendor/php-http/message-factory/README.md new file mode 100644 index 0000000..6c3b745 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/README.md @@ -0,0 +1,42 @@ +# PSR-7 Message Factory + +[![Latest Version](https://img.shields.io/github/release/php-http/message-factory.svg?style=flat-square)](https://github.com/php-http/message-factory/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +[![Total Downloads](https://img.shields.io/packagist/dt/php-http/message-factory.svg?style=flat-square)](https://packagist.org/packages/php-http/message-factory) + +**Factory interfaces for PSR-7 HTTP Message.** + +## Obsolete + +The PHP-HTTP factories have become obsolete with the [PSR-17](https://www.php-fig.org/psr/psr-17/) factories standard. +All major HTTP client implementors provide [PSR-17 factories](https://packagist.org/packages/psr/http-factory). + +This package will remain available for the time being to not break legacy code, but we encourage everybody to move to PSR-17. + +## Install + +Via Composer + +``` bash +$ composer require php-http/message-factory +``` + + +## Documentation + +Please see the [official documentation](http://docs.php-http.org/en/latest/message/message-factory.html). + + +## Contributing + +Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). + + +## Security + +If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). + + +## License + +The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/tests/php_test_files/vendor/php-http/message-factory/composer.json b/tests/php_test_files/vendor/php-http/message-factory/composer.json new file mode 100644 index 0000000..57bdb4b --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/composer.json @@ -0,0 +1,27 @@ +{ + "name": "php-http/message-factory", + "description": "Factory interfaces for PSR-7 HTTP Message", + "license": "MIT", + "keywords": ["http", "factory", "message", "stream", "uri"], + "homepage": "http://php-http.org", + "authors": [ + { + "name": "Mรกrk Sรกgi-Kazรกr", + "email": "mark.sagikazar@gmail.com" + } + ], + "require": { + "php": ">=5.4", + "psr/http-message": "^1.0 || ^2.0" + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + } +} diff --git a/tests/php_test_files/vendor/php-http/message-factory/puli.json b/tests/php_test_files/vendor/php-http/message-factory/puli.json new file mode 100644 index 0000000..fac317b --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/puli.json @@ -0,0 +1,44 @@ +{ + "version": "1.0", + "name": "php-http/message-factory", + "binding-types": { + "Http\\Message\\MessageFactory": { + "description": "PSR-7 Message Factory", + "parameters": { + "depends": { + "description": "Optional class dependency which can be checked by consumers" + } + } + }, + "Http\\Message\\RequestFactory": { + "parameters": { + "depends": { + "description": "Optional class dependency which can be checked by consumers" + } + } + }, + "Http\\Message\\ResponseFactory": { + "parameters": { + "depends": { + "description": "Optional class dependency which can be checked by consumers" + } + } + }, + "Http\\Message\\StreamFactory": { + "description": "PSR-7 Stream Factory", + "parameters": { + "depends": { + "description": "Optional class dependency which can be checked by consumers" + } + } + }, + "Http\\Message\\UriFactory": { + "description": "PSR-7 URI Factory", + "parameters": { + "depends": { + "description": "Optional class dependency which can be checked by consumers" + } + } + } + } +} diff --git a/tests/php_test_files/vendor/php-http/message-factory/src/MessageFactory.php b/tests/php_test_files/vendor/php-http/message-factory/src/MessageFactory.php new file mode 100644 index 0000000..2ed7e45 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/src/MessageFactory.php @@ -0,0 +1,14 @@ + + * + * @deprecated since version 1.1, use Psr\Http\Message\RequestFactoryInterface and Psr\Http\Message\ResponseFactoryInterface instead. + */ +interface MessageFactory extends RequestFactory, ResponseFactory +{ +} diff --git a/tests/php_test_files/vendor/php-http/message-factory/src/RequestFactory.php b/tests/php_test_files/vendor/php-http/message-factory/src/RequestFactory.php new file mode 100644 index 0000000..09879f1 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/src/RequestFactory.php @@ -0,0 +1,36 @@ + + * + * @deprecated since version 1.1, use Psr\Http\Message\RequestFactoryInterface instead. + */ +interface RequestFactory +{ + /** + * Creates a new PSR-7 request. + * + * @param string $method + * @param string|UriInterface $uri + * @param array $headers + * @param resource|string|StreamInterface|null $body + * @param string $protocolVersion + * + * @return RequestInterface + */ + public function createRequest( + $method, + $uri, + array $headers = [], + $body = null, + $protocolVersion = '1.1' + ); +} diff --git a/tests/php_test_files/vendor/php-http/message-factory/src/ResponseFactory.php b/tests/php_test_files/vendor/php-http/message-factory/src/ResponseFactory.php new file mode 100644 index 0000000..eb9bde7 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/src/ResponseFactory.php @@ -0,0 +1,37 @@ + + * + * @deprecated since version 1.1, use Psr\Http\Message\ResponseFactoryInterface instead. + */ +interface ResponseFactory +{ + /** + * Creates a new PSR-7 response. + * + * @param int $statusCode + * @param string|null $reasonPhrase + * @param array $headers + * @param resource|string|StreamInterface|null $body + * @param string $protocolVersion + * + * @return ResponseInterface + */ + public function createResponse( + $statusCode = 200, + $reasonPhrase = null, + array $headers = [], + $body = null, + $protocolVersion = '1.1' + ); +} diff --git a/tests/php_test_files/vendor/php-http/message-factory/src/StreamFactory.php b/tests/php_test_files/vendor/php-http/message-factory/src/StreamFactory.php new file mode 100644 index 0000000..bd949a4 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/src/StreamFactory.php @@ -0,0 +1,27 @@ + + * + * @deprecated since version 1.1, use Psr\Http\Message\StreamFactoryInterface instead. + */ +interface StreamFactory +{ + /** + * Creates a new PSR-7 stream. + * + * @param string|resource|StreamInterface|null $body + * + * @return StreamInterface + * + * @throws \InvalidArgumentException if the stream body is invalid + * @throws \RuntimeException if creating the stream from $body fails + */ + public function createStream($body = null); +} diff --git a/tests/php_test_files/vendor/php-http/message-factory/src/UriFactory.php b/tests/php_test_files/vendor/php-http/message-factory/src/UriFactory.php new file mode 100644 index 0000000..96416b7 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/message-factory/src/UriFactory.php @@ -0,0 +1,26 @@ + + * + * @deprecated since version 1.1, use Psr\Http\Message\UriFactoryInterface instead. + */ +interface UriFactory +{ + /** + * Creates an PSR-7 URI. + * + * @param string|UriInterface $uri + * + * @return UriInterface + * + * @throws \InvalidArgumentException if the $uri argument can not be converted into a valid URI + */ + public function createUri($uri); +} diff --git a/tests/php_test_files/vendor/php-http/promise/CHANGELOG.md b/tests/php_test_files/vendor/php-http/promise/CHANGELOG.md new file mode 100644 index 0000000..b623368 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/CHANGELOG.md @@ -0,0 +1,70 @@ +# Change Log + +## 1.3.1 - 2024-03-15 + +- Made nullable parameter types explicit (PHP 8.4 compatibility) + +## 1.3.0 - 2024-01-04 + +### Fixed + +- Reverted generic annotations on promise - as `then` returns another promise, there seems no way to properly document this. + +## 1.2.1 - 2023-11-08 + +### Added + +- Fixed PHPDoc for `wait()` and `then()`'s `onRejected` callable + +## 1.2.0 - 2023-10-24 + +### Added + +- Generic annotations + +## 1.1.0 - 2020-07-07 + +### Added + +- Test with PHP 7.1, 7.2, 7.3, 7.4 and 8.0 + +### Removed + +- PHP 5 and 7.0 support + +### Fixed + +- Fixed PHPDoc for `Promise::then` + +## 1.0.0 - 2016-01-26 + +### Removed + +- PSR-7 dependency + + +## 1.0.0-RC1 - 2016-01-12 + +### Added + +- Tests for full coverage + +## Changed + +- Updated package files +- Clarified wait method behavior +- Contributing guide moved to the documentation + + +## 0.1.1 - 2015-12-24 + +## Added + +- Fulfilled and Rejected promise implementations + + +## 0.1.0 - 2015-12-13 + +## Added + +- Promise interface diff --git a/tests/php_test_files/vendor/php-http/promise/LICENSE b/tests/php_test_files/vendor/php-http/promise/LICENSE new file mode 100644 index 0000000..4558d6f --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2016 PHP HTTP Team + +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/php-http/promise/README.md b/tests/php_test_files/vendor/php-http/promise/README.md new file mode 100644 index 0000000..8ee4aa6 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/README.md @@ -0,0 +1,48 @@ +# Promise + +[![Latest Version](https://img.shields.io/github/release/php-http/promise.svg?style=flat-square)](https://github.com/php-http/promise/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +[![Build Status](https://github.com/php-http/promise/actions/workflows/tests.yml/badge.svg?branch=1.x)](https://github.com/php-http/promise/actions/workflows/tests.yml) +[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/promise.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/promise) +[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/promise.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/promise) +[![Total Downloads](https://img.shields.io/packagist/dt/php-http/promise.svg?style=flat-square)](https://packagist.org/packages/php-http/promise) + +**Promise used for asynchronous HTTP requests.** + +**Note:** This will eventually be removed/deprecated and replaced with the upcoming Promise PSR. + + +## Install + +Via Composer + +``` bash +$ composer require php-http/promise +``` + + +## Documentation + +Please see the [official documentation](http://docs.php-http.org/en/latest/components/promise.html). + + +## Testing + +``` bash +$ composer test +``` + + +## Contributing + +Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). + + +## Security + +If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). + + +## License + +The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/tests/php_test_files/vendor/php-http/promise/composer.json b/tests/php_test_files/vendor/php-http/promise/composer.json new file mode 100644 index 0000000..184fd60 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/composer.json @@ -0,0 +1,33 @@ +{ + "name": "php-http/promise", + "description": "Promise used for asynchronous HTTP requests", + "license": "MIT", + "keywords": ["promise"], + "homepage": "http://httplug.io", + "authors": [ + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + }, + { + "name": "Mรกrk Sรกgi-Kazรกr", + "email": "mark.sagikazar@gmail.com" + } + ], + "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" + }, + "autoload": { + "psr-4": { + "Http\\Promise\\": "src/" + } + }, + "scripts": { + "test": "vendor/bin/phpspec run", + "test-ci": "vendor/bin/phpspec run -c phpspec.yml.ci" + } +} diff --git a/tests/php_test_files/vendor/php-http/promise/phpstan.neon.dist b/tests/php_test_files/vendor/php-http/promise/phpstan.neon.dist new file mode 100644 index 0000000..f8b94cf --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/phpstan.neon.dist @@ -0,0 +1,6 @@ +parameters: + level: max + checkMissingIterableValueType: false + treatPhpDocTypesAsCertain: false + paths: + - src diff --git a/tests/php_test_files/vendor/php-http/promise/src/FulfilledPromise.php b/tests/php_test_files/vendor/php-http/promise/src/FulfilledPromise.php new file mode 100644 index 0000000..ed77d46 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/src/FulfilledPromise.php @@ -0,0 +1,51 @@ + + */ +final class FulfilledPromise implements Promise +{ + /** + * @var mixed + */ + private $result; + + /** + * @param mixed $result + */ + public function __construct($result) + { + $this->result = $result; + } + + public function then(?callable $onFulfilled = null, ?callable $onRejected = null) + { + if (null === $onFulfilled) { + return $this; + } + + try { + return new self($onFulfilled($this->result)); + } catch (\Exception $e) { + return new RejectedPromise($e); + } + } + + public function getState() + { + return Promise::FULFILLED; + } + + public function wait($unwrap = true) + { + if ($unwrap) { + return $this->result; + } + + return null; + } +} diff --git a/tests/php_test_files/vendor/php-http/promise/src/Promise.php b/tests/php_test_files/vendor/php-http/promise/src/Promise.php new file mode 100644 index 0000000..e240311 --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/src/Promise.php @@ -0,0 +1,69 @@ + + * @author Mรกrk Sรกgi-Kazรกr + */ +interface Promise +{ + /** + * Promise has not been fulfilled or rejected. + */ + const PENDING = 'pending'; + + /** + * Promise has been fulfilled. + */ + const FULFILLED = 'fulfilled'; + + /** + * Promise has been rejected. + */ + const REJECTED = 'rejected'; + + /** + * Adds behavior for when the promise is resolved or rejected (response will be available, or error happens). + * + * If you do not care about one of the cases, you can set the corresponding callable to null + * The callback will be called when the value arrived and never more than once. + * + * @param callable|null $onFulfilled called when a response will be available + * @param callable|null $onRejected called when an exception occurs + * + * @return Promise a new resolved promise with value of the executed callback (onFulfilled / onRejected) + */ + public function then(?callable $onFulfilled = null, ?callable $onRejected = null); + + /** + * Returns the state of the promise, one of PENDING, FULFILLED or REJECTED. + * + * @return string + */ + public function getState(); + + /** + * Wait for the promise to be fulfilled or rejected. + * + * When this method returns, the request has been resolved and if callables have been + * specified, the appropriate one has terminated. + * + * When $unwrap is true (the default), the response is returned, or the exception thrown + * on failure. Otherwise, nothing is returned or thrown. + * + * @param bool $unwrap Whether to return resolved value / throw reason or not + * + * @return ($unwrap is true ? mixed : null) Resolved value, null if $unwrap is set to false + * + * @throws \Throwable the rejection reason if $unwrap is set to true and the request failed + */ + public function wait($unwrap = true); +} diff --git a/tests/php_test_files/vendor/php-http/promise/src/RejectedPromise.php b/tests/php_test_files/vendor/php-http/promise/src/RejectedPromise.php new file mode 100644 index 0000000..8c046ce --- /dev/null +++ b/tests/php_test_files/vendor/php-http/promise/src/RejectedPromise.php @@ -0,0 +1,48 @@ + + */ +final class RejectedPromise implements Promise +{ + /** + * @var \Throwable + */ + private $exception; + + public function __construct(\Throwable $exception) + { + $this->exception = $exception; + } + + public function then(?callable $onFulfilled = null, ?callable $onRejected = null) + { + if (null === $onRejected) { + return $this; + } + + try { + return new FulfilledPromise($onRejected($this->exception)); + } catch (\Exception $e) { + return new self($e); + } + } + + public function getState() + { + return Promise::REJECTED; + } + + public function wait($unwrap = true) + { + if ($unwrap) { + throw $this->exception; + } + + return null; + } +} diff --git a/tests/php_test_files/vendor/psr/container/.gitignore b/tests/php_test_files/vendor/psr/container/.gitignore new file mode 100644 index 0000000..b2395aa --- /dev/null +++ b/tests/php_test_files/vendor/psr/container/.gitignore @@ -0,0 +1,3 @@ +composer.lock +composer.phar +/vendor/ diff --git a/tests/php_test_files/vendor/psr/container/LICENSE b/tests/php_test_files/vendor/psr/container/LICENSE new file mode 100644 index 0000000..2877a48 --- /dev/null +++ b/tests/php_test_files/vendor/psr/container/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2016 container-interop +Copyright (c) 2016 PHP Framework Interoperability Group + +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/psr/container/README.md b/tests/php_test_files/vendor/psr/container/README.md new file mode 100644 index 0000000..1b9d9e5 --- /dev/null +++ b/tests/php_test_files/vendor/psr/container/README.md @@ -0,0 +1,13 @@ +Container interface +============== + +This repository holds all interfaces related to [PSR-11 (Container Interface)][psr-url]. + +Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container. + +The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. + +[psr-url]: https://www.php-fig.org/psr/psr-11/ +[package-url]: https://packagist.org/packages/psr/container +[implementation-url]: https://packagist.org/providers/psr/container-implementation + diff --git a/tests/php_test_files/vendor/psr/container/composer.json b/tests/php_test_files/vendor/psr/container/composer.json new file mode 100644 index 0000000..baf6cd1 --- /dev/null +++ b/tests/php_test_files/vendor/psr/container/composer.json @@ -0,0 +1,27 @@ +{ + "name": "psr/container", + "type": "library", + "description": "Common Container Interface (PHP FIG PSR-11)", + "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"], + "homepage": "https://github.com/php-fig/container", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "require": { + "php": ">=7.4.0" + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + } +} diff --git a/tests/php_test_files/vendor/psr/container/src/ContainerExceptionInterface.php b/tests/php_test_files/vendor/psr/container/src/ContainerExceptionInterface.php new file mode 100644 index 0000000..0f213f2 --- /dev/null +++ b/tests/php_test_files/vendor/psr/container/src/ContainerExceptionInterface.php @@ -0,0 +1,12 @@ +=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/tests/php_test_files/vendor/psr/http-factory/src/RequestFactoryInterface.php b/tests/php_test_files/vendor/psr/http-factory/src/RequestFactoryInterface.php new file mode 100644 index 0000000..cb39a08 --- /dev/null +++ b/tests/php_test_files/vendor/psr/http-factory/src/RequestFactoryInterface.php @@ -0,0 +1,18 @@ + `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. +> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. + diff --git a/tests/php_test_files/vendor/psr/http-message/docs/PSR7-Usage.md b/tests/php_test_files/vendor/psr/http-message/docs/PSR7-Usage.md new file mode 100644 index 0000000..b6d048a --- /dev/null +++ b/tests/php_test_files/vendor/psr/http-message/docs/PSR7-Usage.md @@ -0,0 +1,159 @@ +### PSR-7 Usage + +All PSR-7 applications comply with these interfaces +They were created to establish a standard between middleware implementations. + +> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. +> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. + + +The following examples will illustrate how basic operations are done in PSR-7. + +##### Examples + + +For this examples to work (at least) a PSR-7 implementation package is required. (eg: zendframework/zend-diactoros, guzzlehttp/psr7, slim/slim, etc) +All PSR-7 implementations should have the same behaviour. + +The following will be assumed: +`$request` is an object of `Psr\Http\Message\RequestInterface` and + +`$response` is an object implementing `Psr\Http\Message\RequestInterface` + + +### Working with HTTP Headers + +#### Adding headers to response: + +```php +$response->withHeader('My-Custom-Header', 'My Custom Message'); +``` + +#### Appending values to headers + +```php +$response->withAddedHeader('My-Custom-Header', 'The second message'); +``` + +#### Checking if header exists: + +```php +$request->hasHeader('My-Custom-Header'); // will return false +$response->hasHeader('My-Custom-Header'); // will return true +``` + +> Note: My-Custom-Header was only added in the Response + +#### Getting comma-separated values from a header (also applies to request) + +```php +// getting value from request headers +$request->getHeaderLine('Content-Type'); // will return: "text/html; charset=UTF-8" +// getting value from response headers +$response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Message; The second message" +``` + +#### Getting array of value from a header (also applies to request) +```php +// getting value from request headers +$request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"] +// getting value from response headers +$response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"] +``` + +#### Removing headers from HTTP Messages +```php +// removing a header from Request, removing deprecated "Content-MD5" header +$request->withoutHeader('Content-MD5'); + +// removing a header from Response +// effect: the browser won't know the size of the stream +// the browser will download the stream till it ends +$response->withoutHeader('Content-Length'); +``` + +### Working with HTTP Message Body + +When working with the PSR-7 there are two methods of implementation: +#### 1. Getting the body separately + +> This method makes the body handling easier to understand and is useful when repeatedly calling body methods. (You only call `getBody()` once). Using this method mistakes like `$response->write()` are also prevented. + +```php +$body = $response->getBody(); +// operations on body, eg. read, write, seek +// ... +// replacing the old body +$response->withBody($body); +// this last statement is optional as we working with objects +// in this case the "new" body is same with the "old" one +// the $body variable has the same value as the one in $request, only the reference is passed +``` + +#### 2. Working directly on response + +> This method is useful when only performing few operations as the `$request->getBody()` statement fragment is required + +```php +$response->getBody()->write('hello'); +``` + +### Getting the body contents + +The following snippet gets the contents of a stream contents. +> Note: Streams must be rewinded, if content was written into streams, it will be ignored when calling `getContents()` because the stream pointer is set to the last character, which is `\0` - meaning end of stream. +```php +$body = $response->getBody(); +$body->rewind(); // or $body->seek(0); +$bodyText = $body->getContents(); +``` +> Note: If `$body->seek(1)` is called before `$body->getContents()`, the first character will be ommited as the starting pointer is set to `1`, not `0`. This is why using `$body->rewind()` is recommended. + +### Append to body + +```php +$response->getBody()->write('Hello'); // writing directly +$body = $request->getBody(); // which is a `StreamInterface` +$body->write('xxxxx'); +``` + +### Prepend to body +Prepending is different when it comes to streams. The content must be copied before writing the content to be prepended. +The following example will explain the behaviour of streams. + +```php +// assuming our response is initially empty +$body = $repsonse->getBody(); +// writing the string "abcd" +$body->write('abcd'); + +// seeking to start of stream +$body->seek(0); +// writing 'ef' +$body->write('ef'); // at this point the stream contains "efcd" +``` + +#### Prepending by rewriting separately + +```php +// assuming our response body stream only contains: "abcd" +$body = $response->getBody(); +$body->rewind(); +$contents = $body->getContents(); // abcd +// seeking the stream to beginning +$body->rewind(); +$body->write('ef'); // stream contains "efcd" +$body->write($contents); // stream contains "efabcd" +``` + +> Note: `getContents()` seeks the stream while reading it, therefore if the second `rewind()` method call was not present the stream would have resulted in `abcdefabcd` because the `write()` method appends to stream if not preceeded by `rewind()` or `seek(0)`. + +#### Prepending by using contents as a string +```php +$body = $response->getBody(); +$body->rewind(); +$contents = $body->getContents(); // efabcd +$contents = 'ef'.$contents; +$body->rewind(); +$body->write($contents); +``` diff --git a/tests/php_test_files/vendor/psr/http-message/src/MessageInterface.php b/tests/php_test_files/vendor/psr/http-message/src/MessageInterface.php new file mode 100644 index 0000000..8cdb4ed --- /dev/null +++ b/tests/php_test_files/vendor/psr/http-message/src/MessageInterface.php @@ -0,0 +1,189 @@ +getHeaders() as $name => $values) { + * echo $name . ": " . implode(", ", $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * While header names are not case-sensitive, getHeaders() will preserve the + * exact case in which headers were originally specified. + * + * @return string[][] Returns an associative array of the message's headers. Each + * key MUST be a header name, and each value MUST be an array of strings + * for that header. + */ + public function getHeaders(); + + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function hasHeader(string $name); + + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function getHeader(string $name); + + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function getHeaderLine(string $name); + + /** + * Return an instance with the provided value replacing the specified header. + * + * While header names are case-insensitive, the casing of the header will + * be preserved by this function, and returned from getHeaders(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withHeader(string $name, $value); + + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * @param string $name Case-insensitive header field name to add. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withAddedHeader(string $name, $value); + + /** + * Return an instance without the specified header. + * + * Header resolution MUST be done without case-sensitivity. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * @param string $name Case-insensitive header field name to remove. + * @return static + */ + public function withoutHeader(string $name); + + /** + * Gets the body of the message. + * + * @return StreamInterface Returns the body as a stream. + */ + public function getBody(); + + /** + * Return an instance with the specified message body. + * + * The body MUST be a StreamInterface object. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return a new instance that has the + * new body stream. + * + * @param StreamInterface $body Body. + * @return static + * @throws \InvalidArgumentException When the body is not valid. + */ + public function withBody(StreamInterface $body); +} diff --git a/tests/php_test_files/vendor/psr/http-message/src/RequestInterface.php b/tests/php_test_files/vendor/psr/http-message/src/RequestInterface.php new file mode 100644 index 0000000..38066df --- /dev/null +++ b/tests/php_test_files/vendor/psr/http-message/src/RequestInterface.php @@ -0,0 +1,131 @@ +getQuery()` + * or from the `QUERY_STRING` server param. + * + * @return array + */ + public function getQueryParams(); + + /** + * Return an instance with the specified query string arguments. + * + * These values SHOULD remain immutable over the course of the incoming + * request. They MAY be injected during instantiation, such as from PHP's + * $_GET superglobal, or MAY be derived from some other value such as the + * URI. In cases where the arguments are parsed from the URI, the data + * MUST be compatible with what PHP's parse_str() would return for + * purposes of how duplicate query parameters are handled, and how nested + * sets are handled. + * + * Setting query string arguments MUST NOT change the URI stored by the + * request, nor the values in the server params. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated query string arguments. + * + * @param array $query Array of query string arguments, typically from + * $_GET. + * @return static + */ + public function withQueryParams(array $query); + + /** + * Retrieve normalized file upload data. + * + * This method returns upload metadata in a normalized tree, with each leaf + * an instance of Psr\Http\Message\UploadedFileInterface. + * + * These values MAY be prepared from $_FILES or the message body during + * instantiation, or MAY be injected via withUploadedFiles(). + * + * @return array An array tree of UploadedFileInterface instances; an empty + * array MUST be returned if no data is present. + */ + public function getUploadedFiles(); + + /** + * Create a new instance with the specified uploaded files. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static + * @throws \InvalidArgumentException if an invalid structure is provided. + */ + public function withUploadedFiles(array $uploadedFiles); + + /** + * Retrieve any parameters provided in the request body. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, this method MUST + * return the contents of $_POST. + * + * Otherwise, this method may return any results of deserializing + * the request body content; as parsing returns structured content, the + * potential types MUST be arrays or objects only. A null value indicates + * the absence of body content. + * + * @return null|array|object The deserialized body parameters, if any. + * These will typically be an array or object. + */ + public function getParsedBody(); + + /** + * Return an instance with the specified body parameters. + * + * These MAY be injected during instantiation. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, use this method + * ONLY to inject the contents of $_POST. + * + * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of + * deserializing the request body content. Deserialization/parsing returns + * structured data, and, as such, this method ONLY accepts arrays or objects, + * or a null value if nothing was available to parse. + * + * As an example, if content negotiation determines that the request data + * is a JSON payload, this method could be used to create a request + * instance with the deserialized parameters. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param null|array|object $data The deserialized body data. This will + * typically be in an array or object. + * @return static + * @throws \InvalidArgumentException if an unsupported argument type is + * provided. + */ + public function withParsedBody($data); + + /** + * Retrieve attributes derived from the request. + * + * The request "attributes" may be used to allow injection of any + * parameters derived from the request: e.g., the results of path + * match operations; the results of decrypting cookies; the results of + * deserializing non-form-encoded message bodies; etc. Attributes + * will be application and request specific, and CAN be mutable. + * + * @return array Attributes derived from the request. + */ + public function getAttributes(); + + /** + * Retrieve a single derived request attribute. + * + * Retrieves a single derived request attribute as described in + * getAttributes(). If the attribute has not been previously set, returns + * the default value as provided. + * + * This method obviates the need for a hasAttribute() method, as it allows + * specifying a default value to return if the attribute is not found. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $default Default value to return if the attribute does not exist. + * @return mixed + */ + public function getAttribute(string $name, $default = null); + + /** + * Return an instance with the specified derived request attribute. + * + * This method allows setting a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $value The value of the attribute. + * @return static + */ + public function withAttribute(string $name, $value); + + /** + * Return an instance that removes the specified derived request attribute. + * + * This method allows removing a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @return static + */ + public function withoutAttribute(string $name); +} diff --git a/tests/php_test_files/vendor/psr/http-message/src/StreamInterface.php b/tests/php_test_files/vendor/psr/http-message/src/StreamInterface.php new file mode 100644 index 0000000..5924663 --- /dev/null +++ b/tests/php_test_files/vendor/psr/http-message/src/StreamInterface.php @@ -0,0 +1,160 @@ + + * [user-info@]host[:port] + * + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(); + + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(); + + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(); + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(); + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(); + + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(); + + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(); + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme(string $scheme); + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo(string $user, ?string $password = null); + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost(string $host); + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort(?int $port); + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath(string $path); + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery(string $query); + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment(string $fragment); + + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(); +} diff --git a/tests/php_test_files/vendor/psr/log/LICENSE b/tests/php_test_files/vendor/psr/log/LICENSE new file mode 100644 index 0000000..474c952 --- /dev/null +++ b/tests/php_test_files/vendor/psr/log/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 PHP Framework Interoperability Group + +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/psr/log/README.md b/tests/php_test_files/vendor/psr/log/README.md new file mode 100644 index 0000000..a9f20c4 --- /dev/null +++ b/tests/php_test_files/vendor/psr/log/README.md @@ -0,0 +1,58 @@ +PSR Log +======= + +This repository holds all interfaces/classes/traits related to +[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). + +Note that this is not a logger of its own. It is merely an interface that +describes a logger. See the specification for more details. + +Installation +------------ + +```bash +composer require psr/log +``` + +Usage +----- + +If you need a logger, you can use the interface like this: + +```php +logger = $logger; + } + + public function doSomething() + { + if ($this->logger) { + $this->logger->info('Doing work'); + } + + try { + $this->doSomethingElse(); + } catch (Exception $exception) { + $this->logger->error('Oh no!', array('exception' => $exception)); + } + + // do something useful + } +} +``` + +You can then pick one of the implementations of the interface to get a logger. + +If you want to implement the interface, you can require this package and +implement `Psr\Log\LoggerInterface` in your code. Please read the +[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) +for details. diff --git a/tests/php_test_files/vendor/psr/log/composer.json b/tests/php_test_files/vendor/psr/log/composer.json new file mode 100644 index 0000000..879fc6f --- /dev/null +++ b/tests/php_test_files/vendor/psr/log/composer.json @@ -0,0 +1,26 @@ +{ + "name": "psr/log", + "description": "Common interface for logging libraries", + "keywords": ["psr", "psr-3", "log"], + "homepage": "https://github.com/php-fig/log", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "require": { + "php": ">=8.0.0" + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + } +} diff --git a/tests/php_test_files/vendor/psr/log/src/AbstractLogger.php b/tests/php_test_files/vendor/psr/log/src/AbstractLogger.php new file mode 100644 index 0000000..d60a091 --- /dev/null +++ b/tests/php_test_files/vendor/psr/log/src/AbstractLogger.php @@ -0,0 +1,15 @@ +logger = $logger; + } +} diff --git a/tests/php_test_files/vendor/psr/log/src/LoggerInterface.php b/tests/php_test_files/vendor/psr/log/src/LoggerInterface.php new file mode 100644 index 0000000..b3a24b5 --- /dev/null +++ b/tests/php_test_files/vendor/psr/log/src/LoggerInterface.php @@ -0,0 +1,125 @@ +log(LogLevel::EMERGENCY, $message, $context); + } + + /** + * Action must be taken immediately. + * + * Example: Entire website down, database unavailable, etc. This should + * trigger the SMS alerts and wake you up. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void + */ + public function alert(string|\Stringable $message, array $context = []): void + { + $this->log(LogLevel::ALERT, $message, $context); + } + + /** + * Critical conditions. + * + * Example: Application component unavailable, unexpected exception. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void + */ + public function critical(string|\Stringable $message, array $context = []): void + { + $this->log(LogLevel::CRITICAL, $message, $context); + } + + /** + * Runtime errors that do not require immediate action but should typically + * be logged and monitored. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void + */ + public function error(string|\Stringable $message, array $context = []): void + { + $this->log(LogLevel::ERROR, $message, $context); + } + + /** + * Exceptional occurrences that are not errors. + * + * Example: Use of deprecated APIs, poor use of an API, undesirable things + * that are not necessarily wrong. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void + */ + public function warning(string|\Stringable $message, array $context = []): void + { + $this->log(LogLevel::WARNING, $message, $context); + } + + /** + * Normal but significant events. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void + */ + public function notice(string|\Stringable $message, array $context = []): void + { + $this->log(LogLevel::NOTICE, $message, $context); + } + + /** + * Interesting events. + * + * Example: User logs in, SQL logs. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void + */ + public function info(string|\Stringable $message, array $context = []): void + { + $this->log(LogLevel::INFO, $message, $context); + } + + /** + * Detailed debug information. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void + */ + public function debug(string|\Stringable $message, array $context = []): void + { + $this->log(LogLevel::DEBUG, $message, $context); + } + + /** + * Logs with an arbitrary level. + * + * @param mixed $level + * @param string|\Stringable $message + * @param array $context + * + * @return void + * + * @throws \Psr\Log\InvalidArgumentException + */ + abstract public function log($level, string|\Stringable $message, array $context = []): void; +} diff --git a/tests/php_test_files/vendor/psr/log/src/NullLogger.php b/tests/php_test_files/vendor/psr/log/src/NullLogger.php new file mode 100644 index 0000000..c1cc3c0 --- /dev/null +++ b/tests/php_test_files/vendor/psr/log/src/NullLogger.php @@ -0,0 +1,30 @@ +logger) { }` + * blocks. + */ +class NullLogger extends AbstractLogger +{ + /** + * Logs with an arbitrary level. + * + * @param mixed $level + * @param string|\Stringable $message + * @param array $context + * + * @return void + * + * @throws \Psr\Log\InvalidArgumentException + */ + public function log($level, string|\Stringable $message, array $context = []): void + { + // noop + } +} diff --git a/tests/php_test_files/vendor/psr/simple-cache/.editorconfig b/tests/php_test_files/vendor/psr/simple-cache/.editorconfig new file mode 100644 index 0000000..48542cb --- /dev/null +++ b/tests/php_test_files/vendor/psr/simple-cache/.editorconfig @@ -0,0 +1,12 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/tests/php_test_files/vendor/psr/simple-cache/LICENSE.md b/tests/php_test_files/vendor/psr/simple-cache/LICENSE.md new file mode 100644 index 0000000..e49a7c8 --- /dev/null +++ b/tests/php_test_files/vendor/psr/simple-cache/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +Copyright (c) 2016 PHP Framework Interoperability Group + +> 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/psr/simple-cache/README.md b/tests/php_test_files/vendor/psr/simple-cache/README.md new file mode 100644 index 0000000..43641d1 --- /dev/null +++ b/tests/php_test_files/vendor/psr/simple-cache/README.md @@ -0,0 +1,8 @@ +PHP FIG Simple Cache PSR +======================== + +This repository holds all interfaces related to PSR-16. + +Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details. + +You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package. diff --git a/tests/php_test_files/vendor/psr/simple-cache/composer.json b/tests/php_test_files/vendor/psr/simple-cache/composer.json new file mode 100644 index 0000000..f307a84 --- /dev/null +++ b/tests/php_test_files/vendor/psr/simple-cache/composer.json @@ -0,0 +1,25 @@ +{ + "name": "psr/simple-cache", + "description": "Common interfaces for simple caching", + "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"], + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "require": { + "php": ">=8.0.0" + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + } +} diff --git a/tests/php_test_files/vendor/psr/simple-cache/src/CacheException.php b/tests/php_test_files/vendor/psr/simple-cache/src/CacheException.php new file mode 100644 index 0000000..f61b24c --- /dev/null +++ b/tests/php_test_files/vendor/psr/simple-cache/src/CacheException.php @@ -0,0 +1,10 @@ + $keys A list of keys that can be obtained in a single operation. + * @param mixed $default Default value to return for keys that do not exist. + * + * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function getMultiple(iterable $keys, mixed $default = null): iterable; + + /** + * Persists a set of key => value pairs in the cache, with an optional TTL. + * + * @param iterable $values A list of key => value pairs for a multiple-set operation. + * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $values is neither an array nor a Traversable, + * or if any of the $values are not a legal value. + */ + public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool; + + /** + * Deletes multiple cache items in a single operation. + * + * @param iterable $keys A list of string-based keys to be deleted. + * + * @return bool True if the items were successfully removed. False if there was an error. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function deleteMultiple(iterable $keys): bool; + + /** + * Determines whether an item is present in the cache. + * + * NOTE: It is recommended that has() is only to be used for cache warming type purposes + * and not to be used within your live applications operations for get/set, as this method + * is subject to a race condition where your has() will return true and immediately after, + * another script can remove it making the state of your app out of date. + * + * @param string $key The cache item key. + * + * @return bool + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function has(string $key): bool; +} diff --git a/tests/php_test_files/vendor/psr/simple-cache/src/InvalidArgumentException.php b/tests/php_test_files/vendor/psr/simple-cache/src/InvalidArgumentException.php new file mode 100644 index 0000000..6a9524a --- /dev/null +++ b/tests/php_test_files/vendor/psr/simple-cache/src/InvalidArgumentException.php @@ -0,0 +1,13 @@ += 5.3. + +[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) +[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) +[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) + + +This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). + +## Install + +For PHP version **`>= 5.6`**: + +``` +composer require ralouphie/getallheaders +``` + +For PHP version **`< 5.6`**: + +``` +composer require ralouphie/getallheaders "^2" +``` diff --git a/tests/php_test_files/vendor/ralouphie/getallheaders/composer.json b/tests/php_test_files/vendor/ralouphie/getallheaders/composer.json new file mode 100644 index 0000000..de8ce62 --- /dev/null +++ b/tests/php_test_files/vendor/ralouphie/getallheaders/composer.json @@ -0,0 +1,26 @@ +{ + "name": "ralouphie/getallheaders", + "description": "A polyfill for getallheaders.", + "license": "MIT", + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5 || ^6.5", + "php-coveralls/php-coveralls": "^2.1" + }, + "autoload": { + "files": ["src/getallheaders.php"] + }, + "autoload-dev": { + "psr-4": { + "getallheaders\\Tests\\": "tests/" + } + } +} diff --git a/tests/php_test_files/vendor/ralouphie/getallheaders/src/getallheaders.php b/tests/php_test_files/vendor/ralouphie/getallheaders/src/getallheaders.php new file mode 100644 index 0000000..c7285a5 --- /dev/null +++ b/tests/php_test_files/vendor/ralouphie/getallheaders/src/getallheaders.php @@ -0,0 +1,46 @@ + 'Content-Type', + 'CONTENT_LENGTH' => 'Content-Length', + 'CONTENT_MD5' => 'Content-Md5', + ); + + foreach ($_SERVER as $key => $value) { + if (substr($key, 0, 5) === 'HTTP_') { + $key = substr($key, 5); + if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { + $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); + $headers[$key] = $value; + } + } elseif (isset($copy_server[$key])) { + $headers[$copy_server[$key]] = $value; + } + } + + if (!isset($headers['Authorization'])) { + if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { + $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; + } elseif (isset($_SERVER['PHP_AUTH_USER'])) { + $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; + $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); + } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { + $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; + } + } + + return $headers; + } + +} diff --git a/tests/php_test_files/vendor/ramsey/collection/LICENSE b/tests/php_test_files/vendor/ramsey/collection/LICENSE new file mode 100644 index 0000000..a7fcf12 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2022 Ben Ramsey + +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/ramsey/collection/README.md b/tests/php_test_files/vendor/ramsey/collection/README.md new file mode 100644 index 0000000..c77ffcb --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/README.md @@ -0,0 +1,70 @@ +

    ramsey/collection

    + +

    + A PHP library for representing and manipulating collections. +

    + +

    + Source Code + Download Package + PHP Programming Language + Read License + Build Status + Codecov Code Coverage + Psalm Type Coverage +

    + +## About + +ramsey/collection is a PHP library for representing and manipulating collections. + +Much inspiration for this library came from the [Java Collections Framework][java]. + +This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). +By participating in this project and its community, you are expected to +uphold this code. + +## Installation + +Install this package as a dependency using [Composer](https://getcomposer.org). + +``` bash +composer require ramsey/collection +``` + +## Usage + +Examples of how to use this library may be found in the +[Wiki pages](https://github.com/ramsey/collection/wiki/Examples). + +## Contributing + +Contributions are welcome! To contribute, please familiarize yourself with +[CONTRIBUTING.md](CONTRIBUTING.md). + +## Coordinated Disclosure + +Keeping user information safe and secure is a top priority, and we welcome the +contribution of external security researchers. If you believe you've found a +security issue in software that is maintained in this repository, please read +[SECURITY.md][] for instructions on submitting a vulnerability report. + +## ramsey/collection for Enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of ramsey/collection and thousands of other packages are working +with Tidelift to deliver commercial support and maintenance for the open source +packages you use to build your applications. Save time, reduce risk, and improve +code health, while paying the maintainers of the exact packages you use. +[Learn more.](https://tidelift.com/subscription/pkg/packagist-ramsey-collection?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +## Copyright and License + +The ramsey/collection library is copyright ยฉ [Ben Ramsey](https://benramsey.com) +and licensed for use under the terms of the +MIT License (MIT). Please see [LICENSE](LICENSE) for more information. + + +[java]: http://docs.oracle.com/javase/8/docs/technotes/guides/collections/index.html +[security.md]: https://github.com/ramsey/collection/blob/main/SECURITY.md diff --git a/tests/php_test_files/vendor/ramsey/collection/SECURITY.md b/tests/php_test_files/vendor/ramsey/collection/SECURITY.md new file mode 100644 index 0000000..3de4c0c --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/SECURITY.md @@ -0,0 +1,169 @@ + + +# Vulnerability Disclosure Policy (VDP) + +## Brand Promise + + + +Keeping user information safe and secure is a top priority, and we welcome the +contribution of external security researchers. + +## Scope + + + +If you believe you've found a security issue in software that is maintained in +this repository, we encourage you to notify us. + +| Version | In scope | Source code | +| ------- | :------: | ----------- | +| latest | โœ… | https://github.com/ramsey/collection | + +## How to Submit a Report + + + +To submit a vulnerability report, please contact us at security@ramsey.dev. +Your submission will be reviewed and validated by a member of our team. + +## Safe Harbor + + + +We support safe harbor for security researchers who: + +* Make a good faith effort to avoid privacy violations, destruction of data, and + interruption or degradation of our services. +* Only interact with accounts you own or with explicit permission of the account + holder. If you do encounter Personally Identifiable Information (PII) contact + us immediately, do not proceed with access, and immediately purge any local + information. +* Provide us with a reasonable amount of time to resolve vulnerabilities prior + to any disclosure to the public or a third party. + +We will consider activities conducted consistent with this policy to constitute +"authorized" conduct and will not pursue civil action or initiate a complaint to +law enforcement. We will help to the extent we can if legal action is initiated +by a third party against you. + +Please submit a report to us before engaging in conduct that may be inconsistent +with or unaddressed by this policy. + +## Preferences + + + +* Please provide detailed reports with reproducible steps and a clearly defined + impact. +* Include the version number of the vulnerable package in your report +* Social engineering (e.g. phishing, vishing, smishing) is prohibited. + + + +## Encryption Key for security@ramsey.dev + +For increased privacy when reporting sensitive issues, you may encrypt your +message using the following public key: + +``` +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF+Z9gEBEACbT/pIx8RR0K18t8Z2rDnmEV44YdT7HNsMdq+D6SAlx8UUb6AU +jGIbV9dgBgGNtOLU1pxloaJwL9bWIRbj+X/Qb2WNIP//Vz1Y40ox1dSpfCUrizXx +kb4p58Xml0PsB8dg3b4RDUgKwGC37ne5xmDnigyJPbiB2XJ6Xc46oPCjh86XROTK +wEBB2lY67ClBlSlvC2V9KmbTboRQkLdQDhOaUosMb99zRb0EWqDLaFkZVjY5HI7i +0pTveE6dI12NfHhTwKjZ5pUiAZQGlKA6J1dMjY2unxHZkQj5MlMfrLSyJHZxccdJ +xD94T6OTcTHt/XmMpI2AObpewZDdChDQmcYDZXGfAhFoJmbvXsmLMGXKgzKoZ/ls +RmLsQhh7+/r8E+Pn5r+A6Hh4uAc14ApyEP0ckKeIXw1C6pepHM4E8TEXVr/IA6K/ +z6jlHORixIFX7iNOnfHh+qwOgZw40D6JnBfEzjFi+T2Cy+JzN2uy7I8UnecTMGo3 +5t6astPy6xcH6kZYzFTV7XERR6LIIVyLAiMFd8kF5MbJ8N5ElRFsFHPW+82N2HDX +c60iSaTB85k6R6xd8JIKDiaKE4sSuw2wHFCKq33d/GamYezp1wO+bVUQg88efljC +2JNFyD+vl30josqhw1HcmbE1TP3DlYeIL5jQOlxCMsgai6JtTfHFM/5MYwARAQAB +tBNzZWN1cml0eUByYW1zZXkuZGV2iQJUBBMBCAA+FiEE4drPD+/ofZ570fAYq0bv +vXQCywIFAl+Z9gECGwMFCQeGH4AFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ +q0bvvXQCywIkEA//Qcwv8MtTCy01LHZd9c7VslwhNdXQDYymcTyjcYw8x7O22m4B +3hXE6vqAplFhVxxkqXB2ef0tQuzxhPHNJgkCE4Wq4i+V6qGpaSVHQT2W6DN/NIhL +vS8OdScc6zddmIbIkSrzVVAtjwehFNEIrX3DnbbbK+Iku7vsKT5EclOluIsjlYoX +goW8IeReyDBqOe2H3hoCGw6EA0D/NYV2bJnfy53rXVIyarsXXeOLp7eNEH6Td7aW +PVSrMZJe1t+knrEGnEdrXWzlg4lCJJCtemGv+pKBUomnyISXSdqyoRCCzvQjqyig +2kRebUX8BXPW33p4OXPj9sIboUOjZwormWwqqbFMO+J4TiVCUoEoheI7emPFRcNN +QtPJrjbY1++OznBc0GRpfeUkGoU1cbRl1bnepnFIZMTDLkrVW6I1Y4q8ZVwX3BkE +N81ctFrRpHBlU36EdHvjPQmGtuiL77Qq3fWmMv7yTvK1wHJAXfEb0ZJWHZCbck3w +l0CVq0Z+UUAOM8Rp1N0N8m92xtapav0qCFU9qzf2J5qX6GRmWv+d29wPgFHzDWBm +nnrYYIA4wJLx00U6SMcVBSnNe91B+RfGY5XQhbWPjQQecOGCSDsxaFAq2MeOVJyZ +bIjLYfG9GxoLKr5R7oLRJvZI4nKKBc1Kci/crZbdiSdQhSQGlDz88F1OHeCIdQQQ +EQgAHRYhBOhdAxHd+lus86YQ57Atl5icjAcbBQJfmfdIAAoJELAtl5icjAcbFVcA +/1LqB3ZjsnXDAvvAXZVjSPqofSlpMLeRQP6IM/A9Odq0AQCZrtZc1knOMGEcjppK +Rk+sy/R0Mshy8TDuaZIRgh2Ux7kCDQRfmfYBARAAmchKzzVz7IaEq7PnZDb3szQs +T/+E9F3m39yOpV4fEB1YzObonFakXNT7Gw2tZEx0eitUMqQ/13jjfu3UdzlKl2bR +qA8LrSQRhB+PTC9A1XvwxCUYhhjGiLzJ9CZL6hBQB43qHOmE9XJPme90geLsF+gK +u39Waj1SNWzwGg+Gy1Gl5f2AJoDTxznreCuFGj+Vfaczt/hlfgqpOdb9jsmdoE7t +3DSWppA9dRHWwQSgE6J28rR4QySBcqyXS6IMykqaJn7Z26yNIaITLnHCZOSY8zhP +ha7GFsN549EOCgECbrnPt9dmI2+hQE0RO0e7SOBNsIf5sz/i7urhwuj0CbOqhjc2 +X1AEVNFCVcb6HPi/AWefdFCRu0gaWQxn5g+9nkq5slEgvzCCiKYzaBIcr8qR6Hb4 +FaOPVPxO8vndRouq57Ws8XpAwbPttioFuCqF4u9K+tK/8e2/R8QgRYJsE3Cz/Fu8 ++pZFpMnqbDEbK3DL3ss+1ed1sky+mDV8qXXeI33XW5hMFnk1JWshUjHNlQmE6ftC +U0xSTMVUtwJhzH2zDp8lEdu7qi3EsNULOl68ozDr6soWAvCbHPeTdTOnFySGCleG +/3TonsoZJs/sSPPJnxFQ1DtgQL6EbhIwa0ZwU4eKYVHZ9tjxuMX3teFzRvOrJjgs ++ywGlsIURtEckT5Y6nMAEQEAAYkCPAQYAQgAJhYhBOHazw/v6H2ee9HwGKtG7710 +AssCBQJfmfYBAhsMBQkHhh+AAAoJEKtG7710AssC8NcP/iDAcy1aZFvkA0EbZ85p +i7/+ywtE/1wF4U4/9OuLcoskqGGnl1pJNPooMOSBCfreoTB8HimT0Fln0CoaOm4Q +pScNq39JXmf4VxauqUJVARByP6zUfgYarqoaZNeuFF0S4AZJ2HhGzaQPjDz1uKVM +PE6tQSgQkFzdZ9AtRA4vElTH6yRAgmepUsOihk0b0gUtVnwtRYZ8e0Qt3ie97a73 +DxLgAgedFRUbLRYiT0vNaYbainBsLWKpN/T8odwIg/smP0Khjp/ckV60cZTdBiPR +szBTPJESMUTu0VPntc4gWwGsmhZJg/Tt/qP08XYo3VxNYBegyuWwNR66zDWvwvGH +muMv5UchuDxp6Rt3JkIO4voMT1JSjWy9p8krkPEE4V6PxAagLjdZSkt92wVLiK5x +y5gNrtPhU45YdRAKHr36OvJBJQ42CDaZ6nzrzghcIp9CZ7ANHrI+QLRM/csz+AGA +szSp6S4mc1lnxxfbOhPPpebZPn0nIAXoZnnoVKdrxBVedPQHT59ZFvKTQ9Fs7gd3 +sYNuc7tJGFGC2CxBH4ANDpOQkc5q9JJ1HSGrXU3juxIiRgfA26Q22S9c71dXjElw +Ri584QH+bL6kkYmm8xpKF6TVwhwu5xx/jBPrbWqFrtbvLNrnfPoapTihBfdIhkT6 +nmgawbBHA02D5xEqB5SU3WJu +=eJNx +-----END PGP PUBLIC KEY BLOCK----- +``` diff --git a/tests/php_test_files/vendor/ramsey/collection/composer.json b/tests/php_test_files/vendor/ramsey/collection/composer.json new file mode 100644 index 0000000..5670901 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/composer.json @@ -0,0 +1,119 @@ +{ + "name": "ramsey/collection", + "description": "A PHP library for representing and manipulating collections.", + "license": "MIT", + "type": "library", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "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" + }, + "minimum-stability": "RC", + "prefer-stable": true, + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Ramsey\\Collection\\Test\\": "tests/", + "Ramsey\\Test\\Generics\\": "tests/generics/" + }, + "files": [ + "vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php" + ] + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "ergebnis/composer-normalize": true, + "phpstan/extension-installer": true, + "captainhook/plugin-composer": true + }, + "sort-packages": true + }, + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "scripts": { + "dev:analyze": [ + "@dev:analyze:phpstan", + "@dev:analyze:psalm" + ], + "dev:analyze:phpstan": "phpstan analyse --ansi --memory-limit=1G", + "dev:analyze:psalm": "psalm", + "dev:build:clean": "git clean -fX build/", + "dev:lint": [ + "@dev:lint:syntax", + "@dev:lint:style" + ], + "dev:lint:fix": "phpcbf", + "dev:lint:style": "phpcs --colors", + "dev:lint:syntax": "parallel-lint --colors src/ tests/", + "dev:test": [ + "@dev:lint", + "@dev:analyze", + "@dev:test:unit" + ], + "dev:test:coverage:ci": "phpunit --colors=always --coverage-text --coverage-clover build/coverage/clover.xml --coverage-cobertura build/coverage/cobertura.xml --coverage-crap4j build/coverage/crap4j.xml --coverage-xml build/coverage/coverage-xml --log-junit build/junit.xml", + "dev:test:coverage:html": "phpunit --colors=always --coverage-html build/coverage/coverage-html/", + "dev:test:unit": "phpunit --colors=always", + "test": "@dev:test" + }, + "scripts-descriptions": { + "dev:analyze": "Runs all static analysis checks.", + "dev:analyze:phpstan": "Runs the PHPStan static analyzer.", + "dev:analyze:psalm": "Runs the Psalm static analyzer.", + "dev:build:clean": "Cleans the build/ directory.", + "dev:lint": "Runs all linting checks.", + "dev:lint:fix": "Auto-fixes coding standards issues, if possible.", + "dev:lint:style": "Checks for coding standards issues.", + "dev:lint:syntax": "Checks for syntax errors.", + "dev:test": "Runs linting, static analysis, and unit tests.", + "dev:test:coverage:ci": "Runs unit tests and generates CI coverage reports.", + "dev:test:coverage:html": "Runs unit tests and generates HTML coverage report.", + "dev:test:unit": "Runs unit tests.", + "test": "Runs linting, static analysis, and unit tests." + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/conventional-commits.json b/tests/php_test_files/vendor/ramsey/collection/conventional-commits.json new file mode 100644 index 0000000..5fe21d2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/conventional-commits.json @@ -0,0 +1,22 @@ +{ + "typeCase": "kebab", + "types": [ + "chore", + "ci", + "docs", + "feat", + "fix", + "refactor", + "security", + "style", + "test" + ], + "scopeCase": "kebab", + "scopeRequired": false, + "scopes": [], + "descriptionCase": null, + "descriptionEndMark": "", + "bodyRequired": false, + "bodyWrapWidth": 72, + "requiredFooters": [] +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/AbstractArray.php b/tests/php_test_files/vendor/ramsey/collection/src/AbstractArray.php new file mode 100644 index 0000000..5ce622a --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/AbstractArray.php @@ -0,0 +1,171 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use ArrayIterator; +use Traversable; + +use function count; + +/** + * This class provides a basic implementation of `ArrayInterface`, to minimize + * the effort required to implement this interface. + * + * @template T + * @implements ArrayInterface + */ +abstract class AbstractArray implements ArrayInterface +{ + /** + * The items of this array. + * + * @var array + */ + protected array $data = []; + + /** + * Constructs a new array object. + * + * @param array $data The initial items to add to this array. + */ + public function __construct(array $data = []) + { + // Invoke offsetSet() for each value added; in this way, sub-classes + // may provide additional logic about values added to the array object. + foreach ($data as $key => $value) { + $this[$key] = $value; + } + } + + /** + * Returns an iterator for this array. + * + * @link http://php.net/manual/en/iteratoraggregate.getiterator.php IteratorAggregate::getIterator() + * + * @return Traversable + */ + public function getIterator(): Traversable + { + return new ArrayIterator($this->data); + } + + /** + * Returns `true` if the given offset exists in this array. + * + * @link http://php.net/manual/en/arrayaccess.offsetexists.php ArrayAccess::offsetExists() + * + * @param array-key $offset The offset to check. + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->data[$offset]); + } + + /** + * Returns the value at the specified offset. + * + * @link http://php.net/manual/en/arrayaccess.offsetget.php ArrayAccess::offsetGet() + * + * @param array-key $offset The offset for which a value should be returned. + * + * @return T the value stored at the offset, or null if the offset + * does not exist. + */ + public function offsetGet(mixed $offset): mixed + { + return $this->data[$offset]; + } + + /** + * Sets the given value to the given offset in the array. + * + * @link http://php.net/manual/en/arrayaccess.offsetset.php ArrayAccess::offsetSet() + * + * @param array-key | null $offset The offset to set. If `null`, the value + * may be set at a numerically-indexed offset. + * @param T $value The value to set at the given offset. + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if ($offset === null) { + $this->data[] = $value; + } else { + $this->data[$offset] = $value; + } + } + + /** + * Removes the given offset and its value from the array. + * + * @link http://php.net/manual/en/arrayaccess.offsetunset.php ArrayAccess::offsetUnset() + * + * @param array-key $offset The offset to remove from the array. + */ + public function offsetUnset(mixed $offset): void + { + unset($this->data[$offset]); + } + + /** + * Returns data suitable for PHP serialization. + * + * @link https://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.serialize + * @link https://www.php.net/serialize + * + * @return array + */ + public function __serialize(): array + { + return $this->data; + } + + /** + * Adds unserialized data to the object. + * + * @param array $data + */ + public function __unserialize(array $data): void + { + $this->data = $data; + } + + /** + * Returns the number of items in this array. + * + * @link http://php.net/manual/en/countable.count.php Countable::count() + */ + public function count(): int + { + return count($this->data); + } + + public function clear(): void + { + $this->data = []; + } + + /** + * @inheritDoc + */ + public function toArray(): array + { + return $this->data; + } + + public function isEmpty(): bool + { + return $this->data === []; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/AbstractCollection.php b/tests/php_test_files/vendor/ramsey/collection/src/AbstractCollection.php new file mode 100644 index 0000000..8cb21ec --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/AbstractCollection.php @@ -0,0 +1,393 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use Closure; +use Ramsey\Collection\Exception\CollectionMismatchException; +use Ramsey\Collection\Exception\InvalidArgumentException; +use Ramsey\Collection\Exception\InvalidPropertyOrMethod; +use Ramsey\Collection\Exception\NoSuchElementException; +use Ramsey\Collection\Exception\UnsupportedOperationException; +use Ramsey\Collection\Tool\TypeTrait; +use Ramsey\Collection\Tool\ValueExtractorTrait; +use Ramsey\Collection\Tool\ValueToStringTrait; + +use function array_filter; +use function array_key_first; +use function array_key_last; +use function array_map; +use function array_merge; +use function array_reduce; +use function array_search; +use function array_udiff; +use function array_uintersect; +use function in_array; +use function is_int; +use function is_object; +use function spl_object_id; +use function sprintf; +use function usort; + +/** + * This class provides a basic implementation of `CollectionInterface`, to + * minimize the effort required to implement this interface + * + * @template T + * @extends AbstractArray + * @implements CollectionInterface + */ +abstract class AbstractCollection extends AbstractArray implements CollectionInterface +{ + use TypeTrait; + use ValueToStringTrait; + use ValueExtractorTrait; + + /** + * @throws InvalidArgumentException if $element is of the wrong type. + */ + public function add(mixed $element): bool + { + $this[] = $element; + + return true; + } + + public function contains(mixed $element, bool $strict = true): bool + { + return in_array($element, $this->data, $strict); + } + + /** + * @throws InvalidArgumentException if $element is of the wrong type. + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if ($this->checkType($this->getType(), $value) === false) { + throw new InvalidArgumentException( + 'Value must be of type ' . $this->getType() . '; value is ' + . $this->toolValueToString($value), + ); + } + + if ($offset === null) { + $this->data[] = $value; + } else { + $this->data[$offset] = $value; + } + } + + public function remove(mixed $element): bool + { + if (($position = array_search($element, $this->data, true)) !== false) { + unset($this[$position]); + + return true; + } + + return false; + } + + /** + * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist + * on the elements in this collection. + * @throws UnsupportedOperationException if unable to call column() on this + * collection. + * + * @inheritDoc + */ + public function column(string $propertyOrMethod): array + { + $temp = []; + + foreach ($this->data as $item) { + /** @psalm-suppress MixedAssignment */ + $temp[] = $this->extractValue($item, $propertyOrMethod); + } + + return $temp; + } + + /** + * @return T + * + * @throws NoSuchElementException if this collection is empty. + */ + public function first(): mixed + { + $firstIndex = array_key_first($this->data); + + if ($firstIndex === null) { + throw new NoSuchElementException('Can\'t determine first item. Collection is empty'); + } + + return $this->data[$firstIndex]; + } + + /** + * @return T + * + * @throws NoSuchElementException if this collection is empty. + */ + public function last(): mixed + { + $lastIndex = array_key_last($this->data); + + if ($lastIndex === null) { + throw new NoSuchElementException('Can\'t determine last item. Collection is empty'); + } + + return $this->data[$lastIndex]; + } + + /** + * @return CollectionInterface + * + * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist + * on the elements in this collection. + * @throws UnsupportedOperationException if unable to call sort() on this + * collection. + */ + public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascending): CollectionInterface + { + $collection = clone $this; + + usort( + $collection->data, + /** + * @param T $a + * @param T $b + */ + function (mixed $a, mixed $b) use ($propertyOrMethod, $order): int { + /** @var mixed $aValue */ + $aValue = $this->extractValue($a, $propertyOrMethod); + + /** @var mixed $bValue */ + $bValue = $this->extractValue($b, $propertyOrMethod); + + return ($aValue <=> $bValue) * ($order === Sort::Descending ? -1 : 1); + }, + ); + + return $collection; + } + + /** + * @param callable(T): bool $callback A callable to use for filtering elements. + * + * @return CollectionInterface + */ + public function filter(callable $callback): CollectionInterface + { + $collection = clone $this; + $collection->data = array_merge([], array_filter($collection->data, $callback)); + + return $collection; + } + + /** + * @return CollectionInterface + * + * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist + * on the elements in this collection. + * @throws UnsupportedOperationException if unable to call where() on this + * collection. + */ + public function where(?string $propertyOrMethod, mixed $value): CollectionInterface + { + return $this->filter( + /** + * @param T $item + */ + function (mixed $item) use ($propertyOrMethod, $value): bool { + /** @var mixed $accessorValue */ + $accessorValue = $this->extractValue($item, $propertyOrMethod); + + return $accessorValue === $value; + }, + ); + } + + /** + * @param callable(T): TCallbackReturn $callback A callable to apply to each + * item of the collection. + * + * @return CollectionInterface + * + * @template TCallbackReturn + */ + public function map(callable $callback): CollectionInterface + { + /** @var Collection */ + return new Collection('mixed', array_map($callback, $this->data)); + } + + /** + * @param callable(TCarry, T): TCarry $callback A callable to apply to each + * item of the collection to reduce it to a single value. + * @param TCarry $initial This is the initial value provided to the callback. + * + * @return TCarry + * + * @template TCarry + */ + public function reduce(callable $callback, mixed $initial): mixed + { + /** @var TCarry */ + return array_reduce($this->data, $callback, $initial); + } + + /** + * @param CollectionInterface $other The collection to check for divergent + * items. + * + * @return CollectionInterface + * + * @throws CollectionMismatchException if the compared collections are of + * differing types. + */ + public function diff(CollectionInterface $other): CollectionInterface + { + $this->compareCollectionTypes($other); + + $diffAtoB = array_udiff($this->data, $other->toArray(), $this->getComparator()); + $diffBtoA = array_udiff($other->toArray(), $this->data, $this->getComparator()); + + /** @var array $diff */ + $diff = array_merge($diffAtoB, $diffBtoA); + + $collection = clone $this; + $collection->data = $diff; + + return $collection; + } + + /** + * @param CollectionInterface $other The collection to check for + * intersecting items. + * + * @return CollectionInterface + * + * @throws CollectionMismatchException if the compared collections are of + * differing types. + */ + public function intersect(CollectionInterface $other): CollectionInterface + { + $this->compareCollectionTypes($other); + + /** @var array $intersect */ + $intersect = array_uintersect($this->data, $other->toArray(), $this->getComparator()); + + $collection = clone $this; + $collection->data = $intersect; + + return $collection; + } + + /** + * @param CollectionInterface ...$collections The collections to merge. + * + * @return CollectionInterface + * + * @throws CollectionMismatchException if unable to merge any of the given + * collections or items within the given collections due to type + * mismatch errors. + */ + public function merge(CollectionInterface ...$collections): CollectionInterface + { + $mergedCollection = clone $this; + + foreach ($collections as $index => $collection) { + if (!$collection instanceof static) { + throw new CollectionMismatchException( + sprintf('Collection with index %d must be of type %s', $index, static::class), + ); + } + + // When using generics (Collection.php, Set.php, etc), + // we also need to make sure that the internal types match each other + if ($this->getUniformType($collection) !== $this->getUniformType($this)) { + throw new CollectionMismatchException( + sprintf( + 'Collection items in collection with index %d must be of type %s', + $index, + $this->getType(), + ), + ); + } + + foreach ($collection as $key => $value) { + if (is_int($key)) { + $mergedCollection[] = $value; + } else { + $mergedCollection[$key] = $value; + } + } + } + + return $mergedCollection; + } + + /** + * @param CollectionInterface $other + * + * @throws CollectionMismatchException + */ + private function compareCollectionTypes(CollectionInterface $other): void + { + if (!$other instanceof static) { + throw new CollectionMismatchException('Collection must be of type ' . static::class); + } + + // When using generics (Collection.php, Set.php, etc), + // we also need to make sure that the internal types match each other + if ($this->getUniformType($other) !== $this->getUniformType($this)) { + throw new CollectionMismatchException('Collection items must be of type ' . $this->getType()); + } + } + + private function getComparator(): Closure + { + return /** + * @param T $a + * @param T $b + */ + function (mixed $a, mixed $b): int { + // If the two values are object, we convert them to unique scalars. + // If the collection contains mixed values (unlikely) where some are objects + // and some are not, we leave them as they are. + // The comparator should still work and the result of $a < $b should + // be consistent but unpredictable since not documented. + if (is_object($a) && is_object($b)) { + $a = spl_object_id($a); + $b = spl_object_id($b); + } + + return $a === $b ? 0 : ($a < $b ? 1 : -1); + }; + } + + /** + * @param CollectionInterface $collection + */ + private function getUniformType(CollectionInterface $collection): string + { + return match ($collection->getType()) { + 'integer' => 'int', + 'boolean' => 'bool', + 'double' => 'float', + default => $collection->getType(), + }; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/AbstractSet.php b/tests/php_test_files/vendor/ramsey/collection/src/AbstractSet.php new file mode 100644 index 0000000..7186939 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/AbstractSet.php @@ -0,0 +1,44 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +/** + * This class contains the basic implementation of a collection that does not + * allow duplicated values (a set), to minimize the effort required to implement + * this specific type of collection. + * + * @template T + * @extends AbstractCollection + */ +abstract class AbstractSet extends AbstractCollection +{ + public function add(mixed $element): bool + { + if ($this->contains($element)) { + return false; + } + + return parent::add($element); + } + + public function offsetSet(mixed $offset, mixed $value): void + { + if ($this->contains($value)) { + return; + } + + parent::offsetSet($offset, $value); + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/ArrayInterface.php b/tests/php_test_files/vendor/ramsey/collection/src/ArrayInterface.php new file mode 100644 index 0000000..bc7f6f4 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/ArrayInterface.php @@ -0,0 +1,49 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use ArrayAccess; +use Countable; +use IteratorAggregate; + +/** + * `ArrayInterface` provides traversable array functionality to data types. + * + * @template T + * @extends ArrayAccess + * @extends IteratorAggregate + */ +interface ArrayInterface extends + ArrayAccess, + Countable, + IteratorAggregate +{ + /** + * Removes all items from this array. + */ + public function clear(): void; + + /** + * Returns a native PHP array representation of this array object. + * + * @return array + */ + public function toArray(): array; + + /** + * Returns `true` if this array is empty. + */ + public function isEmpty(): bool; +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Collection.php b/tests/php_test_files/vendor/ramsey/collection/src/Collection.php new file mode 100644 index 0000000..44d26bf --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Collection.php @@ -0,0 +1,95 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +/** + * A collection represents a group of objects. + * + * Each object in the collection is of a specific, defined type. + * + * This is a direct implementation of `CollectionInterface`, provided for + * the sake of convenience. + * + * Example usage: + * + * ``` php + * $collection = new \Ramsey\Collection\Collection('My\\Foo'); + * $collection->add(new \My\Foo()); + * $collection->add(new \My\Foo()); + * + * foreach ($collection as $foo) { + * // Do something with $foo + * } + * ``` + * + * It is preferable to subclass `AbstractCollection` to create your own typed + * collections. For example: + * + * ``` php + * namespace My\Foo; + * + * class FooCollection extends \Ramsey\Collection\AbstractCollection + * { + * public function getType() + * { + * return 'My\\Foo'; + * } + * } + * ``` + * + * And then use it similarly to the earlier example: + * + * ``` php + * $fooCollection = new \My\Foo\FooCollection(); + * $fooCollection->add(new \My\Foo()); + * $fooCollection->add(new \My\Foo()); + * + * foreach ($fooCollection as $foo) { + * // Do something with $foo + * } + * ``` + * + * The benefit with this approach is that you may do type-checking on the + * collection object: + * + * ``` php + * if ($collection instanceof \My\Foo\FooCollection) { + * // the collection is a collection of My\Foo objects + * } + * ``` + * + * @template T + * @extends AbstractCollection + */ +class Collection extends AbstractCollection +{ + /** + * Constructs a collection object of the specified type, optionally with the + * specified data. + * + * @param string $collectionType The type or class name associated with this + * collection. + * @param array $data The initial items to store in the collection. + */ + public function __construct(private readonly string $collectionType, array $data = []) + { + parent::__construct($data); + } + + public function getType(): string + { + return $this->collectionType; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/CollectionInterface.php b/tests/php_test_files/vendor/ramsey/collection/src/CollectionInterface.php new file mode 100644 index 0000000..e3ad014 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/CollectionInterface.php @@ -0,0 +1,253 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use Ramsey\Collection\Exception\CollectionMismatchException; +use Ramsey\Collection\Exception\InvalidArgumentException; +use Ramsey\Collection\Exception\InvalidPropertyOrMethod; +use Ramsey\Collection\Exception\NoSuchElementException; +use Ramsey\Collection\Exception\UnsupportedOperationException; + +/** + * A collection represents a group of values, known as its elements. + * + * Some collections allow duplicate elements and others do not. Some are ordered + * and others unordered. + * + * @template T + * @extends ArrayInterface + */ +interface CollectionInterface extends ArrayInterface +{ + /** + * Ensures that this collection contains the specified element (optional + * operation). + * + * Returns `true` if this collection changed as a result of the call. + * (Returns `false` if this collection does not permit duplicates and + * already contains the specified element.) + * + * Collections that support this operation may place limitations on what + * elements may be added to this collection. In particular, some + * collections will refuse to add `null` elements, and others will impose + * restrictions on the type of elements that may be added. Collection + * classes should clearly specify in their documentation any restrictions + * on what elements may be added. + * + * If a collection refuses to add a particular element for any reason other + * than that it already contains the element, it must throw an exception + * (rather than returning `false`). This preserves the invariant that a + * collection always contains the specified element after this call returns. + * + * @param T $element The element to add to the collection. + * + * @return bool `true` if this collection changed as a result of the call. + * + * @throws InvalidArgumentException if the collection refuses to add the + * $element for any reason other than that it already contains the element. + */ + public function add(mixed $element): bool; + + /** + * Returns `true` if this collection contains the specified element. + * + * @param T $element The element to check whether the collection contains. + * @param bool $strict Whether to perform a strict type check on the value. + */ + public function contains(mixed $element, bool $strict = true): bool; + + /** + * Returns the type associated with this collection. + */ + public function getType(): string; + + /** + * Removes a single instance of the specified element from this collection, + * if it is present. + * + * @param T $element The element to remove from the collection. + * + * @return bool `true` if an element was removed as a result of this call. + */ + public function remove(mixed $element): bool; + + /** + * Returns the values from the given property, method, or array key. + * + * @param string $propertyOrMethod The name of the property, method, or + * array key to evaluate and return. + * + * @return array + * + * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist + * on the elements in this collection. + * @throws UnsupportedOperationException if unable to call column() on this + * collection. + */ + public function column(string $propertyOrMethod): array; + + /** + * Returns the first item of the collection. + * + * @return T + * + * @throws NoSuchElementException if this collection is empty. + */ + public function first(): mixed; + + /** + * Returns the last item of the collection. + * + * @return T + * + * @throws NoSuchElementException if this collection is empty. + */ + public function last(): mixed; + + /** + * Sort the collection by a property, method, or array key with the given + * sort order. + * + * If $propertyOrMethod is `null`, this will sort by comparing each element. + * + * This will always leave the original collection untouched and will return + * a new one. + * + * @param string | null $propertyOrMethod The property, method, or array key + * to sort by. + * @param Sort $order The sort order for the resulting collection. + * + * @return CollectionInterface + * + * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist + * on the elements in this collection. + * @throws UnsupportedOperationException if unable to call sort() on this + * collection. + */ + public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascending): self; + + /** + * Filter out items of the collection which don't match the criteria of + * given callback. + * + * This will always leave the original collection untouched and will return + * a new one. + * + * See the {@link http://php.net/manual/en/function.array-filter.php PHP array_filter() documentation} + * for examples of how the `$callback` parameter works. + * + * @param callable(T): bool $callback A callable to use for filtering elements. + * + * @return CollectionInterface + */ + public function filter(callable $callback): self; + + /** + * Create a new collection where the result of the given property, method, + * or array key of each item in the collection equals the given value. + * + * This will always leave the original collection untouched and will return + * a new one. + * + * @param string | null $propertyOrMethod The property, method, or array key + * to evaluate. If `null`, the element itself is compared to $value. + * @param mixed $value The value to match. + * + * @return CollectionInterface + * + * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist + * on the elements in this collection. + * @throws UnsupportedOperationException if unable to call where() on this + * collection. + */ + public function where(?string $propertyOrMethod, mixed $value): self; + + /** + * Apply a given callback method on each item of the collection. + * + * This will always leave the original collection untouched. The new + * collection is created by mapping the callback to each item of the + * original collection. + * + * See the {@link http://php.net/manual/en/function.array-map.php PHP array_map() documentation} + * for examples of how the `$callback` parameter works. + * + * @param callable(T): TCallbackReturn $callback A callable to apply to each + * item of the collection. + * + * @return CollectionInterface + * + * @template TCallbackReturn + */ + public function map(callable $callback): self; + + /** + * Apply a given callback method on each item of the collection + * to reduce it to a single value. + * + * See the {@link http://php.net/manual/en/function.array-reduce.php PHP array_reduce() documentation} + * for examples of how the `$callback` and `$initial` parameters work. + * + * @param callable(TCarry, T): TCarry $callback A callable to apply to each + * item of the collection to reduce it to a single value. + * @param TCarry $initial This is the initial value provided to the callback. + * + * @return TCarry + * + * @template TCarry + */ + public function reduce(callable $callback, mixed $initial): mixed; + + /** + * Create a new collection with divergent items between current and given + * collection. + * + * @param CollectionInterface $other The collection to check for divergent + * items. + * + * @return CollectionInterface + * + * @throws CollectionMismatchException if the compared collections are of + * differing types. + */ + public function diff(CollectionInterface $other): self; + + /** + * Create a new collection with intersecting item between current and given + * collection. + * + * @param CollectionInterface $other The collection to check for + * intersecting items. + * + * @return CollectionInterface + * + * @throws CollectionMismatchException if the compared collections are of + * differing types. + */ + public function intersect(CollectionInterface $other): self; + + /** + * Merge current items and items of given collections into a new one. + * + * @param CollectionInterface ...$collections The collections to merge. + * + * @return CollectionInterface + * + * @throws CollectionMismatchException if unable to merge any of the given + * collections or items within the given collections due to type + * mismatch errors. + */ + public function merge(CollectionInterface ...$collections): self; +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/DoubleEndedQueue.php b/tests/php_test_files/vendor/ramsey/collection/src/DoubleEndedQueue.php new file mode 100644 index 0000000..62947a2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/DoubleEndedQueue.php @@ -0,0 +1,166 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use Ramsey\Collection\Exception\InvalidArgumentException; +use Ramsey\Collection\Exception\NoSuchElementException; + +use function array_key_last; +use function array_pop; +use function array_unshift; + +/** + * This class provides a basic implementation of `DoubleEndedQueueInterface`, to + * minimize the effort required to implement this interface. + * + * @template T + * @extends Queue + * @implements DoubleEndedQueueInterface + */ +class DoubleEndedQueue extends Queue implements DoubleEndedQueueInterface +{ + /** + * Constructs a double-ended queue (dequeue) object of the specified type, + * optionally with the specified data. + * + * @param string $queueType The type or class name associated with this dequeue. + * @param array $data The initial items to store in the dequeue. + */ + public function __construct(private readonly string $queueType, array $data = []) + { + parent::__construct($this->queueType, $data); + } + + /** + * @throws InvalidArgumentException if $element is of the wrong type + */ + public function addFirst(mixed $element): bool + { + if ($this->checkType($this->getType(), $element) === false) { + throw new InvalidArgumentException( + 'Value must be of type ' . $this->getType() . '; value is ' + . $this->toolValueToString($element), + ); + } + + array_unshift($this->data, $element); + + return true; + } + + /** + * @throws InvalidArgumentException if $element is of the wrong type + */ + public function addLast(mixed $element): bool + { + return $this->add($element); + } + + public function offerFirst(mixed $element): bool + { + try { + return $this->addFirst($element); + } catch (InvalidArgumentException) { + return false; + } + } + + public function offerLast(mixed $element): bool + { + return $this->offer($element); + } + + /** + * @return T the first element in this queue. + * + * @throws NoSuchElementException if the queue is empty + */ + public function removeFirst(): mixed + { + return $this->remove(); + } + + /** + * @return T the last element in this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function removeLast(): mixed + { + return $this->pollLast() ?? throw new NoSuchElementException( + 'Can\'t return element from Queue. Queue is empty.', + ); + } + + /** + * @return T | null the head of this queue, or `null` if this queue is empty. + */ + public function pollFirst(): mixed + { + return $this->poll(); + } + + /** + * @return T | null the tail of this queue, or `null` if this queue is empty. + */ + public function pollLast(): mixed + { + return array_pop($this->data); + } + + /** + * @return T the head of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function firstElement(): mixed + { + return $this->element(); + } + + /** + * @return T the tail of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function lastElement(): mixed + { + return $this->peekLast() ?? throw new NoSuchElementException( + 'Can\'t return element from Queue. Queue is empty.', + ); + } + + /** + * @return T | null the head of this queue, or `null` if this queue is empty. + */ + public function peekFirst(): mixed + { + return $this->peek(); + } + + /** + * @return T | null the tail of this queue, or `null` if this queue is empty. + */ + public function peekLast(): mixed + { + $lastIndex = array_key_last($this->data); + + if ($lastIndex === null) { + return null; + } + + return $this->data[$lastIndex]; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php b/tests/php_test_files/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php new file mode 100644 index 0000000..15cc0e9 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php @@ -0,0 +1,313 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use Ramsey\Collection\Exception\NoSuchElementException; +use RuntimeException; + +/** + * A linear collection that supports element insertion and removal at both ends. + * + * Most `DoubleEndedQueueInterface` implementations place no fixed limits on the + * number of elements they may contain, but this interface supports + * capacity-restricted double-ended queues as well as those with no fixed size + * limit. + * + * This interface defines methods to access the elements at both ends of the + * double-ended queue. Methods are provided to insert, remove, and examine the + * element. Each of these methods exists in two forms: one throws an exception + * if the operation fails, the other returns a special value (either `null` or + * `false`, depending on the operation). The latter form of the insert operation + * is designed specifically for use with capacity-restricted implementations; in + * most implementations, insert operations cannot fail. + * + * The twelve methods described above are summarized in the following table: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Summary of DoubleEndedQueueInterface methods
    First Element (Head)Last Element (Tail)
    Throws exceptionSpecial valueThrows exceptionSpecial value
    InsertaddFirst()offerFirst()addLast()offerLast()
    RemoveremoveFirst()pollFirst()removeLast()pollLast()
    ExaminefirstElement()peekFirst()lastElement()peekLast()
    + * + * This interface extends the `QueueInterface`. When a double-ended queue is + * used as a queue, FIFO (first-in-first-out) behavior results. Elements are + * added at the end of the double-ended queue and removed from the beginning. + * The methods inherited from the `QueueInterface` are precisely equivalent to + * `DoubleEndedQueueInterface` methods as indicated in the following table: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Comparison of QueueInterface and DoubleEndedQueueInterface methods
    QueueInterface MethodDoubleEndedQueueInterface Method
    add()addLast()
    offer()offerLast()
    remove()removeFirst()
    poll()pollFirst()
    element()firstElement()
    peek()peekFirst()
    + * + * Double-ended queues can also be used as LIFO (last-in-first-out) stacks. When + * a double-ended queue is used as a stack, elements are pushed and popped from + * the beginning of the double-ended queue. Stack concepts are precisely + * equivalent to `DoubleEndedQueueInterface` methods as indicated in the table + * below: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Comparison of stack concepts and DoubleEndedQueueInterface methods
    Stack conceptDoubleEndedQueueInterface Method
    pushaddFirst()
    popremoveFirst()
    peekpeekFirst()
    + * + * Note that the `peek()` method works equally well when a double-ended queue is + * used as a queue or a stack; in either case, elements are drawn from the + * beginning of the double-ended queue. + * + * While `DoubleEndedQueueInterface` implementations are not strictly required + * to prohibit the insertion of `null` elements, they are strongly encouraged to + * do so. Users of any `DoubleEndedQueueInterface` implementations that do allow + * `null` elements are strongly encouraged *not* to take advantage of the + * ability to insert nulls. This is so because `null` is used as a special + * return value by various methods to indicated that the double-ended queue is + * empty. + * + * @template T + * @extends QueueInterface + */ +interface DoubleEndedQueueInterface extends QueueInterface +{ + /** + * Inserts the specified element at the front of this queue if it is + * possible to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted double-ended queue, it is generally + * preferable to use the `offerFirst()` method. + * + * @param T $element The element to add to the front of this queue. + * + * @return bool `true` if this queue changed as a result of the call. + * + * @throws RuntimeException if a queue refuses to add a particular element + * for any reason other than that it already contains the element. + * Implementations should use a more-specific exception that extends + * `\RuntimeException`. + */ + public function addFirst(mixed $element): bool; + + /** + * Inserts the specified element at the end of this queue if it is possible + * to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted double-ended queue, it is generally + * preferable to use the `offerLast()` method. + * + * This method is equivalent to `add()`. + * + * @param T $element The element to add to the end of this queue. + * + * @return bool `true` if this queue changed as a result of the call. + * + * @throws RuntimeException if a queue refuses to add a particular element + * for any reason other than that it already contains the element. + * Implementations should use a more-specific exception that extends + * `\RuntimeException`. + */ + public function addLast(mixed $element): bool; + + /** + * Inserts the specified element at the front of this queue if it is + * possible to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted queue, this method is generally + * preferable to `addFirst()`, which can fail to insert an element only by + * throwing an exception. + * + * @param T $element The element to add to the front of this queue. + * + * @return bool `true` if the element was added to this queue, else `false`. + */ + public function offerFirst(mixed $element): bool; + + /** + * Inserts the specified element at the end of this queue if it is possible + * to do so immediately without violating capacity restrictions. + * + * When using a capacity-restricted queue, this method is generally + * preferable to `addLast()` which can fail to insert an element only by + * throwing an exception. + * + * @param T $element The element to add to the end of this queue. + * + * @return bool `true` if the element was added to this queue, else `false`. + */ + public function offerLast(mixed $element): bool; + + /** + * Retrieves and removes the head of this queue. + * + * This method differs from `pollFirst()` only in that it throws an + * exception if this queue is empty. + * + * @return T the first element in this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function removeFirst(): mixed; + + /** + * Retrieves and removes the tail of this queue. + * + * This method differs from `pollLast()` only in that it throws an exception + * if this queue is empty. + * + * @return T the last element in this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function removeLast(): mixed; + + /** + * Retrieves and removes the head of this queue, or returns `null` if this + * queue is empty. + * + * @return T | null the head of this queue, or `null` if this queue is empty. + */ + public function pollFirst(): mixed; + + /** + * Retrieves and removes the tail of this queue, or returns `null` if this + * queue is empty. + * + * @return T | null the tail of this queue, or `null` if this queue is empty. + */ + public function pollLast(): mixed; + + /** + * Retrieves, but does not remove, the head of this queue. + * + * This method differs from `peekFirst()` only in that it throws an + * exception if this queue is empty. + * + * @return T the head of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function firstElement(): mixed; + + /** + * Retrieves, but does not remove, the tail of this queue. + * + * This method differs from `peekLast()` only in that it throws an exception + * if this queue is empty. + * + * @return T the tail of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function lastElement(): mixed; + + /** + * Retrieves, but does not remove, the head of this queue, or returns `null` + * if this queue is empty. + * + * @return T | null the head of this queue, or `null` if this queue is empty. + */ + public function peekFirst(): mixed; + + /** + * Retrieves, but does not remove, the tail of this queue, or returns `null` + * if this queue is empty. + * + * @return T | null the tail of this queue, or `null` if this queue is empty. + */ + public function peekLast(): mixed; +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Exception/CollectionException.php b/tests/php_test_files/vendor/ramsey/collection/src/Exception/CollectionException.php new file mode 100644 index 0000000..4aa92be --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Exception/CollectionException.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Exception; + +use Throwable; + +interface CollectionException extends Throwable +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php b/tests/php_test_files/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php new file mode 100644 index 0000000..42f5be2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Exception; + +use RuntimeException; + +/** + * Thrown when attempting to operate on collections of differing types. + */ +class CollectionMismatchException extends RuntimeException implements CollectionException +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php b/tests/php_test_files/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..7b41b4a --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Exception; + +use InvalidArgumentException as PhpInvalidArgumentException; + +/** + * Thrown to indicate an argument is not of the expected type. + */ +class InvalidArgumentException extends PhpInvalidArgumentException implements CollectionException +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php b/tests/php_test_files/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php new file mode 100644 index 0000000..a53be14 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php @@ -0,0 +1,26 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Exception; + +use RuntimeException; + +/** + * Thrown when attempting to evaluate a property, method, or array key + * that doesn't exist on an element or cannot otherwise be evaluated in the + * current context. + */ +class InvalidPropertyOrMethod extends RuntimeException implements CollectionException +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Exception/NoSuchElementException.php b/tests/php_test_files/vendor/ramsey/collection/src/Exception/NoSuchElementException.php new file mode 100644 index 0000000..cd98f0c --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Exception/NoSuchElementException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Exception; + +use RuntimeException; + +/** + * Thrown when attempting to access an element that does not exist. + */ +class NoSuchElementException extends RuntimeException implements CollectionException +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php b/tests/php_test_files/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php new file mode 100644 index 0000000..c75294e --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Exception; + +use OutOfBoundsException as PhpOutOfBoundsException; + +/** + * Thrown when attempting to access an element out of the range of the collection. + */ +class OutOfBoundsException extends PhpOutOfBoundsException implements CollectionException +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php b/tests/php_test_files/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php new file mode 100644 index 0000000..d074f45 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Exception; + +use RuntimeException; + +/** + * Thrown to indicate that the requested operation is not supported. + */ +class UnsupportedOperationException extends RuntimeException implements CollectionException +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/GenericArray.php b/tests/php_test_files/vendor/ramsey/collection/src/GenericArray.php new file mode 100644 index 0000000..2b079aa --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/GenericArray.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +/** + * `GenericArray` represents a standard array object. + * + * @extends AbstractArray + */ +class GenericArray extends AbstractArray +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Map/AbstractMap.php b/tests/php_test_files/vendor/ramsey/collection/src/Map/AbstractMap.php new file mode 100644 index 0000000..7a851a8 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Map/AbstractMap.php @@ -0,0 +1,203 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Map; + +use Ramsey\Collection\AbstractArray; +use Ramsey\Collection\Exception\InvalidArgumentException; +use Traversable; + +use function array_key_exists; +use function array_keys; +use function in_array; +use function var_export; + +/** + * This class provides a basic implementation of `MapInterface`, to minimize the + * effort required to implement this interface. + * + * @template K of array-key + * @template T + * @extends AbstractArray + * @implements MapInterface + */ +abstract class AbstractMap extends AbstractArray implements MapInterface +{ + /** + * @param array $data The initial items to add to this map. + */ + public function __construct(array $data = []) + { + parent::__construct($data); + } + + /** + * @return Traversable + */ + public function getIterator(): Traversable + { + return parent::getIterator(); + } + + /** + * @param K $offset The offset to set + * @param T $value The value to set at the given offset. + * + * @inheritDoc + * @psalm-suppress MoreSpecificImplementedParamType,DocblockTypeContradiction + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if ($offset === null) { + throw new InvalidArgumentException( + 'Map elements are key/value pairs; a key must be provided for ' + . 'value ' . var_export($value, true), + ); + } + + $this->data[$offset] = $value; + } + + public function containsKey(int | string $key): bool + { + return array_key_exists($key, $this->data); + } + + public function containsValue(mixed $value): bool + { + return in_array($value, $this->data, true); + } + + /** + * @inheritDoc + */ + public function keys(): array + { + return array_keys($this->data); + } + + /** + * @param K $key The key to return from the map. + * @param T | null $defaultValue The default value to use if `$key` is not found. + * + * @return T | null the value or `null` if the key could not be found. + */ + public function get(int | string $key, mixed $defaultValue = null): mixed + { + return $this[$key] ?? $defaultValue; + } + + /** + * @param K $key The key to put or replace in the map. + * @param T $value The value to store at `$key`. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function put(int | string $key, mixed $value): mixed + { + $previousValue = $this->get($key); + $this[$key] = $value; + + return $previousValue; + } + + /** + * @param K $key The key to put in the map. + * @param T $value The value to store at `$key`. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function putIfAbsent(int | string $key, mixed $value): mixed + { + $currentValue = $this->get($key); + + if ($currentValue === null) { + $this[$key] = $value; + } + + return $currentValue; + } + + /** + * @param K $key The key to remove from the map. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function remove(int | string $key): mixed + { + $previousValue = $this->get($key); + unset($this[$key]); + + return $previousValue; + } + + public function removeIf(int | string $key, mixed $value): bool + { + if ($this->get($key) === $value) { + unset($this[$key]); + + return true; + } + + return false; + } + + /** + * @param K $key The key to replace. + * @param T $value The value to set at `$key`. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function replace(int | string $key, mixed $value): mixed + { + $currentValue = $this->get($key); + + if ($this->containsKey($key)) { + $this[$key] = $value; + } + + return $currentValue; + } + + public function replaceIf(int | string $key, mixed $oldValue, mixed $newValue): bool + { + if ($this->get($key) === $oldValue) { + $this[$key] = $newValue; + + return true; + } + + return false; + } + + /** + * @return array + */ + public function __serialize(): array + { + return parent::__serialize(); + } + + /** + * @return array + */ + public function toArray(): array + { + return parent::toArray(); + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Map/AbstractTypedMap.php b/tests/php_test_files/vendor/ramsey/collection/src/Map/AbstractTypedMap.php new file mode 100644 index 0000000..92fdcd5 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Map/AbstractTypedMap.php @@ -0,0 +1,60 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Map; + +use Ramsey\Collection\Exception\InvalidArgumentException; +use Ramsey\Collection\Tool\TypeTrait; +use Ramsey\Collection\Tool\ValueToStringTrait; + +/** + * This class provides a basic implementation of `TypedMapInterface`, to + * minimize the effort required to implement this interface. + * + * @template K of array-key + * @template T + * @extends AbstractMap + * @implements TypedMapInterface + */ +abstract class AbstractTypedMap extends AbstractMap implements TypedMapInterface +{ + use TypeTrait; + use ValueToStringTrait; + + /** + * @param K $offset + * @param T $value + * + * @inheritDoc + * @psalm-suppress MoreSpecificImplementedParamType + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if ($this->checkType($this->getKeyType(), $offset) === false) { + throw new InvalidArgumentException( + 'Key must be of type ' . $this->getKeyType() . '; key is ' + . $this->toolValueToString($offset), + ); + } + + if ($this->checkType($this->getValueType(), $value) === false) { + throw new InvalidArgumentException( + 'Value must be of type ' . $this->getValueType() . '; value is ' + . $this->toolValueToString($value), + ); + } + + parent::offsetSet($offset, $value); + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php b/tests/php_test_files/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php new file mode 100644 index 0000000..34e4e85 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Map; + +/** + * `AssociativeArrayMap` represents a standard associative array object. + * + * @extends AbstractMap + */ +class AssociativeArrayMap extends AbstractMap +{ +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Map/MapInterface.php b/tests/php_test_files/vendor/ramsey/collection/src/Map/MapInterface.php new file mode 100644 index 0000000..22ba1bd --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Map/MapInterface.php @@ -0,0 +1,142 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Map; + +use Ramsey\Collection\ArrayInterface; + +/** + * An object that maps keys to values. + * + * A map cannot contain duplicate keys; each key can map to at most one value. + * + * @template K of array-key + * @template T + * @extends ArrayInterface + */ +interface MapInterface extends ArrayInterface +{ + /** + * Returns `true` if this map contains a mapping for the specified key. + * + * @param K $key The key to check in the map. + */ + public function containsKey(int | string $key): bool; + + /** + * Returns `true` if this map maps one or more keys to the specified value. + * + * This performs a strict type check on the value. + * + * @param T $value The value to check in the map. + */ + public function containsValue(mixed $value): bool; + + /** + * Return an array of the keys contained in this map. + * + * @return list + */ + public function keys(): array; + + /** + * Returns the value to which the specified key is mapped, `null` if this + * map contains no mapping for the key, or (optionally) `$defaultValue` if + * this map contains no mapping for the key. + * + * @param K $key The key to return from the map. + * @param T | null $defaultValue The default value to use if `$key` is not found. + * + * @return T | null the value or `null` if the key could not be found. + */ + public function get(int | string $key, mixed $defaultValue = null): mixed; + + /** + * Associates the specified value with the specified key in this map. + * + * If the map previously contained a mapping for the key, the old value is + * replaced by the specified value. + * + * @param K $key The key to put or replace in the map. + * @param T $value The value to store at `$key`. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function put(int | string $key, mixed $value): mixed; + + /** + * Associates the specified value with the specified key in this map only if + * it is not already set. + * + * If there is already a value associated with `$key`, this returns that + * value without replacing it. + * + * @param K $key The key to put in the map. + * @param T $value The value to store at `$key`. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function putIfAbsent(int | string $key, mixed $value): mixed; + + /** + * Removes the mapping for a key from this map if it is present. + * + * @param K $key The key to remove from the map. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function remove(int | string $key): mixed; + + /** + * Removes the entry for the specified key only if it is currently mapped to + * the specified value. + * + * This performs a strict type check on the value. + * + * @param K $key The key to remove from the map. + * @param T $value The value to match. + * + * @return bool true if the value was removed. + */ + public function removeIf(int | string $key, mixed $value): bool; + + /** + * Replaces the entry for the specified key only if it is currently mapped + * to some value. + * + * @param K $key The key to replace. + * @param T $value The value to set at `$key`. + * + * @return T | null the previous value associated with key, or `null` if + * there was no mapping for `$key`. + */ + public function replace(int | string $key, mixed $value): mixed; + + /** + * Replaces the entry for the specified key only if currently mapped to the + * specified value. + * + * This performs a strict type check on the value. + * + * @param K $key The key to remove from the map. + * @param T $oldValue The value to match. + * @param T $newValue The value to use as a replacement. + * + * @return bool true if the value was replaced. + */ + public function replaceIf(int | string $key, mixed $oldValue, mixed $newValue): bool; +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Map/NamedParameterMap.php b/tests/php_test_files/vendor/ramsey/collection/src/Map/NamedParameterMap.php new file mode 100644 index 0000000..f948e47 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Map/NamedParameterMap.php @@ -0,0 +1,110 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Map; + +use Ramsey\Collection\Exception\InvalidArgumentException; +use Ramsey\Collection\Tool\TypeTrait; +use Ramsey\Collection\Tool\ValueToStringTrait; + +use function array_combine; +use function array_key_exists; +use function is_int; + +/** + * `NamedParameterMap` represents a mapping of values to a set of named keys + * that may optionally be typed + * + * @extends AbstractMap + */ +class NamedParameterMap extends AbstractMap +{ + use TypeTrait; + use ValueToStringTrait; + + /** + * Named parameters defined for this map. + * + * @var array + */ + private readonly array $namedParameters; + + /** + * Constructs a new `NamedParameterMap`. + * + * @param array $namedParameters The named parameters defined for this map. + * @param array $data An initial set of data to set on this map. + */ + public function __construct(array $namedParameters, array $data = []) + { + $this->namedParameters = $this->filterNamedParameters($namedParameters); + parent::__construct($data); + } + + /** + * Returns named parameters set for this `NamedParameterMap`. + * + * @return array + */ + public function getNamedParameters(): array + { + return $this->namedParameters; + } + + public function offsetSet(mixed $offset, mixed $value): void + { + if (!array_key_exists($offset, $this->namedParameters)) { + throw new InvalidArgumentException( + 'Attempting to set value for unconfigured parameter \'' + . $this->toolValueToString($offset) . '\'', + ); + } + + if ($this->checkType($this->namedParameters[$offset], $value) === false) { + throw new InvalidArgumentException( + 'Value for \'' . $offset . '\' must be of type ' + . $this->namedParameters[$offset] . '; value is ' + . $this->toolValueToString($value), + ); + } + + $this->data[$offset] = $value; + } + + /** + * Given an array of named parameters, constructs a proper mapping of + * named parameters to types. + * + * @param array $namedParameters The named parameters to filter. + * + * @return array + */ + protected function filterNamedParameters(array $namedParameters): array + { + $names = []; + $types = []; + + foreach ($namedParameters as $key => $value) { + if (is_int($key)) { + $names[] = $value; + $types[] = 'mixed'; + } else { + $names[] = $key; + $types[] = $value; + } + } + + return array_combine($names, $types) ?: []; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Map/TypedMap.php b/tests/php_test_files/vendor/ramsey/collection/src/Map/TypedMap.php new file mode 100644 index 0000000..f914d9c --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Map/TypedMap.php @@ -0,0 +1,112 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Map; + +/** + * A `TypedMap` represents a map of elements where key and value are typed. + * + * Each element is identified by a key with defined type and a value of defined + * type. The keys of the map must be unique. The values on the map can be + * repeated but each with its own different key. + * + * The most common case is to use a string type key, but it's not limited to + * this type of keys. + * + * This is a direct implementation of `TypedMapInterface`, provided for the sake + * of convenience. + * + * Example usage: + * + * ```php + * $map = new TypedMap('string', Foo::class); + * $map['x'] = new Foo(); + * foreach ($map as $key => $value) { + * // do something with $key, it will be a Foo::class + * } + * + * // this will throw an exception since key must be string + * $map[10] = new Foo(); + * + * // this will throw an exception since value must be a Foo + * $map['bar'] = 'bar'; + * + * // initialize map with contents + * $map = new TypedMap('string', Foo::class, [ + * new Foo(), new Foo(), new Foo() + * ]); + * ``` + * + * It is preferable to subclass `AbstractTypedMap` to create your own typed map + * implementation: + * + * ```php + * class FooTypedMap extends AbstractTypedMap + * { + * public function getKeyType() + * { + * return 'int'; + * } + * + * public function getValueType() + * { + * return Foo::class; + * } + * } + * ``` + * + * โ€ฆ but you also may use the `TypedMap` class: + * + * ```php + * class FooTypedMap extends TypedMap + * { + * public function __constructor(array $data = []) + * { + * parent::__construct('int', Foo::class, $data); + * } + * } + * ``` + * + * @template K of array-key + * @template T + * @extends AbstractTypedMap + */ +class TypedMap extends AbstractTypedMap +{ + /** + * Constructs a map object of the specified key and value types, + * optionally with the specified data. + * + * @param string $keyType The data type of the map's keys. + * @param string $valueType The data type of the map's values. + * @param array $data The initial data to set for this map. + */ + public function __construct( + private readonly string $keyType, + private readonly string $valueType, + array $data = [], + ) { + parent::__construct($data); + } + + public function getKeyType(): string + { + return $this->keyType; + } + + public function getValueType(): string + { + return $this->valueType; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Map/TypedMapInterface.php b/tests/php_test_files/vendor/ramsey/collection/src/Map/TypedMapInterface.php new file mode 100644 index 0000000..5a44f06 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Map/TypedMapInterface.php @@ -0,0 +1,36 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Map; + +/** + * A `TypedMapInterface` represents a map of elements where key and value are + * typed. + * + * @template K of array-key + * @template T + * @extends MapInterface + */ +interface TypedMapInterface extends MapInterface +{ + /** + * Return the type used on the key. + */ + public function getKeyType(): string; + + /** + * Return the type forced on the values. + */ + public function getValueType(): string; +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Queue.php b/tests/php_test_files/vendor/ramsey/collection/src/Queue.php new file mode 100644 index 0000000..0f5b337 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Queue.php @@ -0,0 +1,148 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use Ramsey\Collection\Exception\InvalidArgumentException; +use Ramsey\Collection\Exception\NoSuchElementException; +use Ramsey\Collection\Tool\TypeTrait; +use Ramsey\Collection\Tool\ValueToStringTrait; + +use function array_key_first; + +/** + * This class provides a basic implementation of `QueueInterface`, to minimize + * the effort required to implement this interface. + * + * @template T + * @extends AbstractArray + * @implements QueueInterface + */ +class Queue extends AbstractArray implements QueueInterface +{ + use TypeTrait; + use ValueToStringTrait; + + /** + * Constructs a queue object of the specified type, optionally with the + * specified data. + * + * @param string $queueType The type or class name associated with this queue. + * @param array $data The initial items to store in the queue. + */ + public function __construct(private readonly string $queueType, array $data = []) + { + parent::__construct($data); + } + + /** + * {@inheritDoc} + * + * Since arbitrary offsets may not be manipulated in a queue, this method + * serves only to fulfill the `ArrayAccess` interface requirements. It is + * invoked by other operations when adding values to the queue. + * + * @throws InvalidArgumentException if $value is of the wrong type. + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if ($this->checkType($this->getType(), $value) === false) { + throw new InvalidArgumentException( + 'Value must be of type ' . $this->getType() . '; value is ' + . $this->toolValueToString($value), + ); + } + + $this->data[] = $value; + } + + /** + * @throws InvalidArgumentException if $value is of the wrong type. + */ + public function add(mixed $element): bool + { + $this[] = $element; + + return true; + } + + /** + * @return T + * + * @throws NoSuchElementException if this queue is empty. + */ + public function element(): mixed + { + return $this->peek() ?? throw new NoSuchElementException( + 'Can\'t return element from Queue. Queue is empty.', + ); + } + + public function offer(mixed $element): bool + { + try { + return $this->add($element); + } catch (InvalidArgumentException) { + return false; + } + } + + /** + * @return T | null + */ + public function peek(): mixed + { + $index = array_key_first($this->data); + + if ($index === null) { + return null; + } + + return $this[$index]; + } + + /** + * @return T | null + */ + public function poll(): mixed + { + $index = array_key_first($this->data); + + if ($index === null) { + return null; + } + + $head = $this[$index]; + unset($this[$index]); + + return $head; + } + + /** + * @return T + * + * @throws NoSuchElementException if this queue is empty. + */ + public function remove(): mixed + { + return $this->poll() ?? throw new NoSuchElementException( + 'Can\'t return element from Queue. Queue is empty.', + ); + } + + public function getType(): string + { + return $this->queueType; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/QueueInterface.php b/tests/php_test_files/vendor/ramsey/collection/src/QueueInterface.php new file mode 100644 index 0000000..f29ce43 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/QueueInterface.php @@ -0,0 +1,202 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +use Ramsey\Collection\Exception\NoSuchElementException; +use RuntimeException; + +/** + * A queue is a collection in which the entities in the collection are kept in + * order. + * + * The principal operations on the queue are the addition of entities to the end + * (tail), also known as *enqueue*, and removal of entities from the front + * (head), also known as *dequeue*. This makes the queue a first-in-first-out + * (FIFO) data structure. + * + * Besides basic array operations, queues provide additional insertion, + * extraction, and inspection operations. Each of these methods exists in two + * forms: one throws an exception if the operation fails, the other returns a + * special value (either `null` or `false`, depending on the operation). The + * latter form of the insert operation is designed specifically for use with + * capacity-restricted `QueueInterface` implementations; in most + * implementations, insert operations cannot fail. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Summary of QueueInterface methods
    Throws exceptionReturns special value
    Insertadd()offer()
    Removeremove()poll()
    Examineelement()peek()
    + * + * Queues typically, but do not necessarily, order elements in a FIFO + * (first-in-first-out) manner. Among the exceptions are priority queues, which + * order elements according to a supplied comparator, or the elements' natural + * ordering, and LIFO queues (or stacks) which order the elements LIFO + * (last-in-first-out). Whatever the ordering used, the head of the queue is + * that element which would be removed by a call to remove() or poll(). In a + * FIFO queue, all new elements are inserted at the tail of the queue. Other + * kinds of queues may use different placement rules. Every `QueueInterface` + * implementation must specify its ordering properties. + * + * The `offer()` method inserts an element if possible, otherwise returning + * `false`. This differs from the `add()` method, which can fail to add an + * element only by throwing an unchecked exception. The `offer()` method is + * designed for use when failure is a normal, rather than exceptional + * occurrence, for example, in fixed-capacity (or "bounded") queues. + * + * The `remove()` and `poll()` methods remove and return the head of the queue. + * Exactly which element is removed from the queue is a function of the queue's + * ordering policy, which differs from implementation to implementation. The + * `remove()` and `poll()` methods differ only in their behavior when the queue + * is empty: the `remove()` method throws an exception, while the `poll()` + * method returns `null`. + * + * The `element()` and `peek()` methods return, but do not remove, the head of + * the queue. + * + * `QueueInterface` implementations generally do not allow insertion of `null` + * elements, although some implementations do not prohibit insertion of `null`. + * Even in the implementations that permit it, `null` should not be inserted + * into a queue, as `null` is also used as a special return value by the + * `poll()` method to indicate that the queue contains no elements. + * + * @template T + * @extends ArrayInterface + */ +interface QueueInterface extends ArrayInterface +{ + /** + * Ensures that this queue contains the specified element (optional + * operation). + * + * Returns `true` if this queue changed as a result of the call. (Returns + * `false` if this queue does not permit duplicates and already contains the + * specified element.) + * + * Queues that support this operation may place limitations on what elements + * may be added to this queue. In particular, some queues will refuse to add + * `null` elements, and others will impose restrictions on the type of + * elements that may be added. Queue classes should clearly specify in their + * documentation any restrictions on what elements may be added. + * + * If a queue refuses to add a particular element for any reason other than + * that it already contains the element, it must throw an exception (rather + * than returning `false`). This preserves the invariant that a queue always + * contains the specified element after this call returns. + * + * @see self::offer() + * + * @param T $element The element to add to this queue. + * + * @return bool `true` if this queue changed as a result of the call. + * + * @throws RuntimeException if a queue refuses to add a particular element + * for any reason other than that it already contains the element. + * Implementations should use a more-specific exception that extends + * `\RuntimeException`. + */ + public function add(mixed $element): bool; + + /** + * Retrieves, but does not remove, the head of this queue. + * + * This method differs from `peek()` only in that it throws an exception if + * this queue is empty. + * + * @see self::peek() + * + * @return T the head of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function element(): mixed; + + /** + * Inserts the specified element into this queue if it is possible to do so + * immediately without violating capacity restrictions. + * + * When using a capacity-restricted queue, this method is generally + * preferable to `add()`, which can fail to insert an element only by + * throwing an exception. + * + * @see self::add() + * + * @param T $element The element to add to this queue. + * + * @return bool `true` if the element was added to this queue, else `false`. + */ + public function offer(mixed $element): bool; + + /** + * Retrieves, but does not remove, the head of this queue, or returns `null` + * if this queue is empty. + * + * @see self::element() + * + * @return T | null the head of this queue, or `null` if this queue is empty. + */ + public function peek(): mixed; + + /** + * Retrieves and removes the head of this queue, or returns `null` + * if this queue is empty. + * + * @see self::remove() + * + * @return T | null the head of this queue, or `null` if this queue is empty. + */ + public function poll(): mixed; + + /** + * Retrieves and removes the head of this queue. + * + * This method differs from `poll()` only in that it throws an exception if + * this queue is empty. + * + * @see self::poll() + * + * @return T the head of this queue. + * + * @throws NoSuchElementException if this queue is empty. + */ + public function remove(): mixed; + + /** + * Returns the type associated with this queue. + */ + public function getType(): string; +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Set.php b/tests/php_test_files/vendor/ramsey/collection/src/Set.php new file mode 100644 index 0000000..aa93351 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Set.php @@ -0,0 +1,59 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +/** + * A set is a collection that contains no duplicate elements. + * + * Great care must be exercised if mutable objects are used as set elements. + * The behavior of a set is not specified if the value of an object is changed + * in a manner that affects equals comparisons while the object is an element in + * the set. + * + * Example usage: + * + * ``` php + * $foo = new \My\Foo(); + * $set = new Set(\My\Foo::class); + * + * $set->add($foo); // returns TRUE, the element doesn't exist + * $set->add($foo); // returns FALSE, the element already exists + * + * $bar = new \My\Foo(); + * $set->add($bar); // returns TRUE, $bar !== $foo + * ``` + * + * @template T + * @extends AbstractSet + */ +class Set extends AbstractSet +{ + /** + * Constructs a set object of the specified type, optionally with the + * specified data. + * + * @param string $setType The type or class name associated with this set. + * @param array $data The initial items to store in the set. + */ + public function __construct(private readonly string $setType, array $data = []) + { + parent::__construct($data); + } + + public function getType(): string + { + return $this->setType; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Sort.php b/tests/php_test_files/vendor/ramsey/collection/src/Sort.php new file mode 100644 index 0000000..0c3c192 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Sort.php @@ -0,0 +1,31 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection; + +/** + * Collection sorting + */ +enum Sort: string +{ + /** + * Sort items in a collection in ascending order. + */ + case Ascending = 'asc'; + + /** + * Sort items in a collection in descending order. + */ + case Descending = 'desc'; +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Tool/TypeTrait.php b/tests/php_test_files/vendor/ramsey/collection/src/Tool/TypeTrait.php new file mode 100644 index 0000000..ac51b7f --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Tool/TypeTrait.php @@ -0,0 +1,57 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Tool; + +use function is_array; +use function is_bool; +use function is_callable; +use function is_float; +use function is_int; +use function is_numeric; +use function is_object; +use function is_resource; +use function is_scalar; +use function is_string; + +/** + * Provides functionality to check values for specific types. + */ +trait TypeTrait +{ + /** + * Returns `true` if value is of the specified type. + * + * @param string $type The type to check the value against. + * @param mixed $value The value to check. + */ + protected function checkType(string $type, mixed $value): bool + { + return match ($type) { + 'array' => is_array($value), + 'bool', 'boolean' => is_bool($value), + 'callable' => is_callable($value), + 'float', 'double' => is_float($value), + 'int', 'integer' => is_int($value), + 'null' => $value === null, + 'numeric' => is_numeric($value), + 'object' => is_object($value), + 'resource' => is_resource($value), + 'scalar' => is_scalar($value), + 'string' => is_string($value), + 'mixed' => true, + default => $value instanceof $type, + }; + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php b/tests/php_test_files/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php new file mode 100644 index 0000000..44c4222 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php @@ -0,0 +1,81 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Tool; + +use Ramsey\Collection\Exception\InvalidPropertyOrMethod; +use Ramsey\Collection\Exception\UnsupportedOperationException; + +use function is_array; +use function is_object; +use function method_exists; +use function property_exists; +use function sprintf; + +/** + * Provides functionality to extract the value of a property or method from an object. + */ +trait ValueExtractorTrait +{ + /** + * Extracts the value of the given property, method, or array key from the + * element. + * + * If `$propertyOrMethod` is `null`, we return the element as-is. + * + * @param mixed $element The element to extract the value from. + * @param string | null $propertyOrMethod The property or method for which the + * value should be extracted. + * + * @return mixed the value extracted from the specified property, method, + * or array key, or the element itself. + * + * @throws InvalidPropertyOrMethod + * @throws UnsupportedOperationException + */ + protected function extractValue(mixed $element, ?string $propertyOrMethod): mixed + { + if ($propertyOrMethod === null) { + return $element; + } + + if (!is_object($element) && !is_array($element)) { + throw new UnsupportedOperationException(sprintf( + 'The collection type "%s" does not support the $propertyOrMethod parameter', + $this->getType(), + )); + } + + if (is_array($element)) { + return $element[$propertyOrMethod] ?? throw new InvalidPropertyOrMethod(sprintf( + 'Key or index "%s" not found in collection elements', + $propertyOrMethod, + )); + } + + if (property_exists($element, $propertyOrMethod)) { + return $element->$propertyOrMethod; + } + + if (method_exists($element, $propertyOrMethod)) { + return $element->{$propertyOrMethod}(); + } + + throw new InvalidPropertyOrMethod(sprintf( + 'Method or property "%s" not defined in %s', + $propertyOrMethod, + $element::class, + )); + } +} diff --git a/tests/php_test_files/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php b/tests/php_test_files/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php new file mode 100644 index 0000000..64fc5fa --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php @@ -0,0 +1,91 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Collection\Tool; + +use DateTimeInterface; + +use function assert; +use function get_resource_type; +use function is_array; +use function is_bool; +use function is_callable; +use function is_object; +use function is_resource; +use function is_scalar; + +/** + * Provides functionality to express a value as string + */ +trait ValueToStringTrait +{ + /** + * Returns a string representation of the value. + * + * - null value: `'NULL'` + * - boolean: `'TRUE'`, `'FALSE'` + * - array: `'Array'` + * - scalar: converted-value + * - resource: `'(type resource #number)'` + * - object with `__toString()`: result of `__toString()` + * - object DateTime: ISO 8601 date + * - object: `'(className Object)'` + * - anonymous function: same as object + * + * @param mixed $value the value to return as a string. + */ + protected function toolValueToString(mixed $value): string + { + // null + if ($value === null) { + return 'NULL'; + } + + // boolean constants + if (is_bool($value)) { + return $value ? 'TRUE' : 'FALSE'; + } + + // array + if (is_array($value)) { + return 'Array'; + } + + // scalar types (integer, float, string) + if (is_scalar($value)) { + return (string) $value; + } + + // resource + if (is_resource($value)) { + return '(' . get_resource_type($value) . ' resource #' . (int) $value . ')'; + } + + // From here, $value should be an object. + assert(is_object($value)); + + // __toString() is implemented + if (is_callable([$value, '__toString'])) { + return (string) $value->__toString(); + } + + // object of type \DateTime + if ($value instanceof DateTimeInterface) { + return $value->format('c'); + } + + // unknown type + return '(' . $value::class . ' Object)'; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/LICENSE b/tests/php_test_files/vendor/ramsey/uuid/LICENSE new file mode 100644 index 0000000..5b2acc5 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012-2023 Ben Ramsey + +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/ramsey/uuid/README.md b/tests/php_test_files/vendor/ramsey/uuid/README.md new file mode 100644 index 0000000..0db8149 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/README.md @@ -0,0 +1,83 @@ +

    ramsey/uuid

    + +

    + A PHP library for generating and working with UUIDs. +

    + +

    + Source Code + Download Package + PHP Programming Language + Read License + Build Status + Codecov Code Coverage + Psalm Type Coverage +

    + +ramsey/uuid is a PHP library for generating and working with universally unique +identifiers (UUIDs). + +This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). +By participating in this project and its community, you are expected to +uphold this code. + +Much inspiration for this library came from the [Java][javauuid] and +[Python][pyuuid] UUID libraries. + +## Installation + +The preferred method of installation is via [Composer][]. Run the following +command to install the package and add it as a requirement to your project's +`composer.json`: + +```bash +composer require ramsey/uuid +``` + +## Upgrading to Version 4 + +See the documentation for a thorough upgrade guide: + +* [Upgrading ramsey/uuid Version 3 to 4](https://uuid.ramsey.dev/en/stable/upgrading/3-to-4.html) + +## Documentation + +Please see for documentation, tips, examples, and +frequently asked questions. + +## Contributing + +Contributions are welcome! To contribute, please familiarize yourself with +[CONTRIBUTING.md](CONTRIBUTING.md). + +## Coordinated Disclosure + +Keeping user information safe and secure is a top priority, and we welcome the +contribution of external security researchers. If you believe you've found a +security issue in software that is maintained in this repository, please read +[SECURITY.md][] for instructions on submitting a vulnerability report. + +## ramsey/uuid for Enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of ramsey/uuid and thousands of other packages are working with +Tidelift to deliver commercial support and maintenance for the open source +packages you use to build your applications. Save time, reduce risk, and improve +code health, while paying the maintainers of the exact packages you use. +[Learn more.](https://tidelift.com/subscription/pkg/packagist-ramsey-uuid?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +## Copyright and License + +The ramsey/uuid library is copyright ยฉ [Ben Ramsey](https://benramsey.com/) and +licensed for use under the MIT License (MIT). Please see [LICENSE][] for more +information. + +[rfc4122]: http://tools.ietf.org/html/rfc4122 +[conduct]: https://github.com/ramsey/uuid/blob/4.x/CODE_OF_CONDUCT.md +[javauuid]: http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html +[pyuuid]: http://docs.python.org/3/library/uuid.html +[composer]: http://getcomposer.org/ +[contributing.md]: https://github.com/ramsey/uuid/blob/4.x/CONTRIBUTING.md +[security.md]: https://github.com/ramsey/uuid/blob/4.x/SECURITY.md +[license]: https://github.com/ramsey/uuid/blob/4.x/LICENSE diff --git a/tests/php_test_files/vendor/ramsey/uuid/composer.json b/tests/php_test_files/vendor/ramsey/uuid/composer.json new file mode 100644 index 0000000..8139b54 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/composer.json @@ -0,0 +1,108 @@ +{ + "name": "ramsey/uuid", + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "license": "MIT", + "type": "library", + "keywords": [ + "uuid", + "identifier", + "guid" + ], + "require": { + "php": "^8.0", + "ext-json": "*", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", + "ramsey/collection": "^1.2 || ^2.0" + }, + "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" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "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." + }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Ramsey\\Uuid\\Benchmark\\": "tests/benchmark/", + "Ramsey\\Uuid\\StaticAnalysis\\": "tests/static-analysis/", + "Ramsey\\Uuid\\Test\\": "tests/" + } + }, + "config": { + "allow-plugins": { + "captainhook/plugin-composer": true, + "ergebnis/composer-normalize": true, + "phpstan/extension-installer": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "ramsey/composer-repl": true + }, + "sort-packages": true + }, + "extra": { + "captainhook": { + "force-install": true + } + }, + "scripts": { + "analyze": [ + "@phpstan", + "@psalm" + ], + "build:clean": "git clean -fX build/", + "lint": "parallel-lint src tests", + "lint:paths": "parallel-lint", + "phpbench": "phpbench run", + "phpcbf": "phpcbf -vpw --cache=build/cache/phpcs.cache", + "phpcs": "phpcs --cache=build/cache/phpcs.cache", + "phpstan": [ + "phpstan analyse --no-progress --memory-limit=1G", + "phpstan analyse -c phpstan-tests.neon --no-progress --memory-limit=1G" + ], + "phpunit": "phpunit --verbose --colors=always", + "phpunit-coverage": "phpunit --verbose --colors=always --coverage-html build/coverage", + "psalm": "psalm --show-info=false --config=psalm.xml", + "test": [ + "@lint", + "@phpbench", + "@phpcs", + "@phpstan", + "@psalm", + "@phpunit" + ] + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/BinaryUtils.php b/tests/php_test_files/vendor/ramsey/uuid/src/BinaryUtils.php new file mode 100644 index 0000000..fb8ba9a --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/BinaryUtils.php @@ -0,0 +1,63 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +/** + * Provides binary math utilities + */ +class BinaryUtils +{ + /** + * Applies the RFC 4122 variant field to the 16-bit clock sequence + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant + * + * @param int $clockSeq The 16-bit clock sequence value before the RFC 4122 + * variant is applied + * + * @return int The 16-bit clock sequence multiplexed with the UUID variant + * + * @psalm-pure + */ + public static function applyVariant(int $clockSeq): int + { + $clockSeq = $clockSeq & 0x3fff; + $clockSeq |= 0x8000; + + return $clockSeq; + } + + /** + * Applies the RFC 4122 version number to the 16-bit `time_hi_and_version` field + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, ยง 4.1.3: Version + * + * @param int $timeHi The value of the 16-bit `time_hi_and_version` field + * before the RFC 4122 version is applied + * @param int $version The RFC 4122 version to apply to the `time_hi` field + * + * @return int The 16-bit time_hi field of the timestamp multiplexed with + * the UUID version number + * + * @psalm-pure + */ + public static function applyVersion(int $timeHi, int $version): int + { + $timeHi = $timeHi & 0x0fff; + $timeHi |= $version << 12; + + return $timeHi; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Builder/BuilderCollection.php b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/BuilderCollection.php new file mode 100644 index 0000000..9df3110 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/BuilderCollection.php @@ -0,0 +1,85 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Builder; + +use Ramsey\Collection\AbstractCollection; +use Ramsey\Uuid\Converter\Number\GenericNumberConverter; +use Ramsey\Uuid\Converter\Time\GenericTimeConverter; +use Ramsey\Uuid\Converter\Time\PhpTimeConverter; +use Ramsey\Uuid\Guid\GuidBuilder; +use Ramsey\Uuid\Math\BrickMathCalculator; +use Ramsey\Uuid\Nonstandard\UuidBuilder as NonstandardUuidBuilder; +use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; +use Traversable; + +/** + * A collection of UuidBuilderInterface objects + * + * @deprecated this class has been deprecated, and will be removed in 5.0.0. The use-case for this class comes from + * a pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced + * at runtime: that is no longer necessary, now that you can safely verify your code to be correct, and use + * more generic types like `iterable` instead. + * + * @extends AbstractCollection + */ +class BuilderCollection extends AbstractCollection +{ + public function getType(): string + { + return UuidBuilderInterface::class; + } + + /** + * @psalm-mutation-free + * @psalm-suppress ImpureMethodCall + * @psalm-suppress InvalidTemplateParam + */ + public function getIterator(): Traversable + { + return parent::getIterator(); + } + + /** + * Re-constructs the object from its serialized form + * + * @param string $serialized The serialized PHP string to unserialize into + * a UuidInterface instance + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + * @psalm-suppress RedundantConditionGivenDocblockType + */ + public function unserialize($serialized): void + { + /** @var array $data */ + $data = unserialize($serialized, [ + 'allowed_classes' => [ + BrickMathCalculator::class, + GenericNumberConverter::class, + GenericTimeConverter::class, + GuidBuilder::class, + NonstandardUuidBuilder::class, + PhpTimeConverter::class, + Rfc4122UuidBuilder::class, + ], + ]); + + $this->data = array_filter( + $data, + function ($unserialized): bool { + return $unserialized instanceof UuidBuilderInterface; + } + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php new file mode 100644 index 0000000..7c4a6f8 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php @@ -0,0 +1,26 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Builder; + +use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; + +/** + * @deprecated Transition to {@see Rfc4122UuidBuilder}. + * + * @psalm-immutable + */ +class DefaultUuidBuilder extends Rfc4122UuidBuilder +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php new file mode 100644 index 0000000..20b3842 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php @@ -0,0 +1,67 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Builder; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\Time\DegradedTimeConverter; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\DegradedUuid; +use Ramsey\Uuid\Rfc4122\Fields as Rfc4122Fields; +use Ramsey\Uuid\UuidInterface; + +/** + * @deprecated DegradedUuid instances are no longer necessary to support 32-bit + * systems. Transition to {@see DefaultUuidBuilder}. + * + * @psalm-immutable + */ +class DegradedUuidBuilder implements UuidBuilderInterface +{ + private TimeConverterInterface $timeConverter; + + /** + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the DegradedUuid + * @param TimeConverterInterface|null $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to Unix timestamps + */ + public function __construct( + private NumberConverterInterface $numberConverter, + ?TimeConverterInterface $timeConverter = null + ) { + $this->timeConverter = $timeConverter ?: new DegradedTimeConverter(); + } + + /** + * Builds and returns a DegradedUuid + * + * @param CodecInterface $codec The codec to use for building this DegradedUuid instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return DegradedUuid The DegradedUuidBuild returns an instance of Ramsey\Uuid\DegradedUuid + * + * @psalm-pure + */ + public function build(CodecInterface $codec, string $bytes): UuidInterface + { + return new DegradedUuid( + new Rfc4122Fields($bytes), + $this->numberConverter, + $codec, + $this->timeConverter + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php new file mode 100644 index 0000000..ba5f31f --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php @@ -0,0 +1,68 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Builder; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Exception\BuilderNotFoundException; +use Ramsey\Uuid\Exception\UnableToBuildUuidException; +use Ramsey\Uuid\UuidInterface; + +/** + * FallbackBuilder builds a UUID by stepping through a list of UUID builders + * until a UUID can be constructed without exceptions + * + * @psalm-immutable + */ +class FallbackBuilder implements UuidBuilderInterface +{ + /** + * @param iterable $builders An array of UUID builders + */ + public function __construct(private iterable $builders) + { + } + + /** + * Builds and returns a UuidInterface instance using the first builder that + * succeeds + * + * @param CodecInterface $codec The codec to use for building this instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return UuidInterface an instance of a UUID object + * + * @psalm-pure + */ + public function build(CodecInterface $codec, string $bytes): UuidInterface + { + $lastBuilderException = null; + + foreach ($this->builders as $builder) { + try { + return $builder->build($codec, $bytes); + } catch (UnableToBuildUuidException $exception) { + $lastBuilderException = $exception; + + continue; + } + } + + throw new BuilderNotFoundException( + 'Could not find a suitable builder for the provided codec and fields', + 0, + $lastBuilderException + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php new file mode 100644 index 0000000..8e58b2b --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php @@ -0,0 +1,39 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Builder; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\UuidInterface; + +/** + * A UUID builder builds instances of UuidInterface + * + * @psalm-immutable + */ +interface UuidBuilderInterface +{ + /** + * Builds and returns a UuidInterface + * + * @param CodecInterface $codec The codec to use for building this UuidInterface instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return UuidInterface Implementations may choose to return more specific + * instances of UUIDs that implement UuidInterface + * + * @psalm-pure + */ + public function build(CodecInterface $codec, string $bytes): UuidInterface; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Codec/CodecInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/CodecInterface.php new file mode 100644 index 0000000..85f8a7e --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/CodecInterface.php @@ -0,0 +1,71 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Codec; + +use Ramsey\Uuid\UuidInterface; + +/** + * A codec encodes and decodes a UUID according to defined rules + * + * @psalm-immutable + */ +interface CodecInterface +{ + /** + * Returns a hexadecimal string representation of a UuidInterface + * + * @param UuidInterface $uuid The UUID for which to create a hexadecimal + * string representation + * + * @return string Hexadecimal string representation of a UUID + * + * @psalm-return non-empty-string + */ + public function encode(UuidInterface $uuid): string; + + /** + * Returns a binary string representation of a UuidInterface + * + * @param UuidInterface $uuid The UUID for which to create a binary string + * representation + * + * @return string Binary string representation of a UUID + * + * @psalm-return non-empty-string + */ + public function encodeBinary(UuidInterface $uuid): string; + + /** + * Returns a UuidInterface derived from a hexadecimal string representation + * + * @param string $encodedUuid The hexadecimal string representation to + * convert into a UuidInterface instance + * + * @return UuidInterface An instance of a UUID decoded from a hexadecimal + * string representation + */ + public function decode(string $encodedUuid): UuidInterface; + + /** + * Returns a UuidInterface derived from a binary string representation + * + * @param string $bytes The binary string representation to convert into a + * UuidInterface instance + * + * @return UuidInterface An instance of a UUID decoded from a binary string + * representation + */ + public function decodeBytes(string $bytes): UuidInterface; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php new file mode 100644 index 0000000..04872e0 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php @@ -0,0 +1,76 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Codec; + +use Ramsey\Uuid\Guid\Guid; +use Ramsey\Uuid\UuidInterface; + +use function bin2hex; +use function sprintf; +use function substr; + +/** + * GuidStringCodec encodes and decodes globally unique identifiers (GUID) + * + * @see Guid + * + * @psalm-immutable + */ +class GuidStringCodec extends StringCodec +{ + public function encode(UuidInterface $uuid): string + { + $hex = bin2hex($uuid->getFields()->getBytes()); + + /** @var non-empty-string */ + return sprintf( + '%02s%02s%02s%02s-%02s%02s-%02s%02s-%04s-%012s', + substr($hex, 6, 2), + substr($hex, 4, 2), + substr($hex, 2, 2), + substr($hex, 0, 2), + substr($hex, 10, 2), + substr($hex, 8, 2), + substr($hex, 14, 2), + substr($hex, 12, 2), + substr($hex, 16, 4), + substr($hex, 20), + ); + } + + public function decode(string $encodedUuid): UuidInterface + { + $bytes = $this->getBytes($encodedUuid); + + return $this->getBuilder()->build($this, $this->swapBytes($bytes)); + } + + public function decodeBytes(string $bytes): UuidInterface + { + // Specifically call parent::decode to preserve correct byte order + return parent::decode(bin2hex($bytes)); + } + + /** + * Swaps bytes according to the GUID rules + */ + private function swapBytes(string $bytes): string + { + return $bytes[3] . $bytes[2] . $bytes[1] . $bytes[0] + . $bytes[5] . $bytes[4] + . $bytes[7] . $bytes[6] + . substr($bytes, 8); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php new file mode 100644 index 0000000..0798ebc --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php @@ -0,0 +1,113 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Codec; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Exception\UnsupportedOperationException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Uuid; +use Ramsey\Uuid\UuidInterface; + +use function strlen; +use function substr; + +/** + * OrderedTimeCodec encodes and decodes a UUID, optimizing the byte order for + * more efficient storage + * + * For binary representations of version 1 UUID, this codec may be used to + * reorganize the time fields, making the UUID closer to sequential when storing + * the bytes. According to Percona, this optimization can improve database + * INSERTs and SELECTs using the UUID column as a key. + * + * The string representation of the UUID will remain unchanged. Only the binary + * representation is reordered. + * + * **PLEASE NOTE:** Binary representations of UUIDs encoded with this codec must + * be decoded with this codec. Decoding using another codec can result in + * malformed UUIDs. + * + * @link https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/ Storing UUID Values in MySQL + * + * @psalm-immutable + */ +class OrderedTimeCodec extends StringCodec +{ + /** + * Returns a binary string representation of a UUID, with the timestamp + * fields rearranged for optimized storage + * + * @inheritDoc + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encodeBinary(UuidInterface $uuid): string + { + if ( + !($uuid->getFields() instanceof Rfc4122FieldsInterface) + || $uuid->getFields()->getVersion() !== Uuid::UUID_TYPE_TIME + ) { + throw new InvalidArgumentException( + 'Expected RFC 4122 version 1 (time-based) UUID' + ); + } + + $bytes = $uuid->getFields()->getBytes(); + + /** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */ + return $bytes[6] . $bytes[7] + . $bytes[4] . $bytes[5] + . $bytes[0] . $bytes[1] . $bytes[2] . $bytes[3] + . substr($bytes, 8); + } + + /** + * Returns a UuidInterface derived from an ordered-time binary string + * representation + * + * @throws InvalidArgumentException if $bytes is an invalid length + * + * @inheritDoc + */ + public function decodeBytes(string $bytes): UuidInterface + { + if (strlen($bytes) !== 16) { + throw new InvalidArgumentException( + '$bytes string should contain 16 characters.' + ); + } + + // Rearrange the bytes to their original order. + $rearrangedBytes = $bytes[4] . $bytes[5] . $bytes[6] . $bytes[7] + . $bytes[2] . $bytes[3] + . $bytes[0] . $bytes[1] + . substr($bytes, 8); + + $uuid = parent::decodeBytes($rearrangedBytes); + + if ( + !($uuid->getFields() instanceof Rfc4122FieldsInterface) + || $uuid->getFields()->getVersion() !== Uuid::UUID_TYPE_TIME + ) { + throw new UnsupportedOperationException( + 'Attempting to decode a non-time-based UUID using ' + . 'OrderedTimeCodec' + ); + } + + return $uuid; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Codec/StringCodec.php b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/StringCodec.php new file mode 100644 index 0000000..95f38d2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/StringCodec.php @@ -0,0 +1,131 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Codec; + +use Ramsey\Uuid\Builder\UuidBuilderInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Exception\InvalidUuidStringException; +use Ramsey\Uuid\Uuid; +use Ramsey\Uuid\UuidInterface; + +use function bin2hex; +use function hex2bin; +use function implode; +use function sprintf; +use function str_replace; +use function strlen; +use function substr; + +/** + * StringCodec encodes and decodes RFC 4122 UUIDs + * + * @link http://tools.ietf.org/html/rfc4122 + * + * @psalm-immutable + */ +class StringCodec implements CodecInterface +{ + /** + * Constructs a StringCodec + * + * @param UuidBuilderInterface $builder The builder to use when encoding UUIDs + */ + public function __construct(private UuidBuilderInterface $builder) + { + } + + public function encode(UuidInterface $uuid): string + { + $hex = bin2hex($uuid->getFields()->getBytes()); + + /** @var non-empty-string */ + return sprintf( + '%08s-%04s-%04s-%04s-%012s', + substr($hex, 0, 8), + substr($hex, 8, 4), + substr($hex, 12, 4), + substr($hex, 16, 4), + substr($hex, 20), + ); + } + + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encodeBinary(UuidInterface $uuid): string + { + /** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */ + return $uuid->getFields()->getBytes(); + } + + /** + * @throws InvalidUuidStringException + * + * @inheritDoc + */ + public function decode(string $encodedUuid): UuidInterface + { + return $this->builder->build($this, $this->getBytes($encodedUuid)); + } + + public function decodeBytes(string $bytes): UuidInterface + { + if (strlen($bytes) !== 16) { + throw new InvalidArgumentException( + '$bytes string should contain 16 characters.' + ); + } + + return $this->builder->build($this, $bytes); + } + + /** + * Returns the UUID builder + */ + protected function getBuilder(): UuidBuilderInterface + { + return $this->builder; + } + + /** + * Returns a byte string of the UUID + */ + protected function getBytes(string $encodedUuid): string + { + $parsedUuid = str_replace( + ['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}', '-'], + '', + $encodedUuid + ); + + $components = [ + substr($parsedUuid, 0, 8), + substr($parsedUuid, 8, 4), + substr($parsedUuid, 12, 4), + substr($parsedUuid, 16, 4), + substr($parsedUuid, 20), + ]; + + if (!Uuid::isValid(implode('-', $components))) { + throw new InvalidUuidStringException( + 'Invalid UUID string: ' . $encodedUuid + ); + } + + return (string) hex2bin($parsedUuid); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php new file mode 100644 index 0000000..0e0042d --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php @@ -0,0 +1,113 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Codec; + +use Ramsey\Uuid\Exception\InvalidUuidStringException; +use Ramsey\Uuid\UuidInterface; + +use function bin2hex; +use function sprintf; +use function substr; +use function substr_replace; + +/** + * TimestampFirstCombCodec encodes and decodes COMBs, with the timestamp as the + * first 48 bits + * + * In contrast with the TimestampLastCombCodec, the TimestampFirstCombCodec + * adds the timestamp to the first 48 bits of the COMB. To generate a + * timestamp-first COMB, set the TimestampFirstCombCodec as the codec, along + * with the CombGenerator as the random generator. + * + * ``` php + * $factory = new UuidFactory(); + * + * $factory->setCodec(new TimestampFirstCombCodec($factory->getUuidBuilder())); + * + * $factory->setRandomGenerator(new CombGenerator( + * $factory->getRandomGenerator(), + * $factory->getNumberConverter() + * )); + * + * $timestampFirstComb = $factory->uuid4(); + * ``` + * + * @link https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys + * + * @psalm-immutable + */ +class TimestampFirstCombCodec extends StringCodec +{ + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encode(UuidInterface $uuid): string + { + $bytes = $this->swapBytes($uuid->getFields()->getBytes()); + + return sprintf( + '%08s-%04s-%04s-%04s-%012s', + bin2hex(substr($bytes, 0, 4)), + bin2hex(substr($bytes, 4, 2)), + bin2hex(substr($bytes, 6, 2)), + bin2hex(substr($bytes, 8, 2)), + bin2hex(substr($bytes, 10)) + ); + } + + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function encodeBinary(UuidInterface $uuid): string + { + /** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */ + return $this->swapBytes($uuid->getFields()->getBytes()); + } + + /** + * @throws InvalidUuidStringException + * + * @inheritDoc + */ + public function decode(string $encodedUuid): UuidInterface + { + $bytes = $this->getBytes($encodedUuid); + + return $this->getBuilder()->build($this, $this->swapBytes($bytes)); + } + + public function decodeBytes(string $bytes): UuidInterface + { + return $this->getBuilder()->build($this, $this->swapBytes($bytes)); + } + + /** + * Swaps bytes according to the timestamp-first COMB rules + */ + private function swapBytes(string $bytes): string + { + $first48Bits = substr($bytes, 0, 6); + $last48Bits = substr($bytes, -6); + + $bytes = substr_replace($bytes, $last48Bits, 0, 6); + $bytes = substr_replace($bytes, $first48Bits, -6); + + return $bytes; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php new file mode 100644 index 0000000..4856dea --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php @@ -0,0 +1,51 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Codec; + +/** + * TimestampLastCombCodec encodes and decodes COMBs, with the timestamp as the + * last 48 bits + * + * The CombGenerator when used with the StringCodec (and, by proxy, the + * TimestampLastCombCodec) adds the timestamp to the last 48 bits of the COMB. + * The TimestampLastCombCodec is provided for the sake of consistency. In + * practice, it is identical to the standard StringCodec but, it may be used + * with the CombGenerator for additional context when reading code. + * + * Consider the following code. By default, the codec used by UuidFactory is the + * StringCodec, but here, we explicitly set the TimestampLastCombCodec. It is + * redundant, but it is clear that we intend this COMB to be generated with the + * timestamp appearing at the end. + * + * ``` php + * $factory = new UuidFactory(); + * + * $factory->setCodec(new TimestampLastCombCodec($factory->getUuidBuilder())); + * + * $factory->setRandomGenerator(new CombGenerator( + * $factory->getRandomGenerator(), + * $factory->getNumberConverter() + * )); + * + * $timestampLastComb = $factory->uuid4(); + * ``` + * + * @link https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys + * + * @psalm-immutable + */ +class TimestampLastCombCodec extends StringCodec +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php new file mode 100644 index 0000000..99b88b3 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php @@ -0,0 +1,54 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Number; + +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Math\BrickMathCalculator; + +/** + * Previously used to integrate moontoast/math as a bignum arithmetic library, + * BigNumberConverter is deprecated in favor of GenericNumberConverter + * + * @deprecated Transition to {@see GenericNumberConverter}. + * + * @psalm-immutable + */ +class BigNumberConverter implements NumberConverterInterface +{ + private NumberConverterInterface $converter; + + public function __construct() + { + $this->converter = new GenericNumberConverter(new BrickMathCalculator()); + } + + /** + * @inheritDoc + * @psalm-pure + */ + public function fromHex(string $hex): string + { + return $this->converter->fromHex($hex); + } + + /** + * @inheritDoc + * @psalm-pure + */ + public function toHex(string $number): string + { + return $this->converter->toHex($number); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php new file mode 100644 index 0000000..c9cfa68 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php @@ -0,0 +1,25 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Number; + +/** + * @deprecated DegradedNumberConverter is no longer necessary for converting + * numbers on 32-bit systems. Transition to {@see GenericNumberConverter}. + * + * @psalm-immutable + */ +class DegradedNumberConverter extends BigNumberConverter +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php new file mode 100644 index 0000000..043c3c4 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php @@ -0,0 +1,57 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Number; + +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Math\CalculatorInterface; +use Ramsey\Uuid\Type\Integer as IntegerObject; + +/** + * GenericNumberConverter uses the provided calculator to convert decimal + * numbers to and from hexadecimal values + * + * @psalm-immutable + */ +class GenericNumberConverter implements NumberConverterInterface +{ + public function __construct(private CalculatorInterface $calculator) + { + } + + /** + * @inheritDoc + * @psalm-pure + * @psalm-return numeric-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function fromHex(string $hex): string + { + return $this->calculator->fromBase($hex, 16)->toString(); + } + + /** + * @inheritDoc + * @psalm-pure + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function toHex(string $number): string + { + /** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */ + return $this->calculator->toBase(new IntegerObject($number), 16); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php new file mode 100644 index 0000000..b33ec31 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php @@ -0,0 +1,57 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter; + +/** + * A number converter converts UUIDs from hexadecimal characters into + * representations of integers and vice versa + * + * @psalm-immutable + */ +interface NumberConverterInterface +{ + /** + * Converts a hexadecimal number into an string integer representation of + * the number + * + * The integer representation returned is a string representation of the + * integer, to accommodate unsigned integers greater than PHP_INT_MAX. + * + * @param string $hex The hexadecimal string representation to convert + * + * @return string String representation of an integer + * + * @psalm-return numeric-string + * + * @psalm-pure + */ + public function fromHex(string $hex): string; + + /** + * Converts a string integer representation into a hexadecimal string + * representation of the number + * + * @param string $number A string integer representation to convert; this + * must be a numeric string to accommodate unsigned integers greater + * than PHP_INT_MAX. + * + * @return string Hexadecimal string + * + * @psalm-return non-empty-string + * + * @psalm-pure + */ + public function toHex(string $number): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php new file mode 100644 index 0000000..b6bca9e --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php @@ -0,0 +1,48 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Time; + +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Math\BrickMathCalculator; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Time; + +/** + * Previously used to integrate moontoast/math as a bignum arithmetic library, + * BigNumberTimeConverter is deprecated in favor of GenericTimeConverter + * + * @deprecated Transition to {@see GenericTimeConverter}. + * + * @psalm-immutable + */ +class BigNumberTimeConverter implements TimeConverterInterface +{ + private TimeConverterInterface $converter; + + public function __construct() + { + $this->converter = new GenericTimeConverter(new BrickMathCalculator()); + } + + public function calculateTime(string $seconds, string $microseconds): Hexadecimal + { + return $this->converter->calculateTime($seconds, $microseconds); + } + + public function convertTime(Hexadecimal $uuidTimestamp): Time + { + return $this->converter->convertTime($uuidTimestamp); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php new file mode 100644 index 0000000..cdc2875 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php @@ -0,0 +1,25 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Time; + +/** + * @deprecated DegradedTimeConverter is no longer necessary for converting + * time on 32-bit systems. Transition to {@see GenericTimeConverter}. + * + * @psalm-immutable + */ +class DegradedTimeConverter extends BigNumberTimeConverter +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php new file mode 100644 index 0000000..f6b60ab --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php @@ -0,0 +1,118 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Time; + +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Math\CalculatorInterface; +use Ramsey\Uuid\Math\RoundingMode; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Type\Time; + +use function explode; +use function str_pad; + +use const STR_PAD_LEFT; + +/** + * GenericTimeConverter uses the provided calculator to calculate and convert + * time values + * + * @psalm-immutable + */ +class GenericTimeConverter implements TimeConverterInterface +{ + /** + * The number of 100-nanosecond intervals from the Gregorian calendar epoch + * to the Unix epoch. + */ + private const GREGORIAN_TO_UNIX_INTERVALS = '122192928000000000'; + + /** + * The number of 100-nanosecond intervals in one second. + */ + private const SECOND_INTERVALS = '10000000'; + + /** + * The number of 100-nanosecond intervals in one microsecond. + */ + private const MICROSECOND_INTERVALS = '10'; + + public function __construct(private CalculatorInterface $calculator) + { + } + + public function calculateTime(string $seconds, string $microseconds): Hexadecimal + { + $timestamp = new Time($seconds, $microseconds); + + // Convert the seconds into a count of 100-nanosecond intervals. + $sec = $this->calculator->multiply( + $timestamp->getSeconds(), + new IntegerObject(self::SECOND_INTERVALS) + ); + + // Convert the microseconds into a count of 100-nanosecond intervals. + $usec = $this->calculator->multiply( + $timestamp->getMicroseconds(), + new IntegerObject(self::MICROSECOND_INTERVALS) + ); + + // Combine the seconds and microseconds intervals and add the count of + // 100-nanosecond intervals from the Gregorian calendar epoch to the + // Unix epoch. This gives us the correct count of 100-nanosecond + // intervals since the Gregorian calendar epoch for the given seconds + // and microseconds. + /** @var IntegerObject $uuidTime */ + $uuidTime = $this->calculator->add( + $sec, + $usec, + new IntegerObject(self::GREGORIAN_TO_UNIX_INTERVALS) + ); + + $uuidTimeHex = str_pad( + $this->calculator->toHexadecimal($uuidTime)->toString(), + 16, + '0', + STR_PAD_LEFT + ); + + return new Hexadecimal($uuidTimeHex); + } + + public function convertTime(Hexadecimal $uuidTimestamp): Time + { + // From the total, subtract the number of 100-nanosecond intervals from + // the Gregorian calendar epoch to the Unix epoch. This gives us the + // number of 100-nanosecond intervals from the Unix epoch, which also + // includes the microtime. + $epochNanoseconds = $this->calculator->subtract( + $this->calculator->toInteger($uuidTimestamp), + new IntegerObject(self::GREGORIAN_TO_UNIX_INTERVALS) + ); + + // Convert the 100-nanosecond intervals into seconds and microseconds. + $unixTimestamp = $this->calculator->divide( + RoundingMode::HALF_UP, + 6, + $epochNanoseconds, + new IntegerObject(self::SECOND_INTERVALS) + ); + + $split = explode('.', (string) $unixTimestamp, 2); + + return new Time($split[0], $split[1] ?? 0); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php new file mode 100644 index 0000000..66009f1 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php @@ -0,0 +1,172 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Time; + +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Math\BrickMathCalculator; +use Ramsey\Uuid\Math\CalculatorInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Type\Time; + +use function count; +use function dechex; +use function explode; +use function is_float; +use function is_int; +use function str_pad; +use function strlen; +use function substr; + +use const STR_PAD_LEFT; +use const STR_PAD_RIGHT; + +/** + * PhpTimeConverter uses built-in PHP functions and standard math operations + * available to the PHP programming language to provide facilities for + * converting parts of time into representations that may be used in UUIDs + * + * @psalm-immutable + */ +class PhpTimeConverter implements TimeConverterInterface +{ + /** + * The number of 100-nanosecond intervals from the Gregorian calendar epoch + * to the Unix epoch. + */ + private const GREGORIAN_TO_UNIX_INTERVALS = 0x01b21dd213814000; + + /** + * The number of 100-nanosecond intervals in one second. + */ + private const SECOND_INTERVALS = 10000000; + + /** + * The number of 100-nanosecond intervals in one microsecond. + */ + private const MICROSECOND_INTERVALS = 10; + + private int $phpPrecision; + private CalculatorInterface $calculator; + private TimeConverterInterface $fallbackConverter; + + public function __construct( + ?CalculatorInterface $calculator = null, + ?TimeConverterInterface $fallbackConverter = null + ) { + if ($calculator === null) { + $calculator = new BrickMathCalculator(); + } + + if ($fallbackConverter === null) { + $fallbackConverter = new GenericTimeConverter($calculator); + } + + $this->calculator = $calculator; + $this->fallbackConverter = $fallbackConverter; + $this->phpPrecision = (int) ini_get('precision'); + } + + public function calculateTime(string $seconds, string $microseconds): Hexadecimal + { + $seconds = new IntegerObject($seconds); + $microseconds = new IntegerObject($microseconds); + + // Calculate the count of 100-nanosecond intervals since the Gregorian + // calendar epoch for the given seconds and microseconds. + $uuidTime = ((int) $seconds->toString() * self::SECOND_INTERVALS) + + ((int) $microseconds->toString() * self::MICROSECOND_INTERVALS) + + self::GREGORIAN_TO_UNIX_INTERVALS; + + // Check to see whether we've overflowed the max/min integer size. + // If so, we will default to a different time converter. + /** @psalm-suppress RedundantCondition */ + if (!is_int($uuidTime)) { + return $this->fallbackConverter->calculateTime( + $seconds->toString(), + $microseconds->toString() + ); + } + + return new Hexadecimal(str_pad(dechex($uuidTime), 16, '0', STR_PAD_LEFT)); + } + + public function convertTime(Hexadecimal $uuidTimestamp): Time + { + $timestamp = $this->calculator->toInteger($uuidTimestamp); + + // Convert the 100-nanosecond intervals into seconds and microseconds. + $splitTime = $this->splitTime( + ((int) $timestamp->toString() - self::GREGORIAN_TO_UNIX_INTERVALS) + / self::SECOND_INTERVALS + ); + + if (count($splitTime) === 0) { + return $this->fallbackConverter->convertTime($uuidTimestamp); + } + + return new Time($splitTime['sec'], $splitTime['usec']); + } + + /** + * @param float|int $time The time to split into seconds and microseconds + * + * @return string[] + */ + private function splitTime(float | int $time): array + { + $split = explode('.', (string) $time, 2); + + // If the $time value is a float but $split only has 1 element, then the + // float math was rounded up to the next second, so we want to return + // an empty array to allow use of the fallback converter. + if (is_float($time) && count($split) === 1) { + return []; + } + + if (count($split) === 1) { + return [ + 'sec' => $split[0], + 'usec' => '0', + ]; + } + + // If the microseconds are less than six characters AND the length of + // the number is greater than or equal to the PHP precision, then it's + // possible that we lost some precision for the microseconds. Return an + // empty array, so that we can choose to use the fallback converter. + if (strlen($split[1]) < 6 && strlen((string) $time) >= $this->phpPrecision) { + return []; + } + + $microseconds = $split[1]; + + // Ensure the microseconds are no longer than 6 digits. If they are, + // truncate the number to the first 6 digits and round up, if needed. + if (strlen($microseconds) > 6) { + $roundingDigit = (int) substr($microseconds, 6, 1); + $microseconds = (int) substr($microseconds, 0, 6); + + if ($roundingDigit >= 5) { + $microseconds++; + } + } + + return [ + 'sec' => $split[0], + 'usec' => str_pad((string) $microseconds, 6, '0', STR_PAD_RIGHT), + ]; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php new file mode 100644 index 0000000..4d6d0a8 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php @@ -0,0 +1,90 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter\Time; + +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Math\CalculatorInterface; +use Ramsey\Uuid\Math\RoundingMode; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Type\Time; + +use function explode; +use function str_pad; + +use const STR_PAD_LEFT; + +/** + * UnixTimeConverter converts Unix Epoch timestamps to/from hexadecimal values + * consisting of milliseconds elapsed since the Unix Epoch + * + * @psalm-immutable + */ +class UnixTimeConverter implements TimeConverterInterface +{ + private const MILLISECONDS = 1000; + + public function __construct(private CalculatorInterface $calculator) + { + } + + public function calculateTime(string $seconds, string $microseconds): Hexadecimal + { + $timestamp = new Time($seconds, $microseconds); + + // Convert the seconds into milliseconds. + $sec = $this->calculator->multiply( + $timestamp->getSeconds(), + new IntegerObject(self::MILLISECONDS), + ); + + // Convert the microseconds into milliseconds; the scale is zero because + // we need to discard the fractional part. + $usec = $this->calculator->divide( + RoundingMode::DOWN, // Always round down to stay in the previous millisecond. + 0, + $timestamp->getMicroseconds(), + new IntegerObject(self::MILLISECONDS), + ); + + /** @var IntegerObject $unixTime */ + $unixTime = $this->calculator->add($sec, $usec); + + $unixTimeHex = str_pad( + $this->calculator->toHexadecimal($unixTime)->toString(), + 12, + '0', + STR_PAD_LEFT + ); + + return new Hexadecimal($unixTimeHex); + } + + public function convertTime(Hexadecimal $uuidTimestamp): Time + { + $milliseconds = $this->calculator->toInteger($uuidTimestamp); + + $unixTimestamp = $this->calculator->divide( + RoundingMode::HALF_UP, + 6, + $milliseconds, + new IntegerObject(self::MILLISECONDS) + ); + + $split = explode('.', (string) $unixTimestamp, 2); + + return new Time($split[0], $split[1] ?? '0'); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php new file mode 100644 index 0000000..1e84807 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php @@ -0,0 +1,58 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Converter; + +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Time; + +/** + * A time converter converts timestamps into representations that may be used + * in UUIDs + * + * @psalm-immutable + */ +interface TimeConverterInterface +{ + /** + * Uses the provided seconds and micro-seconds to calculate the count of + * 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for + * RFC 4122 variant UUIDs + * + * @link http://tools.ietf.org/html/rfc4122#section-4.2.2 RFC 4122, ยง 4.2.2: Generation Details + * + * @param string $seconds A string representation of the number of seconds + * since the Unix epoch for the time to calculate + * @param string $microseconds A string representation of the micro-seconds + * associated with the time to calculate + * + * @return Hexadecimal The full UUID timestamp as a Hexadecimal value + * + * @psalm-pure + */ + public function calculateTime(string $seconds, string $microseconds): Hexadecimal; + + /** + * Converts a timestamp extracted from a UUID to a Unix timestamp + * + * @param Hexadecimal $uuidTimestamp A hexadecimal representation of a UUID + * timestamp; a UUID timestamp is a count of 100-nanosecond intervals + * since UTC 00:00:00.00, 15 October 1582. + * + * @return Time An instance of {@see Time} + * + * @psalm-pure + */ + public function convertTime(Hexadecimal $uuidTimestamp): Time; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/DegradedUuid.php b/tests/php_test_files/vendor/ramsey/uuid/src/DegradedUuid.php new file mode 100644 index 0000000..9166042 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/DegradedUuid.php @@ -0,0 +1,25 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +/** + * @deprecated DegradedUuid is no longer necessary to represent UUIDs on 32-bit + * systems. Transition typehints to {@see UuidInterface}. + * + * @psalm-immutable + */ +class DegradedUuid extends Uuid +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php new file mode 100644 index 0000000..ac01a79 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php @@ -0,0 +1,140 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use DateTimeInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; + +/** + * This interface encapsulates deprecated methods for ramsey/uuid + * + * @psalm-immutable + */ +interface DeprecatedUuidInterface +{ + /** + * @deprecated This method will be removed in 5.0.0. There is no alternative + * recommendation, so plan accordingly. + */ + public function getNumberConverter(): NumberConverterInterface; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. + * + * @return string[] + */ + public function getFieldsHex(): array; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}. + */ + public function getClockSeqHiAndReservedHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}. + */ + public function getClockSeqLowHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}. + */ + public function getClockSequenceHex(): string; + + /** + * @deprecated In ramsey/uuid version 5.0.0, this will be removed from the + * interface. It is available at {@see UuidV1::getDateTime()}. + */ + public function getDateTime(): DateTimeInterface; + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getLeastSignificantBitsHex(): string; + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getMostSignificantBitsHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}. + */ + public function getNodeHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}. + */ + public function getTimeHiAndVersionHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}. + */ + public function getTimeLowHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}. + */ + public function getTimeMidHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}. + */ + public function getTimestampHex(): string; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}. + */ + public function getVariant(): ?int; + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}. + */ + public function getVersion(): ?int; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php b/tests/php_test_files/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php new file mode 100644 index 0000000..d3fbb0c --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php @@ -0,0 +1,360 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use DateTimeImmutable; +use DateTimeInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Exception\DateTimeException; +use Ramsey\Uuid\Exception\UnsupportedOperationException; +use Throwable; + +use function str_pad; +use function substr; + +use const STR_PAD_LEFT; + +/** + * This trait encapsulates deprecated methods for ramsey/uuid; this trait and + * its methods will be removed in ramsey/uuid 5.0.0. + * + * @deprecated This trait and its methods will be removed in ramsey/uuid 5.0.0. + * + * @psalm-immutable + */ +trait DeprecatedUuidMethodsTrait +{ + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getClockSeqHiAndReserved(): string + { + return $this->numberConverter->fromHex($this->fields->getClockSeqHiAndReserved()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}. + */ + public function getClockSeqHiAndReservedHex(): string + { + return $this->fields->getClockSeqHiAndReserved()->toString(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getClockSeqLow(): string + { + return $this->numberConverter->fromHex($this->fields->getClockSeqLow()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}. + */ + public function getClockSeqLowHex(): string + { + return $this->fields->getClockSeqLow()->toString(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getClockSequence(): string + { + return $this->numberConverter->fromHex($this->fields->getClockSeq()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}. + */ + public function getClockSequenceHex(): string + { + return $this->fields->getClockSeq()->toString(); + } + + /** + * @deprecated This method will be removed in 5.0.0. There is no alternative + * recommendation, so plan accordingly. + */ + public function getNumberConverter(): NumberConverterInterface + { + return $this->numberConverter; + } + + /** + * @deprecated In ramsey/uuid version 5.0.0, this will be removed. + * It is available at {@see UuidV1::getDateTime()}. + * + * @return DateTimeImmutable An immutable instance of DateTimeInterface + * + * @throws UnsupportedOperationException if UUID is not time-based + * @throws DateTimeException if DateTime throws an exception/error + */ + public function getDateTime(): DateTimeInterface + { + if ($this->fields->getVersion() !== 1) { + throw new UnsupportedOperationException('Not a time-based UUID'); + } + + $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); + + try { + return new DateTimeImmutable( + '@' + . $time->getSeconds()->toString() + . '.' + . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) + ); + } catch (Throwable $e) { + throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); + } + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. + * + * @return string[] + */ + public function getFieldsHex(): array + { + return [ + 'time_low' => $this->fields->getTimeLow()->toString(), + 'time_mid' => $this->fields->getTimeMid()->toString(), + 'time_hi_and_version' => $this->fields->getTimeHiAndVersion()->toString(), + 'clock_seq_hi_and_reserved' => $this->fields->getClockSeqHiAndReserved()->toString(), + 'clock_seq_low' => $this->fields->getClockSeqLow()->toString(), + 'node' => $this->fields->getNode()->toString(), + ]; + } + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getLeastSignificantBits(): string + { + $leastSignificantHex = substr($this->getHex()->toString(), 16); + + return $this->numberConverter->fromHex($leastSignificantHex); + } + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getLeastSignificantBitsHex(): string + { + return substr($this->getHex()->toString(), 16); + } + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getMostSignificantBits(): string + { + $mostSignificantHex = substr($this->getHex()->toString(), 0, 16); + + return $this->numberConverter->fromHex($mostSignificantHex); + } + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + */ + public function getMostSignificantBitsHex(): string + { + return substr($this->getHex()->toString(), 0, 16); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()} and use the + * arbitrary-precision math library of your choice to convert it to a + * string integer. + */ + public function getNode(): string + { + return $this->numberConverter->fromHex($this->fields->getNode()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}. + */ + public function getNodeHex(): string + { + return $this->fields->getNode()->toString(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + */ + public function getTimeHiAndVersion(): string + { + return $this->numberConverter->fromHex($this->fields->getTimeHiAndVersion()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}. + */ + public function getTimeHiAndVersionHex(): string + { + return $this->fields->getTimeHiAndVersion()->toString(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()} and use the + * arbitrary-precision math library of your choice to convert it to a + * string integer. + */ + public function getTimeLow(): string + { + return $this->numberConverter->fromHex($this->fields->getTimeLow()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}. + */ + public function getTimeLowHex(): string + { + return $this->fields->getTimeLow()->toString(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()} and use the + * arbitrary-precision math library of your choice to convert it to a + * string integer. + */ + public function getTimeMid(): string + { + return $this->numberConverter->fromHex($this->fields->getTimeMid()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}. + */ + public function getTimeMidHex(): string + { + return $this->fields->getTimeMid()->toString(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()} and use + * the arbitrary-precision math library of your choice to convert it to + * a string integer. + */ + public function getTimestamp(): string + { + if ($this->fields->getVersion() !== 1) { + throw new UnsupportedOperationException('Not a time-based UUID'); + } + + return $this->numberConverter->fromHex($this->fields->getTimestamp()->toString()); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}. + */ + public function getTimestampHex(): string + { + if ($this->fields->getVersion() !== 1) { + throw new UnsupportedOperationException('Not a time-based UUID'); + } + + return $this->fields->getTimestamp()->toString(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}. + */ + public function getVariant(): ?int + { + return $this->fields->getVariant(); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}. + */ + public function getVersion(): ?int + { + return $this->fields->getVersion(); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php new file mode 100644 index 0000000..220ffed --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate that no suitable builder could be found + */ +class BuilderNotFoundException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/DateTimeException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/DateTimeException.php new file mode 100644 index 0000000..5f0e658 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/DateTimeException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate that the PHP DateTime extension encountered an exception/error + */ +class DateTimeException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/DceSecurityException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/DceSecurityException.php new file mode 100644 index 0000000..e6d8001 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/DceSecurityException.php @@ -0,0 +1,25 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate an exception occurred while dealing with DCE Security + * (version 2) UUIDs + */ +class DceSecurityException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..2a1fa3a --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use InvalidArgumentException as PhpInvalidArgumentException; + +/** + * Thrown to indicate that the argument received is not valid + */ +class InvalidArgumentException extends PhpInvalidArgumentException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php new file mode 100644 index 0000000..1c94f65 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate that the bytes being operated on are invalid in some way + */ +class InvalidBytesException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php new file mode 100644 index 0000000..6d97581 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php @@ -0,0 +1,25 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +/** + * Thrown to indicate that the string received is not a valid UUID + * + * The InvalidArgumentException that this extends is the ramsey/uuid version + * of this exception. It exists in the same namespace as this class. + */ +class InvalidUuidStringException extends InvalidArgumentException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/NameException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/NameException.php new file mode 100644 index 0000000..fd96a1f --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/NameException.php @@ -0,0 +1,25 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate that an error occurred while attempting to hash a + * namespace and name + */ +class NameException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/NodeException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/NodeException.php new file mode 100644 index 0000000..0dbdd50 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/NodeException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate that attempting to fetch or create a node ID encountered an error + */ +class NodeException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/RandomSourceException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/RandomSourceException.php new file mode 100644 index 0000000..a44dd34 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/RandomSourceException.php @@ -0,0 +1,27 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate that the source of random data encountered an error + * + * This exception is used mostly to indicate that random_bytes() or random_int() + * threw an exception. However, it may be used for other sources of random data. + */ +class RandomSourceException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/TimeSourceException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/TimeSourceException.php new file mode 100644 index 0000000..fc9cf36 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/TimeSourceException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate that the source of time encountered an error + */ +class TimeSourceException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php new file mode 100644 index 0000000..5ba26d8 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use RuntimeException as PhpRuntimeException; + +/** + * Thrown to indicate a builder is unable to build a UUID + */ +class UnableToBuildUuidException extends PhpRuntimeException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php new file mode 100644 index 0000000..e1b3eda --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php @@ -0,0 +1,24 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use LogicException as PhpLogicException; + +/** + * Thrown to indicate that the requested operation is not supported + */ +class UnsupportedOperationException extends PhpLogicException implements UuidExceptionInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UuidExceptionInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UuidExceptionInterface.php new file mode 100644 index 0000000..a2f1c10 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Exception/UuidExceptionInterface.php @@ -0,0 +1,21 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Exception; + +use Throwable; + +interface UuidExceptionInterface extends Throwable +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/FeatureSet.php b/tests/php_test_files/vendor/ramsey/uuid/src/FeatureSet.php new file mode 100644 index 0000000..b9af869 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/FeatureSet.php @@ -0,0 +1,397 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use Ramsey\Uuid\Builder\FallbackBuilder; +use Ramsey\Uuid\Builder\UuidBuilderInterface; +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Codec\GuidStringCodec; +use Ramsey\Uuid\Codec\StringCodec; +use Ramsey\Uuid\Converter\Number\GenericNumberConverter; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\Time\GenericTimeConverter; +use Ramsey\Uuid\Converter\Time\PhpTimeConverter; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Generator\DceSecurityGenerator; +use Ramsey\Uuid\Generator\DceSecurityGeneratorInterface; +use Ramsey\Uuid\Generator\NameGeneratorFactory; +use Ramsey\Uuid\Generator\NameGeneratorInterface; +use Ramsey\Uuid\Generator\PeclUuidNameGenerator; +use Ramsey\Uuid\Generator\PeclUuidRandomGenerator; +use Ramsey\Uuid\Generator\PeclUuidTimeGenerator; +use Ramsey\Uuid\Generator\RandomGeneratorFactory; +use Ramsey\Uuid\Generator\RandomGeneratorInterface; +use Ramsey\Uuid\Generator\TimeGeneratorFactory; +use Ramsey\Uuid\Generator\TimeGeneratorInterface; +use Ramsey\Uuid\Generator\UnixTimeGenerator; +use Ramsey\Uuid\Guid\GuidBuilder; +use Ramsey\Uuid\Math\BrickMathCalculator; +use Ramsey\Uuid\Math\CalculatorInterface; +use Ramsey\Uuid\Nonstandard\UuidBuilder as NonstandardUuidBuilder; +use Ramsey\Uuid\Provider\Dce\SystemDceSecurityProvider; +use Ramsey\Uuid\Provider\DceSecurityProviderInterface; +use Ramsey\Uuid\Provider\Node\FallbackNodeProvider; +use Ramsey\Uuid\Provider\Node\RandomNodeProvider; +use Ramsey\Uuid\Provider\Node\SystemNodeProvider; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Provider\Time\SystemTimeProvider; +use Ramsey\Uuid\Provider\TimeProviderInterface; +use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; +use Ramsey\Uuid\Validator\GenericValidator; +use Ramsey\Uuid\Validator\ValidatorInterface; + +use const PHP_INT_SIZE; + +/** + * FeatureSet detects and exposes available features in the current environment + * + * A feature set is used by UuidFactory to determine the available features and + * capabilities of the environment. + */ +class FeatureSet +{ + private ?TimeProviderInterface $timeProvider = null; + private CalculatorInterface $calculator; + private CodecInterface $codec; + private DceSecurityGeneratorInterface $dceSecurityGenerator; + private NameGeneratorInterface $nameGenerator; + private NodeProviderInterface $nodeProvider; + private NumberConverterInterface $numberConverter; + private RandomGeneratorInterface $randomGenerator; + private TimeConverterInterface $timeConverter; + private TimeGeneratorInterface $timeGenerator; + private TimeGeneratorInterface $unixTimeGenerator; + private UuidBuilderInterface $builder; + private ValidatorInterface $validator; + + /** + * @param bool $useGuids True build UUIDs using the GuidStringCodec + * @param bool $force32Bit True to force the use of 32-bit functionality + * (primarily for testing purposes) + * @param bool $forceNoBigNumber (obsolete) + * @param bool $ignoreSystemNode True to disable attempts to check for the + * system node ID (primarily for testing purposes) + * @param bool $enablePecl True to enable the use of the PeclUuidTimeGenerator + * to generate version 1 UUIDs + */ + public function __construct( + bool $useGuids = false, + private bool $force32Bit = false, + bool $forceNoBigNumber = false, + private bool $ignoreSystemNode = false, + private bool $enablePecl = false + ) { + $this->randomGenerator = $this->buildRandomGenerator(); + $this->setCalculator(new BrickMathCalculator()); + $this->builder = $this->buildUuidBuilder($useGuids); + $this->codec = $this->buildCodec($useGuids); + $this->nodeProvider = $this->buildNodeProvider(); + $this->nameGenerator = $this->buildNameGenerator(); + $this->setTimeProvider(new SystemTimeProvider()); + $this->setDceSecurityProvider(new SystemDceSecurityProvider()); + $this->validator = new GenericValidator(); + + assert($this->timeProvider !== null); + $this->unixTimeGenerator = $this->buildUnixTimeGenerator(); + } + + /** + * Returns the builder configured for this environment + */ + public function getBuilder(): UuidBuilderInterface + { + return $this->builder; + } + + /** + * Returns the calculator configured for this environment + */ + public function getCalculator(): CalculatorInterface + { + return $this->calculator; + } + + /** + * Returns the codec configured for this environment + */ + public function getCodec(): CodecInterface + { + return $this->codec; + } + + /** + * Returns the DCE Security generator configured for this environment + */ + public function getDceSecurityGenerator(): DceSecurityGeneratorInterface + { + return $this->dceSecurityGenerator; + } + + /** + * Returns the name generator configured for this environment + */ + public function getNameGenerator(): NameGeneratorInterface + { + return $this->nameGenerator; + } + + /** + * Returns the node provider configured for this environment + */ + public function getNodeProvider(): NodeProviderInterface + { + return $this->nodeProvider; + } + + /** + * Returns the number converter configured for this environment + */ + public function getNumberConverter(): NumberConverterInterface + { + return $this->numberConverter; + } + + /** + * Returns the random generator configured for this environment + */ + public function getRandomGenerator(): RandomGeneratorInterface + { + return $this->randomGenerator; + } + + /** + * Returns the time converter configured for this environment + */ + public function getTimeConverter(): TimeConverterInterface + { + return $this->timeConverter; + } + + /** + * Returns the time generator configured for this environment + */ + public function getTimeGenerator(): TimeGeneratorInterface + { + return $this->timeGenerator; + } + + /** + * Returns the Unix Epoch time generator configured for this environment + */ + public function getUnixTimeGenerator(): TimeGeneratorInterface + { + return $this->unixTimeGenerator; + } + + /** + * Returns the validator configured for this environment + */ + public function getValidator(): ValidatorInterface + { + return $this->validator; + } + + /** + * Sets the calculator to use in this environment + */ + public function setCalculator(CalculatorInterface $calculator): void + { + $this->calculator = $calculator; + $this->numberConverter = $this->buildNumberConverter($calculator); + $this->timeConverter = $this->buildTimeConverter($calculator); + + /** @psalm-suppress RedundantPropertyInitializationCheck */ + if (isset($this->timeProvider)) { + $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); + } + } + + /** + * Sets the DCE Security provider to use in this environment + */ + public function setDceSecurityProvider(DceSecurityProviderInterface $dceSecurityProvider): void + { + $this->dceSecurityGenerator = $this->buildDceSecurityGenerator($dceSecurityProvider); + } + + /** + * Sets the node provider to use in this environment + */ + public function setNodeProvider(NodeProviderInterface $nodeProvider): void + { + $this->nodeProvider = $nodeProvider; + + if (isset($this->timeProvider)) { + $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); + } + } + + /** + * Sets the time provider to use in this environment + */ + public function setTimeProvider(TimeProviderInterface $timeProvider): void + { + $this->timeProvider = $timeProvider; + $this->timeGenerator = $this->buildTimeGenerator($timeProvider); + } + + /** + * Set the validator to use in this environment + */ + public function setValidator(ValidatorInterface $validator): void + { + $this->validator = $validator; + } + + /** + * Returns a codec configured for this environment + * + * @param bool $useGuids Whether to build UUIDs using the GuidStringCodec + */ + private function buildCodec(bool $useGuids = false): CodecInterface + { + if ($useGuids) { + return new GuidStringCodec($this->builder); + } + + return new StringCodec($this->builder); + } + + /** + * Returns a DCE Security generator configured for this environment + */ + private function buildDceSecurityGenerator( + DceSecurityProviderInterface $dceSecurityProvider + ): DceSecurityGeneratorInterface { + return new DceSecurityGenerator( + $this->numberConverter, + $this->timeGenerator, + $dceSecurityProvider + ); + } + + /** + * Returns a node provider configured for this environment + */ + private function buildNodeProvider(): NodeProviderInterface + { + if ($this->ignoreSystemNode) { + return new RandomNodeProvider(); + } + + return new FallbackNodeProvider([ + new SystemNodeProvider(), + new RandomNodeProvider(), + ]); + } + + /** + * Returns a number converter configured for this environment + */ + private function buildNumberConverter(CalculatorInterface $calculator): NumberConverterInterface + { + return new GenericNumberConverter($calculator); + } + + /** + * Returns a random generator configured for this environment + */ + private function buildRandomGenerator(): RandomGeneratorInterface + { + if ($this->enablePecl) { + return new PeclUuidRandomGenerator(); + } + + return (new RandomGeneratorFactory())->getGenerator(); + } + + /** + * Returns a time generator configured for this environment + * + * @param TimeProviderInterface $timeProvider The time provider to use with + * the time generator + */ + private function buildTimeGenerator(TimeProviderInterface $timeProvider): TimeGeneratorInterface + { + if ($this->enablePecl) { + return new PeclUuidTimeGenerator(); + } + + return (new TimeGeneratorFactory( + $this->nodeProvider, + $this->timeConverter, + $timeProvider + ))->getGenerator(); + } + + /** + * Returns a Unix Epoch time generator configured for this environment + */ + private function buildUnixTimeGenerator(): TimeGeneratorInterface + { + return new UnixTimeGenerator($this->randomGenerator); + } + + /** + * Returns a name generator configured for this environment + */ + private function buildNameGenerator(): NameGeneratorInterface + { + if ($this->enablePecl) { + return new PeclUuidNameGenerator(); + } + + return (new NameGeneratorFactory())->getGenerator(); + } + + /** + * Returns a time converter configured for this environment + */ + private function buildTimeConverter(CalculatorInterface $calculator): TimeConverterInterface + { + $genericConverter = new GenericTimeConverter($calculator); + + if ($this->is64BitSystem()) { + return new PhpTimeConverter($calculator, $genericConverter); + } + + return $genericConverter; + } + + /** + * Returns a UUID builder configured for this environment + * + * @param bool $useGuids Whether to build UUIDs using the GuidStringCodec + */ + private function buildUuidBuilder(bool $useGuids = false): UuidBuilderInterface + { + if ($useGuids) { + return new GuidBuilder($this->numberConverter, $this->timeConverter); + } + + return new FallbackBuilder([ + new Rfc4122UuidBuilder($this->numberConverter, $this->timeConverter), + new NonstandardUuidBuilder($this->numberConverter, $this->timeConverter), + ]); + } + + /** + * Returns true if the PHP build is 64-bit + */ + private function is64BitSystem(): bool + { + return PHP_INT_SIZE === 8 && !$this->force32Bit; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Fields/FieldsInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Fields/FieldsInterface.php new file mode 100644 index 0000000..f1b7a29 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Fields/FieldsInterface.php @@ -0,0 +1,32 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Fields; + +use Serializable; + +/** + * UUIDs are comprised of unsigned integers, the bytes of which are separated + * into fields and arranged in a particular layout defined by the specification + * for the variant + * + * @psalm-immutable + */ +interface FieldsInterface extends Serializable +{ + /** + * Returns the bytes that comprise the fields + */ + public function getBytes(): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php b/tests/php_test_files/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php new file mode 100644 index 0000000..3d36b6f --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php @@ -0,0 +1,87 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Fields; + +use ValueError; + +use function base64_decode; +use function sprintf; +use function strlen; + +/** + * Provides common serialization functionality to fields + * + * @psalm-immutable + */ +trait SerializableFieldsTrait +{ + /** + * @param string $bytes The bytes that comprise the fields + */ + abstract public function __construct(string $bytes); + + /** + * Returns the bytes that comprise the fields + */ + abstract public function getBytes(): string; + + /** + * Returns a string representation of object + */ + public function serialize(): string + { + return $this->getBytes(); + } + + /** + * @return array{bytes: string} + */ + public function __serialize(): array + { + return ['bytes' => $this->getBytes()]; + } + + /** + * Constructs the object from a serialized string representation + * + * @param string $data The serialized string representation of the object + * + * @psalm-suppress UnusedMethodCall + */ + public function unserialize(string $data): void + { + if (strlen($data) === 16) { + $this->__construct($data); + } else { + $this->__construct(base64_decode($data)); + } + } + + /** + * @param array{bytes?: string} $data + * + * @psalm-suppress UnusedMethodCall + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + if (!isset($data['bytes'])) { + throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $this->unserialize($data['bytes']); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/CombGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/CombGenerator.php new file mode 100644 index 0000000..0e88706 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/CombGenerator.php @@ -0,0 +1,115 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; + +use function bin2hex; +use function explode; +use function hex2bin; +use function microtime; +use function str_pad; +use function substr; + +use const STR_PAD_LEFT; + +/** + * CombGenerator generates COMBs (combined UUID/timestamp) + * + * The CombGenerator, when used with the StringCodec (and, by proxy, the + * TimestampLastCombCodec) or the TimestampFirstCombCodec, combines the current + * timestamp with a UUID (hence the name "COMB"). The timestamp either appears + * as the first or last 48 bits of the COMB, depending on the codec used. + * + * By default, COMBs will have the timestamp set as the last 48 bits of the + * identifier. + * + * ``` php + * $factory = new UuidFactory(); + * + * $factory->setRandomGenerator(new CombGenerator( + * $factory->getRandomGenerator(), + * $factory->getNumberConverter() + * )); + * + * $comb = $factory->uuid4(); + * ``` + * + * To generate a COMB with the timestamp as the first 48 bits, set the + * TimestampFirstCombCodec as the codec. + * + * ``` php + * $factory->setCodec(new TimestampFirstCombCodec($factory->getUuidBuilder())); + * ``` + * + * @link https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys + */ +class CombGenerator implements RandomGeneratorInterface +{ + public const TIMESTAMP_BYTES = 6; + + public function __construct( + private RandomGeneratorInterface $generator, + private NumberConverterInterface $numberConverter + ) { + } + + /** + * @throws InvalidArgumentException if $length is not a positive integer + * greater than or equal to CombGenerator::TIMESTAMP_BYTES + * + * @inheritDoc + */ + public function generate(int $length): string + { + if ($length < self::TIMESTAMP_BYTES) { + throw new InvalidArgumentException( + 'Length must be a positive integer greater than or equal to ' . self::TIMESTAMP_BYTES + ); + } + + $hash = ''; + if (self::TIMESTAMP_BYTES > 0 && $length > self::TIMESTAMP_BYTES) { + $hash = $this->generator->generate($length - self::TIMESTAMP_BYTES); + } + + $lsbTime = str_pad( + $this->numberConverter->toHex($this->timestamp()), + self::TIMESTAMP_BYTES * 2, + '0', + STR_PAD_LEFT + ); + + return (string) hex2bin( + str_pad( + bin2hex($hash), + $length - self::TIMESTAMP_BYTES, + '0' + ) + . $lsbTime + ); + } + + /** + * Returns current timestamp a string integer, precise to 0.00001 seconds + */ + private function timestamp(): string + { + $time = explode(' ', microtime(false)); + + return $time[1] . substr($time[0], 2, 5); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php new file mode 100644 index 0000000..37ba781 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php @@ -0,0 +1,141 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Exception\DceSecurityException; +use Ramsey\Uuid\Provider\DceSecurityProviderInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Uuid; + +use function hex2bin; +use function in_array; +use function pack; +use function str_pad; +use function strlen; +use function substr_replace; + +use const STR_PAD_LEFT; + +/** + * DceSecurityGenerator generates strings of binary data based on a local + * domain, local identifier, node ID, clock sequence, and the current time + */ +class DceSecurityGenerator implements DceSecurityGeneratorInterface +{ + private const DOMAINS = [ + Uuid::DCE_DOMAIN_PERSON, + Uuid::DCE_DOMAIN_GROUP, + Uuid::DCE_DOMAIN_ORG, + ]; + + /** + * Upper bounds for the clock sequence in DCE Security UUIDs. + */ + private const CLOCK_SEQ_HIGH = 63; + + /** + * Lower bounds for the clock sequence in DCE Security UUIDs. + */ + private const CLOCK_SEQ_LOW = 0; + + public function __construct( + private NumberConverterInterface $numberConverter, + private TimeGeneratorInterface $timeGenerator, + private DceSecurityProviderInterface $dceSecurityProvider + ) { + } + + public function generate( + int $localDomain, + ?IntegerObject $localIdentifier = null, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): string { + if (!in_array($localDomain, self::DOMAINS)) { + throw new DceSecurityException( + 'Local domain must be a valid DCE Security domain' + ); + } + + if ($localIdentifier && $localIdentifier->isNegative()) { + throw new DceSecurityException( + 'Local identifier out of bounds; it must be a value between 0 and 4294967295' + ); + } + + if ($clockSeq > self::CLOCK_SEQ_HIGH || $clockSeq < self::CLOCK_SEQ_LOW) { + throw new DceSecurityException( + 'Clock sequence out of bounds; it must be a value between 0 and 63' + ); + } + + switch ($localDomain) { + case Uuid::DCE_DOMAIN_ORG: + if ($localIdentifier === null) { + throw new DceSecurityException( + 'A local identifier must be provided for the org domain' + ); + } + + break; + case Uuid::DCE_DOMAIN_PERSON: + if ($localIdentifier === null) { + $localIdentifier = $this->dceSecurityProvider->getUid(); + } + + break; + case Uuid::DCE_DOMAIN_GROUP: + default: + if ($localIdentifier === null) { + $localIdentifier = $this->dceSecurityProvider->getGid(); + } + + break; + } + + $identifierHex = $this->numberConverter->toHex($localIdentifier->toString()); + + // The maximum value for the local identifier is 0xffffffff, or + // 4294967295. This is 8 hexadecimal digits, so if the length of + // hexadecimal digits is greater than 8, we know the value is greater + // than 0xffffffff. + if (strlen($identifierHex) > 8) { + throw new DceSecurityException( + 'Local identifier out of bounds; it must be a value between 0 and 4294967295' + ); + } + + $domainByte = pack('n', $localDomain)[1]; + $identifierBytes = (string) hex2bin(str_pad($identifierHex, 8, '0', STR_PAD_LEFT)); + + if ($node instanceof Hexadecimal) { + $node = $node->toString(); + } + + // Shift the clock sequence 8 bits to the left, so it matches 0x3f00. + if ($clockSeq !== null) { + $clockSeq = $clockSeq << 8; + } + + $bytes = $this->timeGenerator->generate($node, $clockSeq); + + // Replace bytes in the time-based UUID with DCE Security values. + $bytes = substr_replace($bytes, $identifierBytes, 0, 4); + + return substr_replace($bytes, $domainByte, 9, 1); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php new file mode 100644 index 0000000..faa29a5 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php @@ -0,0 +1,53 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Rfc4122\UuidV2; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; + +/** + * A DCE Security generator generates strings of binary data based on a local + * domain, local identifier, node ID, clock sequence, and the current time + * + * @see UuidV2 + */ +interface DceSecurityGeneratorInterface +{ + /** + * Generate a binary string from a local domain, local identifier, node ID, + * clock sequence, and current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return string A binary string + */ + public function generate( + int $localDomain, + ?IntegerObject $localIdentifier = null, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php new file mode 100644 index 0000000..7303e9f --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php @@ -0,0 +1,48 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Exception\NameException; +use Ramsey\Uuid\UuidInterface; +use ValueError; + +use function hash; + +/** + * DefaultNameGenerator generates strings of binary data based on a namespace, + * name, and hashing algorithm + */ +class DefaultNameGenerator implements NameGeneratorInterface +{ + /** @psalm-pure */ + public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string + { + try { + /** @var string|bool $bytes */ + $bytes = @hash($hashAlgorithm, $ns->getBytes() . $name, true); + } catch (ValueError $e) { + $bytes = false; // keep same behavior than PHP 7 + } + + if ($bytes === false) { + throw new NameException(sprintf( + 'Unable to hash namespace and name with algorithm \'%s\'', + $hashAlgorithm + )); + } + + return (string) $bytes; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php new file mode 100644 index 0000000..ea1e2a6 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php @@ -0,0 +1,129 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Exception\RandomSourceException; +use Ramsey\Uuid\Exception\TimeSourceException; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Provider\TimeProviderInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Throwable; + +use function dechex; +use function hex2bin; +use function is_int; +use function pack; +use function preg_match; +use function sprintf; +use function str_pad; +use function strlen; + +use const STR_PAD_LEFT; + +/** + * DefaultTimeGenerator generates strings of binary data based on a node ID, + * clock sequence, and the current time + */ +class DefaultTimeGenerator implements TimeGeneratorInterface +{ + public function __construct( + private NodeProviderInterface $nodeProvider, + private TimeConverterInterface $timeConverter, + private TimeProviderInterface $timeProvider + ) { + } + + /** + * @throws InvalidArgumentException if the parameters contain invalid values + * @throws RandomSourceException if random_int() throws an exception/error + * + * @inheritDoc + */ + public function generate($node = null, ?int $clockSeq = null): string + { + if ($node instanceof Hexadecimal) { + $node = $node->toString(); + } + + $node = $this->getValidNode($node); + + if ($clockSeq === null) { + try { + // This does not use "stable storage"; see RFC 4122, Section 4.2.1.1. + $clockSeq = random_int(0, 0x3fff); + } catch (Throwable $exception) { + throw new RandomSourceException( + $exception->getMessage(), + (int) $exception->getCode(), + $exception + ); + } + } + + $time = $this->timeProvider->getTime(); + + $uuidTime = $this->timeConverter->calculateTime( + $time->getSeconds()->toString(), + $time->getMicroseconds()->toString() + ); + + $timeHex = str_pad($uuidTime->toString(), 16, '0', STR_PAD_LEFT); + + if (strlen($timeHex) !== 16) { + throw new TimeSourceException(sprintf( + 'The generated time of \'%s\' is larger than expected', + $timeHex + )); + } + + $timeBytes = (string) hex2bin($timeHex); + + return $timeBytes[4] . $timeBytes[5] . $timeBytes[6] . $timeBytes[7] + . $timeBytes[2] . $timeBytes[3] + . $timeBytes[0] . $timeBytes[1] + . pack('n*', $clockSeq) + . $node; + } + + /** + * Uses the node provider given when constructing this instance to get + * the node ID (usually a MAC address) + * + * @param int|string|null $node A node value that may be used to override the node provider + * + * @return string 6-byte binary string representation of the node + * + * @throws InvalidArgumentException + */ + private function getValidNode(int | string | null $node): string + { + if ($node === null) { + $node = $this->nodeProvider->getNode(); + } + + // Convert the node to hex, if it is still an integer. + if (is_int($node)) { + $node = dechex($node); + } + + if (!preg_match('/^[A-Fa-f0-9]+$/', (string) $node) || strlen((string) $node) > 12) { + throw new InvalidArgumentException('Invalid node value'); + } + + return (string) hex2bin(str_pad((string) $node, 12, '0', STR_PAD_LEFT)); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php new file mode 100644 index 0000000..6f08e29 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php @@ -0,0 +1,30 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +/** + * NameGeneratorFactory retrieves a default name generator, based on the + * environment + */ +class NameGeneratorFactory +{ + /** + * Returns a default name generator, based on the current environment + */ + public function getGenerator(): NameGeneratorInterface + { + return new DefaultNameGenerator(); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php new file mode 100644 index 0000000..cc43dd0 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php @@ -0,0 +1,38 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\UuidInterface; + +/** + * A name generator generates strings of binary data created by hashing together + * a namespace with a name, according to a hashing algorithm + */ +interface NameGeneratorInterface +{ + /** + * Generate a binary string from a namespace and name hashed together with + * the specified hashing algorithm + * + * @param UuidInterface $ns The namespace + * @param string $name The name to use for creating a UUID + * @param string $hashAlgorithm The hashing algorithm to use + * + * @return string A binary string + * + * @psalm-pure + */ + public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php new file mode 100644 index 0000000..6a6d1ae --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php @@ -0,0 +1,49 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Exception\NameException; +use Ramsey\Uuid\UuidInterface; + +use function sprintf; +use function uuid_generate_md5; +use function uuid_generate_sha1; +use function uuid_parse; + +/** + * PeclUuidNameGenerator generates strings of binary data from a namespace and a + * name, using ext-uuid + * + * @link https://pecl.php.net/package/uuid ext-uuid + */ +class PeclUuidNameGenerator implements NameGeneratorInterface +{ + /** @psalm-pure */ + public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string + { + $uuid = match ($hashAlgorithm) { + 'md5' => uuid_generate_md5($ns->toString(), $name), + 'sha1' => uuid_generate_sha1($ns->toString(), $name), + default => throw new NameException( + sprintf( + 'Unable to hash namespace and name with algorithm \'%s\'', + $hashAlgorithm + ) + ), + }; + + return uuid_parse($uuid); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php new file mode 100644 index 0000000..07c47d2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php @@ -0,0 +1,35 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use function uuid_create; +use function uuid_parse; + +use const UUID_TYPE_RANDOM; + +/** + * PeclUuidRandomGenerator generates strings of random binary data using ext-uuid + * + * @link https://pecl.php.net/package/uuid ext-uuid + */ +class PeclUuidRandomGenerator implements RandomGeneratorInterface +{ + public function generate(int $length): string + { + $uuid = uuid_create(UUID_TYPE_RANDOM); + + return uuid_parse($uuid); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php new file mode 100644 index 0000000..e01f44e --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php @@ -0,0 +1,39 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use function uuid_create; +use function uuid_parse; + +use const UUID_TYPE_TIME; + +/** + * PeclUuidTimeGenerator generates strings of binary data for time-base UUIDs, + * using ext-uuid + * + * @link https://pecl.php.net/package/uuid ext-uuid + */ +class PeclUuidTimeGenerator implements TimeGeneratorInterface +{ + /** + * @inheritDoc + */ + public function generate($node = null, ?int $clockSeq = null): string + { + $uuid = uuid_create(UUID_TYPE_TIME); + + return uuid_parse($uuid); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php new file mode 100644 index 0000000..12edb96 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php @@ -0,0 +1,45 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Exception\RandomSourceException; +use Throwable; + +/** + * RandomBytesGenerator generates strings of random binary data using the + * built-in `random_bytes()` PHP function + * + * @link http://php.net/random_bytes random_bytes() + */ +class RandomBytesGenerator implements RandomGeneratorInterface +{ + /** + * @throws RandomSourceException if random_bytes() throws an exception/error + * + * @inheritDoc + */ + public function generate(int $length): string + { + try { + return random_bytes($length); + } catch (Throwable $exception) { + throw new RandomSourceException( + $exception->getMessage(), + (int) $exception->getCode(), + $exception + ); + } + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php new file mode 100644 index 0000000..b723ac2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php @@ -0,0 +1,30 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +/** + * RandomGeneratorFactory retrieves a default random generator, based on the + * environment + */ +class RandomGeneratorFactory +{ + /** + * Returns a default random generator, based on the current environment + */ + public function getGenerator(): RandomGeneratorInterface + { + return new RandomBytesGenerator(); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php new file mode 100644 index 0000000..1180b97 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php @@ -0,0 +1,30 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +/** + * A random generator generates strings of random binary data + */ +interface RandomGeneratorInterface +{ + /** + * Generates a string of randomized binary data + * + * @param int<1, max> $length The number of bytes of random binary data to generate + * + * @return string A binary string + */ + public function generate(int $length): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php new file mode 100644 index 0000000..fd0ccc8 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php @@ -0,0 +1,56 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use RandomLib\Factory; +use RandomLib\Generator; + +/** + * RandomLibAdapter generates strings of random binary data using the + * paragonie/random-lib library + * + * @deprecated This class will be removed in 5.0.0. Use the default + * RandomBytesGenerator or implement your own generator that implements + * RandomGeneratorInterface. + * + * @link https://packagist.org/packages/paragonie/random-lib paragonie/random-lib + */ +class RandomLibAdapter implements RandomGeneratorInterface +{ + private Generator $generator; + + /** + * Constructs a RandomLibAdapter + * + * By default, if no Generator is passed in, this creates a high-strength + * generator to use when generating random binary data. + * + * @param Generator|null $generator The generator to use when generating binary data + */ + public function __construct(?Generator $generator = null) + { + if ($generator === null) { + $factory = new Factory(); + $generator = $factory->getHighStrengthGenerator(); + } + + $this->generator = $generator; + } + + public function generate(int $length): string + { + return $this->generator->generate($length); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php new file mode 100644 index 0000000..8d06fc3 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php @@ -0,0 +1,45 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Provider\TimeProviderInterface; + +/** + * TimeGeneratorFactory retrieves a default time generator, based on the + * environment + */ +class TimeGeneratorFactory +{ + public function __construct( + private NodeProviderInterface $nodeProvider, + private TimeConverterInterface $timeConverter, + private TimeProviderInterface $timeProvider + ) { + } + + /** + * Returns a default time generator, based on the current environment + */ + public function getGenerator(): TimeGeneratorInterface + { + return new DefaultTimeGenerator( + $this->nodeProvider, + $this->timeConverter, + $this->timeProvider + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php new file mode 100644 index 0000000..18f21c4 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php @@ -0,0 +1,38 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Ramsey\Uuid\Type\Hexadecimal; + +/** + * A time generator generates strings of binary data based on a node ID, + * clock sequence, and the current time + */ +interface TimeGeneratorInterface +{ + /** + * Generate a binary string from a node ID, clock sequence, and current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return string A binary string + */ + public function generate($node = null, ?int $clockSeq = null): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php new file mode 100644 index 0000000..d7c8ed4 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php @@ -0,0 +1,169 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Generator; + +use Brick\Math\BigInteger; +use DateTimeImmutable; +use DateTimeInterface; +use Ramsey\Uuid\Type\Hexadecimal; + +use function hash; +use function pack; +use function str_pad; +use function strlen; +use function substr; +use function substr_replace; +use function unpack; + +use const PHP_INT_SIZE; +use const STR_PAD_LEFT; + +/** + * UnixTimeGenerator generates bytes that combine a 48-bit timestamp in + * milliseconds since the Unix Epoch with 80 random bits + * + * Code and concepts within this class are borrowed from the symfony/uid package + * and are used under the terms of the MIT license distributed with symfony/uid. + * + * symfony/uid is copyright (c) Fabien Potencier. + * + * @link https://symfony.com/components/Uid Symfony Uid component + * @link https://github.com/symfony/uid/blob/4f9f537e57261519808a7ce1d941490736522bbc/UuidV7.php Symfony UuidV7 class + * @link https://github.com/symfony/uid/blob/6.2/LICENSE MIT License + */ +class UnixTimeGenerator implements TimeGeneratorInterface +{ + private static string $time = ''; + private static ?string $seed = null; + private static int $seedIndex = 0; + + /** @var int[] */ + private static array $rand = []; + + /** @var int[] */ + private static array $seedParts; + + public function __construct( + private RandomGeneratorInterface $randomGenerator, + private int $intSize = PHP_INT_SIZE + ) { + } + + /** + * @param Hexadecimal|int|string|null $node Unused in this generator + * @param int|null $clockSeq Unused in this generator + * @param DateTimeInterface $dateTime A date-time instance to use when + * generating bytes + * + * @inheritDoc + */ + public function generate($node = null, ?int $clockSeq = null, ?DateTimeInterface $dateTime = null): string + { + $time = ($dateTime ?? new DateTimeImmutable('now'))->format('Uv'); + + if ($time > self::$time || ($dateTime !== null && $time !== self::$time)) { + $this->randomize($time); + } else { + $time = $this->increment(); + } + + if ($this->intSize >= 8) { + $time = substr(pack('J', (int) $time), -6); + } else { + $time = str_pad(BigInteger::of($time)->toBytes(false), 6, "\x00", STR_PAD_LEFT); + } + + /** @var non-empty-string */ + return $time . pack('n*', self::$rand[1], self::$rand[2], self::$rand[3], self::$rand[4], self::$rand[5]); + } + + private function randomize(string $time): void + { + if (self::$seed === null) { + $seed = $this->randomGenerator->generate(16); + self::$seed = $seed; + } else { + $seed = $this->randomGenerator->generate(10); + } + + /** @var int[] $rand */ + $rand = unpack('n*', $seed); + $rand[1] &= 0x03ff; + + self::$rand = $rand; + self::$time = $time; + } + + /** + * Special thanks to Nicolas Grekas for sharing the following information: + * + * Within the same ms, we increment the rand part by a random 24-bit number. + * + * Instead of getting this number from random_bytes(), which is slow, we get + * it by sha512-hashing self::$seed. This produces 64 bytes of entropy, + * which we need to split in a list of 24-bit numbers. unpack() first splits + * them into 16 x 32-bit numbers; we take the first byte of each of these + * numbers to get 5 extra 24-bit numbers. Then, we consume those numbers + * one-by-one and run this logic every 21 iterations. + * + * self::$rand holds the random part of the UUID, split into 5 x 16-bit + * numbers for x86 portability. We increment this random part by the next + * 24-bit number in the self::$seedParts list and decrement + * self::$seedIndex. + * + * @link https://twitter.com/nicolasgrekas/status/1583356938825261061 Tweet from Nicolas Grekas + */ + private function increment(): string + { + if (self::$seedIndex === 0 && self::$seed !== null) { + self::$seed = hash('sha512', self::$seed, true); + + /** @var int[] $s */ + $s = unpack('l*', self::$seed); + $s[] = ($s[1] >> 8 & 0xff0000) | ($s[2] >> 16 & 0xff00) | ($s[3] >> 24 & 0xff); + $s[] = ($s[4] >> 8 & 0xff0000) | ($s[5] >> 16 & 0xff00) | ($s[6] >> 24 & 0xff); + $s[] = ($s[7] >> 8 & 0xff0000) | ($s[8] >> 16 & 0xff00) | ($s[9] >> 24 & 0xff); + $s[] = ($s[10] >> 8 & 0xff0000) | ($s[11] >> 16 & 0xff00) | ($s[12] >> 24 & 0xff); + $s[] = ($s[13] >> 8 & 0xff0000) | ($s[14] >> 16 & 0xff00) | ($s[15] >> 24 & 0xff); + + self::$seedParts = $s; + self::$seedIndex = 21; + } + + self::$rand[5] = 0xffff & $carry = self::$rand[5] + 1 + (self::$seedParts[self::$seedIndex--] & 0xffffff); + self::$rand[4] = 0xffff & $carry = self::$rand[4] + ($carry >> 16); + self::$rand[3] = 0xffff & $carry = self::$rand[3] + ($carry >> 16); + self::$rand[2] = 0xffff & $carry = self::$rand[2] + ($carry >> 16); + self::$rand[1] += $carry >> 16; + + if (0xfc00 & self::$rand[1]) { + $time = self::$time; + $mtime = (int) substr($time, -9); + + if ($this->intSize >= 8 || strlen($time) < 10) { + $time = (string) ((int) $time + 1); + } elseif ($mtime === 999999999) { + $time = (1 + (int) substr($time, 0, -9)) . '000000000'; + } else { + $mtime++; + $time = substr_replace($time, str_pad((string) $mtime, 9, '0', STR_PAD_LEFT), -9); + } + + $this->randomize($time); + } + + return self::$time; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Guid/Fields.php b/tests/php_test_files/vendor/ramsey/uuid/src/Guid/Fields.php new file mode 100644 index 0000000..0fc5d1c --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Guid/Fields.php @@ -0,0 +1,195 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Guid; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Fields\SerializableFieldsTrait; +use Ramsey\Uuid\Rfc4122\FieldsInterface; +use Ramsey\Uuid\Rfc4122\MaxTrait; +use Ramsey\Uuid\Rfc4122\NilTrait; +use Ramsey\Uuid\Rfc4122\VariantTrait; +use Ramsey\Uuid\Rfc4122\VersionTrait; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Uuid; + +use function bin2hex; +use function dechex; +use function hexdec; +use function pack; +use function sprintf; +use function str_pad; +use function strlen; +use function substr; +use function unpack; + +use const STR_PAD_LEFT; + +/** + * GUIDs are comprised of a set of named fields, according to RFC 4122 + * + * @see Guid + * + * @psalm-immutable + */ +final class Fields implements FieldsInterface +{ + use MaxTrait; + use NilTrait; + use SerializableFieldsTrait; + use VariantTrait; + use VersionTrait; + + /** + * @param string $bytes A 16-byte binary string representation of a UUID + * + * @throws InvalidArgumentException if the byte string is not exactly 16 bytes + * @throws InvalidArgumentException if the byte string does not represent a GUID + * @throws InvalidArgumentException if the byte string does not contain a valid version + */ + public function __construct(private string $bytes) + { + if (strlen($this->bytes) !== 16) { + throw new InvalidArgumentException( + 'The byte string must be 16 bytes long; ' + . 'received ' . strlen($this->bytes) . ' bytes' + ); + } + + if (!$this->isCorrectVariant()) { + throw new InvalidArgumentException( + 'The byte string received does not conform to the RFC ' + . '4122 or Microsoft Corporation variants' + ); + } + + if (!$this->isCorrectVersion()) { + throw new InvalidArgumentException( + 'The byte string received does not contain a valid version' + ); + } + } + + public function getBytes(): string + { + return $this->bytes; + } + + public function getTimeLow(): Hexadecimal + { + // Swap the bytes from little endian to network byte order. + /** @var array $hex */ + $hex = unpack( + 'H*', + pack( + 'v*', + hexdec(bin2hex(substr($this->bytes, 2, 2))), + hexdec(bin2hex(substr($this->bytes, 0, 2))) + ) + ); + + return new Hexadecimal((string) ($hex[1] ?? '')); + } + + public function getTimeMid(): Hexadecimal + { + // Swap the bytes from little endian to network byte order. + /** @var array $hex */ + $hex = unpack( + 'H*', + pack( + 'v', + hexdec(bin2hex(substr($this->bytes, 4, 2))) + ) + ); + + return new Hexadecimal((string) ($hex[1] ?? '')); + } + + public function getTimeHiAndVersion(): Hexadecimal + { + // Swap the bytes from little endian to network byte order. + /** @var array $hex */ + $hex = unpack( + 'H*', + pack( + 'v', + hexdec(bin2hex(substr($this->bytes, 6, 2))) + ) + ); + + return new Hexadecimal((string) ($hex[1] ?? '')); + } + + public function getTimestamp(): Hexadecimal + { + return new Hexadecimal(sprintf( + '%03x%04s%08s', + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, + $this->getTimeMid()->toString(), + $this->getTimeLow()->toString() + )); + } + + public function getClockSeq(): Hexadecimal + { + if ($this->isMax()) { + $clockSeq = 0xffff; + } elseif ($this->isNil()) { + $clockSeq = 0x0000; + } else { + $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; + } + + return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); + } + + public function getClockSeqHiAndReserved(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 8, 1))); + } + + public function getClockSeqLow(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 9, 1))); + } + + public function getNode(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 10))); + } + + public function getVersion(): ?int + { + if ($this->isNil() || $this->isMax()) { + return null; + } + + /** @var array $parts */ + $parts = unpack('n*', $this->bytes); + + return ((int) $parts[4] >> 4) & 0x00f; + } + + private function isCorrectVariant(): bool + { + if ($this->isNil() || $this->isMax()) { + return true; + } + + $variant = $this->getVariant(); + + return $variant === Uuid::RFC_4122 || $variant === Uuid::RESERVED_MICROSOFT; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Guid/Guid.php b/tests/php_test_files/vendor/ramsey/uuid/src/Guid/Guid.php new file mode 100644 index 0000000..b3ed096 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Guid/Guid.php @@ -0,0 +1,61 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Guid; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Uuid; + +/** + * Guid represents a UUID with "native" (little-endian) byte order + * + * From Wikipedia: + * + * > The first three fields are unsigned 32- and 16-bit integers and are subject + * > to swapping, while the last two fields consist of uninterpreted bytes, not + * > subject to swapping. This byte swapping applies even for versions 3, 4, and + * > 5, where the canonical fields do not correspond to the content of the UUID. + * + * The first three fields of a GUID are encoded in little-endian byte order, + * while the last three fields are in network (big-endian) byte order. This is + * according to the history of the Microsoft definition of a GUID. + * + * According to the .NET Guid.ToByteArray method documentation: + * + * > Note that the order of bytes in the returned byte array is different from + * > the string representation of a Guid value. The order of the beginning + * > four-byte group and the next two two-byte groups is reversed, whereas the + * > order of the last two-byte group and the closing six-byte group is the + * > same. + * + * @link https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants UUID Variants on Wikipedia + * @link https://docs.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid Windows GUID structure + * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid .NET Guid Struct + * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid.tobytearray .NET Guid.ToByteArray Method + * + * @psalm-immutable + */ +final class Guid extends Uuid +{ + public function __construct( + Fields $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Guid/GuidBuilder.php b/tests/php_test_files/vendor/ramsey/uuid/src/Guid/GuidBuilder.php new file mode 100644 index 0000000..c036bb2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Guid/GuidBuilder.php @@ -0,0 +1,77 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Guid; + +use Ramsey\Uuid\Builder\UuidBuilderInterface; +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\UnableToBuildUuidException; +use Ramsey\Uuid\UuidInterface; +use Throwable; + +/** + * GuidBuilder builds instances of Guid + * + * @see Guid + * + * @psalm-immutable + */ +class GuidBuilder implements UuidBuilderInterface +{ + /** + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the Guid + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to Unix timestamps + */ + public function __construct( + private NumberConverterInterface $numberConverter, + private TimeConverterInterface $timeConverter + ) { + } + + /** + * Builds and returns a Guid + * + * @param CodecInterface $codec The codec to use for building this Guid instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return Guid The GuidBuilder returns an instance of Ramsey\Uuid\Guid\Guid + * + * @psalm-pure + */ + public function build(CodecInterface $codec, string $bytes): UuidInterface + { + try { + return new Guid( + $this->buildFields($bytes), + $this->numberConverter, + $codec, + $this->timeConverter + ); + } catch (Throwable $e) { + throw new UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); + } + } + + /** + * Proxy method to allow injecting a mock, for testing + */ + protected function buildFields(string $bytes): Fields + { + return new Fields($bytes); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php b/tests/php_test_files/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php new file mode 100644 index 0000000..c0b47bb --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php @@ -0,0 +1,572 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Lazy; + +use DateTimeInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Exception\UnsupportedOperationException; +use Ramsey\Uuid\Fields\FieldsInterface; +use Ramsey\Uuid\Rfc4122\UuidV1; +use Ramsey\Uuid\Rfc4122\UuidV6; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\UuidFactory; +use Ramsey\Uuid\UuidInterface; +use ValueError; + +use function assert; +use function bin2hex; +use function hex2bin; +use function sprintf; +use function str_replace; +use function substr; + +/** + * Lazy version of a UUID: its format has not been determined yet, so it is mostly only usable for string/bytes + * conversion. This object optimizes instantiation, serialization and string conversion time, at the cost of + * increased overhead for more advanced UUID operations. + * + * @internal this type is used internally for performance reasons, and is not supposed to be directly referenced + * in consumer libraries. + * + * @psalm-immutable + * + * Note: the {@see FieldsInterface} does not declare methods that deprecated API + * relies upon: the API has been ported from the {@see \Ramsey\Uuid\Uuid} definition, + * and is deprecated anyway. + * Note: the deprecated API from {@see \Ramsey\Uuid\Uuid} is in use here (on purpose): it will be removed + * once the deprecated API is gone from this class too. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + */ +final class LazyUuidFromString implements UuidInterface +{ + public const VALID_REGEX = '/\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/ms'; + + private ?UuidInterface $unwrapped = null; + + /** + * @psalm-param non-empty-string $uuid + */ + public function __construct(private string $uuid) + { + } + + /** @psalm-pure */ + public static function fromBytes(string $bytes): self + { + $base16Uuid = bin2hex($bytes); + + return new self( + substr($base16Uuid, 0, 8) + . '-' + . substr($base16Uuid, 8, 4) + . '-' + . substr($base16Uuid, 12, 4) + . '-' + . substr($base16Uuid, 16, 4) + . '-' + . substr($base16Uuid, 20, 12) + ); + } + + public function serialize(): string + { + return $this->uuid; + } + + /** + * @return array{string: string} + * + * @psalm-return array{string: non-empty-string} + */ + public function __serialize(): array + { + return ['string' => $this->uuid]; + } + + /** + * {@inheritDoc} + * + * @param string $data + * + * @psalm-param non-empty-string $data + */ + public function unserialize(string $data): void + { + $this->uuid = $data; + } + + /** + * @param array{string?: string} $data + * + * @psalm-param array{string?: non-empty-string} $data + * @psalm-suppress UnusedMethodCall + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + if (!isset($data['string'])) { + throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $this->unserialize($data['string']); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getNumberConverter(): NumberConverterInterface + { + return ($this->unwrapped ?? $this->unwrap()) + ->getNumberConverter(); + } + + /** + * {@inheritDoc} + * + * @psalm-suppress DeprecatedMethod + */ + public function getFieldsHex(): array + { + return ($this->unwrapped ?? $this->unwrap()) + ->getFieldsHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getClockSeqHiAndReservedHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getClockSeqHiAndReservedHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getClockSeqLowHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getClockSeqLowHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getClockSequenceHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getClockSequenceHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getDateTime(): DateTimeInterface + { + return ($this->unwrapped ?? $this->unwrap()) + ->getDateTime(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getLeastSignificantBitsHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getLeastSignificantBitsHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getMostSignificantBitsHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getMostSignificantBitsHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getNodeHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getNodeHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getTimeHiAndVersionHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getTimeHiAndVersionHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getTimeLowHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getTimeLowHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getTimeMidHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getTimeMidHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getTimestampHex(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getTimestampHex(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getUrn(): string + { + return ($this->unwrapped ?? $this->unwrap()) + ->getUrn(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getVariant(): ?int + { + return ($this->unwrapped ?? $this->unwrap()) + ->getVariant(); + } + + /** @psalm-suppress DeprecatedMethod */ + public function getVersion(): ?int + { + return ($this->unwrapped ?? $this->unwrap()) + ->getVersion(); + } + + public function compareTo(UuidInterface $other): int + { + return ($this->unwrapped ?? $this->unwrap()) + ->compareTo($other); + } + + public function equals(?object $other): bool + { + if (! $other instanceof UuidInterface) { + return false; + } + + return $this->uuid === $other->toString(); + } + + /** + * {@inheritDoc} + * + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement we know that {@see self::$uuid} is a non-empty string, so + * we know that {@see hex2bin} will retrieve a non-empty string too. + */ + public function getBytes(): string + { + /** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */ + return (string) hex2bin(str_replace('-', '', $this->uuid)); + } + + public function getFields(): FieldsInterface + { + return ($this->unwrapped ?? $this->unwrap()) + ->getFields(); + } + + public function getHex(): Hexadecimal + { + return ($this->unwrapped ?? $this->unwrap()) + ->getHex(); + } + + public function getInteger(): IntegerObject + { + return ($this->unwrapped ?? $this->unwrap()) + ->getInteger(); + } + + public function toString(): string + { + return $this->uuid; + } + + public function __toString(): string + { + return $this->uuid; + } + + public function jsonSerialize(): string + { + return $this->uuid; + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getClockSeqHiAndReserved(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex( + $instance->getFields() + ->getClockSeqHiAndReserved() + ->toString() + ); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getClockSeqLow(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex( + $instance->getFields() + ->getClockSeqLow() + ->toString() + ); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getClockSequence(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex( + $instance->getFields() + ->getClockSeq() + ->toString() + ); + } + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getLeastSignificantBits(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex(substr($instance->getHex()->toString(), 16)); + } + + /** + * @deprecated This method will be removed in 5.0.0. There is no direct + * alternative, but the same information may be obtained by splitting + * in half the value returned by {@see UuidInterface::getHex()}. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getMostSignificantBits(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex(substr($instance->getHex()->toString(), 0, 16)); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getNode()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getNode(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex( + $instance->getFields() + ->getNode() + ->toString() + ); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimeHiAndVersion(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex( + $instance->getFields() + ->getTimeHiAndVersion() + ->toString() + ); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimeLow(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex( + $instance->getFields() + ->getTimeLow() + ->toString() + ); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimeMid(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + return $instance->getNumberConverter() + ->fromHex( + $instance->getFields() + ->getTimeMid() + ->toString() + ); + } + + /** + * @deprecated Use {@see UuidInterface::getFields()} to get a + * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} + * instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()} + * and use the arbitrary-precision math library of your choice to + * convert it to a string integer. + * + * @psalm-suppress UndefinedInterfaceMethod + * @psalm-suppress DeprecatedMethod + * @psalm-suppress MixedArgument + * @psalm-suppress MixedMethodCall + */ + public function getTimestamp(): string + { + $instance = ($this->unwrapped ?? $this->unwrap()); + $fields = $instance->getFields(); + + if ($fields->getVersion() !== 1) { + throw new UnsupportedOperationException('Not a time-based UUID'); + } + + return $instance->getNumberConverter() + ->fromHex($fields->getTimestamp()->toString()); + } + + public function toUuidV1(): UuidV1 + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + if ($instance instanceof UuidV1) { + return $instance; + } + + assert($instance instanceof UuidV6); + + return $instance->toUuidV1(); + } + + public function toUuidV6(): UuidV6 + { + $instance = ($this->unwrapped ?? $this->unwrap()); + + assert($instance instanceof UuidV6); + + return $instance; + } + + /** + * @psalm-suppress ImpureMethodCall the retrieval of the factory is a clear violation of purity here: this is a + * known pitfall of the design of this library, where a value object contains + * a mutable reference to a factory. We use a fixed factory here, so the violation + * will not have real-world effects, as this object is only instantiated with the + * default factory settings/features. + * @psalm-suppress InaccessibleProperty property {@see $unwrapped} is used as a cache: we don't expose it to the + * outside world, so we should be fine here. + */ + private function unwrap(): UuidInterface + { + return $this->unwrapped = (new UuidFactory()) + ->fromString($this->uuid); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php new file mode 100644 index 0000000..f065acd --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php @@ -0,0 +1,146 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Math; + +use Brick\Math\BigDecimal; +use Brick\Math\BigInteger; +use Brick\Math\Exception\MathException; +use Brick\Math\RoundingMode as BrickMathRounding; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Type\Decimal; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Type\NumberInterface; + +/** + * A calculator using the brick/math library for arbitrary-precision arithmetic + * + * @psalm-immutable + */ +final class BrickMathCalculator implements CalculatorInterface +{ + private const ROUNDING_MODE_MAP = [ + RoundingMode::UNNECESSARY => BrickMathRounding::UNNECESSARY, + RoundingMode::UP => BrickMathRounding::UP, + RoundingMode::DOWN => BrickMathRounding::DOWN, + RoundingMode::CEILING => BrickMathRounding::CEILING, + RoundingMode::FLOOR => BrickMathRounding::FLOOR, + RoundingMode::HALF_UP => BrickMathRounding::HALF_UP, + RoundingMode::HALF_DOWN => BrickMathRounding::HALF_DOWN, + RoundingMode::HALF_CEILING => BrickMathRounding::HALF_CEILING, + RoundingMode::HALF_FLOOR => BrickMathRounding::HALF_FLOOR, + RoundingMode::HALF_EVEN => BrickMathRounding::HALF_EVEN, + ]; + + public function add(NumberInterface $augend, NumberInterface ...$addends): NumberInterface + { + $sum = BigInteger::of($augend->toString()); + + foreach ($addends as $addend) { + $sum = $sum->plus($addend->toString()); + } + + return new IntegerObject((string) $sum); + } + + public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahends): NumberInterface + { + $difference = BigInteger::of($minuend->toString()); + + foreach ($subtrahends as $subtrahend) { + $difference = $difference->minus($subtrahend->toString()); + } + + return new IntegerObject((string) $difference); + } + + public function multiply(NumberInterface $multiplicand, NumberInterface ...$multipliers): NumberInterface + { + $product = BigInteger::of($multiplicand->toString()); + + foreach ($multipliers as $multiplier) { + $product = $product->multipliedBy($multiplier->toString()); + } + + return new IntegerObject((string) $product); + } + + public function divide( + int $roundingMode, + int $scale, + NumberInterface $dividend, + NumberInterface ...$divisors + ): NumberInterface { + $brickRounding = $this->getBrickRoundingMode($roundingMode); + + $quotient = BigDecimal::of($dividend->toString()); + + foreach ($divisors as $divisor) { + $quotient = $quotient->dividedBy($divisor->toString(), $scale, $brickRounding); + } + + if ($scale === 0) { + return new IntegerObject((string) $quotient->toBigInteger()); + } + + return new Decimal((string) $quotient); + } + + public function fromBase(string $value, int $base): IntegerObject + { + try { + return new IntegerObject((string) BigInteger::fromBase($value, $base)); + } catch (MathException | \InvalidArgumentException $exception) { + throw new InvalidArgumentException( + $exception->getMessage(), + (int) $exception->getCode(), + $exception + ); + } + } + + public function toBase(IntegerObject $value, int $base): string + { + try { + return BigInteger::of($value->toString())->toBase($base); + } catch (MathException | \InvalidArgumentException $exception) { + throw new InvalidArgumentException( + $exception->getMessage(), + (int) $exception->getCode(), + $exception + ); + } + } + + public function toHexadecimal(IntegerObject $value): Hexadecimal + { + return new Hexadecimal($this->toBase($value, 16)); + } + + public function toInteger(Hexadecimal $value): IntegerObject + { + return $this->fromBase($value->toString(), 16); + } + + /** + * Maps ramsey/uuid rounding modes to those used by brick/math + * + * @return BrickMathRounding::* + */ + private function getBrickRoundingMode(int $roundingMode) + { + return self::ROUNDING_MODE_MAP[$roundingMode] ?? BrickMathRounding::UNNECESSARY; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Math/CalculatorInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Math/CalculatorInterface.php new file mode 100644 index 0000000..f03645d --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Math/CalculatorInterface.php @@ -0,0 +1,106 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Math; + +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Type\NumberInterface; + +/** + * A calculator performs arithmetic operations on numbers + * + * @psalm-immutable + */ +interface CalculatorInterface +{ + /** + * Returns the sum of all the provided parameters + * + * @param NumberInterface $augend The first addend (the integer being added to) + * @param NumberInterface ...$addends The additional integers to a add to the augend + * + * @return NumberInterface The sum of all the parameters + */ + public function add(NumberInterface $augend, NumberInterface ...$addends): NumberInterface; + + /** + * Returns the difference of all the provided parameters + * + * @param NumberInterface $minuend The integer being subtracted from + * @param NumberInterface ...$subtrahends The integers to subtract from the minuend + * + * @return NumberInterface The difference after subtracting all parameters + */ + public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahends): NumberInterface; + + /** + * Returns the product of all the provided parameters + * + * @param NumberInterface $multiplicand The integer to be multiplied + * @param NumberInterface ...$multipliers The factors by which to multiply the multiplicand + * + * @return NumberInterface The product of multiplying all the provided parameters + */ + public function multiply(NumberInterface $multiplicand, NumberInterface ...$multipliers): NumberInterface; + + /** + * Returns the quotient of the provided parameters divided left-to-right + * + * @param int $roundingMode The RoundingMode constant to use for this operation + * @param int $scale The scale to use for this operation + * @param NumberInterface $dividend The integer to be divided + * @param NumberInterface ...$divisors The integers to divide $dividend by, in + * the order in which the division operations should take place + * (left-to-right) + * + * @return NumberInterface The quotient of dividing the provided parameters left-to-right + */ + public function divide( + int $roundingMode, + int $scale, + NumberInterface $dividend, + NumberInterface ...$divisors + ): NumberInterface; + + /** + * Converts a value from an arbitrary base to a base-10 integer value + * + * @param string $value The value to convert + * @param int $base The base to convert from (i.e., 2, 16, 32, etc.) + * + * @return IntegerObject The base-10 integer value of the converted value + */ + public function fromBase(string $value, int $base): IntegerObject; + + /** + * Converts a base-10 integer value to an arbitrary base + * + * @param IntegerObject $value The integer value to convert + * @param int $base The base to convert to (i.e., 2, 16, 32, etc.) + * + * @return string The value represented in the specified base + */ + public function toBase(IntegerObject $value, int $base): string; + + /** + * Converts an Integer instance to a Hexadecimal instance + */ + public function toHexadecimal(IntegerObject $value): Hexadecimal; + + /** + * Converts a Hexadecimal instance to an Integer instance + */ + public function toInteger(Hexadecimal $value): IntegerObject; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Math/RoundingMode.php b/tests/php_test_files/vendor/ramsey/uuid/src/Math/RoundingMode.php new file mode 100644 index 0000000..e710270 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Math/RoundingMode.php @@ -0,0 +1,146 @@ += 0.5; otherwise, behaves + * as for DOWN. Note that this is the rounding mode commonly taught at + * school. + */ + public const HALF_UP = 5; + + /** + * 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. + */ + public const HALF_DOWN = 6; + + /** + * 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. + */ + public const HALF_CEILING = 7; + + /** + * 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. + */ + public const HALF_FLOOR = 8; + + /** + * 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. + */ + public const HALF_EVEN = 9; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/Fields.php b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/Fields.php new file mode 100644 index 0000000..5dfe610 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/Fields.php @@ -0,0 +1,131 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Nonstandard; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Fields\SerializableFieldsTrait; +use Ramsey\Uuid\Rfc4122\FieldsInterface; +use Ramsey\Uuid\Rfc4122\VariantTrait; +use Ramsey\Uuid\Type\Hexadecimal; + +use function bin2hex; +use function dechex; +use function hexdec; +use function sprintf; +use function str_pad; +use function strlen; +use function substr; + +use const STR_PAD_LEFT; + +/** + * Nonstandard UUID fields do not conform to the RFC 4122 standard + * + * Since some systems may create nonstandard UUIDs, this implements the + * Rfc4122\FieldsInterface, so that functionality of a nonstandard UUID is not + * degraded, in the event these UUIDs are expected to contain RFC 4122 fields. + * + * Internally, this class represents the fields together as a 16-byte binary + * string. + * + * @psalm-immutable + */ +final class Fields implements FieldsInterface +{ + use SerializableFieldsTrait; + use VariantTrait; + + /** + * @param string $bytes A 16-byte binary string representation of a UUID + * + * @throws InvalidArgumentException if the byte string is not exactly 16 bytes + */ + public function __construct(private string $bytes) + { + if (strlen($this->bytes) !== 16) { + throw new InvalidArgumentException( + 'The byte string must be 16 bytes long; ' + . 'received ' . strlen($this->bytes) . ' bytes' + ); + } + } + + public function getBytes(): string + { + return $this->bytes; + } + + public function getClockSeq(): Hexadecimal + { + $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; + + return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); + } + + public function getClockSeqHiAndReserved(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 8, 1))); + } + + public function getClockSeqLow(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 9, 1))); + } + + public function getNode(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 10))); + } + + public function getTimeHiAndVersion(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 6, 2))); + } + + public function getTimeLow(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 0, 4))); + } + + public function getTimeMid(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 4, 2))); + } + + public function getTimestamp(): Hexadecimal + { + return new Hexadecimal(sprintf( + '%03x%04s%08s', + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, + $this->getTimeMid()->toString(), + $this->getTimeLow()->toString() + )); + } + + public function getVersion(): ?int + { + return null; + } + + public function isNil(): bool + { + return false; + } + + public function isMax(): bool + { + return false; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/Uuid.php b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/Uuid.php new file mode 100644 index 0000000..715f825 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/Uuid.php @@ -0,0 +1,37 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Nonstandard; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Uuid as BaseUuid; + +/** + * Nonstandard\Uuid is a UUID that doesn't conform to RFC 4122 + * + * @psalm-immutable + */ +final class Uuid extends BaseUuid +{ + public function __construct( + Fields $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php new file mode 100644 index 0000000..82efd40 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php @@ -0,0 +1,76 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Nonstandard; + +use Ramsey\Uuid\Builder\UuidBuilderInterface; +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\UnableToBuildUuidException; +use Ramsey\Uuid\UuidInterface; +use Throwable; + +/** + * Nonstandard\UuidBuilder builds instances of Nonstandard\Uuid + * + * @psalm-immutable + */ +class UuidBuilder implements UuidBuilderInterface +{ + /** + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the Nonstandard\Uuid + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to Unix timestamps + */ + public function __construct( + private NumberConverterInterface $numberConverter, + private TimeConverterInterface $timeConverter + ) { + } + + /** + * Builds and returns a Nonstandard\Uuid + * + * @param CodecInterface $codec The codec to use for building this instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return Uuid The Nonstandard\UuidBuilder returns an instance of + * Nonstandard\Uuid + * + * @psalm-pure + */ + public function build(CodecInterface $codec, string $bytes): UuidInterface + { + try { + return new Uuid( + $this->buildFields($bytes), + $this->numberConverter, + $codec, + $this->timeConverter + ); + } catch (Throwable $e) { + throw new UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); + } + } + + /** + * Proxy method to allow injecting a mock, for testing + */ + protected function buildFields(string $bytes): Fields + { + return new Fields($bytes); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php new file mode 100644 index 0000000..7497dd1 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php @@ -0,0 +1,105 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Nonstandard; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Lazy\LazyUuidFromString; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Rfc4122\TimeTrait; +use Ramsey\Uuid\Rfc4122\UuidInterface; +use Ramsey\Uuid\Rfc4122\UuidV1; +use Ramsey\Uuid\Uuid as BaseUuid; + +/** + * Reordered time, or version 6, UUIDs include timestamp, clock sequence, and + * node values that are combined into a 128-bit unsigned integer + * + * @deprecated Use {@see \Ramsey\Uuid\Rfc4122\UuidV6} instead. + * + * @link https://github.com/uuid6/uuid6-ietf-draft UUID version 6 IETF draft + * @link http://gh.peabody.io/uuidv6/ "Version 6" UUIDs + * + * @psalm-immutable + */ +class UuidV6 extends BaseUuid implements UuidInterface +{ + use TimeTrait; + + /** + * Creates a version 6 (reordered time) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_REORDERED_TIME) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV6 must represent a ' + . 'version 6 (reordered time) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } + + /** + * Converts this UUID into an instance of a version 1 UUID + */ + public function toUuidV1(): UuidV1 + { + $hex = $this->getHex()->toString(); + $hex = substr($hex, 7, 5) + . substr($hex, 13, 3) + . substr($hex, 3, 4) + . '1' . substr($hex, 0, 3) + . substr($hex, 16); + + /** @var LazyUuidFromString $uuid */ + $uuid = Uuid::fromBytes((string) hex2bin($hex)); + + return $uuid->toUuidV1(); + } + + /** + * Converts a version 1 UUID into an instance of a version 6 UUID + */ + public static function fromUuidV1(UuidV1 $uuidV1): \Ramsey\Uuid\Rfc4122\UuidV6 + { + $hex = $uuidV1->getHex()->toString(); + $hex = substr($hex, 13, 3) + . substr($hex, 8, 4) + . substr($hex, 0, 5) + . '6' . substr($hex, 5, 3) + . substr($hex, 16); + + /** @var LazyUuidFromString $uuid */ + $uuid = Uuid::fromBytes((string) hex2bin($hex)); + + return $uuid->toUuidV6(); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php new file mode 100644 index 0000000..d5b6cf0 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php @@ -0,0 +1,231 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Dce; + +use Ramsey\Uuid\Exception\DceSecurityException; +use Ramsey\Uuid\Provider\DceSecurityProviderInterface; +use Ramsey\Uuid\Type\Integer as IntegerObject; + +use function escapeshellarg; +use function preg_split; +use function str_getcsv; +use function strrpos; +use function strtolower; +use function strtoupper; +use function substr; +use function trim; + +use const PREG_SPLIT_NO_EMPTY; + +/** + * SystemDceSecurityProvider retrieves the user or group identifiers from the system + */ +class SystemDceSecurityProvider implements DceSecurityProviderInterface +{ + /** + * @throws DceSecurityException if unable to get a user identifier + * + * @inheritDoc + */ + public function getUid(): IntegerObject + { + /** @var int|float|string|IntegerObject|null $uid */ + static $uid = null; + + if ($uid instanceof IntegerObject) { + return $uid; + } + + if ($uid === null) { + $uid = $this->getSystemUid(); + } + + if ($uid === '') { + throw new DceSecurityException( + 'Unable to get a user identifier using the system DCE ' + . 'Security provider; please provide a custom identifier or ' + . 'use a different provider' + ); + } + + $uid = new IntegerObject($uid); + + return $uid; + } + + /** + * @throws DceSecurityException if unable to get a group identifier + * + * @inheritDoc + */ + public function getGid(): IntegerObject + { + /** @var int|float|string|IntegerObject|null $gid */ + static $gid = null; + + if ($gid instanceof IntegerObject) { + return $gid; + } + + if ($gid === null) { + $gid = $this->getSystemGid(); + } + + if ($gid === '') { + throw new DceSecurityException( + 'Unable to get a group identifier using the system DCE ' + . 'Security provider; please provide a custom identifier or ' + . 'use a different provider' + ); + } + + $gid = new IntegerObject($gid); + + return $gid; + } + + /** + * Returns the UID from the system + */ + private function getSystemUid(): string + { + if (!$this->hasShellExec()) { + return ''; + } + + return match ($this->getOs()) { + 'WIN' => $this->getWindowsUid(), + default => trim((string) shell_exec('id -u')), + }; + } + + /** + * Returns the GID from the system + */ + private function getSystemGid(): string + { + if (!$this->hasShellExec()) { + return ''; + } + + return match ($this->getOs()) { + 'WIN' => $this->getWindowsGid(), + default => trim((string) shell_exec('id -g')), + }; + } + + /** + * Returns true if shell_exec() is available for use + */ + private function hasShellExec(): bool + { + $disabledFunctions = strtolower((string) ini_get('disable_functions')); + + return !str_contains($disabledFunctions, 'shell_exec'); + } + + /** + * Returns the PHP_OS string + */ + private function getOs(): string + { + /** + * @psalm-suppress UnnecessaryVarAnnotation + * @var string $phpOs + */ + $phpOs = constant('PHP_OS'); + + return strtoupper(substr($phpOs, 0, 3)); + } + + /** + * Returns the user identifier for a user on a Windows system + * + * Windows does not have the same concept as an effective POSIX UID for the + * running script. Instead, each user is uniquely identified by an SID + * (security identifier). The SID includes three 32-bit unsigned integers + * that make up a unique domain identifier, followed by an RID (relative + * identifier) that we will use as the UID. The primary caveat is that this + * UID may not be unique to the system, since it is, instead, unique to the + * domain. + * + * @link https://www.lifewire.com/what-is-an-sid-number-2626005 What Is an SID Number? + * @link https://bit.ly/30vE7NM Well-known SID Structures + * @link https://bit.ly/2FWcYKJ Well-known security identifiers in Windows operating systems + * @link https://www.windows-commandline.com/get-sid-of-user/ Get SID of user + */ + private function getWindowsUid(): string + { + $response = shell_exec('whoami /user /fo csv /nh'); + + if ($response === null) { + return ''; + } + + $sid = str_getcsv(trim((string) $response))[1] ?? ''; + + if (($lastHyphen = strrpos($sid, '-')) === false) { + return ''; + } + + return trim(substr($sid, $lastHyphen + 1)); + } + + /** + * Returns a group identifier for a user on a Windows system + * + * Since Windows does not have the same concept as an effective POSIX GID + * for the running script, we will get the local group memberships for the + * user running the script. Then, we will get the SID (security identifier) + * for the first group that appears in that list. Finally, we will return + * the RID (relative identifier) for the group and use that as the GID. + * + * @link https://www.windows-commandline.com/list-of-user-groups-command-line/ List of user groups command line + */ + private function getWindowsGid(): string + { + $response = shell_exec('net user %username% | findstr /b /i "Local Group Memberships"'); + + if ($response === null) { + return ''; + } + + /** @var string[] $userGroups */ + $userGroups = preg_split('/\s{2,}/', (string) $response, -1, PREG_SPLIT_NO_EMPTY); + + $firstGroup = trim($userGroups[1] ?? '', "* \t\n\r\0\x0B"); + + if ($firstGroup === '') { + return ''; + } + + $response = shell_exec('wmic group get name,sid | findstr /b /i ' . escapeshellarg($firstGroup)); + + if ($response === null) { + return ''; + } + + /** @var string[] $userGroup */ + $userGroup = preg_split('/\s{2,}/', (string) $response, -1, PREG_SPLIT_NO_EMPTY); + + $sid = $userGroup[1] ?? ''; + + if (($lastHyphen = strrpos($sid, '-')) === false) { + return ''; + } + + return trim(substr($sid, $lastHyphen + 1)); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php new file mode 100644 index 0000000..8325da6 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php @@ -0,0 +1,41 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider; + +use Ramsey\Uuid\Rfc4122\UuidV2; +use Ramsey\Uuid\Type\Integer as IntegerObject; + +/** + * A DCE provider provides access to local domain identifiers for version 2, + * DCE Security, UUIDs + * + * @see UuidV2 + */ +interface DceSecurityProviderInterface +{ + /** + * Returns a user identifier for the system + * + * @link https://en.wikipedia.org/wiki/User_identifier User identifier + */ + public function getUid(): IntegerObject; + + /** + * Returns a group identifier for the system + * + * @link https://en.wikipedia.org/wiki/Group_identifier Group identifier + */ + public function getGid(): IntegerObject; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php new file mode 100644 index 0000000..d2eb20b --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php @@ -0,0 +1,54 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Node; + +use Ramsey\Uuid\Exception\NodeException; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Type\Hexadecimal; + +/** + * FallbackNodeProvider retrieves the system node ID by stepping through a list + * of providers until a node ID can be obtained + */ +class FallbackNodeProvider implements NodeProviderInterface +{ + /** + * @param iterable $providers Array of node providers + */ + public function __construct(private iterable $providers) + { + } + + public function getNode(): Hexadecimal + { + $lastProviderException = null; + + foreach ($this->providers as $provider) { + try { + return $provider->getNode(); + } catch (NodeException $exception) { + $lastProviderException = $exception; + + continue; + } + } + + throw new NodeException( + 'Unable to find a suitable node provider', + 0, + $lastProviderException + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php new file mode 100644 index 0000000..1b979fa --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php @@ -0,0 +1,66 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Node; + +use Ramsey\Collection\AbstractCollection; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Type\Hexadecimal; + +/** + * A collection of NodeProviderInterface objects + * + * @deprecated this class has been deprecated, and will be removed in 5.0.0. The use-case for this class comes from + * a pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced + * at runtime: that is no longer necessary, now that you can safely verify your code to be correct, and use + * more generic types like `iterable` instead. + * + * @extends AbstractCollection + */ +class NodeProviderCollection extends AbstractCollection +{ + public function getType(): string + { + return NodeProviderInterface::class; + } + + /** + * Re-constructs the object from its serialized form + * + * @param string $serialized The serialized PHP string to unserialize into + * a UuidInterface instance + * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + * @psalm-suppress RedundantConditionGivenDocblockType + */ + public function unserialize($serialized): void + { + /** @var array $data */ + $data = unserialize($serialized, [ + 'allowed_classes' => [ + Hexadecimal::class, + RandomNodeProvider::class, + StaticNodeProvider::class, + SystemNodeProvider::class, + ], + ]); + + $this->data = array_filter( + $data, + function ($unserialized): bool { + return $unserialized instanceof NodeProviderInterface; + } + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php new file mode 100644 index 0000000..7614136 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php @@ -0,0 +1,69 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Node; + +use Ramsey\Uuid\Exception\RandomSourceException; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Throwable; + +use function bin2hex; +use function dechex; +use function hex2bin; +use function hexdec; +use function str_pad; +use function substr; + +use const STR_PAD_LEFT; + +/** + * RandomNodeProvider generates a random node ID + * + * @link http://tools.ietf.org/html/rfc4122#section-4.5 RFC 4122, ยง 4.5: Node IDs that Do Not Identify the Host + */ +class RandomNodeProvider implements NodeProviderInterface +{ + public function getNode(): Hexadecimal + { + try { + $nodeBytes = random_bytes(6); + } catch (Throwable $exception) { + throw new RandomSourceException( + $exception->getMessage(), + (int) $exception->getCode(), + $exception + ); + } + + // Split the node bytes for math on 32-bit systems. + $nodeMsb = substr($nodeBytes, 0, 3); + $nodeLsb = substr($nodeBytes, 3); + + // Set the multicast bit; see RFC 4122, section 4.5. + $nodeMsb = hex2bin( + str_pad( + dechex(hexdec(bin2hex($nodeMsb)) | 0x010000), + 6, + '0', + STR_PAD_LEFT + ) + ); + + // Recombine the node bytes. + $node = $nodeMsb . $nodeLsb; + + return new Hexadecimal(str_pad(bin2hex($node), 12, '0', STR_PAD_LEFT)); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php new file mode 100644 index 0000000..0f7536a --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php @@ -0,0 +1,73 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Node; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Type\Hexadecimal; + +use function dechex; +use function hexdec; +use function str_pad; +use function substr; + +use const STR_PAD_LEFT; + +/** + * StaticNodeProvider provides a static node value with the multicast bit set + * + * @link http://tools.ietf.org/html/rfc4122#section-4.5 RFC 4122, ยง 4.5: Node IDs that Do Not Identify the Host + */ +class StaticNodeProvider implements NodeProviderInterface +{ + private Hexadecimal $node; + + /** + * @param Hexadecimal $node The static node value to use + */ + public function __construct(Hexadecimal $node) + { + if (strlen($node->toString()) > 12) { + throw new InvalidArgumentException( + 'Static node value cannot be greater than 12 hexadecimal characters' + ); + } + + $this->node = $this->setMulticastBit($node); + } + + public function getNode(): Hexadecimal + { + return $this->node; + } + + /** + * Set the multicast bit for the static node value + */ + private function setMulticastBit(Hexadecimal $node): Hexadecimal + { + $nodeHex = str_pad($node->toString(), 12, '0', STR_PAD_LEFT); + $firstOctet = substr($nodeHex, 0, 2); + + $firstOctet = str_pad( + dechex(hexdec($firstOctet) | 0x01), + 2, + '0', + STR_PAD_LEFT + ); + + return new Hexadecimal($firstOctet . substr($nodeHex, 2)); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php new file mode 100644 index 0000000..a03c93b --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php @@ -0,0 +1,193 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Node; + +use Ramsey\Uuid\Exception\NodeException; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Type\Hexadecimal; + +use function array_filter; +use function array_map; +use function array_walk; +use function count; +use function ob_get_clean; +use function ob_start; +use function preg_match; +use function preg_match_all; +use function reset; +use function str_contains; +use function str_replace; +use function strtolower; +use function strtoupper; +use function substr; + +use const GLOB_NOSORT; +use const PREG_PATTERN_ORDER; + +/** + * SystemNodeProvider retrieves the system node ID, if possible + * + * The system node ID, or host ID, is often the same as the MAC address for a + * network interface on the host. + */ +class SystemNodeProvider implements NodeProviderInterface +{ + /** + * Pattern to match nodes in ifconfig and ipconfig output. + */ + private const IFCONFIG_PATTERN = '/[^:]([0-9a-f]{2}([:-])[0-9a-f]{2}(\2[0-9a-f]{2}){4})[^:]/i'; + + /** + * Pattern to match nodes in sysfs stream output. + */ + private const SYSFS_PATTERN = '/^([0-9a-f]{2}:){5}[0-9a-f]{2}$/i'; + + public function getNode(): Hexadecimal + { + $node = $this->getNodeFromSystem(); + + if ($node === '') { + throw new NodeException( + 'Unable to fetch a node for this system' + ); + } + + return new Hexadecimal($node); + } + + /** + * Returns the system node, if it can find it + */ + protected function getNodeFromSystem(): string + { + static $node = null; + + if ($node !== null) { + return (string) $node; + } + + // First, try a Linux-specific approach. + $node = $this->getSysfs(); + + if ($node === '') { + // Search ifconfig output for MAC addresses & return the first one. + $node = $this->getIfconfig(); + } + + $node = str_replace([':', '-'], '', $node); + + return $node; + } + + /** + * Returns the network interface configuration for the system + * + * @codeCoverageIgnore + */ + protected function getIfconfig(): string + { + $disabledFunctions = strtolower((string) ini_get('disable_functions')); + + if (str_contains($disabledFunctions, 'passthru')) { + return ''; + } + + /** + * @psalm-suppress UnnecessaryVarAnnotation + * @var string $phpOs + */ + $phpOs = constant('PHP_OS'); + + ob_start(); + switch (strtoupper(substr($phpOs, 0, 3))) { + case 'WIN': + passthru('ipconfig /all 2>&1'); + + break; + case 'DAR': + passthru('ifconfig 2>&1'); + + break; + case 'FRE': + passthru('netstat -i -f link 2>&1'); + + break; + case 'LIN': + default: + passthru('netstat -ie 2>&1'); + + break; + } + + $ifconfig = (string) ob_get_clean(); + + if (preg_match_all(self::IFCONFIG_PATTERN, $ifconfig, $matches, PREG_PATTERN_ORDER)) { + foreach ($matches[1] as $iface) { + if ($iface !== '00:00:00:00:00:00' && $iface !== '00-00-00-00-00-00') { + return $iface; + } + } + } + + return ''; + } + + /** + * Returns MAC address from the first system interface via the sysfs interface + */ + protected function getSysfs(): string + { + $mac = ''; + + /** + * @psalm-suppress UnnecessaryVarAnnotation + * @var string $phpOs + */ + $phpOs = constant('PHP_OS'); + + if (strtoupper($phpOs) === 'LINUX') { + $addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT); + + if ($addressPaths === false || count($addressPaths) === 0) { + return ''; + } + + /** @var array $macs */ + $macs = []; + + array_walk($addressPaths, function (string $addressPath) use (&$macs): void { + if (is_readable($addressPath)) { + $macs[] = file_get_contents($addressPath); + } + }); + + /** @var callable $trim */ + $trim = 'trim'; + + $macs = array_map($trim, $macs); + + // Remove invalid entries. + $macs = array_filter($macs, function (string $address) { + return $address !== '00:00:00:00:00:00' + && preg_match(self::SYSFS_PATTERN, $address); + }); + + /** @var string|bool $mac */ + $mac = reset($macs); + } + + return (string) $mac; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php new file mode 100644 index 0000000..d536b45 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php @@ -0,0 +1,30 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider; + +use Ramsey\Uuid\Type\Hexadecimal; + +/** + * A node provider retrieves or generates a node ID + */ +interface NodeProviderInterface +{ + /** + * Returns a node ID + * + * @return Hexadecimal The node ID as a hexadecimal string + */ + public function getNode(): Hexadecimal; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php new file mode 100644 index 0000000..526c8ff --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php @@ -0,0 +1,57 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Time; + +use Ramsey\Uuid\Provider\TimeProviderInterface; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Type\Time; + +/** + * FixedTimeProvider uses a known time to provide the time + * + * This provider allows the use of a previously-generated, or known, time + * when generating time-based UUIDs. + */ +class FixedTimeProvider implements TimeProviderInterface +{ + public function __construct(private Time $time) + { + } + + /** + * Sets the `usec` component of the time + * + * @param int|string|IntegerObject $value The `usec` value to set + */ + public function setUsec($value): void + { + $this->time = new Time($this->time->getSeconds(), $value); + } + + /** + * Sets the `sec` component of the time + * + * @param int|string|IntegerObject $value The `sec` value to set + */ + public function setSec($value): void + { + $this->time = new Time($value, $this->time->getMicroseconds()); + } + + public function getTime(): Time + { + return $this->time; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php new file mode 100644 index 0000000..3a1e09c --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php @@ -0,0 +1,33 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider\Time; + +use Ramsey\Uuid\Provider\TimeProviderInterface; +use Ramsey\Uuid\Type\Time; + +use function gettimeofday; + +/** + * SystemTimeProvider retrieves the current time using built-in PHP functions + */ +class SystemTimeProvider implements TimeProviderInterface +{ + public function getTime(): Time + { + $time = gettimeofday(); + + return new Time($time['sec'], $time['usec']); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php new file mode 100644 index 0000000..43588e0 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php @@ -0,0 +1,28 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Provider; + +use Ramsey\Uuid\Type\Time; + +/** + * A time provider retrieves the current time + */ +interface TimeProviderInterface +{ + /** + * Returns a time object + */ + public function getTime(): Time; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/Fields.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/Fields.php new file mode 100644 index 0000000..9acf810 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/Fields.php @@ -0,0 +1,195 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Fields\SerializableFieldsTrait; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Uuid; + +use function bin2hex; +use function dechex; +use function hexdec; +use function sprintf; +use function str_pad; +use function strlen; +use function substr; +use function unpack; + +use const STR_PAD_LEFT; + +/** + * RFC 4122 variant UUIDs are comprised of a set of named fields + * + * Internally, this class represents the fields together as a 16-byte binary + * string. + * + * @psalm-immutable + */ +final class Fields implements FieldsInterface +{ + use MaxTrait; + use NilTrait; + use SerializableFieldsTrait; + use VariantTrait; + use VersionTrait; + + /** + * @param string $bytes A 16-byte binary string representation of a UUID + * + * @throws InvalidArgumentException if the byte string is not exactly 16 bytes + * @throws InvalidArgumentException if the byte string does not represent an RFC 4122 UUID + * @throws InvalidArgumentException if the byte string does not contain a valid version + */ + public function __construct(private string $bytes) + { + if (strlen($this->bytes) !== 16) { + throw new InvalidArgumentException( + 'The byte string must be 16 bytes long; ' + . 'received ' . strlen($this->bytes) . ' bytes' + ); + } + + if (!$this->isCorrectVariant()) { + throw new InvalidArgumentException( + 'The byte string received does not conform to the RFC 4122 variant' + ); + } + + if (!$this->isCorrectVersion()) { + throw new InvalidArgumentException( + 'The byte string received does not contain a valid RFC 4122 version' + ); + } + } + + public function getBytes(): string + { + return $this->bytes; + } + + public function getClockSeq(): Hexadecimal + { + if ($this->isMax()) { + $clockSeq = 0xffff; + } elseif ($this->isNil()) { + $clockSeq = 0x0000; + } else { + $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; + } + + return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); + } + + public function getClockSeqHiAndReserved(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 8, 1))); + } + + public function getClockSeqLow(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 9, 1))); + } + + public function getNode(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 10))); + } + + public function getTimeHiAndVersion(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 6, 2))); + } + + public function getTimeLow(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 0, 4))); + } + + public function getTimeMid(): Hexadecimal + { + return new Hexadecimal(bin2hex(substr($this->bytes, 4, 2))); + } + + /** + * Returns the full 60-bit timestamp, without the version + * + * For version 2 UUIDs, the time_low field is the local identifier and + * should not be returned as part of the time. For this reason, we set the + * bottom 32 bits of the timestamp to 0's. As a result, there is some loss + * of fidelity of the timestamp, for version 2 UUIDs. The timestamp can be + * off by a range of 0 to 429.4967295 seconds (or 7 minutes, 9 seconds, and + * 496730 microseconds). + * + * For version 6 UUIDs, the timestamp order is reversed from the typical RFC + * 4122 order (the time bits are in the correct bit order, so that it is + * monotonically increasing). In returning the timestamp value, we put the + * bits in the order: time_low + time_mid + time_hi. + */ + public function getTimestamp(): Hexadecimal + { + $timestamp = match ($this->getVersion()) { + Uuid::UUID_TYPE_DCE_SECURITY => sprintf( + '%03x%04s%08s', + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, + $this->getTimeMid()->toString(), + '' + ), + Uuid::UUID_TYPE_REORDERED_TIME => sprintf( + '%08s%04s%03x', + $this->getTimeLow()->toString(), + $this->getTimeMid()->toString(), + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff + ), + // The Unix timestamp in version 7 UUIDs is a 48-bit number, + // but for consistency, we will return a 60-bit number, padded + // to the left with zeros. + Uuid::UUID_TYPE_UNIX_TIME => sprintf( + '%011s%04s', + $this->getTimeLow()->toString(), + $this->getTimeMid()->toString(), + ), + default => sprintf( + '%03x%04s%08s', + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, + $this->getTimeMid()->toString(), + $this->getTimeLow()->toString() + ), + }; + + return new Hexadecimal($timestamp); + } + + public function getVersion(): ?int + { + if ($this->isNil() || $this->isMax()) { + return null; + } + + /** @var int[] $parts */ + $parts = unpack('n*', $this->bytes); + + return $parts[4] >> 12; + } + + private function isCorrectVariant(): bool + { + if ($this->isNil() || $this->isMax()) { + return true; + } + + return $this->getVariant() === Uuid::RFC_4122; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php new file mode 100644 index 0000000..2241cf5 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php @@ -0,0 +1,128 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Fields\FieldsInterface as BaseFieldsInterface; +use Ramsey\Uuid\Type\Hexadecimal; + +/** + * RFC 4122 defines fields for a specific variant of UUID + * + * The fields of an RFC 4122 variant UUID are: + * + * * **time_low**: The low field of the timestamp, an unsigned 32-bit integer + * * **time_mid**: The middle field of the timestamp, an unsigned 16-bit integer + * * **time_hi_and_version**: The high field of the timestamp multiplexed with + * the version number, an unsigned 16-bit integer + * * **clock_seq_hi_and_reserved**: The high field of the clock sequence + * multiplexed with the variant, an unsigned 8-bit integer + * * **clock_seq_low**: The low field of the clock sequence, an unsigned + * 8-bit integer + * * **node**: The spatially unique node identifier, an unsigned 48-bit + * integer + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1 RFC 4122, ยง 4.1: Format + * + * @psalm-immutable + */ +interface FieldsInterface extends BaseFieldsInterface +{ + /** + * Returns the full 16-bit clock sequence, with the variant bits (two most + * significant bits) masked out + */ + public function getClockSeq(): Hexadecimal; + + /** + * Returns the high field of the clock sequence multiplexed with the variant + */ + public function getClockSeqHiAndReserved(): Hexadecimal; + + /** + * Returns the low field of the clock sequence + */ + public function getClockSeqLow(): Hexadecimal; + + /** + * Returns the node field + */ + public function getNode(): Hexadecimal; + + /** + * Returns the high field of the timestamp multiplexed with the version + */ + public function getTimeHiAndVersion(): Hexadecimal; + + /** + * Returns the low field of the timestamp + */ + public function getTimeLow(): Hexadecimal; + + /** + * Returns the middle field of the timestamp + */ + public function getTimeMid(): Hexadecimal; + + /** + * Returns the full 60-bit timestamp, without the version + */ + public function getTimestamp(): Hexadecimal; + + /** + * Returns the variant + * + * The variant number describes the layout of the UUID. The variant + * number has the following meaning: + * + * - 0 - Reserved for NCS backward compatibility + * - 2 - The RFC 4122 variant + * - 6 - Reserved, Microsoft Corporation backward compatibility + * - 7 - Reserved for future definition + * + * For RFC 4122 variant UUIDs, this value should always be the integer `2`. + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant + */ + public function getVariant(): int; + + /** + * Returns the version + * + * The version number describes how the UUID was generated and has the + * following meaning: + * + * 1. Gregorian time UUID + * 2. DCE security UUID + * 3. Name-based UUID hashed with MD5 + * 4. Randomly generated UUID + * 5. Name-based UUID hashed with SHA-1 + * 6. Reordered time UUID + * 7. Unix Epoch time UUID + * + * This returns `null` if the UUID is not an RFC 4122 variant, since version + * is only meaningful for this variant. + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, ยง 4.1.3: Version + */ + public function getVersion(): ?int; + + /** + * Returns true if these fields represent a nil UUID + * + * The nil UUID is special form of UUID that is specified to have all 128 + * bits set to zero. + */ + public function isNil(): bool; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/MaxTrait.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/MaxTrait.php new file mode 100644 index 0000000..dedb727 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/MaxTrait.php @@ -0,0 +1,41 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +/** + * Provides common functionality for max UUIDs + * + * The max UUID is special form of UUID that is specified to have all 128 bits + * set to one. It is the inverse of the nil UUID. + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.10 Max UUID + * + * @psalm-immutable + */ +trait MaxTrait +{ + /** + * Returns the bytes that comprise the fields + */ + abstract public function getBytes(): string; + + /** + * Returns true if the byte string represents a max UUID + */ + public function isMax(): bool + { + return $this->getBytes() === "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/MaxUuid.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/MaxUuid.php new file mode 100644 index 0000000..e5ffa72 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/MaxUuid.php @@ -0,0 +1,27 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Uuid; + +/** + * The max UUID is special form of UUID that is specified to have all 128 bits + * set to one + * + * @psalm-immutable + */ +final class MaxUuid extends Uuid implements UuidInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php new file mode 100644 index 0000000..9a9774d --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php @@ -0,0 +1,41 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +/** + * Provides common functionality for nil UUIDs + * + * The nil UUID is special form of UUID that is specified to have all 128 bits + * set to zero. + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.7 RFC 4122, ยง 4.1.7: Nil UUID + * + * @psalm-immutable + */ +trait NilTrait +{ + /** + * Returns the bytes that comprise the fields + */ + abstract public function getBytes(): string; + + /** + * Returns true if the byte string represents a nil UUID + */ + public function isNil(): bool + { + return $this->getBytes() === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php new file mode 100644 index 0000000..c49b994 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php @@ -0,0 +1,27 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Uuid; + +/** + * The nil UUID is special form of UUID that is specified to have all 128 bits + * set to zero + * + * @psalm-immutable + */ +final class NilUuid extends Uuid implements UuidInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/TimeTrait.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/TimeTrait.php new file mode 100644 index 0000000..5d939fa --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/TimeTrait.php @@ -0,0 +1,55 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use DateTimeImmutable; +use DateTimeInterface; +use Ramsey\Uuid\Exception\DateTimeException; +use Throwable; + +use function str_pad; + +use const STR_PAD_LEFT; + +/** + * Provides common functionality for getting the time from a time-based UUID + * + * @psalm-immutable + */ +trait TimeTrait +{ + /** + * Returns a DateTimeInterface object representing the timestamp associated + * with the UUID + * + * @return DateTimeImmutable A PHP DateTimeImmutable instance representing + * the timestamp of a time-based UUID + */ + public function getDateTime(): DateTimeInterface + { + $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); + + try { + return new DateTimeImmutable( + '@' + . $time->getSeconds()->toString() + . '.' + . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) + ); + } catch (Throwable $e) { + throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); + } + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php new file mode 100644 index 0000000..2c2677d --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php @@ -0,0 +1,118 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Builder\UuidBuilderInterface; +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\Time\UnixTimeConverter; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\UnableToBuildUuidException; +use Ramsey\Uuid\Exception\UnsupportedOperationException; +use Ramsey\Uuid\Math\BrickMathCalculator; +use Ramsey\Uuid\Rfc4122\UuidInterface as Rfc4122UuidInterface; +use Ramsey\Uuid\Uuid; +use Ramsey\Uuid\UuidInterface; +use Throwable; + +/** + * UuidBuilder builds instances of RFC 4122 UUIDs + * + * @psalm-immutable + */ +class UuidBuilder implements UuidBuilderInterface +{ + private TimeConverterInterface $unixTimeConverter; + + /** + * Constructs the DefaultUuidBuilder + * + * @param NumberConverterInterface $numberConverter The number converter to + * use when constructing the Uuid + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting Gregorian time extracted from version 1, 2, and 6 + * UUIDs to Unix timestamps + * @param TimeConverterInterface|null $unixTimeConverter The time converter + * to use for converter Unix Epoch time extracted from version 7 UUIDs + * to Unix timestamps + */ + public function __construct( + private NumberConverterInterface $numberConverter, + private TimeConverterInterface $timeConverter, + ?TimeConverterInterface $unixTimeConverter = null + ) { + $this->unixTimeConverter = $unixTimeConverter ?? new UnixTimeConverter(new BrickMathCalculator()); + } + + /** + * Builds and returns a Uuid + * + * @param CodecInterface $codec The codec to use for building this Uuid instance + * @param string $bytes The byte string from which to construct a UUID + * + * @return Rfc4122UuidInterface UuidBuilder returns instances of Rfc4122UuidInterface + * + * @psalm-pure + */ + public function build(CodecInterface $codec, string $bytes): UuidInterface + { + try { + /** @var Fields $fields */ + $fields = $this->buildFields($bytes); + + if ($fields->isNil()) { + return new NilUuid($fields, $this->numberConverter, $codec, $this->timeConverter); + } + + if ($fields->isMax()) { + return new MaxUuid($fields, $this->numberConverter, $codec, $this->timeConverter); + } + + switch ($fields->getVersion()) { + case Uuid::UUID_TYPE_TIME: + return new UuidV1($fields, $this->numberConverter, $codec, $this->timeConverter); + case Uuid::UUID_TYPE_DCE_SECURITY: + return new UuidV2($fields, $this->numberConverter, $codec, $this->timeConverter); + case Uuid::UUID_TYPE_HASH_MD5: + return new UuidV3($fields, $this->numberConverter, $codec, $this->timeConverter); + case Uuid::UUID_TYPE_RANDOM: + return new UuidV4($fields, $this->numberConverter, $codec, $this->timeConverter); + case Uuid::UUID_TYPE_HASH_SHA1: + return new UuidV5($fields, $this->numberConverter, $codec, $this->timeConverter); + case Uuid::UUID_TYPE_REORDERED_TIME: + return new UuidV6($fields, $this->numberConverter, $codec, $this->timeConverter); + case Uuid::UUID_TYPE_UNIX_TIME: + return new UuidV7($fields, $this->numberConverter, $codec, $this->unixTimeConverter); + case Uuid::UUID_TYPE_CUSTOM: + return new UuidV8($fields, $this->numberConverter, $codec, $this->timeConverter); + } + + throw new UnsupportedOperationException( + 'The UUID version in the given fields is not supported ' + . 'by this UUID builder' + ); + } catch (Throwable $e) { + throw new UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); + } + } + + /** + * Proxy method to allow injecting a mock, for testing + */ + protected function buildFields(string $bytes): FieldsInterface + { + return new Fields($bytes); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php new file mode 100644 index 0000000..e80f33b --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php @@ -0,0 +1,29 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\UuidInterface as BaseUuidInterface; + +/** + * Also known as a Leach-Salz variant UUID, an RFC 4122 variant UUID is a + * universally unique identifier defined by RFC 4122 + * + * @link https://tools.ietf.org/html/rfc4122 RFC 4122 + * + * @psalm-immutable + */ +interface UuidInterface extends BaseUuidInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php new file mode 100644 index 0000000..515c038 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php @@ -0,0 +1,60 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Uuid; + +/** + * Gregorian time, or version 1, UUIDs include timestamp, clock sequence, and node + * values that are combined into a 128-bit unsigned integer + * + * @psalm-immutable + */ +final class UuidV1 extends Uuid implements UuidInterface +{ + use TimeTrait; + + /** + * Creates a version 1 (Gregorian time) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_TIME) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV1 must represent a ' + . 'version 1 (time-based) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php new file mode 100644 index 0000000..c8ccbe4 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php @@ -0,0 +1,115 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Uuid; + +use function hexdec; + +/** + * DCE Security version, or version 2, UUIDs include local domain identifier, + * local ID for the specified domain, and node values that are combined into a + * 128-bit unsigned integer + * + * It is important to note that a version 2 UUID suffers from some loss of + * fidelity of the timestamp, due to replacing the time_low field with the + * local identifier. When constructing the timestamp value for date + * purposes, we replace the local identifier bits with zeros. As a result, + * the timestamp can be off by a range of 0 to 429.4967295 seconds (or 7 + * minutes, 9 seconds, and 496730 microseconds). + * + * Astute observers might note this value directly corresponds to 2^32 - 1, + * or 0xffffffff. The local identifier is 32-bits, and we have set each of + * these bits to 0, so the maximum range of timestamp drift is 0x00000000 + * to 0xffffffff (counted in 100-nanosecond intervals). + * + * @link https://publications.opengroup.org/c311 DCE 1.1: Authentication and Security Services + * @link https://publications.opengroup.org/c706 DCE 1.1: Remote Procedure Call + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01 DCE 1.1: Auth & Sec, ยง5.2.1.1 + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1: Auth & Sec, ยง11.5.1.1 + * @link https://pubs.opengroup.org/onlinepubs/9629399/apdxa.htm DCE 1.1: RPC, Appendix A + * @link https://github.com/google/uuid Go package for UUIDs (includes DCE implementation) + * + * @psalm-immutable + */ +final class UuidV2 extends Uuid implements UuidInterface +{ + use TimeTrait; + + /** + * Creates a version 2 (DCE Security) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_DCE_SECURITY) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV2 must represent a ' + . 'version 2 (DCE Security) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } + + /** + * Returns the local domain used to create this version 2 UUID + */ + public function getLocalDomain(): int + { + /** @var Rfc4122FieldsInterface $fields */ + $fields = $this->getFields(); + + return (int) hexdec($fields->getClockSeqLow()->toString()); + } + + /** + * Returns the string name of the local domain + */ + public function getLocalDomainName(): string + { + return Uuid::DCE_DOMAIN_NAMES[$this->getLocalDomain()]; + } + + /** + * Returns the local identifier for the domain used to create this version 2 UUID + */ + public function getLocalIdentifier(): IntegerObject + { + /** @var Rfc4122FieldsInterface $fields */ + $fields = $this->getFields(); + + return new IntegerObject( + $this->numberConverter->fromHex($fields->getTimeLow()->toString()) + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php new file mode 100644 index 0000000..deaa54e --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php @@ -0,0 +1,58 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Uuid; + +/** + * Version 3 UUIDs are named-based, using combination of a namespace and name + * that are hashed into a 128-bit unsigned integer using MD5 + * + * @psalm-immutable + */ +final class UuidV3 extends Uuid implements UuidInterface +{ + /** + * Creates a version 3 (name-based, MD5-hashed) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_HASH_MD5) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV3 must represent a ' + . 'version 3 (name-based, MD5-hashed) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php new file mode 100644 index 0000000..2e57246 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php @@ -0,0 +1,58 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Uuid; + +/** + * Random, or version 4, UUIDs are randomly or pseudo-randomly generated 128-bit + * integers + * + * @psalm-immutable + */ +final class UuidV4 extends Uuid implements UuidInterface +{ + /** + * Creates a version 4 (random) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_RANDOM) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV4 must represent a ' + . 'version 4 (random) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php new file mode 100644 index 0000000..2ef6ab3 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php @@ -0,0 +1,58 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Uuid; + +/** + * Version 5 UUIDs are named-based, using combination of a namespace and name + * that are hashed into a 128-bit unsigned integer using SHA1 + * + * @psalm-immutable + */ +final class UuidV5 extends Uuid implements UuidInterface +{ + /** + * Creates a version 5 (name-based, SHA1-hashed) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_HASH_SHA1) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV5 must represent a ' + . 'version 5 (named-based, SHA1-hashed) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV6.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV6.php new file mode 100644 index 0000000..7e37433 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV6.php @@ -0,0 +1,29 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Nonstandard\UuidV6 as NonstandardUuidV6; + +/** + * Reordered time, or version 6, UUIDs include timestamp, clock sequence, and + * node values that are combined into a 128-bit unsigned integer + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.6 UUID Version 6 + * + * @psalm-immutable + */ +final class UuidV6 extends NonstandardUuidV6 implements UuidInterface +{ +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV7.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV7.php new file mode 100644 index 0000000..5b524c4 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV7.php @@ -0,0 +1,62 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Uuid; + +/** + * Unix Epoch time, or version 7, UUIDs include a timestamp in milliseconds + * since the Unix Epoch, along with random bytes + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.7 UUID Version 7 + * + * @psalm-immutable + */ +final class UuidV7 extends Uuid implements UuidInterface +{ + use TimeTrait; + + /** + * Creates a version 7 (Unix Epoch time) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_UNIX_TIME) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV7 must represent a ' + . 'version 7 (Unix Epoch time) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV8.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV8.php new file mode 100644 index 0000000..78b0290 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/UuidV8.php @@ -0,0 +1,65 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\InvalidArgumentException; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Uuid; + +/** + * Version 8, Custom UUIDs provide an RFC 4122 compatible format for + * experimental or vendor-specific uses + * + * The only requirement for version 8 UUIDs is that the version and variant bits + * must be set. Otherwise, implementations are free to set the other bits + * according to their needs. As a result, the uniqueness of version 8 UUIDs is + * implementation-specific and should not be assumed. + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.8 UUID Version 8 + * + * @psalm-immutable + */ +final class UuidV8 extends Uuid implements UuidInterface +{ + /** + * Creates a version 8 (custom) UUID + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_CUSTOM) { + throw new InvalidArgumentException( + 'Fields used to create a UuidV8 must represent a ' + . 'version 8 (custom) UUID' + ); + } + + parent::__construct($fields, $numberConverter, $codec, $timeConverter); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/Validator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/Validator.php new file mode 100644 index 0000000..e82a11e --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/Validator.php @@ -0,0 +1,50 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Uuid; +use Ramsey\Uuid\Validator\ValidatorInterface; + +use function preg_match; +use function str_replace; + +/** + * Rfc4122\Validator validates strings as UUIDs of the RFC 4122 variant + * + * @psalm-immutable + */ +final class Validator implements ValidatorInterface +{ + private const VALID_PATTERN = '\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-' + . '[1-8][0-9A-Fa-f]{3}-[ABab89][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}\z'; + + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function getPattern(): string + { + return self::VALID_PATTERN; + } + + public function validate(string $uuid): bool + { + $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); + $uuid = strtolower($uuid); + + return $uuid === Uuid::NIL || $uuid === Uuid::MAX || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php new file mode 100644 index 0000000..1041de5 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php @@ -0,0 +1,94 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Exception\InvalidBytesException; +use Ramsey\Uuid\Uuid; + +use function decbin; +use function str_pad; +use function str_starts_with; +use function strlen; +use function substr; +use function unpack; + +use const STR_PAD_LEFT; + +/** + * Provides common functionality for handling the variant, as defined by RFC 4122 + * + * @psalm-immutable + */ +trait VariantTrait +{ + /** + * Returns the bytes that comprise the fields + */ + abstract public function getBytes(): string; + + /** + * Returns the variant identifier, according to RFC 4122, for the given bytes + * + * The following values may be returned: + * + * - `0` -- Reserved, NCS backward compatibility. + * - `2` -- The variant specified in RFC 4122. + * - `6` -- Reserved, Microsoft Corporation backward compatibility. + * - `7` -- Reserved for future definition. + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant + * + * @return int The variant identifier, according to RFC 4122 + */ + public function getVariant(): int + { + if (strlen($this->getBytes()) !== 16) { + throw new InvalidBytesException('Invalid number of bytes'); + } + + if ($this->isMax() || $this->isNil()) { + // RFC 4122 defines these special types of UUID, so we will consider + // them as belonging to the RFC 4122 variant. + return Uuid::RFC_4122; + } + + /** @var int[] $parts */ + $parts = unpack('n*', $this->getBytes()); + + // $parts[5] is a 16-bit, unsigned integer containing the variant bits + // of the UUID. We convert this integer into a string containing a + // binary representation, padded to 16 characters. We analyze the first + // three characters (three most-significant bits) to determine the + // variant. + $binary = str_pad( + decbin($parts[5]), + 16, + '0', + STR_PAD_LEFT + ); + + $msb = substr($binary, 0, 3); + + if ($msb === '111') { + return Uuid::RESERVED_FUTURE; + } elseif ($msb === '110') { + return Uuid::RESERVED_MICROSOFT; + } elseif (str_starts_with($msb, '10')) { + return Uuid::RFC_4122; + } + + return Uuid::RESERVED_NCS; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php new file mode 100644 index 0000000..0195e46 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php @@ -0,0 +1,60 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Rfc4122; + +use Ramsey\Uuid\Uuid; + +/** + * Provides common functionality for handling the version, as defined by RFC 4122 + * + * @psalm-immutable + */ +trait VersionTrait +{ + /** + * Returns the version + */ + abstract public function getVersion(): ?int; + + /** + * Returns true if these fields represent a max UUID + */ + abstract public function isMax(): bool; + + /** + * Returns true if these fields represent a nil UUID + */ + abstract public function isNil(): bool; + + /** + * Returns true if the version matches one of those defined by RFC 4122 + * + * @return bool True if the UUID version is valid, false otherwise + */ + private function isCorrectVersion(): bool + { + if ($this->isNil() || $this->isMax()) { + return true; + } + + return match ($this->getVersion()) { + Uuid::UUID_TYPE_TIME, Uuid::UUID_TYPE_DCE_SECURITY, + Uuid::UUID_TYPE_HASH_MD5, Uuid::UUID_TYPE_RANDOM, + Uuid::UUID_TYPE_HASH_SHA1, Uuid::UUID_TYPE_REORDERED_TIME, + Uuid::UUID_TYPE_UNIX_TIME, Uuid::UUID_TYPE_CUSTOM => true, + default => false, + }; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Type/Decimal.php b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Decimal.php new file mode 100644 index 0000000..acc5e75 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Decimal.php @@ -0,0 +1,129 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Type; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use ValueError; + +use function is_numeric; +use function sprintf; +use function str_starts_with; + +/** + * A value object representing a decimal + * + * This class exists for type-safety purposes, to ensure that decimals + * returned from ramsey/uuid methods as strings are truly decimals and not some + * other kind of string. + * + * To support values as true decimals and not as floats or doubles, we store the + * decimals as strings. + * + * @psalm-immutable + */ +final class Decimal implements NumberInterface +{ + private string $value; + private bool $isNegative = false; + + public function __construct(float | int | string | self $value) + { + $value = (string) $value; + + if (!is_numeric($value)) { + throw new InvalidArgumentException( + 'Value must be a signed decimal or a string containing only ' + . 'digits 0-9 and, optionally, a decimal point or sign (+ or -)' + ); + } + + // Remove the leading +-symbol. + if (str_starts_with($value, '+')) { + $value = substr($value, 1); + } + + // For cases like `-0` or `-0.0000`, convert the value to `0`. + if (abs((float) $value) === 0.0) { + $value = '0'; + } + + if (str_starts_with($value, '-')) { + $this->isNegative = true; + } + + $this->value = $value; + } + + public function isNegative(): bool + { + return $this->isNegative; + } + + public function toString(): string + { + return $this->value; + } + + public function __toString(): string + { + return $this->toString(); + } + + public function jsonSerialize(): string + { + return $this->toString(); + } + + public function serialize(): string + { + return $this->toString(); + } + + /** + * @return array{string: string} + */ + public function __serialize(): array + { + return ['string' => $this->toString()]; + } + + /** + * Constructs the object from a serialized string representation + * + * @param string $data The serialized string representation of the object + * + * @psalm-suppress UnusedMethodCall + */ + public function unserialize(string $data): void + { + $this->__construct($data); + } + + /** + * @param array{string?: string} $data + * + * @psalm-suppress UnusedMethodCall + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + if (!isset($data['string'])) { + throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $this->unserialize($data['string']); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Type/Hexadecimal.php b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Hexadecimal.php new file mode 100644 index 0000000..bf71ec4 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Hexadecimal.php @@ -0,0 +1,115 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Type; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use ValueError; + +use function preg_match; +use function sprintf; +use function substr; + +/** + * A value object representing a hexadecimal number + * + * This class exists for type-safety purposes, to ensure that hexadecimal numbers + * returned from ramsey/uuid methods as strings are truly hexadecimal and not some + * other kind of string. + * + * @psalm-immutable + */ +final class Hexadecimal implements TypeInterface +{ + private string $value; + + /** + * @param self|string $value The hexadecimal value to store + */ + public function __construct(self | string $value) + { + $this->value = $value instanceof self ? (string) $value : $this->prepareValue($value); + } + + public function toString(): string + { + return $this->value; + } + + public function __toString(): string + { + return $this->toString(); + } + + public function jsonSerialize(): string + { + return $this->toString(); + } + + public function serialize(): string + { + return $this->toString(); + } + + /** + * @return array{string: string} + */ + public function __serialize(): array + { + return ['string' => $this->toString()]; + } + + /** + * Constructs the object from a serialized string representation + * + * @param string $data The serialized string representation of the object + * + * @psalm-suppress UnusedMethodCall + */ + public function unserialize(string $data): void + { + $this->__construct($data); + } + + /** + * @param array{string?: string} $data + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + if (!isset($data['string'])) { + throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $this->unserialize($data['string']); + } + + private function prepareValue(string $value): string + { + $value = strtolower($value); + + if (str_starts_with($value, '0x')) { + $value = substr($value, 2); + } + + if (!preg_match('/^[A-Fa-f0-9]+$/', $value)) { + throw new InvalidArgumentException( + 'Value must be a hexadecimal number' + ); + } + + return $value; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Type/Integer.php b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Integer.php new file mode 100644 index 0000000..50dac99 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Integer.php @@ -0,0 +1,158 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Type; + +use Ramsey\Uuid\Exception\InvalidArgumentException; +use ValueError; + +use function assert; +use function is_numeric; +use function preg_match; +use function sprintf; +use function substr; + +/** + * A value object representing an integer + * + * This class exists for type-safety purposes, to ensure that integers + * returned from ramsey/uuid methods as strings are truly integers and not some + * other kind of string. + * + * To support large integers beyond PHP_INT_MAX and PHP_INT_MIN on both 64-bit + * and 32-bit systems, we store the integers as strings. + * + * @psalm-immutable + */ +final class Integer implements NumberInterface +{ + /** + * @psalm-var numeric-string + */ + private string $value; + + private bool $isNegative = false; + + public function __construct(float | int | string | self $value) + { + $this->value = $value instanceof self ? (string) $value : $this->prepareValue($value); + } + + public function isNegative(): bool + { + return $this->isNegative; + } + + /** + * @psalm-return numeric-string + */ + public function toString(): string + { + return $this->value; + } + + /** + * @psalm-return numeric-string + */ + public function __toString(): string + { + return $this->toString(); + } + + public function jsonSerialize(): string + { + return $this->toString(); + } + + public function serialize(): string + { + return $this->toString(); + } + + /** + * @return array{string: string} + */ + public function __serialize(): array + { + return ['string' => $this->toString()]; + } + + /** + * Constructs the object from a serialized string representation + * + * @param string $data The serialized string representation of the object + * + * @psalm-suppress UnusedMethodCall + */ + public function unserialize(string $data): void + { + $this->__construct($data); + } + + /** + * @param array{string?: string} $data + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + if (!isset($data['string'])) { + throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $this->unserialize($data['string']); + } + + /** + * @return numeric-string + */ + private function prepareValue(float | int | string $value): string + { + $value = (string) $value; + $sign = '+'; + + // If the value contains a sign, remove it for digit pattern check. + if (str_starts_with($value, '-') || str_starts_with($value, '+')) { + $sign = substr($value, 0, 1); + $value = substr($value, 1); + } + + if (!preg_match('/^\d+$/', $value)) { + throw new InvalidArgumentException( + 'Value must be a signed integer or a string containing only ' + . 'digits 0-9 and, optionally, a sign (+ or -)' + ); + } + + // Trim any leading zeros. + $value = ltrim($value, '0'); + + // Set to zero if the string is empty after trimming zeros. + if ($value === '') { + $value = '0'; + } + + // Add the negative sign back to the value. + if ($sign === '-' && $value !== '0') { + $value = $sign . $value; + + /** @psalm-suppress InaccessibleProperty */ + $this->isNegative = true; + } + + assert(is_numeric($value)); + + return $value; + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Type/NumberInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Type/NumberInterface.php new file mode 100644 index 0000000..bf4ae9d --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Type/NumberInterface.php @@ -0,0 +1,28 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Type; + +/** + * NumberInterface ensures consistency in numeric values returned by ramsey/uuid + * + * @psalm-immutable + */ +interface NumberInterface extends TypeInterface +{ + /** + * Returns true if this number is less than zero + */ + public function isNegative(): bool; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Type/Time.php b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Time.php new file mode 100644 index 0000000..0cedb44 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Type/Time.php @@ -0,0 +1,128 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Type; + +use Ramsey\Uuid\Exception\UnsupportedOperationException; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use ValueError; + +use function json_decode; +use function json_encode; +use function sprintf; + +/** + * A value object representing a timestamp + * + * This class exists for type-safety purposes, to ensure that timestamps used + * by ramsey/uuid are truly timestamp integers and not some other kind of string + * or integer. + * + * @psalm-immutable + */ +final class Time implements TypeInterface +{ + private IntegerObject $seconds; + private IntegerObject $microseconds; + + public function __construct( + float | int | string | IntegerObject $seconds, + float | int | string | IntegerObject $microseconds = 0, + ) { + $this->seconds = new IntegerObject($seconds); + $this->microseconds = new IntegerObject($microseconds); + } + + public function getSeconds(): IntegerObject + { + return $this->seconds; + } + + public function getMicroseconds(): IntegerObject + { + return $this->microseconds; + } + + public function toString(): string + { + return $this->seconds->toString() . '.' . sprintf('%06s', $this->microseconds->toString()); + } + + public function __toString(): string + { + return $this->toString(); + } + + /** + * @return string[] + */ + public function jsonSerialize(): array + { + return [ + 'seconds' => $this->getSeconds()->toString(), + 'microseconds' => $this->getMicroseconds()->toString(), + ]; + } + + public function serialize(): string + { + return (string) json_encode($this); + } + + /** + * @return array{seconds: string, microseconds: string} + */ + public function __serialize(): array + { + return [ + 'seconds' => $this->getSeconds()->toString(), + 'microseconds' => $this->getMicroseconds()->toString(), + ]; + } + + /** + * Constructs the object from a serialized string representation + * + * @param string $data The serialized string representation of the object + * + * @psalm-suppress UnusedMethodCall + */ + public function unserialize(string $data): void + { + /** @var array{seconds?: int|float|string, microseconds?: int|float|string} $time */ + $time = json_decode($data, true); + + if (!isset($time['seconds']) || !isset($time['microseconds'])) { + throw new UnsupportedOperationException( + 'Attempted to unserialize an invalid value' + ); + } + + $this->__construct($time['seconds'], $time['microseconds']); + } + + /** + * @param array{seconds?: string, microseconds?: string} $data + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + if (!isset($data['seconds']) || !isset($data['microseconds'])) { + throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $this->__construct($data['seconds'], $data['microseconds']); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Type/TypeInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Type/TypeInterface.php new file mode 100644 index 0000000..da2d8b2 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Type/TypeInterface.php @@ -0,0 +1,30 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Type; + +use JsonSerializable; +use Serializable; + +/** + * TypeInterface ensures consistency in typed values returned by ramsey/uuid + * + * @psalm-immutable + */ +interface TypeInterface extends JsonSerializable, Serializable +{ + public function toString(): string; + + public function __toString(): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Uuid.php b/tests/php_test_files/vendor/ramsey/uuid/src/Uuid.php new file mode 100644 index 0000000..e0384a5 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Uuid.php @@ -0,0 +1,758 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use BadMethodCallException; +use DateTimeInterface; +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\UnsupportedOperationException; +use Ramsey\Uuid\Fields\FieldsInterface; +use Ramsey\Uuid\Lazy\LazyUuidFromString; +use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use ValueError; + +use function assert; +use function bin2hex; +use function method_exists; +use function preg_match; +use function sprintf; +use function str_replace; +use function strcmp; +use function strlen; +use function strtolower; +use function substr; + +/** + * Uuid provides constants and static methods for working with and generating UUIDs + * + * @psalm-immutable + */ +class Uuid implements UuidInterface +{ + use DeprecatedUuidMethodsTrait; + + /** + * When this namespace is specified, the name string is a fully-qualified + * domain name + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + + /** + * When this namespace is specified, the name string is a URL + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + /** + * When this namespace is specified, the name string is an ISO OID + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8'; + + /** + * When this namespace is specified, the name string is an X.500 DN in DER + * or a text output format + * + * @link http://tools.ietf.org/html/rfc4122#appendix-C RFC 4122, Appendix C: Some Name Space IDs + */ + public const NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8'; + + /** + * The nil UUID is a special form of UUID that is specified to have all 128 + * bits set to zero + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.7 RFC 4122, ยง 4.1.7: Nil UUID + */ + public const NIL = '00000000-0000-0000-0000-000000000000'; + + /** + * The max UUID is a special form of UUID that is specified to have all 128 + * bits set to one + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.10 Max UUID + */ + public const MAX = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; + + /** + * Variant: reserved, NCS backward compatibility + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant + */ + public const RESERVED_NCS = 0; + + /** + * Variant: the UUID layout specified in RFC 4122 + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant + */ + public const RFC_4122 = 2; + + /** + * Variant: reserved, Microsoft Corporation backward compatibility + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant + */ + public const RESERVED_MICROSOFT = 6; + + /** + * Variant: reserved for future definition + * + * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, ยง 4.1.1: Variant + */ + public const RESERVED_FUTURE = 7; + + /** + * @deprecated Use {@see ValidatorInterface::getPattern()} instead. + */ + public const VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'; + + /** + * Version 1 (Gregorian time) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, ยง 4.1.3: Version + */ + public const UUID_TYPE_TIME = 1; + + /** + * Version 2 (DCE Security) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, ยง 4.1.3: Version + */ + public const UUID_TYPE_DCE_SECURITY = 2; + + /** + * @deprecated Use {@see Uuid::UUID_TYPE_DCE_SECURITY} instead. + */ + public const UUID_TYPE_IDENTIFIER = 2; + + /** + * Version 3 (name-based and hashed with MD5) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, ยง 4.1.3: Version + */ + public const UUID_TYPE_HASH_MD5 = 3; + + /** + * Version 4 (random) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, ยง 4.1.3: Version + */ + public const UUID_TYPE_RANDOM = 4; + + /** + * Version 5 (name-based and hashed with SHA1) UUID + * + * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, ยง 4.1.3: Version + */ + public const UUID_TYPE_HASH_SHA1 = 5; + + /** + * @deprecated Use {@see Uuid::UUID_TYPE_REORDERED_TIME} instead. + */ + public const UUID_TYPE_PEABODY = 6; + + /** + * Version 6 (reordered time) UUID + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.6 UUID Version 6 + */ + public const UUID_TYPE_REORDERED_TIME = 6; + + /** + * Version 7 (Unix Epoch time) UUID + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.7 UUID Version 7 + */ + public const UUID_TYPE_UNIX_TIME = 7; + + /** + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.8 UUID Version 8 + */ + public const UUID_TYPE_CUSTOM = 8; + + /** + * DCE Security principal domain + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, ยง11.5.1.1 + */ + public const DCE_DOMAIN_PERSON = 0; + + /** + * DCE Security group domain + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, ยง11.5.1.1 + */ + public const DCE_DOMAIN_GROUP = 1; + + /** + * DCE Security organization domain + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, ยง11.5.1.1 + */ + public const DCE_DOMAIN_ORG = 2; + + /** + * DCE Security domain string names + * + * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, ยง11.5.1.1 + */ + public const DCE_DOMAIN_NAMES = [ + self::DCE_DOMAIN_PERSON => 'person', + self::DCE_DOMAIN_GROUP => 'group', + self::DCE_DOMAIN_ORG => 'org', + ]; + + private static ?UuidFactoryInterface $factory = null; + + /** + * @var bool flag to detect if the UUID factory was replaced internally, + * which disables all optimizations for the default/happy path internal + * scenarios + */ + private static bool $factoryReplaced = false; + + protected CodecInterface $codec; + protected NumberConverterInterface $numberConverter; + protected Rfc4122FieldsInterface $fields; + protected TimeConverterInterface $timeConverter; + + /** + * Creates a universally unique identifier (UUID) from an array of fields + * + * Unless you're making advanced use of this library to generate identifiers + * that deviate from RFC 4122, you probably do not want to instantiate a + * UUID directly. Use the static methods, instead: + * + * ``` + * use Ramsey\Uuid\Uuid; + * + * $timeBasedUuid = Uuid::uuid1(); + * $namespaceMd5Uuid = Uuid::uuid3(Uuid::NAMESPACE_URL, 'http://php.net/'); + * $randomUuid = Uuid::uuid4(); + * $namespaceSha1Uuid = Uuid::uuid5(Uuid::NAMESPACE_URL, 'http://php.net/'); + * ``` + * + * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID + * @param NumberConverterInterface $numberConverter The number converter to use + * for converting hex values to/from integers + * @param CodecInterface $codec The codec to use when encoding or decoding + * UUID strings + * @param TimeConverterInterface $timeConverter The time converter to use + * for converting timestamps extracted from a UUID to unix timestamps + */ + public function __construct( + Rfc4122FieldsInterface $fields, + NumberConverterInterface $numberConverter, + CodecInterface $codec, + TimeConverterInterface $timeConverter + ) { + $this->fields = $fields; + $this->codec = $codec; + $this->numberConverter = $numberConverter; + $this->timeConverter = $timeConverter; + } + + /** + * @psalm-return non-empty-string + */ + public function __toString(): string + { + return $this->toString(); + } + + /** + * Converts the UUID to a string for JSON serialization + */ + public function jsonSerialize(): string + { + return $this->toString(); + } + + /** + * Converts the UUID to a string for PHP serialization + */ + public function serialize(): string + { + return $this->codec->encode($this); + } + + /** + * @return array{bytes: string} + */ + public function __serialize(): array + { + return ['bytes' => $this->serialize()]; + } + + /** + * Re-constructs the object from its serialized form + * + * @param string $data The serialized PHP string to unserialize into + * a UuidInterface instance + */ + public function unserialize(string $data): void + { + if (strlen($data) === 16) { + /** @var Uuid $uuid */ + $uuid = self::getFactory()->fromBytes($data); + } else { + /** @var Uuid $uuid */ + $uuid = self::getFactory()->fromString($data); + } + + $this->codec = $uuid->codec; + $this->numberConverter = $uuid->numberConverter; + $this->fields = $uuid->fields; + $this->timeConverter = $uuid->timeConverter; + } + + /** + * @param array{bytes?: string} $data + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + if (!isset($data['bytes'])) { + throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); + } + // @codeCoverageIgnoreEnd + + $this->unserialize($data['bytes']); + } + + public function compareTo(UuidInterface $other): int + { + $compare = strcmp($this->toString(), $other->toString()); + + if ($compare < 0) { + return -1; + } + + if ($compare > 0) { + return 1; + } + + return 0; + } + + public function equals(?object $other): bool + { + if (!$other instanceof UuidInterface) { + return false; + } + + return $this->compareTo($other) === 0; + } + + /** + * @psalm-return non-empty-string + */ + public function getBytes(): string + { + return $this->codec->encodeBinary($this); + } + + public function getFields(): FieldsInterface + { + return $this->fields; + } + + public function getHex(): Hexadecimal + { + return new Hexadecimal(str_replace('-', '', $this->toString())); + } + + public function getInteger(): IntegerObject + { + return new IntegerObject($this->numberConverter->fromHex($this->getHex()->toString())); + } + + public function getUrn(): string + { + return 'urn:uuid:' . $this->toString(); + } + + /** + * @psalm-return non-empty-string + */ + public function toString(): string + { + return $this->codec->encode($this); + } + + /** + * Returns the factory used to create UUIDs + */ + public static function getFactory(): UuidFactoryInterface + { + if (self::$factory === null) { + self::$factory = new UuidFactory(); + } + + return self::$factory; + } + + /** + * Sets the factory used to create UUIDs + * + * @param UuidFactoryInterface $factory A factory that will be used by this + * class to create UUIDs + */ + public static function setFactory(UuidFactoryInterface $factory): void + { + // Note: non-strict equality is intentional here. If the factory is configured differently, every assumption + // around purity is broken, and we have to internally decide everything differently. + // phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator + self::$factoryReplaced = ($factory != new UuidFactory()); + + self::$factory = $factory; + } + + /** + * Creates a UUID from a byte string + * + * @param string $bytes A binary string + * + * @return UuidInterface A UuidInterface instance created from a binary + * string representation + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-suppress ImpureStaticProperty we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + */ + public static function fromBytes(string $bytes): UuidInterface + { + if (!self::$factoryReplaced && strlen($bytes) === 16) { + $base16Uuid = bin2hex($bytes); + + // Note: we are calling `fromString` internally because we don't know if the given `$bytes` is a valid UUID + return self::fromString( + substr($base16Uuid, 0, 8) + . '-' + . substr($base16Uuid, 8, 4) + . '-' + . substr($base16Uuid, 12, 4) + . '-' + . substr($base16Uuid, 16, 4) + . '-' + . substr($base16Uuid, 20, 12) + ); + } + + return self::getFactory()->fromBytes($bytes); + } + + /** + * Creates a UUID from the string standard representation + * + * @param string $uuid A hexadecimal string + * + * @return UuidInterface A UuidInterface instance created from a hexadecimal + * string representation + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-suppress ImpureStaticProperty we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + */ + public static function fromString(string $uuid): UuidInterface + { + $uuid = strtolower($uuid); + if (!self::$factoryReplaced && preg_match(LazyUuidFromString::VALID_REGEX, $uuid) === 1) { + assert($uuid !== ''); + + return new LazyUuidFromString($uuid); + } + + return self::getFactory()->fromString($uuid); + } + + /** + * Creates a UUID from a DateTimeInterface instance + * + * @param DateTimeInterface $dateTime The date and time + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID created from a DateTimeInterface instance + */ + public static function fromDateTime( + DateTimeInterface $dateTime, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface { + return self::getFactory()->fromDateTime($dateTime, $node, $clockSeq); + } + + /** + * Creates a UUID from the Hexadecimal object + * + * @param Hexadecimal $hex Hexadecimal object representing a hexadecimal number + * + * @return UuidInterface A UuidInterface instance created from the Hexadecimal + * object representing a hexadecimal number + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * @psalm-suppress MixedInferredReturnType,MixedReturnStatement + */ + public static function fromHexadecimal(Hexadecimal $hex): UuidInterface + { + $factory = self::getFactory(); + + if (method_exists($factory, 'fromHexadecimal')) { + /** + * @phpstan-ignore-next-line + * @psalm-suppress UndefinedInterfaceMethod + */ + return self::getFactory()->fromHexadecimal($hex); + } + + throw new BadMethodCallException('The method fromHexadecimal() does not exist on the provided factory'); + } + + /** + * Creates a UUID from a 128-bit integer string + * + * @param string $integer String representation of 128-bit integer + * + * @return UuidInterface A UuidInterface instance created from the string + * representation of a 128-bit integer + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + */ + public static function fromInteger(string $integer): UuidInterface + { + /** @psalm-suppress ImpureMethodCall */ + return self::getFactory()->fromInteger($integer); + } + + /** + * Returns true if the provided string is a valid UUID + * + * @param string $uuid A string to validate as a UUID + * + * @return bool True if the string is a valid UUID, false otherwise + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-assert-if-true =non-empty-string $uuid + */ + public static function isValid(string $uuid): bool + { + /** @psalm-suppress ImpureMethodCall */ + return self::getFactory()->getValidator()->validate($uuid); + } + + /** + * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID + */ + public static function uuid1($node = null, ?int $clockSeq = null): UuidInterface + { + return self::getFactory()->uuid1($node, $clockSeq); + } + + /** + * Returns a version 2 (DCE Security) UUID from a local domain, local + * identifier, host ID, clock sequence, and the current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes (in a version 2 UUID, the lower 8 bits of this number + * are replaced with the domain). + * + * @return UuidInterface A UuidInterface instance that represents a + * version 2 UUID + */ + public static function uuid2( + int $localDomain, + ?IntegerObject $localIdentifier = null, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface { + return self::getFactory()->uuid2($localDomain, $localIdentifier, $node, $clockSeq); + } + + /** + * Returns a version 3 (name-based) UUID based on the MD5 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 3 UUID + * + * @psalm-suppress ImpureMethodCall we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + */ + public static function uuid3($ns, string $name): UuidInterface + { + return self::getFactory()->uuid3($ns, $name); + } + + /** + * Returns a version 4 (random) UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 4 UUID + */ + public static function uuid4(): UuidInterface + { + return self::getFactory()->uuid4(); + } + + /** + * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 5 UUID + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-suppress ImpureMethodCall we know that the factory being replaced can lead to massive + * havoc across all consumers: that should never happen, and + * is generally to be discouraged. Until the factory is kept + * un-replaced, this method is effectively pure. + */ + public static function uuid5($ns, string $name): UuidInterface + { + return self::getFactory()->uuid5($ns, $name); + } + + /** + * Returns a version 6 (reordered time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 6 UUID + */ + public static function uuid6( + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface { + return self::getFactory()->uuid6($node, $clockSeq); + } + + /** + * Returns a version 7 (Unix Epoch time) UUID + * + * @param DateTimeInterface|null $dateTime An optional date/time from which + * to create the version 7 UUID. If not provided, the UUID is generated + * using the current date/time. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 7 UUID + */ + public static function uuid7(?DateTimeInterface $dateTime = null): UuidInterface + { + $factory = self::getFactory(); + + if (method_exists($factory, 'uuid7')) { + /** @var UuidInterface */ + return $factory->uuid7($dateTime); + } + + throw new UnsupportedOperationException( + 'The provided factory does not support the uuid7() method', + ); + } + + /** + * Returns a version 8 (custom) UUID + * + * The bytes provided may contain any value according to your application's + * needs. Be aware, however, that other applications may not understand the + * semantics of the value. + * + * @param string $bytes A 16-byte octet string. This is an open blob + * of data that you may fill with 128 bits of information. Be aware, + * however, bits 48 through 51 will be replaced with the UUID version + * field, and bits 64 and 65 will be replaced with the UUID variant. You + * MUST NOT rely on these bits for your application needs. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 8 UUID + */ + public static function uuid8(string $bytes): UuidInterface + { + $factory = self::getFactory(); + + if (method_exists($factory, 'uuid8')) { + /** @var UuidInterface */ + return $factory->uuid8($bytes); + } + + throw new UnsupportedOperationException( + 'The provided factory does not support the uuid8() method', + ); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/UuidFactory.php b/tests/php_test_files/vendor/ramsey/uuid/src/UuidFactory.php new file mode 100644 index 0000000..1b06ea6 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/UuidFactory.php @@ -0,0 +1,513 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use DateTimeInterface; +use Ramsey\Uuid\Builder\UuidBuilderInterface; +use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Generator\DceSecurityGeneratorInterface; +use Ramsey\Uuid\Generator\DefaultTimeGenerator; +use Ramsey\Uuid\Generator\NameGeneratorInterface; +use Ramsey\Uuid\Generator\RandomGeneratorInterface; +use Ramsey\Uuid\Generator\TimeGeneratorInterface; +use Ramsey\Uuid\Generator\UnixTimeGenerator; +use Ramsey\Uuid\Lazy\LazyUuidFromString; +use Ramsey\Uuid\Provider\NodeProviderInterface; +use Ramsey\Uuid\Provider\Time\FixedTimeProvider; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Type\Time; +use Ramsey\Uuid\Validator\ValidatorInterface; + +use function bin2hex; +use function hex2bin; +use function pack; +use function str_pad; +use function strtolower; +use function substr; +use function substr_replace; +use function unpack; + +use const STR_PAD_LEFT; + +class UuidFactory implements UuidFactoryInterface +{ + private CodecInterface $codec; + private DceSecurityGeneratorInterface $dceSecurityGenerator; + private NameGeneratorInterface $nameGenerator; + private NodeProviderInterface $nodeProvider; + private NumberConverterInterface $numberConverter; + private RandomGeneratorInterface $randomGenerator; + private TimeConverterInterface $timeConverter; + private TimeGeneratorInterface $timeGenerator; + private TimeGeneratorInterface $unixTimeGenerator; + private UuidBuilderInterface $uuidBuilder; + private ValidatorInterface $validator; + + /** + * @var bool whether the feature set was provided from outside, or we can + * operate under "default" assumptions + */ + private bool $isDefaultFeatureSet; + + /** + * @param FeatureSet|null $features A set of available features in the current environment + */ + public function __construct(?FeatureSet $features = null) + { + $this->isDefaultFeatureSet = $features === null; + + $features = $features ?: new FeatureSet(); + + $this->codec = $features->getCodec(); + $this->dceSecurityGenerator = $features->getDceSecurityGenerator(); + $this->nameGenerator = $features->getNameGenerator(); + $this->nodeProvider = $features->getNodeProvider(); + $this->numberConverter = $features->getNumberConverter(); + $this->randomGenerator = $features->getRandomGenerator(); + $this->timeConverter = $features->getTimeConverter(); + $this->timeGenerator = $features->getTimeGenerator(); + $this->uuidBuilder = $features->getBuilder(); + $this->validator = $features->getValidator(); + $this->unixTimeGenerator = $features->getUnixTimeGenerator(); + } + + /** + * Returns the codec used by this factory + */ + public function getCodec(): CodecInterface + { + return $this->codec; + } + + /** + * Sets the codec to use for this factory + * + * @param CodecInterface $codec A UUID encoder-decoder + */ + public function setCodec(CodecInterface $codec): void + { + $this->isDefaultFeatureSet = false; + + $this->codec = $codec; + } + + /** + * Returns the name generator used by this factory + */ + public function getNameGenerator(): NameGeneratorInterface + { + return $this->nameGenerator; + } + + /** + * Sets the name generator to use for this factory + * + * @param NameGeneratorInterface $nameGenerator A generator to generate + * binary data, based on a namespace and name + */ + public function setNameGenerator(NameGeneratorInterface $nameGenerator): void + { + $this->isDefaultFeatureSet = false; + + $this->nameGenerator = $nameGenerator; + } + + /** + * Returns the node provider used by this factory + */ + public function getNodeProvider(): NodeProviderInterface + { + return $this->nodeProvider; + } + + /** + * Returns the random generator used by this factory + */ + public function getRandomGenerator(): RandomGeneratorInterface + { + return $this->randomGenerator; + } + + /** + * Returns the time generator used by this factory + */ + public function getTimeGenerator(): TimeGeneratorInterface + { + return $this->timeGenerator; + } + + /** + * Sets the time generator to use for this factory + * + * @param TimeGeneratorInterface $generator A generator to generate binary + * data, based on the time + */ + public function setTimeGenerator(TimeGeneratorInterface $generator): void + { + $this->isDefaultFeatureSet = false; + + $this->timeGenerator = $generator; + } + + /** + * Returns the DCE Security generator used by this factory + */ + public function getDceSecurityGenerator(): DceSecurityGeneratorInterface + { + return $this->dceSecurityGenerator; + } + + /** + * Sets the DCE Security generator to use for this factory + * + * @param DceSecurityGeneratorInterface $generator A generator to generate + * binary data, based on a local domain and local identifier + */ + public function setDceSecurityGenerator(DceSecurityGeneratorInterface $generator): void + { + $this->isDefaultFeatureSet = false; + + $this->dceSecurityGenerator = $generator; + } + + /** + * Returns the number converter used by this factory + */ + public function getNumberConverter(): NumberConverterInterface + { + return $this->numberConverter; + } + + /** + * Sets the random generator to use for this factory + * + * @param RandomGeneratorInterface $generator A generator to generate binary + * data, based on some random input + */ + public function setRandomGenerator(RandomGeneratorInterface $generator): void + { + $this->isDefaultFeatureSet = false; + + $this->randomGenerator = $generator; + } + + /** + * Sets the number converter to use for this factory + * + * @param NumberConverterInterface $converter A converter to use for working + * with large integers (i.e. integers greater than PHP_INT_MAX) + */ + public function setNumberConverter(NumberConverterInterface $converter): void + { + $this->isDefaultFeatureSet = false; + + $this->numberConverter = $converter; + } + + /** + * Returns the UUID builder used by this factory + */ + public function getUuidBuilder(): UuidBuilderInterface + { + return $this->uuidBuilder; + } + + /** + * Sets the UUID builder to use for this factory + * + * @param UuidBuilderInterface $builder A builder for constructing instances + * of UuidInterface + */ + public function setUuidBuilder(UuidBuilderInterface $builder): void + { + $this->isDefaultFeatureSet = false; + + $this->uuidBuilder = $builder; + } + + /** + * @psalm-mutation-free + */ + public function getValidator(): ValidatorInterface + { + return $this->validator; + } + + /** + * Sets the validator to use for this factory + * + * @param ValidatorInterface $validator A validator to use for validating + * whether a string is a valid UUID + */ + public function setValidator(ValidatorInterface $validator): void + { + $this->isDefaultFeatureSet = false; + + $this->validator = $validator; + } + + /** + * @psalm-pure + */ + public function fromBytes(string $bytes): UuidInterface + { + return $this->codec->decodeBytes($bytes); + } + + /** + * @psalm-pure + */ + public function fromString(string $uuid): UuidInterface + { + $uuid = strtolower($uuid); + + return $this->codec->decode($uuid); + } + + /** + * @psalm-pure + */ + public function fromInteger(string $integer): UuidInterface + { + $hex = $this->numberConverter->toHex($integer); + $hex = str_pad($hex, 32, '0', STR_PAD_LEFT); + + return $this->fromString($hex); + } + + public function fromDateTime( + DateTimeInterface $dateTime, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface { + $timeProvider = new FixedTimeProvider( + new Time($dateTime->format('U'), $dateTime->format('u')) + ); + + $timeGenerator = new DefaultTimeGenerator( + $this->nodeProvider, + $this->timeConverter, + $timeProvider + ); + + $nodeHex = $node ? $node->toString() : null; + + $bytes = $timeGenerator->generate($nodeHex, $clockSeq); + + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_TIME); + } + + /** + * @psalm-pure + */ + public function fromHexadecimal(Hexadecimal $hex): UuidInterface + { + return $this->codec->decode($hex->__toString()); + } + + /** + * @inheritDoc + */ + public function uuid1($node = null, ?int $clockSeq = null): UuidInterface + { + $bytes = $this->timeGenerator->generate($node, $clockSeq); + + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_TIME); + } + + public function uuid2( + int $localDomain, + ?IntegerObject $localIdentifier = null, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface { + $bytes = $this->dceSecurityGenerator->generate( + $localDomain, + $localIdentifier, + $node, + $clockSeq + ); + + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_DCE_SECURITY); + } + + /** + * @inheritDoc + * @psalm-pure + */ + public function uuid3($ns, string $name): UuidInterface + { + return $this->uuidFromNsAndName($ns, $name, Uuid::UUID_TYPE_HASH_MD5, 'md5'); + } + + public function uuid4(): UuidInterface + { + $bytes = $this->randomGenerator->generate(16); + + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_RANDOM); + } + + /** + * @inheritDoc + * @psalm-pure + */ + public function uuid5($ns, string $name): UuidInterface + { + return $this->uuidFromNsAndName($ns, $name, Uuid::UUID_TYPE_HASH_SHA1, 'sha1'); + } + + public function uuid6(?Hexadecimal $node = null, ?int $clockSeq = null): UuidInterface + { + $nodeHex = $node ? $node->toString() : null; + $bytes = $this->timeGenerator->generate($nodeHex, $clockSeq); + + // Rearrange the bytes, according to the UUID version 6 specification. + $v6 = $bytes[6] . $bytes[7] . $bytes[4] . $bytes[5] + . $bytes[0] . $bytes[1] . $bytes[2] . $bytes[3]; + $v6 = bin2hex($v6); + + // Drop the first four bits, while adding an empty four bits for the + // version field. This allows us to reconstruct the correct time from + // the bytes of this UUID. + $v6Bytes = hex2bin(substr($v6, 1, 12) . '0' . substr($v6, -3)); + $v6Bytes .= substr($bytes, 8); + + return $this->uuidFromBytesAndVersion($v6Bytes, Uuid::UUID_TYPE_REORDERED_TIME); + } + + /** + * Returns a version 7 (Unix Epoch time) UUID + * + * @param DateTimeInterface|null $dateTime An optional date/time from which + * to create the version 7 UUID. If not provided, the UUID is generated + * using the current date/time. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 7 UUID + */ + public function uuid7(?DateTimeInterface $dateTime = null): UuidInterface + { + assert($this->unixTimeGenerator instanceof UnixTimeGenerator); + $bytes = $this->unixTimeGenerator->generate(null, null, $dateTime); + + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_UNIX_TIME); + } + + /** + * Returns a version 8 (Custom) UUID + * + * The bytes provided may contain any value according to your application's + * needs. Be aware, however, that other applications may not understand the + * semantics of the value. + * + * @param string $bytes A 16-byte octet string. This is an open blob + * of data that you may fill with 128 bits of information. Be aware, + * however, bits 48 through 51 will be replaced with the UUID version + * field, and bits 64 and 65 will be replaced with the UUID variant. You + * MUST NOT rely on these bits for your application needs. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 8 UUID + */ + public function uuid8(string $bytes): UuidInterface + { + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_CUSTOM); + } + + /** + * Returns a Uuid created from the provided byte string + * + * Uses the configured builder and codec and the provided byte string to + * construct a Uuid object. + * + * @param string $bytes The byte string from which to construct a UUID + * + * @return UuidInterface An instance of UuidInterface, created from the + * provided bytes + * + * @psalm-pure + */ + public function uuid(string $bytes): UuidInterface + { + /** @psalm-suppress ImpurePropertyFetch */ + return $this->uuidBuilder->build($this->codec, $bytes); + } + + /** + * Returns a version 3 or 5 namespaced Uuid + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to hash together with the namespace + * @param int $version The version of UUID to create (3 or 5) + * @param string $hashAlgorithm The hashing algorithm to use when hashing + * together the namespace and name + * + * @return UuidInterface An instance of UuidInterface, created by hashing + * together the provided namespace and name + * + * @psalm-pure + */ + private function uuidFromNsAndName( + UuidInterface | string $ns, + string $name, + int $version, + string $hashAlgorithm + ): UuidInterface { + if (!($ns instanceof UuidInterface)) { + $ns = $this->fromString($ns); + } + + $bytes = $this->nameGenerator->generate($ns, $name, $hashAlgorithm); + + return $this->uuidFromBytesAndVersion(substr($bytes, 0, 16), $version); + } + + /** + * Returns an RFC 4122 variant Uuid, created from the provided bytes and version + * + * @param string $bytes The byte string to convert to a UUID + * @param int $version The RFC 4122 version to apply to the UUID + * + * @return UuidInterface An instance of UuidInterface, created from the + * byte string and version + * + * @psalm-pure + */ + private function uuidFromBytesAndVersion(string $bytes, int $version): UuidInterface + { + /** @var array $unpackedTime */ + $unpackedTime = unpack('n*', substr($bytes, 6, 2)); + $timeHi = (int) $unpackedTime[1]; + $timeHiAndVersion = pack('n*', BinaryUtils::applyVersion($timeHi, $version)); + + /** @var array $unpackedClockSeq */ + $unpackedClockSeq = unpack('n*', substr($bytes, 8, 2)); + $clockSeqHi = (int) $unpackedClockSeq[1]; + $clockSeqHiAndReserved = pack('n*', BinaryUtils::applyVariant($clockSeqHi)); + + $bytes = substr_replace($bytes, $timeHiAndVersion, 6, 2); + $bytes = substr_replace($bytes, $clockSeqHiAndReserved, 8, 2); + + if ($this->isDefaultFeatureSet) { + return LazyUuidFromString::fromBytes($bytes); + } + + /** @psalm-suppress ImpureVariable */ + return $this->uuid($bytes); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/UuidFactoryInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/UuidFactoryInterface.php new file mode 100644 index 0000000..d99fc9d --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/UuidFactoryInterface.php @@ -0,0 +1,182 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use DateTimeInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Ramsey\Uuid\Validator\ValidatorInterface; + +/** + * UuidFactoryInterface defines common functionality all `UuidFactory` instances + * must implement + */ +interface UuidFactoryInterface +{ + /** + * Creates a UUID from a byte string + * + * @param string $bytes A binary string + * + * @return UuidInterface A UuidInterface instance created from a binary + * string representation + * + * @psalm-pure + */ + public function fromBytes(string $bytes): UuidInterface; + + /** + * Creates a UUID from a DateTimeInterface instance + * + * @param DateTimeInterface $dateTime The date and time + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID created from a DateTimeInterface instance + */ + public function fromDateTime( + DateTimeInterface $dateTime, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface; + + /** + * Creates a UUID from a 128-bit integer string + * + * @param string $integer String representation of 128-bit integer + * + * @return UuidInterface A UuidInterface instance created from the string + * representation of a 128-bit integer + * + * @psalm-pure + */ + public function fromInteger(string $integer): UuidInterface; + + /** + * Creates a UUID from the string standard representation + * + * @param string $uuid A hexadecimal string + * + * @return UuidInterface A UuidInterface instance created from a hexadecimal + * string representation + * + * @psalm-pure + */ + public function fromString(string $uuid): UuidInterface; + + /** + * Returns the validator to use for the factory + * + * @psalm-mutation-free + */ + public function getValidator(): ValidatorInterface; + + /** + * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID + */ + public function uuid1($node = null, ?int $clockSeq = null): UuidInterface; + + /** + * Returns a version 2 (DCE Security) UUID from a local domain, local + * identifier, host ID, clock sequence, and the current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 2 UUID + */ + public function uuid2( + int $localDomain, + ?IntegerObject $localIdentifier = null, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface; + + /** + * Returns a version 3 (name-based) UUID based on the MD5 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 3 UUID + * + * @psalm-pure + */ + public function uuid3($ns, string $name): UuidInterface; + + /** + * Returns a version 4 (random) UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 4 UUID + */ + public function uuid4(): UuidInterface; + + /** + * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * @param string $name The name to use for creating a UUID + * + * @return UuidInterface A UuidInterface instance that represents a + * version 5 UUID + * + * @psalm-pure + */ + public function uuid5($ns, string $name): UuidInterface; + + /** + * Returns a version 6 (reordered time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 6 UUID + */ + public function uuid6(?Hexadecimal $node = null, ?int $clockSeq = null): UuidInterface; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/UuidInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/UuidInterface.php new file mode 100644 index 0000000..cac9457 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/UuidInterface.php @@ -0,0 +1,109 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use JsonSerializable; +use Ramsey\Uuid\Fields\FieldsInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; +use Serializable; +use Stringable; + +/** + * A UUID is a universally unique identifier adhering to an agreed-upon + * representation format and standard for generation + * + * @psalm-immutable + */ +interface UuidInterface extends + DeprecatedUuidInterface, + JsonSerializable, + Serializable, + Stringable +{ + /** + * Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than + * the other UUID + * + * The first of two UUIDs is greater than the second if the most + * significant field in which the UUIDs differ is greater for the first + * UUID. + * + * * Q. What's the value of being able to sort UUIDs? + * * A. Use them as keys in a B-Tree or similar mapping. + * + * @param UuidInterface $other The UUID to compare + * + * @return int<-1,1> -1, 0, or 1 if the UUID is less than, equal to, or greater than $other + */ + public function compareTo(UuidInterface $other): int; + + /** + * Returns true if the UUID is equal to the provided object + * + * The result is true if and only if the argument is not null, is a UUID + * object, has the same variant, and contains the same value, bit for bit, + * as the UUID. + * + * @param object|null $other An object to test for equality with this UUID + * + * @return bool True if the other object is equal to this UUID + */ + public function equals(?object $other): bool; + + /** + * Returns the binary string representation of the UUID + * + * @psalm-return non-empty-string + */ + public function getBytes(): string; + + /** + * Returns the fields that comprise this UUID + */ + public function getFields(): FieldsInterface; + + /** + * Returns the hexadecimal representation of the UUID + */ + public function getHex(): Hexadecimal; + + /** + * Returns the integer representation of the UUID + */ + public function getInteger(): IntegerObject; + + /** + * Returns the string standard representation of the UUID as a URN + * + * @link http://en.wikipedia.org/wiki/Uniform_Resource_Name Uniform Resource Name + * @link https://tools.ietf.org/html/rfc4122#section-3 RFC 4122, ยง 3: Namespace Registration Template + */ + public function getUrn(): string; + + /** + * Returns the string standard representation of the UUID + * + * @psalm-return non-empty-string + */ + public function toString(): string; + + /** + * Casts the UUID to the string standard representation + * + * @psalm-return non-empty-string + */ + public function __toString(): string; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Validator/GenericValidator.php b/tests/php_test_files/vendor/ramsey/uuid/src/Validator/GenericValidator.php new file mode 100644 index 0000000..fd60955 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Validator/GenericValidator.php @@ -0,0 +1,50 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Validator; + +use Ramsey\Uuid\Uuid; + +use function preg_match; +use function str_replace; + +/** + * GenericValidator validates strings as UUIDs of any variant + * + * @psalm-immutable + */ +final class GenericValidator implements ValidatorInterface +{ + /** + * Regular expression pattern for matching a UUID of any variant. + */ + private const VALID_PATTERN = '\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\z'; + + /** + * @psalm-return non-empty-string + * @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty + * @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty + */ + public function getPattern(): string + { + return self::VALID_PATTERN; + } + + public function validate(string $uuid): bool + { + $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); + + return $uuid === Uuid::NIL || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); + } +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php b/tests/php_test_files/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php new file mode 100644 index 0000000..3d4bd6f --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php @@ -0,0 +1,41 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid\Validator; + +/** + * A validator validates a string as a proper UUID + * + * @psalm-immutable + */ +interface ValidatorInterface +{ + /** + * Returns the regular expression pattern used by this validator + * + * @return string The regular expression pattern this validator uses + * + * @psalm-return non-empty-string + */ + public function getPattern(): string; + + /** + * Returns true if the provided string represents a UUID + * + * @param string $uuid The string to validate as a UUID + * + * @return bool True if the string is a valid UUID, false otherwise + */ + public function validate(string $uuid): bool; +} diff --git a/tests/php_test_files/vendor/ramsey/uuid/src/functions.php b/tests/php_test_files/vendor/ramsey/uuid/src/functions.php new file mode 100644 index 0000000..1b3ce00 --- /dev/null +++ b/tests/php_test_files/vendor/ramsey/uuid/src/functions.php @@ -0,0 +1,158 @@ + + * @license http://opensource.org/licenses/MIT MIT + * phpcs:disable Squiz.Functions.GlobalFunction + */ + +declare(strict_types=1); + +namespace Ramsey\Uuid; + +use DateTimeInterface; +use Ramsey\Uuid\Type\Hexadecimal; +use Ramsey\Uuid\Type\Integer as IntegerObject; + +/** + * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|int|string|null $node A 48-bit number representing the + * hardware address; this number may be represented as an integer or a + * hexadecimal string + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return non-empty-string Version 1 UUID as a string + */ +function v1($node = null, ?int $clockSeq = null): string +{ + return Uuid::uuid1($node, $clockSeq)->toString(); +} + +/** + * Returns a version 2 (DCE Security) UUID from a local domain, local + * identifier, host ID, clock sequence, and the current time + * + * @param int $localDomain The local domain to use when generating bytes, + * according to DCE Security + * @param IntegerObject|null $localIdentifier The local identifier for the + * given domain; this may be a UID or GID on POSIX systems, if the local + * domain is person or group, or it may be a site-defined identifier + * if the local domain is org + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return non-empty-string Version 2 UUID as a string + */ +function v2( + int $localDomain, + ?IntegerObject $localIdentifier = null, + ?Hexadecimal $node = null, + ?int $clockSeq = null +): string { + return Uuid::uuid2($localDomain, $localIdentifier, $node, $clockSeq)->toString(); +} + +/** + * Returns a version 3 (name-based) UUID based on the MD5 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * + * @return non-empty-string Version 3 UUID as a string + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + */ +function v3($ns, string $name): string +{ + return Uuid::uuid3($ns, $name)->toString(); +} + +/** + * Returns a version 4 (random) UUID + * + * @return non-empty-string Version 4 UUID as a string + */ +function v4(): string +{ + return Uuid::uuid4()->toString(); +} + +/** + * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a + * namespace ID and a name + * + * @param string|UuidInterface $ns The namespace (must be a valid UUID) + * + * @return non-empty-string Version 5 UUID as a string + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + */ +function v5($ns, string $name): string +{ + return Uuid::uuid5($ns, $name)->toString(); +} + +/** + * Returns a version 6 (reordered time) UUID from a host ID, sequence number, + * and the current time + * + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes + * + * @return non-empty-string Version 6 UUID as a string + */ +function v6(?Hexadecimal $node = null, ?int $clockSeq = null): string +{ + return Uuid::uuid6($node, $clockSeq)->toString(); +} + +/** + * Returns a version 7 (Unix Epoch time) UUID + * + * @param DateTimeInterface|null $dateTime An optional date/time from which + * to create the version 7 UUID. If not provided, the UUID is generated + * using the current date/time. + * + * @return non-empty-string Version 7 UUID as a string + */ +function v7(?DateTimeInterface $dateTime = null): string +{ + return Uuid::uuid7($dateTime)->toString(); +} + +/** + * Returns a version 8 (custom) UUID + * + * The bytes provided may contain any value according to your application's + * needs. Be aware, however, that other applications may not understand the + * semantics of the value. + * + * @param string $bytes A 16-byte octet string. This is an open blob + * of data that you may fill with 128 bits of information. Be aware, + * however, bits 48 through 51 will be replaced with the UUID version + * field, and bits 64 and 65 will be replaced with the UUID variant. You + * MUST NOT rely on these bits for your application needs. + * + * @return non-empty-string Version 8 UUID as a string + */ +function v8(string $bytes): string +{ + return Uuid::uuid8($bytes)->toString(); +} diff --git a/tests/php_test_files/vendor/roadrunner-php/app-logger/.styleci.yml b/tests/php_test_files/vendor/roadrunner-php/app-logger/.styleci.yml new file mode 100644 index 0000000..9ec9d16 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/app-logger/.styleci.yml @@ -0,0 +1,73 @@ +preset: psr12 +risky: true + +version: 8 + +enabled: + - alpha_ordered_traits + - array_indentation + - array_push + - combine_consecutive_issets + - combine_consecutive_unsets + - combine_nested_dirname + - declare_strict_types + - dir_constant + - fully_qualified_strict_types + - function_to_constant + - is_null + - magic_constant_casing + - magic_method_casing + - method_separation + - modernize_types_casting + - native_function_casing + - native_function_type_declaration_casing + - no_alias_functions + - no_empty_comment + - no_empty_phpdoc + - no_empty_statement + - no_extra_block_blank_lines + - no_short_bool_cast + - no_superfluous_elseif + - no_unneeded_control_parentheses + - no_unneeded_curly_braces + - no_unneeded_final_method + - no_unset_cast + - no_unused_imports + - no_unused_lambda_imports + - no_useless_else + - no_useless_return + - normalize_index_brace + - php_unit_dedicate_assert + - php_unit_dedicate_assert_internal_type + - php_unit_expectation + - php_unit_mock + - php_unit_mock_short_will_return + - php_unit_namespaced + - php_unit_no_expectation_annotation + - phpdoc_no_empty_return + - phpdoc_no_useless_inheritdoc + - phpdoc_order + - phpdoc_property + - phpdoc_scalar + - phpdoc_separation + - phpdoc_singular_inheritdoc + - phpdoc_trim + - phpdoc_trim_consecutive_blank_line_separation + - phpdoc_type_to_var + - phpdoc_types + - phpdoc_types_order + - print_to_echo + - regular_callable_call + - return_assignment + - self_accessor + - self_static_accessor + - set_type_to_cast + - short_array_syntax + - short_list_syntax + - simplified_if_return + - single_quote + - standardize_not_equals + - ternary_to_null_coalescing + - trailing_comma_in_multiline_array + - unalign_double_arrow + - unalign_equals \ No newline at end of file diff --git a/tests/php_test_files/vendor/roadrunner-php/app-logger/LICENSE b/tests/php_test_files/vendor/roadrunner-php/app-logger/LICENSE new file mode 100644 index 0000000..8a33434 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/app-logger/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Spiral Scout + +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/roadrunner-php/app-logger/README.md b/tests/php_test_files/vendor/roadrunner-php/app-logger/README.md new file mode 100644 index 0000000..98c01aa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/app-logger/README.md @@ -0,0 +1,92 @@ +# Package for sending log messages to RoadRunner + + +[![PHP Version Require](https://poser.pugx.org/roadrunner-php/app-logger/require/php)](https://packagist.org/packages/roadrunner-php/app-logger) +[![Latest Stable Version](https://poser.pugx.org/roadrunner-php/app-logger/v/stable)](https://packagist.org/packages/roadrunner-php/app-logger) +[![phpunit](https://github.com/roadrunner-php/app-logger/actions/workflows/phpunit.yml/badge.svg)](https://github.com/roadrunner-php/app-logger/actions) +[![psalm](https://github.com/roadrunner-php/app-logger/actions/workflows/psalm.yml/badge.svg)](https://github.com/roadrunner-php/app-logger/actions) +[![Codecov](https://codecov.io/gh/roadrunner-php/app-logger/branch/master/graph/badge.svg)](https://codecov.io/gh/roadrunner-php/app-logger/) +[![Total Downloads](https://poser.pugx.org/roadrunner-php/app-logger/downloads)](https://packagist.org/packages/roadrunner-php/app-logger) + +## Requirements + +Make sure that your server is configured with following PHP version and extensions: + +- PHP 8.1+ + +## Installation + +You can install the package via composer: + +```bash +composer require roadrunner-php/app-logger +``` + +## Usage + +Such a configuration would be quite feasible to run: + +```yaml +rpc: + listen: tcp://127.0.0.1:6001 + +logs: + channels: + app: + level: info +``` + +Then you need to create an instance of `RoadRunner\Logger\Logger` + +```PHP +use Spiral\Goridge\RPC\RPC; +use RoadRunner\Logger\Logger; + +$rpc = RPC::create('tcp://127.0.0.1:6001'); +// or +$rpc = RPC::fromGlobals(); +// or +$rpc = RPC::fromEnvironment(new \Spiral\RoadRunner\Environment([ + 'RR_RPC' => 'tcp://127.0.0.1:6001' +])); + +$logger = new Logger($rpc); +``` + +## Available methods +```debug```, ```error```, ```info```, ```warning``` is RoadRunner logger, and ```log``` is stderr +```PHP +/** + * debug mapped to RR's debug logger + */ +$logger->debug('Debug message'); + +/** + * error mapped to RR's error logger + */ +$logger->error('Error message'); + +/** + * log mapped to RR's stderr + */ +$logger->log("Log message \n"); + +/** + * info mapped to RR's info logger + */ +$logger->info('Info message'); + +/** + * warning mapped to RR's warning logger + */ +$logger->warning('Warning message'); +``` + + +try Spiral Framework + + +## License + +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained +by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/roadrunner-php/app-logger/composer.json b/tests/php_test_files/vendor/roadrunner-php/app-logger/composer.json new file mode 100644 index 0000000..c98aefa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/app-logger/composer.json @@ -0,0 +1,46 @@ +{ + "name": "roadrunner-php/app-logger", + "type": "library", + "description": "Send log messages to RoadRunner", + "license": "MIT", + "authors": [ + { + "name": "Kirill Astakhov (kastahov)", + "email": "kirill.astakhov@spiralscout.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + } + ], + "require": { + "php": ">=8.1", + "ext-json": "*", + "spiral/goridge": "^3.1 || ^4.0", + "roadrunner-php/roadrunner-api-dto": "^1.4" + }, + "autoload": { + "psr-4": { + "RoadRunner\\Logger\\": "src" + } + }, + "require-dev": { + "mockery/mockery": "^1.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": ">=5.8" + }, + "autoload-dev": { + "psr-4": { + "RoadRunner\\Logger\\Tests\\": "tests" + } + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm --no-cache" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/roadrunner-php/app-logger/psalm.xml b/tests/php_test_files/vendor/roadrunner-php/app-logger/psalm.xml new file mode 100644 index 0000000..5f72b21 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/app-logger/psalm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/tests/php_test_files/vendor/roadrunner-php/app-logger/src/Exception/LoggerException.php b/tests/php_test_files/vendor/roadrunner-php/app-logger/src/Exception/LoggerException.php new file mode 100644 index 0000000..f8fabc4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/app-logger/src/Exception/LoggerException.php @@ -0,0 +1,10 @@ + + */ +final class Logger +{ + private readonly RPCInterface $rpc; + private readonly CodecInterface $codec; + + public function __construct(RPCInterface $rpc) + { + $this->rpc = $rpc->withServicePrefix('app'); + $this->codec = new ProtobufCodec(); + } + + /** + * Log an emergency message to the logs. + * + * @param TMessage $message + * @param TContext $context + */ + public function error(string|\Stringable $message, array $context = []): void + { + $this->send(LogLevel::Error, $message, $context); + } + + /** + * Log a warning message to the logs. + * + * @param TMessage $message + * @param TContext $context + */ + public function warning(string|\Stringable $message, array $context = []): void + { + $this->send(LogLevel::Warning, $message, $context); + } + + /** + * Log an informational message to the logs. + * + * @param TMessage $message + * @param TContext $context + */ + public function info(string $message, array $context = []): void + { + $this->send(LogLevel::Info, $message, $context); + } + + /** + * Log a debug message to the logs. + * + * @param TMessage $message + * @param TContext $context + */ + public function debug(string|\Stringable $message, array $context = []): void + { + $this->send(LogLevel::Debug, $message, $context); + } + + /** + * Log a message to the logs. + * + * @param TMessage $message + * @param TContext $context + */ + public function log(string|\Stringable $message, array $context = []): void + { + $this->send(LogLevel::Log, $message, $context); + } + + /** + * @param TContext $context + * @throws LoggerException + */ + private function send(LogLevel $level, string|\Stringable $message, array $context = []): void + { + try { + if ($context === []) { + $this->rpc->call($level->name, (string)$message); + } else { + $attrs = []; + + foreach ($context as $key => $value) { + try { + $attrs[] = new LogAttrs(data: [ + 'key' => $key, + 'value' => $this->prepareValue($value), + ]); + } catch (\Throwable) { + // We can't log this value, so we just skip it. + } + } + + $level = $level->name . 'WithContext'; + $this->rpc + ->withCodec($this->codec) + ->call( + $level, + new LogEntry([ + 'message' => (string)$message, + 'log_attrs' => $attrs, + ]), + ); + } + } catch (ServiceException $e) { + $this->handleError($e); + } + } + + /** + * @throws Exception\LoggerException + */ + private function handleError(ServiceException $e): never + { + $message = \str_replace(["\t", "\n"], ' ', $e->getMessage()); + + throw new Exception\LoggerException($message, $e->getCode(), $e); + } + + /** + * @throws \Throwable + */ + private function prepareValue(mixed $value): string + { + if (\is_string($value)) { + return $value; + } + + if ($value instanceof \Stringable) { + return (string)$value; + } + + return \json_encode($value, JSON_THROW_ON_ERROR); + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/LICENSE b/tests/php_test_files/vendor/roadrunner-php/centrifugo/LICENSE new file mode 100644 index 0000000..f218000 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Spiral Scout + +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/roadrunner-php/centrifugo/README.md b/tests/php_test_files/vendor/roadrunner-php/centrifugo/README.md new file mode 100644 index 0000000..13e762b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/README.md @@ -0,0 +1,217 @@ + + + + + + + +# RoadRunner Centrifugo Bridge + +[![PHP Version Require](https://poser.pugx.org/roadrunner-php/centrifugo/require/php)](https://packagist.org/packages/roadrunner-php/centrifugo) +[![Latest Stable Version](https://poser.pugx.org/roadrunner-php/centrifugo/v/stable)](https://packagist.org/packages/roadrunner-php/centrifugo) +[![phpunit](https://github.com/roadrunner-php/centrifugo/actions/workflows/phpunit.yml/badge.svg)](https://github.com/roadrunner-php/centrifugo/actions) +[![psalm](https://github.com/roadrunner-php/centrifugo/actions/workflows/psalm.yml/badge.svg)](https://github.com/roadrunner-php/centrifugo/actions) +[![Codecov](https://codecov.io/gh/roadrunner-php/centrifugo/branch/master/graph/badge.svg)](https://codecov.io/gh/roadrunner-php/centrifugo/) +[![Total Downloads](https://poser.pugx.org/roadrunner-php/centrifugo/downloads)](https://packagist.org/packages/roadrunner-php/centrifugo) + +This repository contains the codebase PHP bridge using RoadRunner centrifuge plugin. + +## Installation + +To install application server and Jobs codebase + +```bash +composer require roadrunner-php/centrifugo +``` + +You can use the convenient installer to download the latest available compatible version of RoadRunner assembly: + +```bash +composer require spiral/roadrunner-cli --dev +vendor/bin/rr get +``` + +## Proxy Centrifugo requests to a PHP application + +It's possible to proxy some client connection events from Centrifugo to the RoadRunner application server and react to +them in a custom way. For example, it's possible to authenticate connection via request from Centrifugo to application +backend, refresh client sessions and answer to RPC calls sent by a client over bidirectional connection. + +The list of events that can be proxied: + +* `connect` โ€“ called when a client connects to Centrifugo, so it's possible to authenticate user, return custom data to a +client, subscribe connection to several channels, attach meta information to the connection, and so on. Works for +bidirectional and unidirectional transports. +* `refresh` - called when a client session is going to expire, so it's possible to prolong it or just let it expire. Can +also be used just as a periodical connection liveness callback from Centrifugo to app backend. Works for bidirectional +and unidirectional transports. +* `sub_refresh` - called when it's time to refresh the subscription. Centrifugo itself will ask your backend about subscription validity instead of subscription refresh workflow on the client-side. +* `subscribe` - called when clients try to subscribe on a channel, so it's possible to check permissions and return custom +initial subscription data. Works for bidirectional transports only. +* `publish` - called when a client tries to publish into a channel, so it's possible to check permissions and optionally +modify publication data. Works for bidirectional transports only. +* `rpc` - called when a client sends RPC, you can do whatever logic you need based on a client-provided RPC method and +params. Works for bidirectional transports only. + +First you need to add `centrifuge` section to your RoadRunner configuration. For example, such a configuration +would be quite feasible to run: + +```yaml +rpc: + listen: tcp://127.0.0.1:6001 + +server: + command: "php app.php" + relay: pipes + +centrifuge: + proxy_address: "tcp://0.0.0.0:10001" # Centrifugo address +``` + +and centrifugo config: + +```json +{ + "admin": true, + "api_key": "secret", + "admin_password": "password", + "admin_secret": "admin_secret", + "allowed_origins": [ + "*" + ], + "token_hmac_secret_key": "test", + "publish": true, + "proxy_publish": true, + "proxy_subscribe": true, + "proxy_connect": true, + "allow_subscribe_for_client": true, + "proxy_connect_endpoint": "grpc://127.0.0.1:10001", + "proxy_connect_timeout": "10s", + "proxy_publish_endpoint": "grpc://127.0.0.1:10001", + "proxy_publish_timeout": "10s", + "proxy_subscribe_endpoint": "grpc://127.0.0.1:10001", + "proxy_subscribe_timeout": "10s", + "proxy_refresh_endpoint": "grpc://127.0.0.1:10001", + "proxy_refresh_timeout": "10s", + "proxy_sub_refresh_endpoint": "grpc://127.0.0.1:10001", + "proxy_sub_refresh_timeout": "1s", + "proxy_rpc_endpoint": "grpc://127.0.0.1:10001", + "proxy_rpc_timeout": "10s" +} +``` + +> **Note** +> `proxy_connect_endpoint`, `proxy_publish_endpoint`, `proxy_subscribe_endpoint`, `proxy_refresh_endpoint`, +> `proxy_sub_refresh_endpoint`, `proxy_rpc_endpoint` - endpoint address of roadrunner server with activated +> `centrifuge` plugin. + +To init abstract RoadRunner worker: + +```php +waitRequest()) { + + if ($request instanceof Request\Invalid) { + $errorMessage = $request->getException()->getMessage(); + + if ($request->getException() instanceof \RoadRunner\Centrifugo\Exception\InvalidRequestTypeException) { + $payload = $request->getException()->payload; + } + + // Handle invalid request + // $logger->error($errorMessage, $payload ?? []); + + continue; + } + + if ($request instanceof Request\Refresh) { + try { + // Do something + $request->respond(new Payload\RefreshResponse( + // ... + )); + } catch (\Throwable $e) { + $request->error($e->getCode(), $e->getMessage()); + } + + continue; + } + + if ($request instanceof Request\Subscribe) { + try { + // Do something + $request->respond(new Payload\SubscribeResponse( + // ... + )); + + // You can also disconnect connection + $request->disconnect('500', 'Connection is not allowed.'); + } catch (\Throwable $e) { + $request->error($e->getCode(), $e->getMessage()); + } + + continue; + } + + if ($request instanceof Request\Publish) { + try { + // Do something + $request->respond(new Payload\PublishResponse( + // ... + )); + + // You can also disconnect connection + $request->disconnect('500', 'Connection is not allowed.'); + } catch (\Throwable $e) { + $request->error($e->getCode(), $e->getMessage()); + } + + continue; + } + + if ($request instanceof Request\RPC) { + try { + $response = $router->handle( + new Request(uri: $request->method, data: $request->data), + ); // ['user' => ['id' => 1, 'username' => 'john_smith']] + + $request->respond(new Payload\RPCResponse( + data: $response + )); + } catch (\Throwable $e) { + $request->error($e->getCode(), $e->getMessage()); + } + + continue; + } +} +``` + +> **Note** +> You can find addition information about [here](https://centrifugal.dev/docs/server/proxy). + + +try Spiral Framework + + +## License + +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained +by [Spiral Scout](https://spiralscout.com). + + diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/composer.json b/tests/php_test_files/vendor/roadrunner-php/centrifugo/composer.json new file mode 100644 index 0000000..22bcde7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/composer.json @@ -0,0 +1,79 @@ +{ + "name": "roadrunner-php/centrifugo", + "type": "library", + "description": "RoadRunner: Centrifugo bridge", + "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" + } + ], + "homepage": "https://roadrunner.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": ">=8.1", + "ext-json": "*", + "roadrunner-php/roadrunner-api-dto": "^1.0", + "spiral/goridge": "^4.0", + "spiral/roadrunner-worker": "^3.0", + "spiral/roadrunner": "^2023.1 || ^2024.1", + "google/protobuf": "^3.7 || ^4.0" + }, + "autoload": { + "psr-4": { + "RoadRunner\\Centrifugo\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "RoadRunner\\Centrifugo\\Tests\\": "tests" + } + }, + "require-dev": { + "mockery/mockery": "^1.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": ">= 5.8" + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm --no-cache", + "compile": "protoc --proto_path=resources/proto/v1 --php_out=generated resources/proto/v1/proxy.proto resources/proto/v1/service.proto" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/psalm.xml b/tests/php_test_files/vendor/roadrunner-php/centrifugo/psalm.xml new file mode 100644 index 0000000..8822f66 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/psalm.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoApiInterface.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoApiInterface.php new file mode 100644 index 0000000..9116822 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoApiInterface.php @@ -0,0 +1,155 @@ + $tags + */ + public function publish( + string $channel, + string $message, + bool $skipHistory = true, + array $tags = [], + ): void; + + /** + * Similar to publish but allows to send the same data into many channels. + * + * @param non-empty-string[] $channels + * @param string $message JSON encoded string + * @param array $tags + */ + public function broadcast( + array $channels, + string $message, + bool $skipHistory = true, + array $tags = [], + ): void; + + /** + * Allows refreshing user connection (mostly useful when unidirectional transports are used). + * + * @param non-empty-string|null $client + * @param non-empty-string|null $session + */ + public function refresh( + string $user, + ?string $client = null, + ?string $session = null, + bool $expired = false, + ?\DateTimeInterface $expireAt = null, + ): void; + + /** + * Allows subscribing user to a channel. + * + * @param non-empty-string $channel + * @param non-empty-string|null $client + * @param non-empty-string|null $session + */ + public function subscribe( + string $channel, + string $user, + ?\DateTimeInterface $expireAt = null, + array $info = [], + ?string $client = null, + array $data = [], + ?string $session = null, + ): void; + + /** + * Allows unsubscribing user from a channel. + * + * @param non-empty-string $channel + * @param non-empty-string|null $client + * @param non-empty-string|null $session + */ + public function unsubscribe( + string $channel, + string $user, + ?string $client = null, + ?string $session = null, + ): void; + + /** + * Allows disconnecting a user by ID. + * + * @param non-empty-string|null $client + * @param non-empty-string[] $whitelist + * @param non-empty-string|null $session + */ + public function disconnect( + string $user, + ?string $client = null, + array $whitelist = [], + ?string $session = null, + ?Disconnect $disconnect = null, + ): void; + + /** + * Allows getting channel online presence information (all clients currently subscribed on this channel). + * + * @param non-empty-string $channel + * @return array + */ + public function presence( + string $channel + ): array; + + /** + * Allows getting short channel presence information - number of clients and number of unique users + * (based on user ID). + * + * @param non-empty-string $channel + * @return array{ + * num_clients: int, + * num_users: int + * } + */ + public function presenceStats( + string $channel + ): array; + + /** + * Return active channels (with one or more active subscribers in it). + * + * @param non-empty-string|null $pattern + * @return array + */ + public function channels( + ?string $pattern = null + ): array; + + /** + * Block user. + * + * @param non-empty-string $user + */ + public function blockUser(string $user, ?\DateTimeInterface $expireAt = null): void; + + /** + * Unblock user. + * + * @param non-empty-string $user + */ + public function unblockUser(string $user): void; +} \ No newline at end of file diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoWorker.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoWorker.php new file mode 100644 index 0000000..412563b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoWorker.php @@ -0,0 +1,41 @@ +worker->waitPayload(); + if ($payload === null || (!$payload->body && !$payload->header)) { + return null; + } + + return $this->requestFactory->createFromPayload($payload); + } catch (\Throwable $e) { + return $this->requestFactory->createFromException($e); + } + } + + public function getWorker(): WorkerInterface + { + return $this->worker; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoWorkerInterface.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoWorkerInterface.php new file mode 100644 index 0000000..67ce831 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/CentrifugoWorkerInterface.php @@ -0,0 +1,16 @@ +getMessage(), $error->getCode()); + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Exception/InvalidRequestTypeException.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Exception/InvalidRequestTypeException.php new file mode 100644 index 0000000..a66aef9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Exception/InvalidRequestTypeException.php @@ -0,0 +1,19 @@ + $subscriptions + */ + public function __construct( + public readonly string $user = '', + public readonly int|\DateTimeInterface|null $expireAt = null, + public readonly array $data = [], + public readonly array $info = [], + public readonly array $channels = [], + public readonly array $meta = [], + public readonly array $subscriptions = [], + ) { + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Payload/Disconnect.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Payload/Disconnect.php new file mode 100644 index 0000000..67f3f2b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Payload/Disconnect.php @@ -0,0 +1,26 @@ +reconnect = $reconnect; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Payload/Override.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Payload/Override.php new file mode 100644 index 0000000..c91c356 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Payload/Override.php @@ -0,0 +1,27 @@ +rpc = $rpc->withCodec(new ProtobufCodec()); + } + + public function publish(string $channel, string $message, bool $skipHistory = true, array $tags = [],): void + { + $request = new DTO\PublishRequest(); + $request->setChannel($channel); + $request->setSkipHistory($skipHistory); + $request->setData($message); + + if ($tags !== []) { + $request->setTags($tags); + } + + $this->call('centrifuge.Publish', $request, DTO\PublishResponse::class); + } + + public function broadcast(array $channels, string $message, bool $skipHistory = true, array $tags = [],): void + { + $request = new DTO\BroadcastRequest(); + $request->setChannels($channels); + $request->setSkipHistory($skipHistory); + $request->setData($message); + + if ($tags !== []) { + $request->setTags($tags); + } + + $this->call('centrifuge.Broadcast', $request, DTO\BroadcastResponse::class); + } + + public function refresh( + string $user, + ?string $client = null, + ?string $session = null, + bool $expired = false, + ?\DateTimeInterface $expireAt = null, + ): void { + $request = new DTO\RefreshRequest(); + $request->setUser($user); + $request->setExpired($expired); + + if ($client !== null) { + $request->setClient($client); + } + + if ($session !== null) { + $request->setSession($session); + } + + if ($expireAt !== null) { + $request->setExpireAt($expireAt->getTimestamp()); + } + + $this->call('centrifuge.Refresh', $request, DTO\RefreshResponse::class); + } + + public function subscribe( + string $channel, + string $user, + ?\DateTimeInterface $expireAt = null, + array $info = [], + ?string $client = null, + array $data = [], + ?string $session = null, + ): void { + $request = new DTO\SubscribeRequest(); + $request->setChannel($channel); + $request->setUser($user); + + if ($expireAt !== null) { + $request->setExpireAt($expireAt->getTimestamp()); + } + + if ($data !== []) { + $request->setData(\json_encode($data, JSON_THROW_ON_ERROR)); + } + + if ($info !== []) { + $request->setInfo(\json_encode($info, JSON_THROW_ON_ERROR)); + } + + if ($client !== null) { + $request->setClient($client); + } + + if ($session !== null) { + $request->setSession($session); + } + + $this->call('centrifuge.Subscribe', $request, DTO\SubscribeResponse::class); + } + + public function unsubscribe(string $channel, string $user, ?string $client = null, ?string $session = null,): void + { + $request = new DTO\UnsubscribeRequest(); + $request->setChannel($channel); + $request->setUser($user); + + if ($client !== null) { + $request->setClient($client); + } + + if ($session !== null) { + $request->setSession($session); + } + + $this->call('centrifuge.Unsubscribe', $request, DTO\UnsubscribeResponse::class); + } + + public function disconnect( + string $user, + ?string $client = null, + array $whitelist = [], + ?string $session = null, + ?Disconnect $disconnect = null, + ): void { + $request = new DTO\DisconnectRequest(); + $request->setUser($user); + + if ($client !== null) { + $request->setClient($client); + } + + if ($session !== null) { + $request->setSession($session); + } + + if ($whitelist !== []) { + $request->setWhitelist($whitelist); + } + + if ($disconnect !== null) { + $request->setDisconnect( + new DTO\Disconnect([ + 'code' => $disconnect->code, + 'reason' => $disconnect->reason, + ]) + ); + } + + $this->call('centrifuge.Unsubscribe', $request, DTO\DisconnectResponse::class); + } + + public function presence(string $channel): array + { + $request = new DTO\PresenceRequest(); + $request->setChannel($channel); + + $data = []; + $response = $this->call( + 'centrifuge.Presence', + $request, + DTO\PresenceResponse::class + ); + + /** @var array $result */ + $result = $response->getResult()?->getPresence() ?? []; + + foreach ($result as $clientId => $info) { + $data[$clientId] = [ + 'client' => $info->getClient(), + 'user' => $info->getUser(), + 'conn_info' => $info->getConnInfo(), + 'chan_info' => $info->getChanInfo(), + ]; + } + + return $data; + } + + public function presenceStats(string $channel): array + { + $request = new DTO\PresenceStatsRequest(); + $request->setChannel($channel); + + $response = $this->call( + 'centrifuge.PresenceStats', + $request, + DTO\PresenceStatsResponse::class + ); + + return [ + 'num_clients' => $response->getResult()?->getNumClients() ?? 0, + 'num_users' => $response->getResult()?->getNumUsers() ?? 0, + ]; + } + + public function channels(?string $pattern = null): array + { + $request = new DTO\ChannelsRequest(); + if ($pattern !== null) { + $request->setPattern($pattern); + } + + $response = $this->call( + 'centrifuge.Channels', + $request, + DTO\ChannelsResponse::class + ); + + $data = []; + + /** @var array $result */ + $result = $response->getResult()?->getChannels() ?? []; + + foreach ($result as $channel => $info) { + $data[$channel] = [ + 'num_clients' => $info->getNumClients(), + ]; + } + + return $data; + } + + public function blockUser(string $user, ?\DateTimeInterface $expireAt = null): void + { + $request = new DTO\BlockUserRequest(); + $request->setUser($user); + if ($expireAt !== null) { + $request->setExpireAt($expireAt->getTimestamp()); + } + + $this->call('centrifuge.BlockUser', $request, DTO\BlockUserResponse::class); + } + + public function unblockUser(string $user): void + { + $request = new DTO\UnblockUserRequest(); + $request->setUser($user); + + $this->call('centrifuge.UnblockUser', $request, DTO\UnblockUserResponse::class); + } + + /** + * Make an RPC call to the Centrifugo server. + * + * @template T of object + * @param non-empty-string $method + * @param RequestDTO $request + * @param class-string $responseClass + * @return T + * @throws CentrifugoApiResponseException + * + * @psalm-suppress MixedInferredReturnType + * @psalm-suppress MismatchingDocblockReturnType + * @psalm-suppress RedundantConditionGivenDocblockType + */ + private function call(string $method, Message $request, string $responseClass): Message + { + /** @var ResponseDTO $response */ + $response = $this->rpc->call($method, $request, $responseClass); + \assert($response instanceof $responseClass); + + $error = $response->getError(); + + if ($error !== null) { + throw CentrifugoApiResponseException::createFromError($error); + } + + return $response; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/AbstractRequest.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/AbstractRequest.php new file mode 100644 index 0000000..bb3a6b2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/AbstractRequest.php @@ -0,0 +1,88 @@ +attributes; + } + + public function getData(): array + { + return $this->data; + } + + public function getAttribute(string $name, mixed $default = null): mixed + { + return $this->attributes[$name] ?? $default; + } + + public function withAttribute(string $name, mixed $value): self + { + $self = clone $this; + $self->attributes[$name] = $value; + + return $self; + } + + /** + * @return ResponseDTO + */ + abstract protected function getResponseObject(): object; + + final public function error(int $code, string $message, bool $temporary = false): void + { + $response = $this->getResponseObject(); + $response->setError( + new Error(compact('code', 'message', 'temporary')), + ); + + $this->sendResponse($response); + } + + /** + * @param bool $reconnect This parameter is no longer used since v2.0.1 due to the removal of this option in + * centrifugal/centrifugo v5.0.0 API. It will be removed in v3.0.0. + */ + final public function disconnect(int $code, string $reason, bool $reconnect = false): void + { + $response = $this->getResponseObject(); + $response->setDisconnect( + new Disconnect(\compact('code', 'reason')), + ); + + $this->sendResponse($response); + } + + /** + * @param ResponseDTO $response + * @psalm-suppress InternalClass + * @psalm-suppress InternalMethod + */ + protected function sendResponse(object $response): void + { + $this->worker->respond( + new Payload($response->serializeToString()), + ); + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Connect.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Connect.php new file mode 100644 index 0000000..79581e2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Connect.php @@ -0,0 +1,180 @@ +mapResponse($response); + $responseObject = $this->getResponseObject(); + $responseObject->setResult($result); + + $this->sendResponse($responseObject); + } + + /** + * @throws \JsonException + */ + private function mapResponse(ConnectResponse $response): DTO\ConnectResult + { + $result = new DTO\ConnectResult(); + $result->setUser($response->user); + + if ($response->expireAt !== null) { + $result->setExpireAt($this->parseExpiresAt($response->expireAt)); + } + + if ($response->data !== []) { + $result->setData(\json_encode($response->data, JSON_THROW_ON_ERROR)); + } + + if ($response->info !== []) { + $result->setInfo(\json_encode($response->info, JSON_THROW_ON_ERROR)); + } + + if ($response->meta !== []) { + $result->setMeta(\json_encode($response->meta, JSON_THROW_ON_ERROR)); + } + + if ($response->channels !== []) { + $result->setChannels($response->channels); + } + + if ($response->subscriptions !== []) { + $result->setSubs($this->mapSubscriptions($response->subscriptions)); + } + + return $result; + } + + protected function getResponseObject(): DTO\ConnectResponse + { + return new DTO\ConnectResponse(); + } + + /** + * @param array $subscriptions + * @return array + * @throws \JsonException + */ + private function mapSubscriptions(array $subscriptions): array + { + $subs = []; + + foreach ($subscriptions as $name => $subscription) { + $sub = new DTO\SubscribeOptions(); + + if ($subscription->expireAt !== null) { + $sub->setExpireAt($this->parseExpiresAt($subscription->expireAt)); + } + + if ($subscription->data !== []) { + $sub->setData(\json_encode($subscription->data, JSON_THROW_ON_ERROR)); + } + + if ($subscription->info !== []) { + $sub->setInfo(\json_encode($subscription->info, JSON_THROW_ON_ERROR)); + } + + if ($subscription->override !== null) { + $sub->setOverride($this->mapSubscribeOption($subscription->override)); + } + + $subs[$name] = $sub; + } + + return $subs; + } + + public function mapSubscribeOption(Override $override): DTO\SubscribeOptionOverride + { + $option = new DTO\SubscribeOptionOverride(); + + if ($override->presence !== null) { + $option->setPresence( + new DTO\BoolValue([ + 'value' => $override->presence, + ]) + ); + } + + if ($override->joinLeave !== null) { + $option->setJoinLeave( + new DTO\BoolValue([ + 'value' => $override->joinLeave, + ]) + ); + } + + if ($override->forceRecovery !== null) { + $option->setForceRecovery( + new DTO\BoolValue([ + 'value' => $override->forceRecovery, + ]) + ); + } + + if ($override->forcePositioning !== null) { + $option->setForcePositioning( + new DTO\BoolValue([ + 'value' => $override->forcePositioning, + ]) + ); + } + + if ($override->forcePushJoinLeave !== null) { + $option->setForcePushJoinLeave( + new DTO\BoolValue([ + 'value' => $override->forcePushJoinLeave, + ]) + ); + } + return $option; + } + + public function parseExpiresAt(\DateTimeInterface|int $expireAt): int + { + return $expireAt instanceof \DateTimeInterface + ? $expireAt->getTimestamp() + : $expireAt; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Invalid.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Invalid.php new file mode 100644 index 0000000..96d33ce --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Invalid.php @@ -0,0 +1,37 @@ +exception; + } + + protected function getResponseObject(): object + { + throw new \RuntimeException(self::RESPONSE_EXCEPTION_MESSAGE); + } + + public function respond(ResponseInterface $response): void + { + throw new \RuntimeException(self::RESPONSE_EXCEPTION_MESSAGE); + } + + protected function sendResponse(object $response): void + { + throw new \RuntimeException(self::RESPONSE_EXCEPTION_MESSAGE); + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Publish.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Publish.php new file mode 100644 index 0000000..76d9df7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Publish.php @@ -0,0 +1,69 @@ +mapResponse($response); + $responseObject = $this->getResponseObject(); + $responseObject->setResult($result); + + $this->sendResponse($responseObject); + } + + protected function getResponseObject(): DTO\PublishResponse + { + return new DTO\PublishResponse(); + } + + /** + * @throws \JsonException + */ + private function mapResponse(PublishResponse $response): DTO\PublishResult + { + $result = new DTO\PublishResult(); + + $result->setSkipHistory($response->skipHistory); + + if ($response->data !== []) { + $result->setData(\json_encode($response->data, JSON_THROW_ON_ERROR)); + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RPC.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RPC.php new file mode 100644 index 0000000..1e90637 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RPC.php @@ -0,0 +1,60 @@ +mapResponse($response); + + $responseObject = $this->getResponseObject(); + $responseObject->setResult($result); + + $this->sendResponse($responseObject); + } + + private function mapResponse(RPCResponse $response): DTO\RPCResult + { + return new DTO\RPCResult([ + 'data' => \json_encode($response->data, JSON_THROW_ON_ERROR), + ]); + } + + protected function getResponseObject(): DTO\RPCResponse + { + return new DTO\RPCResponse(); + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Refresh.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Refresh.php new file mode 100644 index 0000000..be8a33e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Refresh.php @@ -0,0 +1,74 @@ +mapResponse($response); + $responseObject = $this->getResponseObject(); + $responseObject->setResult($result); + + $this->sendResponse($responseObject); + } + + protected function getResponseObject(): DTO\RefreshResponse + { + return new DTO\RefreshResponse(); + } + + /** + * @throws \JsonException + */ + private function mapResponse(RefreshResponse $response): DTO\RefreshResult + { + $result = new DTO\RefreshResult(); + $result->setExpired($response->expired); + + if ($response->expireAt !== null) { + $expireAt = $response->expireAt instanceof \DateTimeInterface + ? $response->expireAt->getTimestamp() + : $response->expireAt; + + $result->setExpireAt($expireAt); + } + + if ($response->info !== []) { + $result->setInfo(\json_encode($response->info, JSON_THROW_ON_ERROR)); + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestFactory.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestFactory.php new file mode 100644 index 0000000..3028bc2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestFactory.php @@ -0,0 +1,229 @@ + + */ +final class RequestFactory +{ + public function __construct( + private readonly WorkerInterface $worker + ) { + } + + /** + * Create a request Payload object. + * @throws JsonException + * @throws InvalidRequestTypeException + * @psalm-suppress InternalProperty + */ + public function createFromPayload(WorkerPayload $payload): RequestInterface + { + /** @var RequestHeader $headers */ + $headers = \json_decode($payload->header, true, 512, JSON_THROW_ON_ERROR); + $type = $headers['type'][0] ?? 'unknown'; + + try { + $typeEnum = RequestType::from($type); + } catch (\Throwable) { + throw new InvalidRequestTypeException( + $payload, + \sprintf('Request type `%s` is not supported', $type) + ); + } + + \assert($payload->body !== ''); + + return match ($typeEnum) { + RequestType::Connect => $this->createConnectRequest($payload->body, $headers), + RequestType::Refresh => $this->createRefreshRequest($payload->body, $headers), + RequestType::SubRefresh => $this->createSubRefreshRequest($payload->body, $headers), + RequestType::Subscribe => $this->createSubscribeRequest($payload->body, $headers), + RequestType::Publish => $this->createPublishRequest($payload->body, $headers), + RequestType::RPC => $this->createRPCRequest($payload->body, $headers), + RequestType::Invalid => throw new InvalidRequestTypeException( + $payload, + \sprintf('Request type `%s` is not supported', $type) + ) + }; + } + + public function createFromException(\Throwable $e): Invalid + { + return new Invalid( + exception: $e, + ); + } + + /** + * @param non-empty-string $body + * @param RequestHeader $headers + * @throws JsonException + */ + private function createConnectRequest(string $body, array $headers): Connect + { + $request = $this->unmarshalRequestBody(DTO\ConnectRequest::class, $body); + + /** @var non-empty-string[] $channels */ + $channels = \iterator_to_array($request->getChannels()->getIterator()); + + return new Connect( + worker: $this->worker, + client: $request->getClient(), + transport: $request->getTransport(), + protocol: $request->getProtocol(), + encoding: $request->getEncoding(), + data: $request->getData() ? (array)\json_decode($request->getData(), true, 512, JSON_THROW_ON_ERROR) : [], + name: $request->getName(), + version: $request->getVersion(), + channels: $channels, + headers: $headers, + ); + } + + /** + * @param non-empty-string $body + * @param RequestHeader $headers + * @throws JsonException + */ + private function createRefreshRequest(string $body, array $headers): Refresh + { + $request = $this->unmarshalRequestBody(DTO\RefreshRequest::class, $body); + + return new Refresh( + worker: $this->worker, + client: $request->getClient(), + transport: $request->getTransport(), + protocol: $request->getProtocol(), + encoding: $request->getEncoding(), + user: $request->getUser(), + meta: $request->getMeta() ? (array)\json_decode($request->getMeta(), true, 512, JSON_THROW_ON_ERROR) : [], + headers: $headers, + ); + } + + /** + * @param non-empty-string $body + * @param RequestHeader $headers + * @throws JsonException + */ + private function createSubRefreshRequest(string $body, array $headers): SubRefresh + { + $request = $this->unmarshalRequestBody(DTO\SubRefreshRequest::class, $body); + + return new SubRefresh( + worker: $this->worker, + client: $request->getClient(), + transport: $request->getTransport(), + protocol: $request->getProtocol(), + encoding: $request->getEncoding(), + user: $request->getUser(), + channel: $request->getChannel(), + meta: $request->getMeta() ? (array)\json_decode($request->getMeta(), true, 512, JSON_THROW_ON_ERROR) : [], + headers: $headers, + ); + } + + /** + * @param non-empty-string $body + * @param RequestHeader $headers + * @throws JsonException + */ + private function createSubscribeRequest(string $body, array $headers): Subscribe + { + $request = $this->unmarshalRequestBody(DTO\SubscribeRequest::class, $body); + + return new Subscribe( + worker: $this->worker, + client: $request->getClient(), + transport: $request->getTransport(), + protocol: $request->getProtocol(), + encoding: $request->getEncoding(), + user: $request->getUser(), + channel: $request->getChannel(), + token: $request->getToken(), + meta: $request->getMeta() ? (array)\json_decode($request->getMeta(), true, 512, JSON_THROW_ON_ERROR) : [], + data: $request->getData() ? (array)\json_decode($request->getData(), true, 512, JSON_THROW_ON_ERROR) : [], + headers: $headers, + ); + } + + /** + * @param non-empty-string $body + * @param RequestHeader $headers + * @throws JsonException + */ + private function createPublishRequest(string $body, array $headers): Publish + { + $request = $this->unmarshalRequestBody(DTO\PublishRequest::class, $body); + + return new Publish( + worker: $this->worker, + client: $request->getClient(), + transport: $request->getTransport(), + protocol: $request->getProtocol(), + encoding: $request->getEncoding(), + user: $request->getUser(), + channel: $request->getChannel(), + meta: $request->getMeta() ? (array)\json_decode($request->getMeta(), true, 512, JSON_THROW_ON_ERROR) : [], + data: $request->getData() ? (array)\json_decode($request->getData(), true, 512, JSON_THROW_ON_ERROR) : [], + headers: $headers, + ); + } + + /** + * @param non-empty-string $body + * @param RequestHeader $headers + * @throws JsonException + */ + private function createRPCRequest(string $body, array $headers): RPC + { + $request = $this->unmarshalRequestBody(DTO\RPCRequest::class, $body); + + return new RPC( + worker: $this->worker, + client: $request->getClient(), + transport: $request->getTransport(), + protocol: $request->getProtocol(), + encoding: $request->getEncoding(), + user: $request->getUser(), + method: $request->getMethod(), + meta: $request->getMeta() ? (array)\json_decode($request->getMeta(), true, 512, JSON_THROW_ON_ERROR) : [], + data: $request->getData() ? (array)\json_decode($request->getData(), true, 512, JSON_THROW_ON_ERROR) : [], + headers: $headers, + ); + } + + /** + * Unmarshal encoded body into GRPC DTO. + * + * @template T of Message + * @param class-string $class + * @param non-empty-string $body + * @return T + * + * @psalm-suppress UnsafeInstantiation + */ + private function unmarshalRequestBody(string $class, string $body): Message + { + /** @var RequestDTO $request */ + $request = new $class(); + \assert($request instanceof $class); + + $request->mergeFromString($body); + + return $request; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestInterface.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestInterface.php new file mode 100644 index 0000000..2a5e2cb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestInterface.php @@ -0,0 +1,51 @@ +> + */ +interface RequestInterface +{ + /** + * Get data from the request. + */ + public function getData(): array; + + /** + * Get additional attributes from the request. + */ + public function getAttributes(): array; + + /** + * Get attribute from the request by name. + */ + public function getAttribute(string $name, mixed $default = null): mixed; + + /** + * Add attribute to the request. + */ + public function withAttribute(string $name, mixed $value): self; + + /** + * Send response to Centrifugo server. + */ + public function respond(ResponseInterface $response): void; + + /** + * Send error response to Centrifugo server. + */ + public function error(int $code, string $message, bool $temporary = false): void; + + /** + * Send disconnect response to Centrifugo server. + * + * @param bool $reconnect This parameter is no longer used since v2.0.1 due to the removal of this option in + * centrifugal/centrifugo v5.0.0 API. It will be removed in v3.0.0. + */ + public function disconnect(int $code, string $reason, bool $reconnect = false): void; +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestType.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestType.php new file mode 100644 index 0000000..c92c495 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/RequestType.php @@ -0,0 +1,31 @@ + RequestType::Connect, + $request instanceof Subscribe => RequestType::Subscribe, + $request instanceof Refresh => RequestType::Refresh, + $request instanceof SubRefresh => RequestType::SubRefresh, + $request instanceof Publish => RequestType::Publish, + $request instanceof RPC => RequestType::RPC, + $request instanceof Invalid => RequestType::Invalid, + }; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/SubRefresh.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/SubRefresh.php new file mode 100644 index 0000000..fe7a48b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/SubRefresh.php @@ -0,0 +1,75 @@ +mapResponse($response); + $responseObject = $this->getResponseObject(); + $responseObject->setResult($result); + + $this->sendResponse($responseObject); + } + + protected function getResponseObject(): DTO\SubRefreshResponse + { + return new DTO\SubRefreshResponse(); + } + + /** + * @throws \JsonException + */ + private function mapResponse(SubRefreshResponse $response): DTO\SubRefreshResult + { + $result = new DTO\SubRefreshResult(); + $result->setExpired($response->expired); + + if ($response->expireAt !== null) { + $expireAt = $response->expireAt instanceof \DateTimeInterface + ? $response->expireAt->getTimestamp() + : $response->expireAt; + + $result->setExpireAt($expireAt); + } + + if ($response->info !== []) { + $result->setInfo(\json_encode($response->info, JSON_THROW_ON_ERROR)); + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Subscribe.php b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Subscribe.php new file mode 100644 index 0000000..2b34392 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/centrifugo/src/Request/Subscribe.php @@ -0,0 +1,126 @@ +mapResponse($response); + $responseObject = $this->getResponseObject(); + $responseObject->setResult($result); + + $this->sendResponse($responseObject); + } + + /** + * @throws \JsonException + */ + private function mapResponse(SubscribeResponse $response): DTO\SubscribeResult + { + $result = new DTO\SubscribeResult(); + + if ($response->info !== []) { + $result->setInfo(\json_encode($response->info, JSON_THROW_ON_ERROR)); + } + + if ($response->data !== []) { + $result->setData(\json_encode($response->data, JSON_THROW_ON_ERROR)); + } + + if ($response->allow !== []) { + $result->setAllow($response->allow); + } + + if ($response->override !== null) { + $result->setOverride($this->mapSubscribeOption($response->override)); + } + + return $result; + } + + protected function getResponseObject(): DTO\SubscribeResponse + { + return new DTO\SubscribeResponse(); + } + + public function mapSubscribeOption(Override $override): DTO\SubscribeOptionOverride + { + $option = new DTO\SubscribeOptionOverride(); + + if ($override->presence !== null) { + $option->setPresence( + new DTO\BoolValue([ + 'value' => $override->presence, + ]) + ); + } + + if ($override->joinLeave !== null) { + $option->setJoinLeave( + new DTO\BoolValue([ + 'value' => $override->joinLeave, + ]) + ); + } + + if ($override->forceRecovery !== null) { + $option->setForceRecovery( + new DTO\BoolValue([ + 'value' => $override->forceRecovery, + ]) + ); + } + + if ($override->forcePositioning !== null) { + $option->setForcePositioning( + new DTO\BoolValue([ + 'value' => $override->forcePositioning, + ]) + ); + } + + if ($override->forcePushJoinLeave !== null) { + $option->setForcePushJoinLeave( + new DTO\BoolValue([ + 'value' => $override->forcePushJoinLeave, + ]) + ); + } + return $option; + } +} diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/LICENSE b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/LICENSE new file mode 100644 index 0000000..f20fa3a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Spiral Scout + +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/roadrunner-php/roadrunner-api-dto/README.md b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/README.md new file mode 100644 index 0000000..41ac9b3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/README.md @@ -0,0 +1,61 @@ + + + + + + + +# RoadRunner PHP API DTO + +[![PHP Version Require](https://poser.pugx.org/roadrunner-php/roadrunner-api-dto/require/php)](https://packagist.org/packages/roadrunner-php/roadrunner-api-dto) +[![Latest Stable Version](https://poser.pugx.org/roadrunner-php/roadrunner-api-dto/v/stable)](https://packagist.org/packages/roadrunner-php/roadrunner-api-dto) +[![Total Downloads](https://poser.pugx.org/roadrunner-php/roadrunner-api-dto/downloads)](https://packagist.org/packages/roadrunner-php/roadrunner-api-dto) + +This is a GitHub repository and Composer package that provides PHP Data Transfer Object (DTO) messages for RoadRunner +API protocol buffer files, available at https://github.com/roadrunner-server/api. + +With this repository, you can use pre-generated DTO messages for the following RoadRunner plugins: + +- Centrifugo +- HTTP +- Jobs +- KV +- Lock +- Plugins +- Service +- Status +- WebSockets + +The repository contains the pre-generated DTO files, and you can include the package in your PHP project to use them for +making RPC calls to the RoadRunner server. + +## Installation + +You can install the package. Simply run the following command: + +```bash +composer require roadrunner-php/roadrunner-api-dto +``` + +## Generating DTOs + +If you would like to generate the DTOs yourself, you can use the `generate.sh` script. This script will generate the +DTOs for all of the plugins, and place them in the `generated/` directory. + +But before that, you will need to compile the `grpc_php_plugin`. Follow [this instruction](https://github.com/grpc/grpc/blob/master/src/php/README.md#grpc_php_plugin-protoc-plugin) to build the file. + +Then run: + +```bash +./generate.sh +``` + +> Note: You will need to have the `protoc` >= 3.15 binary installed on your system. + +## Contribution + +Contributions are welcome! If you would like to contribute to this project, please open an issue or pull request. + +## License + +This repository is licensed under the MIT license. See [LICENSE](./LICENSE) for more information. diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/composer.json b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/composer.json new file mode 100644 index 0000000..80491bb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/composer.json @@ -0,0 +1,53 @@ +{ + "name": "roadrunner-php/roadrunner-api-dto", + "type": "library", + "description": "RoadRunner PHP API", + "license": "MIT", + "homepage": "https://roadrunner.dev", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev", + "chat": "https://discord.gg/V6EK4he" + }, + "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" + } + ], + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": "^8.1", + "google/protobuf": "^3.22 || ^4.0" + }, + "suggest": { + "google/common-protos": "Required for Temporal API" + }, + "conflict": { + "temporal/sdk": "<2.9.0" + }, + "scripts": { + "build": "./generate.sh" + }, + "autoload": { + "psr-4": { + "RoadRunner\\": "generated/RoadRunner", + "GPBMetadata\\": "generated/GPBMetadata", + "Temporal\\": "generated/Temporal" + } + } +} \ No newline at end of file diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Dependencies/Gogoproto/Gogo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Dependencies/Gogoproto/Gogo.php new file mode 100644 index 0000000..fc4c966 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Dependencies/Gogoproto/Gogo.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A~\x0A!dependencies/gogoproto/gogo.proto\x12\x09gogoproto\x1A google/protobuf/descriptor.protoB\$Z\"github.com/gogo/protobuf/gogoprotob\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Batch/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Batch/V1/Message.php new file mode 100644 index 0000000..ad99a22 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Batch/V1/Message.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xB9\x08\x0A#temporal/api/batch/v1/message.proto\x12\x15temporal.api.batch.v1\x1A\$temporal/api/common/v1/message.proto\x1A+temporal/api/enums/v1/batch_operation.proto\x1A!temporal/api/enums/v1/reset.proto\"\xBF\x01\x0A\x12BatchOperationInfo\x12\x0E\x0A\x06job_id\x18\x01 \x01(\x09\x129\x0A\x05state\x18\x02 \x01(\x0E2*.temporal.api.enums.v1.BatchOperationState\x12.\x0A\x0Astart_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12.\x0A\x0Aclose_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"`\x0A\x19BatchOperationTermination\x121\x0A\x07details\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\"\x99\x01\x0A\x14BatchOperationSignal\x12\x0E\x0A\x06signal\x18\x01 \x01(\x09\x12/\x0A\x05input\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12.\x0A\x06header\x18\x03 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\".\x0A\x1ABatchOperationCancellation\x12\x10\x0A\x08identity\x18\x01 \x01(\x09\"*\x0A\x16BatchOperationDeletion\x12\x10\x0A\x08identity\x18\x01 \x01(\x09\"\xD9\x01\x0A\x13BatchOperationReset\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x125\x0A\x07options\x18\x04 \x01(\x0B2\$.temporal.api.common.v1.ResetOptions\x124\x0A\x0Areset_type\x18\x01 \x01(\x0E2 .temporal.api.enums.v1.ResetType\x12C\x0A\x12reset_reapply_type\x18\x02 \x01(\x0E2'.temporal.api.enums.v1.ResetReapplyTypeB\x84\x01\x0A\x18io.temporal.api.batch.v1B\x0CMessageProtoP\x01Z!go.temporal.io/api/batch/v1;batch\xAA\x02\x17Temporalio.Api.Batch.V1\xEA\x02\x1ATemporalio::Api::Batch::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Command/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Command/V1/Message.php new file mode 100644 index 0000000..b212926 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Command/V1/Message.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + "\x0A\xB47\x0A%temporal/api/command/v1/message.proto\x12\x17temporal.api.command.v1\x1A\$temporal/api/enums/v1/workflow.proto\x1A(temporal/api/enums/v1/command_type.proto\x1A\$temporal/api/common/v1/message.proto\x1A%temporal/api/failure/v1/message.proto\x1A'temporal/api/taskqueue/v1/message.proto\x1A'temporal/api/sdk/v1/user_metadata.proto\"\x82\x05\x0A%ScheduleActivityTaskCommandAttributes\x12\x13\x0A\x0Bactivity_id\x18\x01 \x01(\x09\x12;\x0A\x0Dactivity_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.ActivityType\x128\x0A\x0Atask_queue\x18\x04 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12.\x0A\x06header\x18\x05 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12/\x0A\x05input\x18\x06 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12<\x0A\x19schedule_to_close_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x12<\x0A\x19schedule_to_start_timeout\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x129\x0A\x16start_to_close_timeout\x18\x09 \x01(\x0B2\x19.google.protobuf.Duration\x124\x0A\x11heartbeat_timeout\x18\x0A \x01(\x0B2\x19.google.protobuf.Duration\x129\x0A\x0Cretry_policy\x18\x0B \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x1F\x0A\x17request_eager_execution\x18\x0C \x01(\x08\x12\x1D\x0A\x15use_workflow_build_id\x18\x0D \x01(\x08J\x04\x08\x03\x10\x04\"H\x0A*RequestCancelActivityTaskCommandAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\"i\x0A\x1BStartTimerCommandAttributes\x12\x10\x0A\x08timer_id\x18\x01 \x01(\x09\x128\x0A\x15start_to_fire_timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"^\x0A*CompleteWorkflowExecutionCommandAttributes\x120\x0A\x06result\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\"[\x0A&FailWorkflowExecutionCommandAttributes\x121\x0A\x07failure\x18\x01 \x01(\x0B2 .temporal.api.failure.v1.Failure\"0\x0A\x1CCancelTimerCommandAttributes\x12\x10\x0A\x08timer_id\x18\x01 \x01(\x09\"]\x0A(CancelWorkflowExecutionCommandAttributes\x121\x0A\x07details\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\"\xAF\x01\x0A7RequestCancelExternalWorkflowExecutionCommandAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x03 \x01(\x09\x12\x0F\x0A\x07control\x18\x04 \x01(\x09\x12\x1B\x0A\x13child_workflow_only\x18\x05 \x01(\x08\x12\x0E\x0A\x06reason\x18\x06 \x01(\x09\"\xA7\x02\x0A0SignalExternalWorkflowExecutionCommandAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12<\x0A\x09execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x13\x0A\x0Bsignal_name\x18\x03 \x01(\x09\x12/\x0A\x05input\x18\x04 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x0F\x0A\x07control\x18\x05 \x01(\x09\x12\x1B\x0A\x13child_workflow_only\x18\x06 \x01(\x08\x12.\x0A\x06header\x18\x07 \x01(\x0B2\x1E.temporal.api.common.v1.Header\"v\x0A/UpsertWorkflowSearchAttributesCommandAttributes\x12C\x0A\x11search_attributes\x18\x01 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\"`\x0A)ModifyWorkflowPropertiesCommandAttributes\x123\x0A\x0Dupserted_memo\x18\x01 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\"\xBF\x02\x0A\x1DRecordMarkerCommandAttributes\x12\x13\x0A\x0Bmarker_name\x18\x01 \x01(\x09\x12T\x0A\x07details\x18\x02 \x03(\x0B2C.temporal.api.command.v1.RecordMarkerCommandAttributes.DetailsEntry\x12.\x0A\x06header\x18\x03 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x121\x0A\x07failure\x18\x04 \x01(\x0B2 .temporal.api.failure.v1.Failure\x1AP\x0A\x0CDetailsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12/\x0A\x05value\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads:\x028\x01\"\xCB\x06\x0A/ContinueAsNewWorkflowExecutionCommandAttributes\x12;\x0A\x0Dworkflow_type\x18\x01 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x128\x0A\x0Atask_queue\x18\x02 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x03 \x01(\x0B2 .temporal.api.common.v1.Payloads\x127\x0A\x14workflow_run_timeout\x18\x04 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x129\x0A\x16backoff_start_interval\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x129\x0A\x0Cretry_policy\x18\x07 \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12@\x0A\x09initiator\x18\x08 \x01(\x0E2-.temporal.api.enums.v1.ContinueAsNewInitiator\x121\x0A\x07failure\x18\x09 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12@\x0A\x16last_completion_result\x18\x0A \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x15\x0A\x0Dcron_schedule\x18\x0B \x01(\x09\x12.\x0A\x06header\x18\x0C \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12*\x0A\x04memo\x18\x0D \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x0E \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12\x18\x0A\x10inherit_build_id\x18\x0F \x01(\x08\"\xE5\x06\x0A,StartChildWorkflowExecutionCommandAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x128\x0A\x0Atask_queue\x18\x04 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12=\x0A\x1Aworkflow_execution_timeout\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x14workflow_run_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x12E\x0A\x13parent_close_policy\x18\x09 \x01(\x0E2(.temporal.api.enums.v1.ParentClosePolicy\x12\x0F\x0A\x07control\x18\x0A \x01(\x09\x12N\x0A\x18workflow_id_reuse_policy\x18\x0B \x01(\x0E2,.temporal.api.enums.v1.WorkflowIdReusePolicy\x129\x0A\x0Cretry_policy\x18\x0C \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x15\x0A\x0Dcron_schedule\x18\x0D \x01(\x09\x12.\x0A\x06header\x18\x0E \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12*\x0A\x04memo\x18\x0F \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x10 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12\x18\x0A\x10inherit_build_id\x18\x11 \x01(\x08\"6\x0A ProtocolMessageCommandAttributes\x12\x12\x0A\x0Amessage_id\x18\x01 \x01(\x09\"\xEA\x02\x0A'ScheduleNexusOperationCommandAttributes\x12\x10\x0A\x08endpoint\x18\x01 \x01(\x09\x12\x0F\x0A\x07service\x18\x02 \x01(\x09\x12\x11\x0A\x09operation\x18\x03 \x01(\x09\x12.\x0A\x05input\x18\x04 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\x12<\x0A\x19schedule_to_close_timeout\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12g\x0A\x0Cnexus_header\x18\x06 \x03(\x0B2Q.temporal.api.command.v1.ScheduleNexusOperationCommandAttributes.NexusHeaderEntry\x1A2\x0A\x10NexusHeaderEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"J\x0A,RequestCancelNexusOperationCommandAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\"\xC2\x11\x0A\x07Command\x128\x0A\x0Ccommand_type\x18\x01 \x01(\x0E2\".temporal.api.enums.v1.CommandType\x129\x0A\x0Duser_metadata\x18\xAD\x02 \x01(\x0B2!.temporal.api.sdk.v1.UserMetadata\x12s\x0A)schedule_activity_task_command_attributes\x18\x02 \x01(\x0B2>.temporal.api.command.v1.ScheduleActivityTaskCommandAttributesH\x00\x12^\x0A\x1Estart_timer_command_attributes\x18\x03 \x01(\x0B24.temporal.api.command.v1.StartTimerCommandAttributesH\x00\x12}\x0A.complete_workflow_execution_command_attributes\x18\x04 \x01(\x0B2C.temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributesH\x00\x12u\x0A*fail_workflow_execution_command_attributes\x18\x05 \x01(\x0B2?.temporal.api.command.v1.FailWorkflowExecutionCommandAttributesH\x00\x12~\x0A/request_cancel_activity_task_command_attributes\x18\x06 \x01(\x0B2C.temporal.api.command.v1.RequestCancelActivityTaskCommandAttributesH\x00\x12`\x0A\x1Fcancel_timer_command_attributes\x18\x07 \x01(\x0B25.temporal.api.command.v1.CancelTimerCommandAttributesH\x00\x12y\x0A,cancel_workflow_execution_command_attributes\x18\x08 \x01(\x0B2A.temporal.api.command.v1.CancelWorkflowExecutionCommandAttributesH\x00\x12\x99\x01\x0A=request_cancel_external_workflow_execution_command_attributes\x18\x09 \x01(\x0B2P.temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributesH\x00\x12b\x0A record_marker_command_attributes\x18\x0A \x01(\x0B26.temporal.api.command.v1.RecordMarkerCommandAttributesH\x00\x12\x89\x01\x0A5continue_as_new_workflow_execution_command_attributes\x18\x0B \x01(\x0B2H.temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributesH\x00\x12\x82\x01\x0A1start_child_workflow_execution_command_attributes\x18\x0C \x01(\x0B2E.temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributesH\x00\x12\x8A\x01\x0A5signal_external_workflow_execution_command_attributes\x18\x0D \x01(\x0B2I.temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributesH\x00\x12\x88\x01\x0A4upsert_workflow_search_attributes_command_attributes\x18\x0E \x01(\x0B2H.temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributesH\x00\x12h\x0A#protocol_message_command_attributes\x18\x0F \x01(\x0B29.temporal.api.command.v1.ProtocolMessageCommandAttributesH\x00\x12{\x0A-modify_workflow_properties_command_attributes\x18\x11 \x01(\x0B2B.temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributesH\x00\x12w\x0A+schedule_nexus_operation_command_attributes\x18\x12 \x01(\x0B2@.temporal.api.command.v1.ScheduleNexusOperationCommandAttributesH\x00\x12\x82\x01\x0A1request_cancel_nexus_operation_command_attributes\x18\x13 \x01(\x0B2E.temporal.api.command.v1.RequestCancelNexusOperationCommandAttributesH\x00B\x0C\x0A\x0AattributesB\x8E\x01\x0A\x1Aio.temporal.api.command.v1B\x0CMessageProtoP\x01Z%go.temporal.io/api/command/v1;command\xAA\x02\x19Temporalio.Api.Command.V1\xEA\x02\x1CTemporalio::Api::Command::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Common/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Common/V1/Message.php new file mode 100644 index 0000000..86925ed --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Common/V1/Message.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xA8\x11\x0A\$temporal/api/common/v1/message.proto\x12\x16temporal.api.common.v1\x1A\x1Bgoogle/protobuf/empty.proto\x1A\"temporal/api/enums/v1/common.proto\x1A!temporal/api/enums/v1/reset.proto\"T\x0A\x08DataBlob\x12:\x0A\x0Dencoding_type\x18\x01 \x01(\x0E2#.temporal.api.enums.v1.EncodingType\x12\x0C\x0A\x04data\x18\x02 \x01(\x0C\"=\x0A\x08Payloads\x121\x0A\x08payloads\x18\x01 \x03(\x0B2\x1F.temporal.api.common.v1.Payload\"\x89\x01\x0A\x07Payload\x12?\x0A\x08metadata\x18\x01 \x03(\x0B2-.temporal.api.common.v1.Payload.MetadataEntry\x12\x0C\x0A\x04data\x18\x02 \x01(\x0C\x1A/\x0A\x0DMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x0C:\x028\x01\"\xBE\x01\x0A\x10SearchAttributes\x12S\x0A\x0Eindexed_fields\x18\x01 \x03(\x0B2;.temporal.api.common.v1.SearchAttributes.IndexedFieldsEntry\x1AU\x0A\x12IndexedFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12.\x0A\x05value\x18\x02 \x01(\x0B2\x1F.temporal.api.common.v1.Payload:\x028\x01\"\x90\x01\x0A\x04Memo\x128\x0A\x06fields\x18\x01 \x03(\x0B2(.temporal.api.common.v1.Memo.FieldsEntry\x1AN\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12.\x0A\x05value\x18\x02 \x01(\x0B2\x1F.temporal.api.common.v1.Payload:\x028\x01\"\x94\x01\x0A\x06Header\x12:\x0A\x06fields\x18\x01 \x03(\x0B2*.temporal.api.common.v1.Header.FieldsEntry\x1AN\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12.\x0A\x05value\x18\x02 \x01(\x0B2\x1F.temporal.api.common.v1.Payload:\x028\x01\"8\x0A\x11WorkflowExecution\x12\x13\x0A\x0Bworkflow_id\x18\x01 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x02 \x01(\x09\"\x1C\x0A\x0CWorkflowType\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"\x1C\x0A\x0CActivityType\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"\xD1\x01\x0A\x0BRetryPolicy\x123\x0A\x10initial_interval\x18\x01 \x01(\x0B2\x19.google.protobuf.Duration\x12\x1B\x0A\x13backoff_coefficient\x18\x02 \x01(\x01\x123\x0A\x10maximum_interval\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x12\x18\x0A\x10maximum_attempts\x18\x04 \x01(\x05\x12!\x0A\x19non_retryable_error_types\x18\x05 \x03(\x09\"F\x0A\x10MeteringMetadata\x122\x0A*nonfirst_local_activity_execution_attempts\x18\x0D \x01(\x0D\">\x0A\x12WorkerVersionStamp\x12\x10\x0A\x08build_id\x18\x01 \x01(\x09\x12\x16\x0A\x0Euse_versioning\x18\x03 \x01(\x08\"E\x0A\x19WorkerVersionCapabilities\x12\x10\x0A\x08build_id\x18\x01 \x01(\x09\x12\x16\x0A\x0Euse_versioning\x18\x02 \x01(\x08\"\xE9\x02\x0A\x0CResetOptions\x125\x0A\x13first_workflow_task\x18\x01 \x01(\x0B2\x16.google.protobuf.EmptyH\x00\x124\x0A\x12last_workflow_task\x18\x02 \x01(\x0B2\x16.google.protobuf.EmptyH\x00\x12\x1A\x0A\x10workflow_task_id\x18\x03 \x01(\x03H\x00\x12\x12\x0A\x08build_id\x18\x04 \x01(\x09H\x00\x12C\x0A\x12reset_reapply_type\x18\x0A \x01(\x0E2'.temporal.api.enums.v1.ResetReapplyType\x12\x18\x0A\x10current_run_only\x18\x0B \x01(\x08\x12S\x0A\x1Breset_reapply_exclude_types\x18\x0C \x03(\x0E2..temporal.api.enums.v1.ResetReapplyExcludeTypeB\x08\x0A\x06target\"\xDE\x01\x0A\x08Callback\x127\x0A\x05nexus\x18\x02 \x01(\x0B2&.temporal.api.common.v1.Callback.NexusH\x00\x1A\x87\x01\x0A\x05Nexus\x12\x0B\x0A\x03url\x18\x01 \x01(\x09\x12B\x0A\x06header\x18\x02 \x03(\x0B22.temporal.api.common.v1.Callback.Nexus.HeaderEntry\x1A-\x0A\x0BHeaderEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x09\x0A\x07variantJ\x04\x08\x01\x10\x02B\x89\x01\x0A\x19io.temporal.api.common.v1B\x0CMessageProtoP\x01Z#go.temporal.io/api/common/v1;common\xAA\x02\x18Temporalio.Api.Common.V1\xEA\x02\x1BTemporalio::Api::Common::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/BatchOperation.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/BatchOperation.php new file mode 100644 index 0000000..1edd260 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/BatchOperation.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xE7\x04\x0A+temporal/api/enums/v1/batch_operation.proto\x12\x15temporal.api.enums.v1*\xE1\x01\x0A\x12BatchOperationType\x12\$\x0A BATCH_OPERATION_TYPE_UNSPECIFIED\x10\x00\x12\"\x0A\x1EBATCH_OPERATION_TYPE_TERMINATE\x10\x01\x12\x1F\x0A\x1BBATCH_OPERATION_TYPE_CANCEL\x10\x02\x12\x1F\x0A\x1BBATCH_OPERATION_TYPE_SIGNAL\x10\x03\x12\x1F\x0A\x1BBATCH_OPERATION_TYPE_DELETE\x10\x04\x12\x1E\x0A\x1ABATCH_OPERATION_TYPE_RESET\x10\x05*\xA6\x01\x0A\x13BatchOperationState\x12%\x0A!BATCH_OPERATION_STATE_UNSPECIFIED\x10\x00\x12!\x0A\x1DBATCH_OPERATION_STATE_RUNNING\x10\x01\x12#\x0A\x1FBATCH_OPERATION_STATE_COMPLETED\x10\x02\x12 \x0A\x1CBATCH_OPERATION_STATE_FAILED\x10\x03B\x8B\x01\x0A\x18io.temporal.api.enums.v1B\x13BatchOperationProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/CommandType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/CommandType.php new file mode 100644 index 0000000..5855673 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/CommandType.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xF3\x07\x0A(temporal/api/enums/v1/command_type.proto\x12\x15temporal.api.enums.v1*\x9C\x06\x0A\x0BCommandType\x12\x1C\x0A\x18COMMAND_TYPE_UNSPECIFIED\x10\x00\x12'\x0A#COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK\x10\x01\x12-\x0A)COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK\x10\x02\x12\x1C\x0A\x18COMMAND_TYPE_START_TIMER\x10\x03\x12,\x0A(COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION\x10\x04\x12(\x0A\$COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION\x10\x05\x12\x1D\x0A\x19COMMAND_TYPE_CANCEL_TIMER\x10\x06\x12*\x0A&COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION\x10\x07\x12;\x0A7COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION\x10\x08\x12\x1E\x0A\x1ACOMMAND_TYPE_RECORD_MARKER\x10\x09\x123\x0A/COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION\x10\x0A\x12/\x0A+COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION\x10\x0B\x123\x0A/COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION\x10\x0C\x122\x0A.COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES\x10\x0D\x12!\x0A\x1DCOMMAND_TYPE_PROTOCOL_MESSAGE\x10\x0E\x12+\x0A'COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES\x10\x10\x12)\x0A%COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION\x10\x11\x12/\x0A+COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION\x10\x12B\x88\x01\x0A\x18io.temporal.api.enums.v1B\x10CommandTypeProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Common.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Common.php new file mode 100644 index 0000000..fe8306e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Common.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\x89\x0B\x0A\"temporal/api/enums/v1/common.proto\x12\x15temporal.api.enums.v1*_\x0A\x0CEncodingType\x12\x1D\x0A\x19ENCODING_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14ENCODING_TYPE_PROTO3\x10\x01\x12\x16\x0A\x12ENCODING_TYPE_JSON\x10\x02*\x91\x02\x0A\x10IndexedValueType\x12\"\x0A\x1EINDEXED_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17INDEXED_VALUE_TYPE_TEXT\x10\x01\x12\x1E\x0A\x1AINDEXED_VALUE_TYPE_KEYWORD\x10\x02\x12\x1A\x0A\x16INDEXED_VALUE_TYPE_INT\x10\x03\x12\x1D\x0A\x19INDEXED_VALUE_TYPE_DOUBLE\x10\x04\x12\x1B\x0A\x17INDEXED_VALUE_TYPE_BOOL\x10\x05\x12\x1F\x0A\x1BINDEXED_VALUE_TYPE_DATETIME\x10\x06\x12#\x0A\x1FINDEXED_VALUE_TYPE_KEYWORD_LIST\x10\x07*^\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DSEVERITY_HIGH\x10\x01\x12\x13\x0A\x0FSEVERITY_MEDIUM\x10\x02\x12\x10\x0A\x0CSEVERITY_LOW\x10\x03*\xC2\x01\x0A\x0DCallbackState\x12\x1E\x0A\x1ACALLBACK_STATE_UNSPECIFIED\x10\x00\x12\x1A\x0A\x16CALLBACK_STATE_STANDBY\x10\x01\x12\x1C\x0A\x18CALLBACK_STATE_SCHEDULED\x10\x02\x12\x1E\x0A\x1ACALLBACK_STATE_BACKING_OFF\x10\x03\x12\x19\x0A\x15CALLBACK_STATE_FAILED\x10\x04\x12\x1C\x0A\x18CALLBACK_STATE_SUCCEEDED\x10\x05*\xD2\x01\x0A\x1APendingNexusOperationState\x12-\x0A)PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED\x10\x00\x12+\x0A'PENDING_NEXUS_OPERATION_STATE_SCHEDULED\x10\x01\x12-\x0A)PENDING_NEXUS_OPERATION_STATE_BACKING_OFF\x10\x02\x12)\x0A%PENDING_NEXUS_OPERATION_STATE_STARTED\x10\x03*\xCE\x02\x0A\x1FNexusOperationCancellationState\x122\x0A.NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED\x10\x00\x120\x0A,NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED\x10\x01\x122\x0A.NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF\x10\x02\x120\x0A,NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED\x10\x03\x12-\x0A)NEXUS_OPERATION_CANCELLATION_STATE_FAILED\x10\x04\x120\x0A,NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT\x10\x05B\x83\x01\x0A\x18io.temporal.api.enums.v1B\x0BCommonProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/EventType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/EventType.php new file mode 100644 index 0000000..438ce4b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/EventType.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xBB\x15\x0A&temporal/api/enums/v1/event_type.proto\x12\x15temporal.api.enums.v1*\xE8\x13\x0A\x09EventType\x12\x1A\x0A\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12)\x0A%EVENT_TYPE_WORKFLOW_EXECUTION_STARTED\x10\x01\x12+\x0A'EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED\x10\x02\x12(\x0A\$EVENT_TYPE_WORKFLOW_EXECUTION_FAILED\x10\x03\x12+\x0A'EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT\x10\x04\x12&\x0A\"EVENT_TYPE_WORKFLOW_TASK_SCHEDULED\x10\x05\x12\$\x0A EVENT_TYPE_WORKFLOW_TASK_STARTED\x10\x06\x12&\x0A\"EVENT_TYPE_WORKFLOW_TASK_COMPLETED\x10\x07\x12&\x0A\"EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT\x10\x08\x12#\x0A\x1FEVENT_TYPE_WORKFLOW_TASK_FAILED\x10\x09\x12&\x0A\"EVENT_TYPE_ACTIVITY_TASK_SCHEDULED\x10\x0A\x12\$\x0A EVENT_TYPE_ACTIVITY_TASK_STARTED\x10\x0B\x12&\x0A\"EVENT_TYPE_ACTIVITY_TASK_COMPLETED\x10\x0C\x12#\x0A\x1FEVENT_TYPE_ACTIVITY_TASK_FAILED\x10\x0D\x12&\x0A\"EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT\x10\x0E\x12-\x0A)EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED\x10\x0F\x12%\x0A!EVENT_TYPE_ACTIVITY_TASK_CANCELED\x10\x10\x12\x1C\x0A\x18EVENT_TYPE_TIMER_STARTED\x10\x11\x12\x1A\x0A\x16EVENT_TYPE_TIMER_FIRED\x10\x12\x12\x1D\x0A\x19EVENT_TYPE_TIMER_CANCELED\x10\x13\x122\x0A.EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED\x10\x14\x12*\x0A&EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED\x10\x15\x12C\x0A?EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\x10\x16\x12@\x0AinternalAddGeneratedFile( + "\x0A\xCE\x1E\x0A(temporal/api/enums/v1/failed_cause.proto\x12\x15temporal.api.enums.v1*\xEE\x11\x0A\x17WorkflowTaskFailedCause\x12*\x0A&WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED\x10\x00\x120\x0A,WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND\x10\x01\x12?\x0A;WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES\x10\x02\x12E\x0AAWORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES\x10\x03\x129\x0A5WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES\x10\x04\x12:\x0A6WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES\x10\x05\x12;\x0A7WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES\x10\x06\x12I\x0AEWORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES\x10\x07\x12E\x0AAWORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES\x10\x08\x12G\x0ACWORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES\x10\x09\x12X\x0ATWORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES\x10\x0A\x12=\x0A9WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES\x10\x0B\x127\x0A3WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID\x10\x0C\x126\x0A2WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE\x10\x0D\x12@\x0AinternalAddGeneratedFile( + "\x0A\xBF\x04\x0A%temporal/api/enums/v1/namespace.proto\x12\x15temporal.api.enums.v1*\x8E\x01\x0A\x0ENamespaceState\x12\x1F\x0A\x1BNAMESPACE_STATE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ANAMESPACE_STATE_REGISTERED\x10\x01\x12\x1E\x0A\x1ANAMESPACE_STATE_DEPRECATED\x10\x02\x12\x1B\x0A\x17NAMESPACE_STATE_DELETED\x10\x03*h\x0A\x0DArchivalState\x12\x1E\x0A\x1AARCHIVAL_STATE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17ARCHIVAL_STATE_DISABLED\x10\x01\x12\x1A\x0A\x16ARCHIVAL_STATE_ENABLED\x10\x02*s\x0A\x10ReplicationState\x12!\x0A\x1DREPLICATION_STATE_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18REPLICATION_STATE_NORMAL\x10\x01\x12\x1E\x0A\x1AREPLICATION_STATE_HANDOVER\x10\x02B\x86\x01\x0A\x18io.temporal.api.enums.v1B\x0ENamespaceProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Query.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Query.php new file mode 100644 index 0000000..ae460e1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Query.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xF4\x03\x0A!temporal/api/enums/v1/query.proto\x12\x15temporal.api.enums.v1*r\x0A\x0FQueryResultType\x12!\x0A\x1DQUERY_RESULT_TYPE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1AQUERY_RESULT_TYPE_ANSWERED\x10\x01\x12\x1C\x0A\x18QUERY_RESULT_TYPE_FAILED\x10\x02*\xB6\x01\x0A\x14QueryRejectCondition\x12&\x0A\"QUERY_REJECT_CONDITION_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BQUERY_REJECT_CONDITION_NONE\x10\x01\x12#\x0A\x1FQUERY_REJECT_CONDITION_NOT_OPEN\x10\x02\x120\x0A,QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY\x10\x03B\x82\x01\x0A\x18io.temporal.api.enums.v1B\x0AQueryProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Reset.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Reset.php new file mode 100644 index 0000000..11dca06 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Reset.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xE7\x04\x0A!temporal/api/enums/v1/reset.proto\x12\x15temporal.api.enums.v1*\x93\x01\x0A\x17ResetReapplyExcludeType\x12*\x0A&RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED\x10\x00\x12%\x0A!RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL\x10\x01\x12%\x0A!RESET_REAPPLY_EXCLUDE_TYPE_UPDATE\x10\x02*\x97\x01\x0A\x10ResetReapplyType\x12\"\x0A\x1ERESET_REAPPLY_TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19RESET_REAPPLY_TYPE_SIGNAL\x10\x01\x12\x1B\x0A\x17RESET_REAPPLY_TYPE_NONE\x10\x02\x12#\x0A\x1FRESET_REAPPLY_TYPE_ALL_ELIGIBLE\x10\x03*n\x0A\x09ResetType\x12\x1A\x0A\x16RESET_TYPE_UNSPECIFIED\x10\x00\x12\"\x0A\x1ERESET_TYPE_FIRST_WORKFLOW_TASK\x10\x01\x12!\x0A\x1DRESET_TYPE_LAST_WORKFLOW_TASK\x10\x02B\x82\x01\x0A\x18io.temporal.api.enums.v1B\x0AResetProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Schedule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Schedule.php new file mode 100644 index 0000000..a51e5d0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Schedule.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\x80\x04\x0A\$temporal/api/enums/v1/schedule.proto\x12\x15temporal.api.enums.v1*\xB0\x02\x0A\x15ScheduleOverlapPolicy\x12'\x0A#SCHEDULE_OVERLAP_POLICY_UNSPECIFIED\x10\x00\x12 \x0A\x1CSCHEDULE_OVERLAP_POLICY_SKIP\x10\x01\x12&\x0A\"SCHEDULE_OVERLAP_POLICY_BUFFER_ONE\x10\x02\x12&\x0A\"SCHEDULE_OVERLAP_POLICY_BUFFER_ALL\x10\x03\x12(\x0A\$SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER\x10\x04\x12+\x0A'SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER\x10\x05\x12%\x0A!SCHEDULE_OVERLAP_POLICY_ALLOW_ALL\x10\x06B\x85\x01\x0A\x18io.temporal.api.enums.v1B\x0DScheduleProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/TaskQueue.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/TaskQueue.php new file mode 100644 index 0000000..2447443 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/TaskQueue.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xD7\x07\x0A&temporal/api/enums/v1/task_queue.proto\x12\x15temporal.api.enums.v1*h\x0A\x0DTaskQueueKind\x12\x1F\x0A\x1BTASK_QUEUE_KIND_UNSPECIFIED\x10\x00\x12\x1A\x0A\x16TASK_QUEUE_KIND_NORMAL\x10\x01\x12\x1A\x0A\x16TASK_QUEUE_KIND_STICKY\x10\x02*\x87\x01\x0A\x0DTaskQueueType\x12\x1F\x0A\x1BTASK_QUEUE_TYPE_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18TASK_QUEUE_TYPE_WORKFLOW\x10\x01\x12\x1C\x0A\x18TASK_QUEUE_TYPE_ACTIVITY\x10\x02\x12\x19\x0A\x15TASK_QUEUE_TYPE_NEXUS\x10\x03*\xD2\x01\x0A\x10TaskReachability\x12!\x0A\x1DTASK_REACHABILITY_UNSPECIFIED\x10\x00\x12#\x0A\x1FTASK_REACHABILITY_NEW_WORKFLOWS\x10\x01\x12(\x0A\$TASK_REACHABILITY_EXISTING_WORKFLOWS\x10\x02\x12\$\x0A TASK_REACHABILITY_OPEN_WORKFLOWS\x10\x03\x12&\x0A\"TASK_REACHABILITY_CLOSED_WORKFLOWS\x10\x04*\xD1\x01\x0A\x17BuildIdTaskReachability\x12*\x0A&BUILD_ID_TASK_REACHABILITY_UNSPECIFIED\x10\x00\x12(\x0A\$BUILD_ID_TASK_REACHABILITY_REACHABLE\x10\x01\x124\x0A0BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY\x10\x02\x12*\x0A&BUILD_ID_TASK_REACHABILITY_UNREACHABLE\x10\x03*h\x0A\x15DescribeTaskQueueMode\x12(\x0A\$DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED\x10\x00\x12%\x0A!DESCRIBE_TASK_QUEUE_MODE_ENHANCED\x10\x01B\x86\x01\x0A\x18io.temporal.api.enums.v1B\x0ETaskQueueProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Update.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Update.php new file mode 100644 index 0000000..69a1565 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Update.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xCC\x04\x0A\"temporal/api/enums/v1/update.proto\x12\x15temporal.api.enums.v1*\x8B\x02\x0A%UpdateWorkflowExecutionLifecycleStage\x129\x0A5UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED\x10\x00\x126\x0A2UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED\x10\x01\x126\x0A2UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED\x10\x02\x127\x0A3UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED\x10\x03*s\x0A\x19UpdateAdmittedEventOrigin\x12,\x0A(UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED\x10\x00\x12(\x0A\$UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY\x10\x01B\x83\x01\x0A\x18io.temporal.api.enums.v1B\x0BUpdateProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Workflow.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Workflow.php new file mode 100644 index 0000000..e71b296 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Enums/V1/Workflow.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xC1\x12\x0A\$temporal/api/enums/v1/workflow.proto\x12\x15temporal.api.enums.v1*\x8B\x02\x0A\x15WorkflowIdReusePolicy\x12(\x0A\$WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED\x10\x00\x12,\x0A(WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE\x10\x01\x128\x0A4WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY\x10\x02\x12-\x0A)WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE\x10\x03\x121\x0A-WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING\x10\x04*\xCF\x01\x0A\x18WorkflowIdConflictPolicy\x12+\x0A'WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED\x10\x00\x12\$\x0A WORKFLOW_ID_CONFLICT_POLICY_FAIL\x10\x01\x12,\x0A(WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING\x10\x02\x122\x0A.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING\x10\x03*\xA4\x01\x0A\x11ParentClosePolicy\x12#\x0A\x1FPARENT_CLOSE_POLICY_UNSPECIFIED\x10\x00\x12!\x0A\x1DPARENT_CLOSE_POLICY_TERMINATE\x10\x01\x12\x1F\x0A\x1BPARENT_CLOSE_POLICY_ABANDON\x10\x02\x12&\x0A\"PARENT_CLOSE_POLICY_REQUEST_CANCEL\x10\x03*\xBD\x01\x0A\x16ContinueAsNewInitiator\x12)\x0A%CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED\x10\x00\x12&\x0A\"CONTINUE_AS_NEW_INITIATOR_WORKFLOW\x10\x01\x12#\x0A\x1FCONTINUE_AS_NEW_INITIATOR_RETRY\x10\x02\x12+\x0A'CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE\x10\x03*\xE5\x02\x0A\x17WorkflowExecutionStatus\x12)\x0A%WORKFLOW_EXECUTION_STATUS_UNSPECIFIED\x10\x00\x12%\x0A!WORKFLOW_EXECUTION_STATUS_RUNNING\x10\x01\x12'\x0A#WORKFLOW_EXECUTION_STATUS_COMPLETED\x10\x02\x12\$\x0A WORKFLOW_EXECUTION_STATUS_FAILED\x10\x03\x12&\x0A\"WORKFLOW_EXECUTION_STATUS_CANCELED\x10\x04\x12(\x0A\$WORKFLOW_EXECUTION_STATUS_TERMINATED\x10\x05\x12.\x0A*WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW\x10\x06\x12'\x0A#WORKFLOW_EXECUTION_STATUS_TIMED_OUT\x10\x07*\xB5\x01\x0A\x14PendingActivityState\x12&\x0A\"PENDING_ACTIVITY_STATE_UNSPECIFIED\x10\x00\x12\$\x0A PENDING_ACTIVITY_STATE_SCHEDULED\x10\x01\x12\"\x0A\x1EPENDING_ACTIVITY_STATE_STARTED\x10\x02\x12+\x0A'PENDING_ACTIVITY_STATE_CANCEL_REQUESTED\x10\x03*\x9B\x01\x0A\x18PendingWorkflowTaskState\x12+\x0A'PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED\x10\x00\x12)\x0A%PENDING_WORKFLOW_TASK_STATE_SCHEDULED\x10\x01\x12'\x0A#PENDING_WORKFLOW_TASK_STATE_STARTED\x10\x02*\x97\x01\x0A\x16HistoryEventFilterType\x12)\x0A%HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED\x10\x00\x12'\x0A#HISTORY_EVENT_FILTER_TYPE_ALL_EVENT\x10\x01\x12)\x0A%HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT\x10\x02*\x9F\x02\x0A\x0ARetryState\x12\x1B\x0A\x17RETRY_STATE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17RETRY_STATE_IN_PROGRESS\x10\x01\x12%\x0A!RETRY_STATE_NON_RETRYABLE_FAILURE\x10\x02\x12\x17\x0A\x13RETRY_STATE_TIMEOUT\x10\x03\x12(\x0A\$RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED\x10\x04\x12\$\x0A RETRY_STATE_RETRY_POLICY_NOT_SET\x10\x05\x12%\x0A!RETRY_STATE_INTERNAL_SERVER_ERROR\x10\x06\x12 \x0A\x1CRETRY_STATE_CANCEL_REQUESTED\x10\x07*\xB0\x01\x0A\x0BTimeoutType\x12\x1C\x0A\x18TIMEOUT_TYPE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BTIMEOUT_TYPE_START_TO_CLOSE\x10\x01\x12\"\x0A\x1ETIMEOUT_TYPE_SCHEDULE_TO_START\x10\x02\x12\"\x0A\x1ETIMEOUT_TYPE_SCHEDULE_TO_CLOSE\x10\x03\x12\x1A\x0A\x16TIMEOUT_TYPE_HEARTBEAT\x10\x04B\x85\x01\x0A\x18io.temporal.api.enums.v1B\x0DWorkflowProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xAA\x02\x17Temporalio.Api.Enums.V1\xEA\x02\x1ATemporalio::Api::Enums::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Errordetails/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Errordetails/V1/Message.php new file mode 100644 index 0000000..c451502 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Errordetails/V1/Message.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xDD\x0D\x0A*temporal/api/errordetails/v1/message.proto\x12\x1Ctemporal.api.errordetails.v1\x1A\$temporal/api/common/v1/message.proto\x1A(temporal/api/enums/v1/failed_cause.proto\x1A%temporal/api/enums/v1/namespace.proto\"B\x0A\x0FNotFoundFailure\x12\x17\x0A\x0Fcurrent_cluster\x18\x01 \x01(\x09\x12\x16\x0A\x0Eactive_cluster\x18\x02 \x01(\x09\"R\x0A&WorkflowExecutionAlreadyStartedFailure\x12\x18\x0A\x10start_request_id\x18\x01 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x02 \x01(\x09\"_\x0A\x19NamespaceNotActiveFailure\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x17\x0A\x0Fcurrent_cluster\x18\x02 \x01(\x09\x12\x16\x0A\x0Eactive_cluster\x18\x03 \x01(\x09\"\xA6\x01\x0A\x1CNamespaceInvalidStateFailure\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x124\x0A\x05state\x18\x02 \x01(\x0E2%.temporal.api.enums.v1.NamespaceState\x12=\x0A\x0Eallowed_states\x18\x03 \x03(\x0E2%.temporal.api.enums.v1.NamespaceState\"-\x0A\x18NamespaceNotFoundFailure\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\"\x1F\x0A\x1DNamespaceAlreadyExistsFailure\"k\x0A ClientVersionNotSupportedFailure\x12\x16\x0A\x0Eclient_version\x18\x01 \x01(\x09\x12\x13\x0A\x0Bclient_name\x18\x02 \x01(\x09\x12\x1A\x0A\x12supported_versions\x18\x03 \x01(\x09\"d\x0A ServerVersionNotSupportedFailure\x12\x16\x0A\x0Eserver_version\x18\x01 \x01(\x09\x12(\x0A client_supported_server_versions\x18\x02 \x01(\x09\"%\x0A#CancellationAlreadyRequestedFailure\"\x14\x0A\x12QueryFailedFailure\")\x0A\x17PermissionDeniedFailure\x12\x0E\x0A\x06reason\x18\x01 \x01(\x09\"\x96\x01\x0A\x18ResourceExhaustedFailure\x12<\x0A\x05cause\x18\x01 \x01(\x0E2-.temporal.api.enums.v1.ResourceExhaustedCause\x12<\x0A\x05scope\x18\x02 \x01(\x0E2-.temporal.api.enums.v1.ResourceExhaustedScope\"v\x0A\x15SystemWorkflowFailure\x12E\x0A\x12workflow_execution\x18\x01 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x16\x0A\x0Eworkflow_error\x18\x02 \x01(\x09\"\x19\x0A\x17WorkflowNotReadyFailure\"3\x0A\x17NewerBuildExistsFailure\x12\x18\x0A\x10default_build_id\x18\x01 \x01(\x09\"\xD9\x01\x0A\x1EMultiOperationExecutionFailure\x12^\x0A\x08statuses\x18\x01 \x03(\x0B2L.temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus\x1AW\x0A\x0FOperationStatus\x12\x0C\x0A\x04code\x18\x01 \x01(\x05\x12\x0F\x0A\x07message\x18\x02 \x01(\x09\x12%\x0A\x07details\x18\x03 \x03(\x0B2\x14.google.protobuf.AnyB\xA7\x01\x0A\x1Fio.temporal.api.errordetails.v1B\x0CMessageProtoP\x01Z/go.temporal.io/api/errordetails/v1;errordetails\xAA\x02\x1ETemporalio.Api.ErrorDetails.V1\xEA\x02!Temporalio::Api::ErrorDetails::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Export/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Export/V1/Message.php new file mode 100644 index 0000000..e1649d1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Export/V1/Message.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xEA\x02\x0A\$temporal/api/export/v1/message.proto\x12\x16temporal.api.export.v1\"F\x0A\x11WorkflowExecution\x121\x0A\x07history\x18\x01 \x01(\x0B2 .temporal.api.history.v1.History\"N\x0A\x12WorkflowExecutions\x128\x0A\x05items\x18\x01 \x03(\x0B2).temporal.api.export.v1.WorkflowExecutionB\x89\x01\x0A\x19io.temporal.api.export.v1B\x0CMessageProtoP\x01Z#go.temporal.io/api/export/v1;export\xAA\x02\x18Temporalio.Api.Export.V1\xEA\x02\x1BTemporalio::Api::Export::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Failure/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Failure/V1/Message.php new file mode 100644 index 0000000..44680f8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Failure/V1/Message.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xCF\x13\x0A%temporal/api/failure/v1/message.proto\x12\x17temporal.api.failure.v1\x1A\$temporal/api/enums/v1/workflow.proto\x1A\x1Egoogle/protobuf/duration.proto\"\xA5\x01\x0A\x16ApplicationFailureInfo\x12\x0C\x0A\x04type\x18\x01 \x01(\x09\x12\x15\x0A\x0Dnon_retryable\x18\x02 \x01(\x08\x121\x0A\x07details\x18\x03 \x01(\x0B2 .temporal.api.common.v1.Payloads\x123\x0A\x10next_retry_delay\x18\x04 \x01(\x0B2\x19.google.protobuf.Duration\"\x90\x01\x0A\x12TimeoutFailureInfo\x128\x0A\x0Ctimeout_type\x18\x01 \x01(\x0E2\".temporal.api.enums.v1.TimeoutType\x12@\x0A\x16last_heartbeat_details\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\"H\x0A\x13CanceledFailureInfo\x121\x0A\x07details\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\"\x17\x0A\x15TerminatedFailureInfo\"*\x0A\x11ServerFailureInfo\x12\x15\x0A\x0Dnon_retryable\x18\x01 \x01(\x08\"\\\x0A\x18ResetWorkflowFailureInfo\x12@\x0A\x16last_heartbeat_details\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\"\xE7\x01\x0A\x13ActivityFailureInfo\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x02 \x01(\x03\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12;\x0A\x0Dactivity_type\x18\x04 \x01(\x0B2\$.temporal.api.common.v1.ActivityType\x12\x13\x0A\x0Bactivity_id\x18\x05 \x01(\x09\x126\x0A\x0Bretry_state\x18\x06 \x01(\x0E2!.temporal.api.enums.v1.RetryState\"\xA8\x02\x0A!ChildWorkflowExecutionFailureInfo\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x1A\x0A\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x05 \x01(\x03\x126\x0A\x0Bretry_state\x18\x06 \x01(\x0E2!.temporal.api.enums.v1.RetryState\"\x83\x01\x0A\x19NexusOperationFailureInfo\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\x0A\x08endpoint\x18\x02 \x01(\x09\x12\x0F\x0A\x07service\x18\x03 \x01(\x09\x12\x11\x0A\x09operation\x18\x04 \x01(\x09\x12\x14\x0A\x0Coperation_id\x18\x05 \x01(\x09\"\xC8\x07\x0A\x07Failure\x12\x0F\x0A\x07message\x18\x01 \x01(\x09\x12\x0E\x0A\x06source\x18\x02 \x01(\x09\x12\x13\x0A\x0Bstack_trace\x18\x03 \x01(\x09\x12;\x0A\x12encoded_attributes\x18\x14 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\x12/\x0A\x05cause\x18\x04 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12S\x0A\x18application_failure_info\x18\x05 \x01(\x0B2/.temporal.api.failure.v1.ApplicationFailureInfoH\x00\x12K\x0A\x14timeout_failure_info\x18\x06 \x01(\x0B2+.temporal.api.failure.v1.TimeoutFailureInfoH\x00\x12M\x0A\x15canceled_failure_info\x18\x07 \x01(\x0B2,.temporal.api.failure.v1.CanceledFailureInfoH\x00\x12Q\x0A\x17terminated_failure_info\x18\x08 \x01(\x0B2..temporal.api.failure.v1.TerminatedFailureInfoH\x00\x12I\x0A\x13server_failure_info\x18\x09 \x01(\x0B2*.temporal.api.failure.v1.ServerFailureInfoH\x00\x12X\x0A\x1Breset_workflow_failure_info\x18\x0A \x01(\x0B21.temporal.api.failure.v1.ResetWorkflowFailureInfoH\x00\x12M\x0A\x15activity_failure_info\x18\x0B \x01(\x0B2,.temporal.api.failure.v1.ActivityFailureInfoH\x00\x12k\x0A%child_workflow_execution_failure_info\x18\x0C \x01(\x0B2:.temporal.api.failure.v1.ChildWorkflowExecutionFailureInfoH\x00\x12d\x0A&nexus_operation_execution_failure_info\x18\x0D \x01(\x0B22.temporal.api.failure.v1.NexusOperationFailureInfoH\x00B\x0E\x0A\x0Cfailure_info\" \x0A\x1EMultiOperationExecutionAbortedB\x8E\x01\x0A\x1Aio.temporal.api.failure.v1B\x0CMessageProtoP\x01Z%go.temporal.io/api/failure/v1;failure\xAA\x02\x19Temporalio.Api.Failure.V1\xEA\x02\x1CTemporalio::Api::Failure::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Filter/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Filter/V1/Message.php new file mode 100644 index 0000000..534c7d9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Filter/V1/Message.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA3\x04\x0A\$temporal/api/filter/v1/message.proto\x12\x16temporal.api.filter.v1\x1A\$temporal/api/enums/v1/workflow.proto\">\x0A\x17WorkflowExecutionFilter\x12\x13\x0A\x0Bworkflow_id\x18\x01 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x02 \x01(\x09\"\"\x0A\x12WorkflowTypeFilter\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"u\x0A\x0FStartTimeFilter\x121\x0A\x0Dearliest_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Blatest_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"N\x0A\x0CStatusFilter\x12>\x0A\x06status\x18\x01 \x01(\x0E2..temporal.api.enums.v1.WorkflowExecutionStatusB\x89\x01\x0A\x19io.temporal.api.filter.v1B\x0CMessageProtoP\x01Z#go.temporal.io/api/filter/v1;filter\xAA\x02\x18Temporalio.Api.Filter.V1\xEA\x02\x1BTemporalio::Api::Filter::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/History/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/History/V1/Message.php new file mode 100644 index 0000000..f25f6f9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/History/V1/Message.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + "\x0A\xD6\xB7\x01\x0A%temporal/api/history/v1/message.proto\x12\x17temporal.api.history.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A&temporal/api/enums/v1/event_type.proto\x1A(temporal/api/enums/v1/failed_cause.proto\x1A\"temporal/api/enums/v1/update.proto\x1A\$temporal/api/enums/v1/workflow.proto\x1A\$temporal/api/common/v1/message.proto\x1A%temporal/api/failure/v1/message.proto\x1A'temporal/api/taskqueue/v1/message.proto\x1A\$temporal/api/update/v1/message.proto\x1A&temporal/api/workflow/v1/message.proto\x1A0temporal/api/sdk/v1/task_complete_metadata.proto\x1A'temporal/api/sdk/v1/user_metadata.proto\"\xF9\x0C\x0A'WorkflowExecutionStartedEventAttributes\x12;\x0A\x0Dworkflow_type\x18\x01 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12!\x0A\x19parent_workflow_namespace\x18\x02 \x01(\x09\x12\$\x0A\x1Cparent_workflow_namespace_id\x18\x1B \x01(\x09\x12L\x0A\x19parent_workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12!\x0A\x19parent_initiated_event_id\x18\x04 \x01(\x03\x128\x0A\x0Atask_queue\x18\x05 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x06 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12=\x0A\x1Aworkflow_execution_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x14workflow_run_timeout\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x09 \x01(\x0B2\x19.google.protobuf.Duration\x12\"\x0A\x1Acontinued_execution_run_id\x18\x0A \x01(\x09\x12@\x0A\x09initiator\x18\x0B \x01(\x0E2-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\x0A\x11continued_failure\x18\x0C \x01(\x0B2 .temporal.api.failure.v1.Failure\x12@\x0A\x16last_completion_result\x18\x0D \x01(\x0B2 .temporal.api.common.v1.Payloads\x12!\x0A\x19original_execution_run_id\x18\x0E \x01(\x09\x12\x10\x0A\x08identity\x18\x0F \x01(\x09\x12\x1E\x0A\x16first_execution_run_id\x18\x10 \x01(\x09\x129\x0A\x0Cretry_policy\x18\x11 \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x0F\x0A\x07attempt\x18\x12 \x01(\x05\x12F\x0A\"workflow_execution_expiration_time\x18\x13 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x15\x0A\x0Dcron_schedule\x18\x14 \x01(\x09\x12>\x0A\x1Bfirst_workflow_task_backoff\x18\x15 \x01(\x0B2\x19.google.protobuf.Duration\x12*\x0A\x04memo\x18\x16 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x17 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12E\x0A\x16prev_auto_reset_points\x18\x18 \x01(\x0B2%.temporal.api.workflow.v1.ResetPoints\x12.\x0A\x06header\x18\x19 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12&\x0A\x1Eparent_initiated_event_version\x18\x1A \x01(\x03\x12\x13\x0A\x0Bworkflow_id\x18\x1C \x01(\x09\x12H\x0A\x14source_version_stamp\x18\x1D \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\x12>\x0A\x14completion_callbacks\x18\x1E \x03(\x0B2 .temporal.api.common.v1.Callback\x12J\x0A\x17root_workflow_execution\x18\x1F \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x1A\x0A\x12inherited_build_id\x18 \x01(\x09\"\xA5\x01\x0A)WorkflowExecutionCompletedEventAttributes\x120\x0A\x06result\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12(\x0A workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x1C\x0A\x14new_execution_run_id\x18\x03 \x01(\x09\"\xDB\x01\x0A&WorkflowExecutionFailedEventAttributes\x121\x0A\x07failure\x18\x01 \x01(\x0B2 .temporal.api.failure.v1.Failure\x126\x0A\x0Bretry_state\x18\x02 \x01(\x0E2!.temporal.api.enums.v1.RetryState\x12(\x0A workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x1C\x0A\x14new_execution_run_id\x18\x04 \x01(\x09\"\x80\x01\x0A(WorkflowExecutionTimedOutEventAttributes\x126\x0A\x0Bretry_state\x18\x01 \x01(\x0E2!.temporal.api.enums.v1.RetryState\x12\x1C\x0A\x14new_execution_run_id\x18\x02 \x01(\x09\"\xC0\x06\x0A.WorkflowExecutionContinuedAsNewEventAttributes\x12\x1C\x0A\x14new_execution_run_id\x18\x01 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x128\x0A\x0Atask_queue\x18\x03 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x04 \x01(\x0B2 .temporal.api.common.v1.Payloads\x127\x0A\x14workflow_run_timeout\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x12(\x0A workflow_task_completed_event_id\x18\x07 \x01(\x03\x129\x0A\x16backoff_start_interval\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x12@\x0A\x09initiator\x18\x09 \x01(\x0E2-.temporal.api.enums.v1.ContinueAsNewInitiator\x121\x0A\x07failure\x18\x0A \x01(\x0B2 .temporal.api.failure.v1.Failure\x12@\x0A\x16last_completion_result\x18\x0B \x01(\x0B2 .temporal.api.common.v1.Payloads\x12.\x0A\x06header\x18\x0C \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12*\x0A\x04memo\x18\x0D \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x0E \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12\x18\x0A\x10inherit_build_id\x18\x0F \x01(\x08\"\xAC\x01\x0A\$WorkflowTaskScheduledEventAttributes\x128\x0A\x0Atask_queue\x18\x01 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x129\x0A\x16start_to_close_timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x12\x0F\x0A\x07attempt\x18\x03 \x01(\x05\"\x8A\x02\x0A\"WorkflowTaskStartedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x03 \x01(\x09\x12\x1F\x0A\x17suggest_continue_as_new\x18\x04 \x01(\x08\x12\x1A\x0A\x12history_size_bytes\x18\x05 \x01(\x03\x12B\x0A\x0Eworker_version\x18\x06 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\x12!\x0A\x19build_id_redirect_counter\x18\x07 \x01(\x03\"\xDA\x02\x0A\$WorkflowTaskCompletedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x02 \x01(\x03\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12\x17\x0A\x0Fbinary_checksum\x18\x04 \x01(\x09\x12B\x0A\x0Eworker_version\x18\x05 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\x12H\x0A\x0Csdk_metadata\x18\x06 \x01(\x0B22.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12C\x0A\x11metering_metadata\x18\x0D \x01(\x0B2(.temporal.api.common.v1.MeteringMetadata\"\x95\x01\x0A#WorkflowTaskTimedOutEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x02 \x01(\x03\x128\x0A\x0Ctimeout_type\x18\x03 \x01(\x0E2\".temporal.api.enums.v1.TimeoutType\"\xFF\x02\x0A!WorkflowTaskFailedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x02 \x01(\x03\x12=\x0A\x05cause\x18\x03 \x01(\x0E2..temporal.api.enums.v1.WorkflowTaskFailedCause\x121\x0A\x07failure\x18\x04 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x10\x0A\x08identity\x18\x05 \x01(\x09\x12\x13\x0A\x0Bbase_run_id\x18\x06 \x01(\x09\x12\x12\x0A\x0Anew_run_id\x18\x07 \x01(\x09\x12\x1A\x0A\x12fork_event_version\x18\x08 \x01(\x03\x12\x17\x0A\x0Fbinary_checksum\x18\x09 \x01(\x09\x12B\x0A\x0Eworker_version\x18\x0A \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"\x8A\x05\x0A\$ActivityTaskScheduledEventAttributes\x12\x13\x0A\x0Bactivity_id\x18\x01 \x01(\x09\x12;\x0A\x0Dactivity_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.ActivityType\x128\x0A\x0Atask_queue\x18\x04 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12.\x0A\x06header\x18\x05 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12/\x0A\x05input\x18\x06 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12<\x0A\x19schedule_to_close_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x12<\x0A\x19schedule_to_start_timeout\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x129\x0A\x16start_to_close_timeout\x18\x09 \x01(\x0B2\x19.google.protobuf.Duration\x124\x0A\x11heartbeat_timeout\x18\x0A \x01(\x0B2\x19.google.protobuf.Duration\x12(\x0A workflow_task_completed_event_id\x18\x0B \x01(\x03\x129\x0A\x0Cretry_policy\x18\x0C \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x1D\x0A\x15use_workflow_build_id\x18\x0D \x01(\x08J\x04\x08\x03\x10\x04\"\x96\x02\x0A\"ActivityTaskStartedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x03 \x01(\x09\x12\x0F\x0A\x07attempt\x18\x04 \x01(\x05\x126\x0A\x0Clast_failure\x18\x05 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12B\x0A\x0Eworker_version\x18\x06 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\x12!\x0A\x19build_id_redirect_counter\x18\x07 \x01(\x03\"\xE4\x01\x0A\$ActivityTaskCompletedEventAttributes\x120\x0A\x06result\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x1A\x0A\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x03 \x01(\x03\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\x12B\x0A\x0Eworker_version\x18\x05 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"\x9A\x02\x0A!ActivityTaskFailedEventAttributes\x121\x0A\x07failure\x18\x01 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x1A\x0A\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x03 \x01(\x03\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\x126\x0A\x0Bretry_state\x18\x05 \x01(\x0E2!.temporal.api.enums.v1.RetryState\x12B\x0A\x0Eworker_version\x18\x06 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"\xC6\x01\x0A#ActivityTaskTimedOutEventAttributes\x121\x0A\x07failure\x18\x01 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x1A\x0A\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x03 \x01(\x03\x126\x0A\x0Bretry_state\x18\x04 \x01(\x0E2!.temporal.api.enums.v1.RetryState\"r\x0A*ActivityTaskCancelRequestedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12(\x0A workflow_task_completed_event_id\x18\x02 \x01(\x03\"\x8E\x02\x0A#ActivityTaskCanceledEventAttributes\x121\x0A\x07details\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12(\x0A latest_cancel_requested_event_id\x18\x02 \x01(\x03\x12\x1A\x0A\x12scheduled_event_id\x18\x03 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x04 \x01(\x03\x12\x10\x0A\x08identity\x18\x05 \x01(\x09\x12B\x0A\x0Eworker_version\x18\x06 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"\x93\x01\x0A\x1BTimerStartedEventAttributes\x12\x10\x0A\x08timer_id\x18\x01 \x01(\x09\x128\x0A\x15start_to_fire_timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x12(\x0A workflow_task_completed_event_id\x18\x03 \x01(\x03\"G\x0A\x19TimerFiredEventAttributes\x12\x10\x0A\x08timer_id\x18\x01 \x01(\x09\x12\x18\x0A\x10started_event_id\x18\x02 \x01(\x03\"\x86\x01\x0A\x1CTimerCanceledEventAttributes\x12\x10\x0A\x08timer_id\x18\x01 \x01(\x09\x12\x18\x0A\x10started_event_id\x18\x02 \x01(\x03\x12(\x0A workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\"\xC7\x01\x0A/WorkflowExecutionCancelRequestedEventAttributes\x12\x0D\x0A\x05cause\x18\x01 \x01(\x09\x12#\x0A\x1Bexternal_initiated_event_id\x18\x02 \x01(\x03\x12N\x0A\x1Bexternal_workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\"\x87\x01\x0A(WorkflowExecutionCanceledEventAttributes\x12(\x0A workflow_task_completed_event_id\x18\x01 \x01(\x03\x121\x0A\x07details\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\"\xE9\x02\x0A\x1DMarkerRecordedEventAttributes\x12\x13\x0A\x0Bmarker_name\x18\x01 \x01(\x09\x12T\x0A\x07details\x18\x02 \x03(\x0B2C.temporal.api.history.v1.MarkerRecordedEventAttributes.DetailsEntry\x12(\x0A workflow_task_completed_event_id\x18\x03 \x01(\x03\x12.\x0A\x06header\x18\x04 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x121\x0A\x07failure\x18\x05 \x01(\x0B2 .temporal.api.failure.v1.Failure\x1AP\x0A\x0CDetailsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12/\x0A\x05value\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads:\x028\x01\"\xA7\x02\x0A(WorkflowExecutionSignaledEventAttributes\x12\x13\x0A\x0Bsignal_name\x18\x01 \x01(\x09\x12/\x0A\x05input\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12.\x0A\x06header\x18\x04 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12#\x0A\x1Bskip_generate_workflow_task\x18\x05 \x01(\x08\x12N\x0A\x1Bexternal_workflow_execution\x18\x06 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\"\x81\x01\x0A*WorkflowExecutionTerminatedEventAttributes\x12\x0E\x0A\x06reason\x18\x01 \x01(\x09\x121\x0A\x07details\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\"\x98\x02\x0A>RequestCancelExternalWorkflowExecutionInitiatedEventAttributes\x12(\x0A workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x07 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x0F\x0A\x07control\x18\x04 \x01(\x09\x12\x1B\x0A\x13child_workflow_only\x18\x05 \x01(\x08\x12\x0E\x0A\x06reason\x18\x06 \x01(\x09\"\xD6\x02\x0A;RequestCancelExternalWorkflowExecutionFailedEventAttributes\x12P\x0A\x05cause\x18\x01 \x01(\x0E2A.temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause\x12(\x0A workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\x0A\x09namespace\x18\x03 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x07 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x04 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x1A\x0A\x12initiated_event_id\x18\x05 \x01(\x03\x12\x0F\x0A\x07control\x18\x06 \x01(\x09\"\xC5\x01\x0A7ExternalWorkflowExecutionCancelRequestedEventAttributes\x12\x1A\x0A\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x04 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\"\xF7\x02\x0A7SignalExternalWorkflowExecutionInitiatedEventAttributes\x12(\x0A workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x09 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x13\x0A\x0Bsignal_name\x18\x04 \x01(\x09\x12/\x0A\x05input\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x0F\x0A\x07control\x18\x06 \x01(\x09\x12\x1B\x0A\x13child_workflow_only\x18\x07 \x01(\x08\x12.\x0A\x06header\x18\x08 \x01(\x0B2\x1E.temporal.api.common.v1.Header\"\xCF\x02\x0A4SignalExternalWorkflowExecutionFailedEventAttributes\x12P\x0A\x05cause\x18\x01 \x01(\x0E2A.temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause\x12(\x0A workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\x0A\x09namespace\x18\x03 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x07 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x04 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x1A\x0A\x12initiated_event_id\x18\x05 \x01(\x03\x12\x0F\x0A\x07control\x18\x06 \x01(\x09\"\xCF\x01\x0A0ExternalWorkflowExecutionSignaledEventAttributes\x12\x1A\x0A\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x05 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x0F\x0A\x07control\x18\x04 \x01(\x09\"\x9E\x01\x0A-UpsertWorkflowSearchAttributesEventAttributes\x12(\x0A workflow_task_completed_event_id\x18\x01 \x01(\x03\x12C\x0A\x11search_attributes\x18\x02 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\"\x8A\x01\x0A)WorkflowPropertiesModifiedEventAttributes\x12(\x0A workflow_task_completed_event_id\x18\x01 \x01(\x03\x123\x0A\x0Dupserted_memo\x18\x02 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\"\xAC\x07\x0A3StartChildWorkflowExecutionInitiatedEventAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x12 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x128\x0A\x0Atask_queue\x18\x04 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12=\x0A\x1Aworkflow_execution_timeout\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x14workflow_run_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x12E\x0A\x13parent_close_policy\x18\x09 \x01(\x0E2(.temporal.api.enums.v1.ParentClosePolicy\x12\x0F\x0A\x07control\x18\x0A \x01(\x09\x12(\x0A workflow_task_completed_event_id\x18\x0B \x01(\x03\x12N\x0A\x18workflow_id_reuse_policy\x18\x0C \x01(\x0E2,.temporal.api.enums.v1.WorkflowIdReusePolicy\x129\x0A\x0Cretry_policy\x18\x0D \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x15\x0A\x0Dcron_schedule\x18\x0E \x01(\x09\x12.\x0A\x06header\x18\x0F \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12*\x0A\x04memo\x18\x10 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x11 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12\x18\x0A\x10inherit_build_id\x18\x13 \x01(\x08\"\xD2\x02\x0A0StartChildWorkflowExecutionFailedEventAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x08 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12L\x0A\x05cause\x18\x04 \x01(\x0E2=.temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause\x12\x0F\x0A\x07control\x18\x05 \x01(\x09\x12\x1A\x0A\x12initiated_event_id\x18\x06 \x01(\x03\x12(\x0A workflow_task_completed_event_id\x18\x07 \x01(\x03\"\xA7\x02\x0A,ChildWorkflowExecutionStartedEventAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x06 \x01(\x09\x12\x1A\x0A\x12initiated_event_id\x18\x02 \x01(\x03\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x04 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12.\x0A\x06header\x18\x05 \x01(\x0B2\x1E.temporal.api.common.v1.Header\"\xC5\x02\x0A.ChildWorkflowExecutionCompletedEventAttributes\x120\x0A\x06result\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x07 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x04 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x1A\x0A\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x06 \x01(\x03\"\xFB\x02\x0A+ChildWorkflowExecutionFailedEventAttributes\x121\x0A\x07failure\x18\x01 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x08 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x04 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x1A\x0A\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x06 \x01(\x03\x126\x0A\x0Bretry_state\x18\x07 \x01(\x0E2!.temporal.api.enums.v1.RetryState\"\xC5\x02\x0A-ChildWorkflowExecutionCanceledEventAttributes\x121\x0A\x07details\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x07 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x03 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x04 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x1A\x0A\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x06 \x01(\x03\"\xCA\x02\x0A-ChildWorkflowExecutionTimedOutEventAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x07 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x1A\x0A\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x05 \x01(\x03\x126\x0A\x0Bretry_state\x18\x06 \x01(\x0E2!.temporal.api.enums.v1.RetryState\"\x94\x02\x0A/ChildWorkflowExecutionTerminatedEventAttributes\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x06 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x1A\x0A\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x05 \x01(\x03\"\xC0\x02\x0A3WorkflowPropertiesModifiedExternallyEventAttributes\x12\x16\x0A\x0Enew_task_queue\x18\x01 \x01(\x09\x12<\x0A\x19new_workflow_task_timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x12;\x0A\x18new_workflow_run_timeout\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x12A\x0A\x1Enew_workflow_execution_timeout\x18\x04 \x01(\x0B2\x19.google.protobuf.Duration\x123\x0A\x0Dupserted_memo\x18\x05 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\"\x90\x01\x0A3ActivityPropertiesModifiedExternallyEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12=\x0A\x10new_retry_policy\x18\x02 \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\"\xDC\x01\x0A.WorkflowExecutionUpdateAcceptedEventAttributes\x12\x1C\x0A\x14protocol_instance_id\x18\x01 \x01(\x09\x12#\x0A\x1Baccepted_request_message_id\x18\x02 \x01(\x09\x12,\x0A\$accepted_request_sequencing_event_id\x18\x03 \x01(\x03\x129\x0A\x10accepted_request\x18\x04 \x01(\x0B2\x1F.temporal.api.update.v1.Request\"\xAA\x01\x0A/WorkflowExecutionUpdateCompletedEventAttributes\x12*\x0A\x04meta\x18\x01 \x01(\x0B2\x1C.temporal.api.update.v1.Meta\x12\x19\x0A\x11accepted_event_id\x18\x03 \x01(\x03\x120\x0A\x07outcome\x18\x02 \x01(\x0B2\x1F.temporal.api.update.v1.Outcome\"\x8F\x02\x0A.WorkflowExecutionUpdateRejectedEventAttributes\x12\x1C\x0A\x14protocol_instance_id\x18\x01 \x01(\x09\x12#\x0A\x1Brejected_request_message_id\x18\x02 \x01(\x09\x12,\x0A\$rejected_request_sequencing_event_id\x18\x03 \x01(\x03\x129\x0A\x10rejected_request\x18\x04 \x01(\x0B2\x1F.temporal.api.update.v1.Request\x121\x0A\x07failure\x18\x05 \x01(\x0B2 .temporal.api.failure.v1.Failure\"\xA4\x01\x0A.WorkflowExecutionUpdateAdmittedEventAttributes\x120\x0A\x07request\x18\x01 \x01(\x0B2\x1F.temporal.api.update.v1.Request\x12@\x0A\x06origin\x18\x02 \x01(\x0E20.temporal.api.enums.v1.UpdateAdmittedEventOrigin\"\xBB\x03\x0A&NexusOperationScheduledEventAttributes\x12\x10\x0A\x08endpoint\x18\x01 \x01(\x09\x12\x0F\x0A\x07service\x18\x02 \x01(\x09\x12\x11\x0A\x09operation\x18\x03 \x01(\x09\x12.\x0A\x05input\x18\x04 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\x12<\x0A\x19schedule_to_close_timeout\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12f\x0A\x0Cnexus_header\x18\x06 \x03(\x0B2P.temporal.api.history.v1.NexusOperationScheduledEventAttributes.NexusHeaderEntry\x12(\x0A workflow_task_completed_event_id\x18\x07 \x01(\x03\x12\x12\x0A\x0Arequest_id\x18\x08 \x01(\x09\x12\x13\x0A\x0Bendpoint_id\x18\x09 \x01(\x09\x1A2\x0A\x10NexusHeaderEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"X\x0A\$NexusOperationStartedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x14\x0A\x0Coperation_id\x18\x03 \x01(\x09\"u\x0A&NexusOperationCompletedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12/\x0A\x06result\x18\x02 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\"t\x0A#NexusOperationFailedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x121\x0A\x07failure\x18\x02 \x01(\x0B2 .temporal.api.failure.v1.Failure\"v\x0A%NexusOperationTimedOutEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x121\x0A\x07failure\x18\x02 \x01(\x0B2 .temporal.api.failure.v1.Failure\"v\x0A%NexusOperationCanceledEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x121\x0A\x07failure\x18\x02 \x01(\x0B2 .temporal.api.failure.v1.Failure\"t\x0A,NexusOperationCancelRequestedEventAttributes\x12\x1A\x0A\x12scheduled_event_id\x18\x01 \x01(\x03\x12(\x0A workflow_task_completed_event_id\x18\x02 \x01(\x03\"\xE57\x0A\x0CHistoryEvent\x12\x10\x0A\x08event_id\x18\x01 \x01(\x03\x12.\x0A\x0Aevent_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x0Aevent_type\x18\x03 \x01(\x0E2 .temporal.api.enums.v1.EventType\x12\x0F\x0A\x07version\x18\x04 \x01(\x03\x12\x0F\x0A\x07task_id\x18\x05 \x01(\x03\x12\x1A\x0A\x11worker_may_ignore\x18\xAC\x02 \x01(\x08\x129\x0A\x0Duser_metadata\x18\xAD\x02 \x01(\x0B2!.temporal.api.sdk.v1.UserMetadata\x12w\x0A+workflow_execution_started_event_attributes\x18\x06 \x01(\x0B2@.temporal.api.history.v1.WorkflowExecutionStartedEventAttributesH\x00\x12{\x0A-workflow_execution_completed_event_attributes\x18\x07 \x01(\x0B2B.temporal.api.history.v1.WorkflowExecutionCompletedEventAttributesH\x00\x12u\x0A*workflow_execution_failed_event_attributes\x18\x08 \x01(\x0B2?.temporal.api.history.v1.WorkflowExecutionFailedEventAttributesH\x00\x12z\x0A-workflow_execution_timed_out_event_attributes\x18\x09 \x01(\x0B2A.temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributesH\x00\x12q\x0A(workflow_task_scheduled_event_attributes\x18\x0A \x01(\x0B2=.temporal.api.history.v1.WorkflowTaskScheduledEventAttributesH\x00\x12m\x0A&workflow_task_started_event_attributes\x18\x0B \x01(\x0B2;.temporal.api.history.v1.WorkflowTaskStartedEventAttributesH\x00\x12q\x0A(workflow_task_completed_event_attributes\x18\x0C \x01(\x0B2=.temporal.api.history.v1.WorkflowTaskCompletedEventAttributesH\x00\x12p\x0A(workflow_task_timed_out_event_attributes\x18\x0D \x01(\x0B2<.temporal.api.history.v1.WorkflowTaskTimedOutEventAttributesH\x00\x12k\x0A%workflow_task_failed_event_attributes\x18\x0E \x01(\x0B2:.temporal.api.history.v1.WorkflowTaskFailedEventAttributesH\x00\x12q\x0A(activity_task_scheduled_event_attributes\x18\x0F \x01(\x0B2=.temporal.api.history.v1.ActivityTaskScheduledEventAttributesH\x00\x12m\x0A&activity_task_started_event_attributes\x18\x10 \x01(\x0B2;.temporal.api.history.v1.ActivityTaskStartedEventAttributesH\x00\x12q\x0A(activity_task_completed_event_attributes\x18\x11 \x01(\x0B2=.temporal.api.history.v1.ActivityTaskCompletedEventAttributesH\x00\x12k\x0A%activity_task_failed_event_attributes\x18\x12 \x01(\x0B2:.temporal.api.history.v1.ActivityTaskFailedEventAttributesH\x00\x12p\x0A(activity_task_timed_out_event_attributes\x18\x13 \x01(\x0B2<.temporal.api.history.v1.ActivityTaskTimedOutEventAttributesH\x00\x12^\x0A\x1Etimer_started_event_attributes\x18\x14 \x01(\x0B24.temporal.api.history.v1.TimerStartedEventAttributesH\x00\x12Z\x0A\x1Ctimer_fired_event_attributes\x18\x15 \x01(\x0B22.temporal.api.history.v1.TimerFiredEventAttributesH\x00\x12~\x0A/activity_task_cancel_requested_event_attributes\x18\x16 \x01(\x0B2C.temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributesH\x00\x12o\x0A'activity_task_canceled_event_attributes\x18\x17 \x01(\x0B2<.temporal.api.history.v1.ActivityTaskCanceledEventAttributesH\x00\x12`\x0A\x1Ftimer_canceled_event_attributes\x18\x18 \x01(\x0B25.temporal.api.history.v1.TimerCanceledEventAttributesH\x00\x12b\x0A marker_recorded_event_attributes\x18\x19 \x01(\x0B26.temporal.api.history.v1.MarkerRecordedEventAttributesH\x00\x12y\x0A,workflow_execution_signaled_event_attributes\x18\x1A \x01(\x0B2A.temporal.api.history.v1.WorkflowExecutionSignaledEventAttributesH\x00\x12}\x0A.workflow_execution_terminated_event_attributes\x18\x1B \x01(\x0B2C.temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributesH\x00\x12\x88\x01\x0A4workflow_execution_cancel_requested_event_attributes\x18\x1C \x01(\x0B2H.temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributesH\x00\x12y\x0A,workflow_execution_canceled_event_attributes\x18\x1D \x01(\x0B2A.temporal.api.history.v1.WorkflowExecutionCanceledEventAttributesH\x00\x12\xA8\x01\x0AErequest_cancel_external_workflow_execution_initiated_event_attributes\x18\x1E \x01(\x0B2W.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\xA2\x01\x0ABrequest_cancel_external_workflow_execution_failed_event_attributes\x18\x1F \x01(\x0B2T.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x99\x01\x0A=external_workflow_execution_cancel_requested_event_attributes\x18 \x01(\x0B2P.temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributesH\x00\x12\x87\x01\x0A4workflow_execution_continued_as_new_event_attributes\x18! \x01(\x0B2G.temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributesH\x00\x12\x91\x01\x0A9start_child_workflow_execution_initiated_event_attributes\x18\" \x01(\x0B2L.temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributesH\x00\x12\x8B\x01\x0A6start_child_workflow_execution_failed_event_attributes\x18# \x01(\x0B2I.temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributesH\x00\x12\x82\x01\x0A1child_workflow_execution_started_event_attributes\x18\$ \x01(\x0B2E.temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributesH\x00\x12\x86\x01\x0A3child_workflow_execution_completed_event_attributes\x18% \x01(\x0B2G.temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributesH\x00\x12\x80\x01\x0A0child_workflow_execution_failed_event_attributes\x18& \x01(\x0B2D.temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributesH\x00\x12\x84\x01\x0A2child_workflow_execution_canceled_event_attributes\x18' \x01(\x0B2F.temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributesH\x00\x12\x85\x01\x0A3child_workflow_execution_timed_out_event_attributes\x18( \x01(\x0B2F.temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributesH\x00\x12\x88\x01\x0A4child_workflow_execution_terminated_event_attributes\x18) \x01(\x0B2H.temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributesH\x00\x12\x99\x01\x0A=signal_external_workflow_execution_initiated_event_attributes\x18* \x01(\x0B2P.temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\x93\x01\x0A:signal_external_workflow_execution_failed_event_attributes\x18+ \x01(\x0B2M.temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x8A\x01\x0A5external_workflow_execution_signaled_event_attributes\x18, \x01(\x0B2I.temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributesH\x00\x12\x84\x01\x0A2upsert_workflow_search_attributes_event_attributes\x18- \x01(\x0B2F.temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributesH\x00\x12\x86\x01\x0A3workflow_execution_update_accepted_event_attributes\x18. \x01(\x0B2G.temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributesH\x00\x12\x86\x01\x0A3workflow_execution_update_rejected_event_attributes\x18/ \x01(\x0B2G.temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributesH\x00\x12\x88\x01\x0A4workflow_execution_update_completed_event_attributes\x180 \x01(\x0B2H.temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributesH\x00\x12\x90\x01\x0A8workflow_properties_modified_externally_event_attributes\x181 \x01(\x0B2L.temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributesH\x00\x12\x90\x01\x0A8activity_properties_modified_externally_event_attributes\x182 \x01(\x0B2L.temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributesH\x00\x12{\x0A-workflow_properties_modified_event_attributes\x183 \x01(\x0B2B.temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributesH\x00\x12\x86\x01\x0A3workflow_execution_update_admitted_event_attributes\x184 \x01(\x0B2G.temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributesH\x00\x12u\x0A*nexus_operation_scheduled_event_attributes\x185 \x01(\x0B2?.temporal.api.history.v1.NexusOperationScheduledEventAttributesH\x00\x12q\x0A(nexus_operation_started_event_attributes\x186 \x01(\x0B2=.temporal.api.history.v1.NexusOperationStartedEventAttributesH\x00\x12u\x0A*nexus_operation_completed_event_attributes\x187 \x01(\x0B2?.temporal.api.history.v1.NexusOperationCompletedEventAttributesH\x00\x12o\x0A'nexus_operation_failed_event_attributes\x188 \x01(\x0B2<.temporal.api.history.v1.NexusOperationFailedEventAttributesH\x00\x12s\x0A)nexus_operation_canceled_event_attributes\x189 \x01(\x0B2>.temporal.api.history.v1.NexusOperationCanceledEventAttributesH\x00\x12t\x0A*nexus_operation_timed_out_event_attributes\x18: \x01(\x0B2>.temporal.api.history.v1.NexusOperationTimedOutEventAttributesH\x00\x12\x82\x01\x0A1nexus_operation_cancel_requested_event_attributes\x18; \x01(\x0B2E.temporal.api.history.v1.NexusOperationCancelRequestedEventAttributesH\x00B\x0C\x0A\x0Aattributes\"@\x0A\x07History\x125\x0A\x06events\x18\x01 \x03(\x0B2%.temporal.api.history.v1.HistoryEventB\x8E\x01\x0A\x1Aio.temporal.api.history.v1B\x0CMessageProtoP\x01Z%go.temporal.io/api/history/v1;history\xAA\x02\x19Temporalio.Api.History.V1\xEA\x02\x1CTemporalio::Api::History::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Nexus/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Nexus/V1/Message.php new file mode 100644 index 0000000..f4c750b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Nexus/V1/Message.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\x96\x13\x0A#temporal/api/nexus/v1/message.proto\x12\x15temporal.api.nexus.v1\x1A\$temporal/api/common/v1/message.proto\"\x9C\x01\x0A\x07Failure\x12\x0F\x0A\x07message\x18\x01 \x01(\x09\x12>\x0A\x08metadata\x18\x02 \x03(\x0B2,.temporal.api.nexus.v1.Failure.MetadataEntry\x12\x0F\x0A\x07details\x18\x03 \x01(\x0C\x1A/\x0A\x0DMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"S\x0A\x0CHandlerError\x12\x12\x0A\x0Aerror_type\x18\x01 \x01(\x09\x12/\x0A\x07failure\x18\x02 \x01(\x0B2\x1E.temporal.api.nexus.v1.Failure\"f\x0A\x1AUnsuccessfulOperationError\x12\x17\x0A\x0Foperation_state\x18\x01 \x01(\x09\x12/\x0A\x07failure\x18\x02 \x01(\x0B2\x1E.temporal.api.nexus.v1.Failure\"\xA5\x02\x0A\x15StartOperationRequest\x12\x0F\x0A\x07service\x18\x01 \x01(\x09\x12\x11\x0A\x09operation\x18\x02 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x03 \x01(\x09\x12\x10\x0A\x08callback\x18\x04 \x01(\x09\x120\x0A\x07payload\x18\x05 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\x12Y\x0A\x0Fcallback_header\x18\x06 \x03(\x0B2@.temporal.api.nexus.v1.StartOperationRequest.CallbackHeaderEntry\x1A5\x0A\x13CallbackHeaderEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"R\x0A\x16CancelOperationRequest\x12\x0F\x0A\x07service\x18\x01 \x01(\x09\x12\x11\x0A\x09operation\x18\x02 \x01(\x09\x12\x14\x0A\x0Coperation_id\x18\x03 \x01(\x09\"\xC7\x02\x0A\x07Request\x12:\x0A\x06header\x18\x01 \x03(\x0B2*.temporal.api.nexus.v1.Request.HeaderEntry\x122\x0A\x0Escheduled_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12G\x0A\x0Fstart_operation\x18\x03 \x01(\x0B2,.temporal.api.nexus.v1.StartOperationRequestH\x00\x12I\x0A\x10cancel_operation\x18\x04 \x01(\x0B2-.temporal.api.nexus.v1.CancelOperationRequestH\x00\x1A-\x0A\x0BHeaderEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x09\x0A\x07variant\"\xE4\x02\x0A\x16StartOperationResponse\x12J\x0A\x0Csync_success\x18\x01 \x01(\x0B22.temporal.api.nexus.v1.StartOperationResponse.SyncH\x00\x12L\x0A\x0Dasync_success\x18\x02 \x01(\x0B23.temporal.api.nexus.v1.StartOperationResponse.AsyncH\x00\x12L\x0A\x0Foperation_error\x18\x03 \x01(\x0B21.temporal.api.nexus.v1.UnsuccessfulOperationErrorH\x00\x1A8\x0A\x04Sync\x120\x0A\x07payload\x18\x01 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\x1A\x1D\x0A\x05Async\x12\x14\x0A\x0Coperation_id\x18\x01 \x01(\x09B\x09\x0A\x07variant\"\x19\x0A\x17CancelOperationResponse\"\xAB\x01\x0A\x08Response\x12H\x0A\x0Fstart_operation\x18\x01 \x01(\x0B2-.temporal.api.nexus.v1.StartOperationResponseH\x00\x12J\x0A\x10cancel_operation\x18\x02 \x01(\x0B2..temporal.api.nexus.v1.CancelOperationResponseH\x00B\x09\x0A\x07variant\"\xD8\x01\x0A\x08Endpoint\x12\x0F\x0A\x07version\x18\x01 \x01(\x03\x12\x0A\x0A\x02id\x18\x02 \x01(\x09\x121\x0A\x04spec\x18\x03 \x01(\x0B2#.temporal.api.nexus.v1.EndpointSpec\x120\x0A\x0Ccreated_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x126\x0A\x12last_modified_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x12\x0A\x0Aurl_prefix\x18\x06 \x01(\x09\"\x89\x01\x0A\x0CEndpointSpec\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bdescription\x18\x02 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\x125\x0A\x06target\x18\x03 \x01(\x0B2%.temporal.api.nexus.v1.EndpointTarget\"\xE9\x01\x0A\x0EEndpointTarget\x12>\x0A\x06worker\x18\x01 \x01(\x0B2,.temporal.api.nexus.v1.EndpointTarget.WorkerH\x00\x12B\x0A\x08external\x18\x02 \x01(\x0B2..temporal.api.nexus.v1.EndpointTarget.ExternalH\x00\x1A/\x0A\x06Worker\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x12\x0A\x0Atask_queue\x18\x02 \x01(\x09\x1A\x17\x0A\x08External\x12\x0B\x0A\x03url\x18\x01 \x01(\x09B\x09\x0A\x07variantB\x84\x01\x0A\x18io.temporal.api.nexus.v1B\x0CMessageProtoP\x01Z!go.temporal.io/api/nexus/v1;nexus\xAA\x02\x17Temporalio.Api.Nexus.V1\xEA\x02\x1ATemporalio::Api::Nexus::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Operatorservice/V1/RequestResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Operatorservice/V1/RequestResponse.php new file mode 100644 index 0000000..9b8d1f9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Operatorservice/V1/RequestResponse.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xB2\x17\x0A6temporal/api/operatorservice/v1/request_response.proto\x12\x1Ftemporal.api.operatorservice.v1\x1A#temporal/api/nexus/v1/message.proto\x1A\x1Egoogle/protobuf/duration.proto\"\xFF\x01\x0A\x1AAddSearchAttributesRequest\x12l\x0A\x11search_attributes\x18\x01 \x03(\x0B2Q.temporal.api.operatorservice.v1.AddSearchAttributesRequest.SearchAttributesEntry\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\x1A`\x0A\x15SearchAttributesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x126\x0A\x05value\x18\x02 \x01(\x0E2'.temporal.api.enums.v1.IndexedValueType:\x028\x01\"\x1D\x0A\x1BAddSearchAttributesResponse\"M\x0A\x1DRemoveSearchAttributesRequest\x12\x19\x0A\x11search_attributes\x18\x01 \x03(\x09\x12\x11\x0A\x09namespace\x18\x02 \x01(\x09\" \x0A\x1ERemoveSearchAttributesResponse\"0\x0A\x1BListSearchAttributesRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\"\xE2\x04\x0A\x1CListSearchAttributesResponse\x12n\x0A\x11custom_attributes\x18\x01 \x03(\x0B2S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.CustomAttributesEntry\x12n\x0A\x11system_attributes\x18\x02 \x03(\x0B2S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.SystemAttributesEntry\x12h\x0A\x0Estorage_schema\x18\x03 \x03(\x0B2P.temporal.api.operatorservice.v1.ListSearchAttributesResponse.StorageSchemaEntry\x1A`\x0A\x15CustomAttributesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x126\x0A\x05value\x18\x02 \x01(\x0E2'.temporal.api.enums.v1.IndexedValueType:\x028\x01\x1A`\x0A\x15SystemAttributesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x126\x0A\x05value\x18\x02 \x01(\x0E2'.temporal.api.enums.v1.IndexedValueType:\x028\x01\x1A4\x0A\x12StorageSchemaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"|\x0A\x16DeleteNamespaceRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x14\x0A\x0Cnamespace_id\x18\x02 \x01(\x09\x129\x0A\x16namespace_delete_delay\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\"4\x0A\x17DeleteNamespaceResponse\x12\x19\x0A\x11deleted_namespace\x18\x01 \x01(\x09\"\x84\x01\x0A\x1FAddOrUpdateRemoteClusterRequest\x12\x18\x0A\x10frontend_address\x18\x01 \x01(\x09\x12(\x0A enable_remote_cluster_connection\x18\x02 \x01(\x08\x12\x1D\x0A\x15frontend_http_address\x18\x03 \x01(\x09\"\"\x0A AddOrUpdateRemoteClusterResponse\"2\x0A\x1ARemoveRemoteClusterRequest\x12\x14\x0A\x0Ccluster_name\x18\x01 \x01(\x09\"\x1D\x0A\x1BRemoveRemoteClusterResponse\"A\x0A\x13ListClustersRequest\x12\x11\x0A\x09page_size\x18\x01 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"s\x0A\x14ListClustersResponse\x12B\x0A\x08clusters\x18\x01 \x03(\x0B20.temporal.api.operatorservice.v1.ClusterMetadata\x12\x17\x0A\x0Fnext_page_token\x18\x04 \x01(\x0C\"\xC0\x01\x0A\x0FClusterMetadata\x12\x14\x0A\x0Ccluster_name\x18\x01 \x01(\x09\x12\x12\x0A\x0Acluster_id\x18\x02 \x01(\x09\x12\x0F\x0A\x07address\x18\x03 \x01(\x09\x12\x14\x0A\x0Chttp_address\x18\x07 \x01(\x09\x12 \x0A\x18initial_failover_version\x18\x04 \x01(\x03\x12\x1B\x0A\x13history_shard_count\x18\x05 \x01(\x05\x12\x1D\x0A\x15is_connection_enabled\x18\x06 \x01(\x08\"%\x0A\x17GetNexusEndpointRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\"M\x0A\x18GetNexusEndpointResponse\x121\x0A\x08endpoint\x18\x01 \x01(\x0B2\x1F.temporal.api.nexus.v1.Endpoint\"O\x0A\x1ACreateNexusEndpointRequest\x121\x0A\x04spec\x18\x01 \x01(\x0B2#.temporal.api.nexus.v1.EndpointSpec\"P\x0A\x1BCreateNexusEndpointResponse\x121\x0A\x08endpoint\x18\x01 \x01(\x0B2\x1F.temporal.api.nexus.v1.Endpoint\"l\x0A\x1AUpdateNexusEndpointRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0F\x0A\x07version\x18\x02 \x01(\x03\x121\x0A\x04spec\x18\x03 \x01(\x0B2#.temporal.api.nexus.v1.EndpointSpec\"P\x0A\x1BUpdateNexusEndpointResponse\x121\x0A\x08endpoint\x18\x01 \x01(\x0B2\x1F.temporal.api.nexus.v1.Endpoint\"9\x0A\x1ADeleteNexusEndpointRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0F\x0A\x07version\x18\x02 \x01(\x03\"\x1D\x0A\x1BDeleteNexusEndpointResponse\"U\x0A\x19ListNexusEndpointsRequest\x12\x11\x0A\x09page_size\x18\x01 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\x12\x0C\x0A\x04name\x18\x03 \x01(\x09\"i\x0A\x1AListNexusEndpointsResponse\x12\x17\x0A\x0Fnext_page_token\x18\x01 \x01(\x0C\x122\x0A\x09endpoints\x18\x02 \x03(\x0B2\x1F.temporal.api.nexus.v1.EndpointB\xBE\x01\x0A\"io.temporal.api.operatorservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/operatorservice/v1;operatorservice\xAA\x02!Temporalio.Api.OperatorService.V1\xEA\x02\$Temporalio::Api::OperatorService::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Operatorservice/V1/Service.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Operatorservice/V1/Service.php new file mode 100644 index 0000000..08bd221 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Operatorservice/V1/Service.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA1\x12\x0A-temporal/api/operatorservice/v1/service.proto\x12\x1Ftemporal.api.operatorservice.v1\x1A\x1Cgoogle/api/annotations.proto2\xEF\x0F\x0A\x0FOperatorService\x12\x92\x01\x0A\x13AddSearchAttributes\x12;.temporal.api.operatorservice.v1.AddSearchAttributesRequest\x1A<.temporal.api.operatorservice.v1.AddSearchAttributesResponse\"\x00\x12\x9B\x01\x0A\x16RemoveSearchAttributes\x12>.temporal.api.operatorservice.v1.RemoveSearchAttributesRequest\x1A?.temporal.api.operatorservice.v1.RemoveSearchAttributesResponse\"\x00\x12\xCE\x01\x0A\x14ListSearchAttributes\x12<.temporal.api.operatorservice.v1.ListSearchAttributesRequest\x1A=.temporal.api.operatorservice.v1.ListSearchAttributesResponse\"9\x82\xD3\xE4\x93\x023\x121/cluster/namespaces/{namespace}/search-attributes\x12\x86\x01\x0A\x0FDeleteNamespace\x127.temporal.api.operatorservice.v1.DeleteNamespaceRequest\x1A8.temporal.api.operatorservice.v1.DeleteNamespaceResponse\"\x00\x12\xA1\x01\x0A\x18AddOrUpdateRemoteCluster\x12@.temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest\x1AA.temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse\"\x00\x12\x92\x01\x0A\x13RemoveRemoteCluster\x12;.temporal.api.operatorservice.v1.RemoveRemoteClusterRequest\x1A<.temporal.api.operatorservice.v1.RemoveRemoteClusterResponse\"\x00\x12}\x0A\x0CListClusters\x124.temporal.api.operatorservice.v1.ListClustersRequest\x1A5.temporal.api.operatorservice.v1.ListClustersResponse\"\x00\x12\xAE\x01\x0A\x10GetNexusEndpoint\x128.temporal.api.operatorservice.v1.GetNexusEndpointRequest\x1A9.temporal.api.operatorservice.v1.GetNexusEndpointResponse\"%\x82\xD3\xE4\x93\x02\x1F\x12\x1D/cluster/nexus/endpoints/{id}\x12\xB5\x01\x0A\x13CreateNexusEndpoint\x12;.temporal.api.operatorservice.v1.CreateNexusEndpointRequest\x1A<.temporal.api.operatorservice.v1.CreateNexusEndpointResponse\"#\x82\xD3\xE4\x93\x02\x1D\"\x18/cluster/nexus/endpoints:\x01*\x12\xC1\x01\x0A\x13UpdateNexusEndpoint\x12;.temporal.api.operatorservice.v1.UpdateNexusEndpointRequest\x1A<.temporal.api.operatorservice.v1.UpdateNexusEndpointResponse\"/\x82\xD3\xE4\x93\x02)\"\$/cluster/nexus/endpoints/{id}/update:\x01*\x12\xB7\x01\x0A\x13DeleteNexusEndpoint\x12;.temporal.api.operatorservice.v1.DeleteNexusEndpointRequest\x1A<.temporal.api.operatorservice.v1.DeleteNexusEndpointResponse\"%\x82\xD3\xE4\x93\x02\x1F*\x1D/cluster/nexus/endpoints/{id}\x12\xAF\x01\x0A\x12ListNexusEndpoints\x12:.temporal.api.operatorservice.v1.ListNexusEndpointsRequest\x1A;.temporal.api.operatorservice.v1.ListNexusEndpointsResponse\" \x82\xD3\xE4\x93\x02\x1A\x12\x18/cluster/nexus/endpointsB\xB6\x01\x0A\"io.temporal.api.operatorservice.v1B\x0CServiceProtoP\x01Z5go.temporal.io/api/operatorservice/v1;operatorservice\xAA\x02!Temporalio.Api.OperatorService.V1\xEA\x02\$Temporalio::Api::OperatorService::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/PBNamespace/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/PBNamespace/V1/Message.php new file mode 100644 index 0000000..5980865 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/PBNamespace/V1/Message.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xBD\x0E\x0A'temporal/api/namespace/v1/message.proto\x12\x19temporal.api.namespace.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A%temporal/api/enums/v1/namespace.proto\"\xBA\x03\x0A\x0DNamespaceInfo\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x05state\x18\x02 \x01(\x0E2%.temporal.api.enums.v1.NamespaceState\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12\x13\x0A\x0Bowner_email\x18\x04 \x01(\x09\x12@\x0A\x04data\x18\x05 \x03(\x0B22.temporal.api.namespace.v1.NamespaceInfo.DataEntry\x12\x0A\x0A\x02id\x18\x06 \x01(\x09\x12K\x0A\x0Ccapabilities\x18\x07 \x01(\x0B25.temporal.api.namespace.v1.NamespaceInfo.Capabilities\x12\x1A\x0A\x12supports_schedules\x18d \x01(\x08\x1A+\x0A\x09DataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1AW\x0A\x0CCapabilities\x12\x1C\x0A\x14eager_workflow_start\x18\x01 \x01(\x08\x12\x13\x0A\x0Bsync_update\x18\x02 \x01(\x08\x12\x14\x0A\x0Casync_update\x18\x03 \x01(\x08\"\x9E\x04\x0A\x0FNamespaceConfig\x12C\x0A workflow_execution_retention_ttl\x18\x01 \x01(\x0B2\x19.google.protobuf.Duration\x12<\x0A\x0Cbad_binaries\x18\x02 \x01(\x0B2&.temporal.api.namespace.v1.BadBinaries\x12D\x0A\x16history_archival_state\x18\x03 \x01(\x0E2\$.temporal.api.enums.v1.ArchivalState\x12\x1C\x0A\x14history_archival_uri\x18\x04 \x01(\x09\x12G\x0A\x19visibility_archival_state\x18\x05 \x01(\x0E2\$.temporal.api.enums.v1.ArchivalState\x12\x1F\x0A\x17visibility_archival_uri\x18\x06 \x01(\x09\x12u\x0A\x1Fcustom_search_attribute_aliases\x18\x07 \x03(\x0B2L.temporal.api.namespace.v1.NamespaceConfig.CustomSearchAttributeAliasesEntry\x1AC\x0A!CustomSearchAttributeAliasesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xB0\x01\x0A\x0BBadBinaries\x12F\x0A\x08binaries\x18\x01 \x03(\x0B24.temporal.api.namespace.v1.BadBinaries.BinariesEntry\x1AY\x0A\x0DBinariesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x127\x0A\x05value\x18\x02 \x01(\x0B2(.temporal.api.namespace.v1.BadBinaryInfo:\x028\x01\"b\x0A\x0DBadBinaryInfo\x12\x0E\x0A\x06reason\x18\x01 \x01(\x09\x12\x10\x0A\x08operator\x18\x02 \x01(\x09\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xEA\x01\x0A\x13UpdateNamespaceInfo\x12\x13\x0A\x0Bdescription\x18\x01 \x01(\x09\x12\x13\x0A\x0Bowner_email\x18\x02 \x01(\x09\x12F\x0A\x04data\x18\x03 \x03(\x0B28.temporal.api.namespace.v1.UpdateNamespaceInfo.DataEntry\x124\x0A\x05state\x18\x04 \x01(\x0E2%.temporal.api.enums.v1.NamespaceState\x1A+\x0A\x09DataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"*\x0A\x0FNamespaceFilter\x12\x17\x0A\x0Finclude_deleted\x18\x01 \x01(\x08B\x98\x01\x0A\x1Cio.temporal.api.namespace.v1B\x0CMessageProtoP\x01Z)go.temporal.io/api/namespace/v1;namespace\xAA\x02\x1BTemporalio.Api.Namespace.V1\xEA\x02\x1ETemporalio::Api::Namespace::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Protocol/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Protocol/V1/Message.php new file mode 100644 index 0000000..5c1d890 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Protocol/V1/Message.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xF8\x02\x0A&temporal/api/protocol/v1/message.proto\x12\x18temporal.api.protocol.v1\"\x95\x01\x0A\x07Message\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x1C\x0A\x14protocol_instance_id\x18\x02 \x01(\x09\x12\x12\x0A\x08event_id\x18\x03 \x01(\x03H\x00\x12\x17\x0A\x0Dcommand_index\x18\x04 \x01(\x03H\x00\x12\"\x0A\x04body\x18\x05 \x01(\x0B2\x14.google.protobuf.AnyB\x0F\x0A\x0Dsequencing_idB\x93\x01\x0A\x1Bio.temporal.api.protocol.v1B\x0CMessageProtoP\x01Z'go.temporal.io/api/protocol/v1;protocol\xAA\x02\x1ATemporalio.Api.Protocol.V1\xEA\x02\x1DTemporalio::Api::Protocol::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Query/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Query/V1/Message.php new file mode 100644 index 0000000..7e3fd92 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Query/V1/Message.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x92\x05\x0A#temporal/api/query/v1/message.proto\x12\x15temporal.api.query.v1\x1A\$temporal/api/enums/v1/workflow.proto\x1A\$temporal/api/common/v1/message.proto\"\x89\x01\x0A\x0DWorkflowQuery\x12\x12\x0A\x0Aquery_type\x18\x01 \x01(\x09\x124\x0A\x0Aquery_args\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12.\x0A\x06header\x18\x03 \x01(\x0B2\x1E.temporal.api.common.v1.Header\"\x9B\x01\x0A\x13WorkflowQueryResult\x12;\x0A\x0Bresult_type\x18\x01 \x01(\x0E2&.temporal.api.enums.v1.QueryResultType\x120\x0A\x06answer\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x15\x0A\x0Derror_message\x18\x03 \x01(\x09\"O\x0A\x0DQueryRejected\x12>\x0A\x06status\x18\x01 \x01(\x0E2..temporal.api.enums.v1.WorkflowExecutionStatusB\x84\x01\x0A\x18io.temporal.api.query.v1B\x0CMessageProtoP\x01Z!go.temporal.io/api/query/v1;query\xAA\x02\x17Temporalio.Api.Query.V1\xEA\x02\x1ATemporalio::Api::Query::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Replication/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Replication/V1/Message.php new file mode 100644 index 0000000..acea087 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Replication/V1/Message.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xEA\x04\x0A)temporal/api/replication/v1/message.proto\x12\x1Btemporal.api.replication.v1\x1A%temporal/api/enums/v1/namespace.proto\"0\x0A\x18ClusterReplicationConfig\x12\x14\x0A\x0Ccluster_name\x18\x01 \x01(\x09\"\xBA\x01\x0A\x1ANamespaceReplicationConfig\x12\x1B\x0A\x13active_cluster_name\x18\x01 \x01(\x09\x12G\x0A\x08clusters\x18\x02 \x03(\x0B25.temporal.api.replication.v1.ClusterReplicationConfig\x126\x0A\x05state\x18\x03 \x01(\x0E2'.temporal.api.enums.v1.ReplicationState\"]\x0A\x0EFailoverStatus\x121\x0A\x0Dfailover_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x18\x0A\x10failover_version\x18\x02 \x01(\x03B\xA2\x01\x0A\x1Eio.temporal.api.replication.v1B\x0CMessageProtoP\x01Z-go.temporal.io/api/replication/v1;replication\xAA\x02\x1DTemporalio.Api.Replication.V1\xEA\x02 Temporalio::Api::Replication::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Schedule/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Schedule/V1/Message.php new file mode 100644 index 0000000..758c69a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Schedule/V1/Message.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xFB\x1E\x0A&temporal/api/schedule/v1/message.proto\x12\x18temporal.api.schedule.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\$temporal/api/common/v1/message.proto\x1A\$temporal/api/enums/v1/schedule.proto\x1A&temporal/api/workflow/v1/message.proto\"\x95\x01\x0A\x0CCalendarSpec\x12\x0E\x0A\x06second\x18\x01 \x01(\x09\x12\x0E\x0A\x06minute\x18\x02 \x01(\x09\x12\x0C\x0A\x04hour\x18\x03 \x01(\x09\x12\x14\x0A\x0Cday_of_month\x18\x04 \x01(\x09\x12\x0D\x0A\x05month\x18\x05 \x01(\x09\x12\x0C\x0A\x04year\x18\x06 \x01(\x09\x12\x13\x0A\x0Bday_of_week\x18\x07 \x01(\x09\x12\x0F\x0A\x07comment\x18\x08 \x01(\x09\"1\x0A\x05Range\x12\x0D\x0A\x05start\x18\x01 \x01(\x05\x12\x0B\x0A\x03end\x18\x02 \x01(\x05\x12\x0C\x0A\x04step\x18\x03 \x01(\x05\"\x86\x03\x0A\x16StructuredCalendarSpec\x12/\x0A\x06second\x18\x01 \x03(\x0B2\x1F.temporal.api.schedule.v1.Range\x12/\x0A\x06minute\x18\x02 \x03(\x0B2\x1F.temporal.api.schedule.v1.Range\x12-\x0A\x04hour\x18\x03 \x03(\x0B2\x1F.temporal.api.schedule.v1.Range\x125\x0A\x0Cday_of_month\x18\x04 \x03(\x0B2\x1F.temporal.api.schedule.v1.Range\x12.\x0A\x05month\x18\x05 \x03(\x0B2\x1F.temporal.api.schedule.v1.Range\x12-\x0A\x04year\x18\x06 \x03(\x0B2\x1F.temporal.api.schedule.v1.Range\x124\x0A\x0Bday_of_week\x18\x07 \x03(\x0B2\x1F.temporal.api.schedule.v1.Range\x12\x0F\x0A\x07comment\x18\x08 \x01(\x09\"e\x0A\x0CIntervalSpec\x12+\x0A\x08interval\x18\x01 \x01(\x0B2\x19.google.protobuf.Duration\x12(\x0A\x05phase\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"\xBA\x04\x0A\x0CScheduleSpec\x12M\x0A\x13structured_calendar\x18\x07 \x03(\x0B20.temporal.api.schedule.v1.StructuredCalendarSpec\x12\x13\x0A\x0Bcron_string\x18\x08 \x03(\x09\x128\x0A\x08calendar\x18\x01 \x03(\x0B2&.temporal.api.schedule.v1.CalendarSpec\x128\x0A\x08interval\x18\x02 \x03(\x0B2&.temporal.api.schedule.v1.IntervalSpec\x12D\x0A\x10exclude_calendar\x18\x03 \x03(\x0B2&.temporal.api.schedule.v1.CalendarSpecB\x02\x18\x01\x12U\x0A\x1Bexclude_structured_calendar\x18\x09 \x03(\x0B20.temporal.api.schedule.v1.StructuredCalendarSpec\x12.\x0A\x0Astart_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12)\x0A\x06jitter\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x12\x15\x0A\x0Dtimezone_name\x18\x0A \x01(\x09\x12\x15\x0A\x0Dtimezone_data\x18\x0B \x01(\x0C\"\xC8\x01\x0A\x10SchedulePolicies\x12D\x0A\x0Eoverlap_policy\x18\x01 \x01(\x0E2,.temporal.api.enums.v1.ScheduleOverlapPolicy\x121\x0A\x0Ecatchup_window\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x12\x18\x0A\x10pause_on_failure\x18\x03 \x01(\x08\x12!\x0A\x19keep_original_workflow_id\x18\x04 \x01(\x08\"h\x0A\x0EScheduleAction\x12L\x0A\x0Estart_workflow\x18\x01 \x01(\x0B22.temporal.api.workflow.v1.NewWorkflowExecutionInfoH\x00B\x08\x0A\x06action\"\xC4\x01\x0A\x14ScheduleActionResult\x121\x0A\x0Dschedule_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bactual_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12H\x0A\x15start_workflow_result\x18\x0B \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\"b\x0A\x0DScheduleState\x12\x0D\x0A\x05notes\x18\x01 \x01(\x09\x12\x0E\x0A\x06paused\x18\x02 \x01(\x08\x12\x17\x0A\x0Flimited_actions\x18\x03 \x01(\x08\x12\x19\x0A\x11remaining_actions\x18\x04 \x01(\x03\"a\x0A\x19TriggerImmediatelyRequest\x12D\x0A\x0Eoverlap_policy\x18\x01 \x01(\x0E2,.temporal.api.enums.v1.ScheduleOverlapPolicy\"\xB5\x01\x0A\x0FBackfillRequest\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12D\x0A\x0Eoverlap_policy\x18\x03 \x01(\x0E2,.temporal.api.enums.v1.ScheduleOverlapPolicy\"\xC6\x01\x0A\x0DSchedulePatch\x12P\x0A\x13trigger_immediately\x18\x01 \x01(\x0B23.temporal.api.schedule.v1.TriggerImmediatelyRequest\x12C\x0A\x10backfill_request\x18\x02 \x03(\x0B2).temporal.api.schedule.v1.BackfillRequest\x12\x0D\x0A\x05pause\x18\x03 \x01(\x09\x12\x0F\x0A\x07unpause\x18\x04 \x01(\x09\"\xD6\x03\x0A\x0CScheduleInfo\x12\x14\x0A\x0Caction_count\x18\x01 \x01(\x03\x12\x1D\x0A\x15missed_catchup_window\x18\x02 \x01(\x03\x12\x17\x0A\x0Foverlap_skipped\x18\x03 \x01(\x03\x12\x16\x0A\x0Ebuffer_dropped\x18\x0A \x01(\x03\x12\x13\x0A\x0Bbuffer_size\x18\x0B \x01(\x03\x12D\x0A\x11running_workflows\x18\x09 \x03(\x0B2).temporal.api.common.v1.WorkflowExecution\x12F\x0A\x0Erecent_actions\x18\x04 \x03(\x0B2..temporal.api.schedule.v1.ScheduleActionResult\x127\x0A\x13future_action_times\x18\x05 \x03(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bcreate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\"\x0A\x16invalid_schedule_error\x18\x08 \x01(\x09B\x02\x18\x01\"\xF0\x01\x0A\x08Schedule\x124\x0A\x04spec\x18\x01 \x01(\x0B2&.temporal.api.schedule.v1.ScheduleSpec\x128\x0A\x06action\x18\x02 \x01(\x0B2(.temporal.api.schedule.v1.ScheduleAction\x12<\x0A\x08policies\x18\x03 \x01(\x0B2*.temporal.api.schedule.v1.SchedulePolicies\x126\x0A\x05state\x18\x04 \x01(\x0B2'.temporal.api.schedule.v1.ScheduleState\"\xA5\x02\x0A\x10ScheduleListInfo\x124\x0A\x04spec\x18\x01 \x01(\x0B2&.temporal.api.schedule.v1.ScheduleSpec\x12;\x0A\x0Dworkflow_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x0D\x0A\x05notes\x18\x03 \x01(\x09\x12\x0E\x0A\x06paused\x18\x04 \x01(\x08\x12F\x0A\x0Erecent_actions\x18\x05 \x03(\x0B2..temporal.api.schedule.v1.ScheduleActionResult\x127\x0A\x13future_action_times\x18\x06 \x03(\x0B2\x1A.google.protobuf.Timestamp\"\xD3\x01\x0A\x11ScheduleListEntry\x12\x13\x0A\x0Bschedule_id\x18\x01 \x01(\x09\x12*\x0A\x04memo\x18\x02 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x03 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x128\x0A\x04info\x18\x04 \x01(\x0B2*.temporal.api.schedule.v1.ScheduleListInfoB\x93\x01\x0A\x1Bio.temporal.api.schedule.v1B\x0CMessageProtoP\x01Z'go.temporal.io/api/schedule/v1;schedule\xAA\x02\x1ATemporalio.Api.Schedule.V1\xEA\x02\x1DTemporalio::Api::Schedule::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/EnhancedStackTrace.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/EnhancedStackTrace.php new file mode 100644 index 0000000..156a6b4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/EnhancedStackTrace.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xAB\x06\x0A.temporal/api/sdk/v1/enhanced_stack_trace.proto\x12\x13temporal.api.sdk.v1\"\x9B\x02\x0A\x12EnhancedStackTrace\x123\x0A\x03sdk\x18\x01 \x01(\x0B2&.temporal.api.sdk.v1.StackTraceSDKInfo\x12E\x0A\x07sources\x18\x02 \x03(\x0B24.temporal.api.sdk.v1.EnhancedStackTrace.SourcesEntry\x12/\x0A\x06stacks\x18\x03 \x03(\x0B2\x1F.temporal.api.sdk.v1.StackTrace\x1AX\x0A\x0CSourcesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x127\x0A\x05value\x18\x02 \x01(\x0B2(.temporal.api.sdk.v1.StackTraceFileSlice:\x028\x01\"2\x0A\x11StackTraceSDKInfo\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0F\x0A\x07version\x18\x02 \x01(\x09\";\x0A\x13StackTraceFileSlice\x12\x13\x0A\x0Bline_offset\x18\x01 \x01(\x0D\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\"w\x0A\x16StackTraceFileLocation\x12\x11\x0A\x09file_path\x18\x01 \x01(\x09\x12\x0C\x0A\x04line\x18\x02 \x01(\x05\x12\x0E\x0A\x06column\x18\x03 \x01(\x05\x12\x15\x0A\x0Dfunction_name\x18\x04 \x01(\x09\x12\x15\x0A\x0Dinternal_code\x18\x05 \x01(\x08\"L\x0A\x0AStackTrace\x12>\x0A\x09locations\x18\x01 \x03(\x0B2+.temporal.api.sdk.v1.StackTraceFileLocationB\x85\x01\x0A\x16io.temporal.api.sdk.v1B\x17EnhancedStackTraceProtoP\x01Z\x1Dgo.temporal.io/api/sdk/v1;sdk\xAA\x02\x15Temporalio.Api.Sdk.V1\xEA\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/TaskCompleteMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/TaskCompleteMetadata.php new file mode 100644 index 0000000..a66233c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/TaskCompleteMetadata.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xD3\x02\x0A0temporal/api/sdk/v1/task_complete_metadata.proto\x12\x13temporal.api.sdk.v1\"x\x0A\x1DWorkflowTaskCompletedMetadata\x12\x17\x0A\x0Fcore_used_flags\x18\x01 \x03(\x0D\x12\x17\x0A\x0Flang_used_flags\x18\x02 \x03(\x0D\x12\x10\x0A\x08sdk_name\x18\x03 \x01(\x09\x12\x13\x0A\x0Bsdk_version\x18\x04 \x01(\x09B\x87\x01\x0A\x16io.temporal.api.sdk.v1B\x19TaskCompleteMetadataProtoP\x01Z\x1Dgo.temporal.io/api/sdk/v1;sdk\xAA\x02\x15Temporalio.Api.Sdk.V1\xEA\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/UserMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/UserMetadata.php new file mode 100644 index 0000000..24cf45a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/UserMetadata.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xBB\x02\x0A'temporal/api/sdk/v1/user_metadata.proto\x12\x13temporal.api.sdk.v1\"r\x0A\x0CUserMetadata\x120\x0A\x07summary\x18\x01 \x01(\x0B2\x1F.temporal.api.common.v1.Payload\x120\x0A\x07details\x18\x02 \x01(\x0B2\x1F.temporal.api.common.v1.PayloadB\x7F\x0A\x16io.temporal.api.sdk.v1B\x11UserMetadataProtoP\x01Z\x1Dgo.temporal.io/api/sdk/v1;sdk\xAA\x02\x15Temporalio.Api.Sdk.V1\xEA\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/WorkflowMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/WorkflowMetadata.php new file mode 100644 index 0000000..3b5c48c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Sdk/V1/WorkflowMetadata.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\x92\x05\x0A+temporal/api/sdk/v1/workflow_metadata.proto\x12\x13temporal.api.sdk.v1\"h\x0A\x10WorkflowMetadata\x12;\x0A\x0Adefinition\x18\x01 \x01(\x0B2'.temporal.api.sdk.v1.WorkflowDefinition\x12\x17\x0A\x0Fcurrent_details\x18\x02 \x01(\x09\"\x91\x02\x0A\x12WorkflowDefinition\x12\x0C\x0A\x04type\x18\x01 \x01(\x09\x12M\x0A\x11query_definitions\x18\x02 \x03(\x0B22.temporal.api.sdk.v1.WorkflowInteractionDefinition\x12N\x0A\x12signal_definitions\x18\x03 \x03(\x0B22.temporal.api.sdk.v1.WorkflowInteractionDefinition\x12N\x0A\x12update_definitions\x18\x04 \x03(\x0B22.temporal.api.sdk.v1.WorkflowInteractionDefinition\"B\x0A\x1DWorkflowInteractionDefinition\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09B\x83\x01\x0A\x16io.temporal.api.sdk.v1B\x15WorkflowMetadataProtoP\x01Z\x1Dgo.temporal.io/api/sdk/v1;sdk\xAA\x02\x15Temporalio.Api.Sdk.V1\xEA\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Taskqueue/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Taskqueue/V1/Message.php new file mode 100644 index 0000000..f4cfd9c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Taskqueue/V1/Message.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xA6\x15\x0A'temporal/api/taskqueue/v1/message.proto\x12\x19temporal.api.taskqueue.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A&temporal/api/enums/v1/task_queue.proto\x1A\$temporal/api/common/v1/message.proto\"b\x0A\x09TaskQueue\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x122\x0A\x04kind\x18\x02 \x01(\x0E2\$.temporal.api.enums.v1.TaskQueueKind\x12\x13\x0A\x0Bnormal_name\x18\x03 \x01(\x09\"O\x0A\x11TaskQueueMetadata\x12:\x0A\x14max_tasks_per_second\x18\x01 \x01(\x0B2\x1C.google.protobuf.DoubleValue\"W\x0A\x19TaskQueueVersionSelection\x12\x11\x0A\x09build_ids\x18\x01 \x03(\x09\x12\x13\x0A\x0Bunversioned\x18\x02 \x01(\x08\x12\x12\x0A\x0Aall_active\x18\x03 \x01(\x08\"\x95\x02\x0A\x14TaskQueueVersionInfo\x12R\x0A\x0Atypes_info\x18\x01 \x03(\x0B2>.temporal.api.taskqueue.v1.TaskQueueVersionInfo.TypesInfoEntry\x12I\x0A\x11task_reachability\x18\x02 \x01(\x0E2..temporal.api.enums.v1.BuildIdTaskReachability\x1A^\x0A\x0ETypesInfoEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x05\x12;\x0A\x05value\x18\x02 \x01(\x0B2,.temporal.api.taskqueue.v1.TaskQueueTypeInfo:\x028\x01\"\x85\x01\x0A\x11TaskQueueTypeInfo\x126\x0A\x07pollers\x18\x01 \x03(\x0B2%.temporal.api.taskqueue.v1.PollerInfo\x128\x0A\x05stats\x18\x02 \x01(\x0B2).temporal.api.taskqueue.v1.TaskQueueStats\"\xA4\x01\x0A\x0ETaskQueueStats\x12!\x0A\x19approximate_backlog_count\x18\x01 \x01(\x03\x12:\x0A\x17approximate_backlog_age\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x12\x16\x0A\x0Etasks_add_rate\x18\x03 \x01(\x02\x12\x1B\x0A\x13tasks_dispatch_rate\x18\x04 \x01(\x02\"\xAC\x01\x0A\x0FTaskQueueStatus\x12\x1A\x0A\x12backlog_count_hint\x18\x01 \x01(\x03\x12\x12\x0A\x0Aread_level\x18\x02 \x01(\x03\x12\x11\x0A\x09ack_level\x18\x03 \x01(\x03\x12\x17\x0A\x0Frate_per_second\x18\x04 \x01(\x01\x12=\x0A\x0Dtask_id_block\x18\x05 \x01(\x0B2&.temporal.api.taskqueue.v1.TaskIdBlock\"/\x0A\x0BTaskIdBlock\x12\x10\x0A\x08start_id\x18\x01 \x01(\x03\x12\x0E\x0A\x06end_id\x18\x02 \x01(\x03\"B\x0A\x1ATaskQueuePartitionMetadata\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x17\x0A\x0Fowner_host_name\x18\x02 \x01(\x09\"\xC5\x01\x0A\x0APollerInfo\x124\x0A\x10last_access_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\x12\x17\x0A\x0Frate_per_second\x18\x03 \x01(\x01\x12V\x0A\x1Bworker_version_capabilities\x18\x04 \x01(\x0B21.temporal.api.common.v1.WorkerVersionCapabilities\"\x9A\x01\x0A\x19StickyExecutionAttributes\x12?\x0A\x11worker_task_queue\x18\x01 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12<\x0A\x19schedule_to_start_timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\")\x0A\x14CompatibleVersionSet\x12\x11\x0A\x09build_ids\x18\x01 \x03(\x09\"j\x0A\x15TaskQueueReachability\x12\x12\x0A\x0Atask_queue\x18\x01 \x01(\x09\x12=\x0A\x0Creachability\x18\x02 \x03(\x0E2'.temporal.api.enums.v1.TaskReachability\"z\x0A\x13BuildIdReachability\x12\x10\x0A\x08build_id\x18\x01 \x01(\x09\x12Q\x0A\x17task_queue_reachability\x18\x02 \x03(\x0B20.temporal.api.taskqueue.v1.TaskQueueReachability\"+\x0A\x10RampByPercentage\x12\x17\x0A\x0Framp_percentage\x18\x01 \x01(\x02\"\x80\x01\x0A\x15BuildIdAssignmentRule\x12\x17\x0A\x0Ftarget_build_id\x18\x01 \x01(\x09\x12F\x0A\x0Fpercentage_ramp\x18\x03 \x01(\x0B2+.temporal.api.taskqueue.v1.RampByPercentageH\x00B\x06\x0A\x04ramp\"Q\x0A\x1DCompatibleBuildIdRedirectRule\x12\x17\x0A\x0Fsource_build_id\x18\x01 \x01(\x09\x12\x17\x0A\x0Ftarget_build_id\x18\x02 \x01(\x09\"\x93\x01\x0A TimestampedBuildIdAssignmentRule\x12>\x0A\x04rule\x18\x01 \x01(\x0B20.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x12/\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xA3\x01\x0A(TimestampedCompatibleBuildIdRedirectRule\x12F\x0A\x04rule\x18\x01 \x01(\x0B28.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x12/\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x98\x01\x0A\x1Cio.temporal.api.taskqueue.v1B\x0CMessageProtoP\x01Z)go.temporal.io/api/taskqueue/v1;taskqueue\xAA\x02\x1BTemporalio.Api.TaskQueue.V1\xEA\x02\x1ETemporalio::Api::TaskQueue::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Update/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Update/V1/Message.php new file mode 100644 index 0000000..25f42a3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Update/V1/Message.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xC6\x0A\x0A\$temporal/api/update/v1/message.proto\x12\x16temporal.api.update.v1\x1A\"temporal/api/enums/v1/update.proto\x1A%temporal/api/failure/v1/message.proto\"c\x0A\x0AWaitPolicy\x12U\x0A\x0Flifecycle_stage\x18\x01 \x01(\x0E2<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\"e\x0A\x09UpdateRef\x12E\x0A\x12workflow_execution\x18\x01 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x11\x0A\x09update_id\x18\x02 \x01(\x09\"|\x0A\x07Outcome\x123\x0A\x07success\x18\x01 \x01(\x0B2 .temporal.api.common.v1.PayloadsH\x00\x123\x0A\x07failure\x18\x02 \x01(\x0B2 .temporal.api.failure.v1.FailureH\x00B\x07\x0A\x05value\"+\x0A\x04Meta\x12\x11\x0A\x09update_id\x18\x01 \x01(\x09\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\"u\x0A\x05Input\x12.\x0A\x06header\x18\x01 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12\x0C\x0A\x04name\x18\x02 \x01(\x09\x12.\x0A\x04args\x18\x03 \x01(\x0B2 .temporal.api.common.v1.Payloads\"c\x0A\x07Request\x12*\x0A\x04meta\x18\x01 \x01(\x0B2\x1C.temporal.api.update.v1.Meta\x12,\x0A\x05input\x18\x02 \x01(\x0B2\x1D.temporal.api.update.v1.Input\"\xCC\x01\x0A\x09Rejection\x12#\x0A\x1Brejected_request_message_id\x18\x01 \x01(\x09\x12,\x0A\$rejected_request_sequencing_event_id\x18\x02 \x01(\x03\x129\x0A\x10rejected_request\x18\x03 \x01(\x0B2\x1F.temporal.api.update.v1.Request\x121\x0A\x07failure\x18\x04 \x01(\x0B2 .temporal.api.failure.v1.Failure\"\x9A\x01\x0A\x0AAcceptance\x12#\x0A\x1Baccepted_request_message_id\x18\x01 \x01(\x09\x12,\x0A\$accepted_request_sequencing_event_id\x18\x02 \x01(\x03\x129\x0A\x10accepted_request\x18\x03 \x01(\x0B2\x1F.temporal.api.update.v1.Request\"h\x0A\x08Response\x12*\x0A\x04meta\x18\x01 \x01(\x0B2\x1C.temporal.api.update.v1.Meta\x120\x0A\x07outcome\x18\x02 \x01(\x0B2\x1F.temporal.api.update.v1.OutcomeB\x89\x01\x0A\x19io.temporal.api.update.v1B\x0CMessageProtoP\x01Z#go.temporal.io/api/update/v1;update\xAA\x02\x18Temporalio.Api.Update.V1\xEA\x02\x1BTemporalio::Api::Update::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Version/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Version/V1/Message.php new file mode 100644 index 0000000..a6ee0c8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Version/V1/Message.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA9\x05\x0A%temporal/api/version/v1/message.proto\x12\x17temporal.api.version.v1\x1A\"temporal/api/enums/v1/common.proto\"_\x0A\x0BReleaseInfo\x12\x0F\x0A\x07version\x18\x01 \x01(\x09\x120\x0A\x0Crelease_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05notes\x18\x03 \x01(\x09\"K\x0A\x05Alert\x12\x0F\x0A\x07message\x18\x01 \x01(\x09\x121\x0A\x08severity\x18\x02 \x01(\x0E2\x1F.temporal.api.enums.v1.Severity\"\xFB\x01\x0A\x0BVersionInfo\x125\x0A\x07current\x18\x01 \x01(\x0B2\$.temporal.api.version.v1.ReleaseInfo\x129\x0A\x0Brecommended\x18\x02 \x01(\x0B2\$.temporal.api.version.v1.ReleaseInfo\x12\x14\x0A\x0Cinstructions\x18\x03 \x01(\x09\x12.\x0A\x06alerts\x18\x04 \x03(\x0B2\x1E.temporal.api.version.v1.Alert\x124\x0A\x10last_update_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x8E\x01\x0A\x1Aio.temporal.api.version.v1B\x0CMessageProtoP\x01Z%go.temporal.io/api/version/v1;version\xAA\x02\x19Temporalio.Api.Version.V1\xEA\x02\x1CTemporalio::Api::Version::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflow/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflow/V1/Message.php new file mode 100644 index 0000000..c34d8df --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflow/V1/Message.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + "\x0A\xBB,\x0A&temporal/api/workflow/v1/message.proto\x12\x18temporal.api.workflow.v1\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\"temporal/api/enums/v1/common.proto\x1A\$temporal/api/enums/v1/workflow.proto\x1A\$temporal/api/common/v1/message.proto\x1A%temporal/api/failure/v1/message.proto\x1A'temporal/api/taskqueue/v1/message.proto\x1A'temporal/api/sdk/v1/user_metadata.proto\"\xE1\x07\x0A\x15WorkflowExecutionInfo\x12<\x0A\x09execution\x18\x01 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x122\x0A\x04type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12.\x0A\x0Astart_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12.\x0A\x0Aclose_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12>\x0A\x06status\x18\x05 \x01(\x0E2..temporal.api.enums.v1.WorkflowExecutionStatus\x12\x16\x0A\x0Ehistory_length\x18\x06 \x01(\x03\x12\x1B\x0A\x13parent_namespace_id\x18\x07 \x01(\x09\x12C\x0A\x10parent_execution\x18\x08 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x122\x0A\x0Eexecution_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12*\x0A\x04memo\x18\x0A \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x0B \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12@\x0A\x11auto_reset_points\x18\x0C \x01(\x0B2%.temporal.api.workflow.v1.ResetPoints\x12\x12\x0A\x0Atask_queue\x18\x0D \x01(\x09\x12\x1E\x0A\x16state_transition_count\x18\x0E \x01(\x03\x12\x1A\x0A\x12history_size_bytes\x18\x0F \x01(\x03\x12T\x0A most_recent_worker_version_stamp\x18\x10 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\x125\x0A\x12execution_duration\x18\x11 \x01(\x0B2\x19.google.protobuf.Duration\x12A\x0A\x0Eroot_execution\x18\x12 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x19\x0A\x11assigned_build_id\x18\x13 \x01(\x09\x12\x1A\x0A\x12inherited_build_id\x18\x14 \x01(\x09\"\xC7\x02\x0A\x17WorkflowExecutionConfig\x128\x0A\x0Atask_queue\x18\x01 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12=\x0A\x1Aworkflow_execution_timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x14workflow_run_timeout\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x12@\x0A\x1Ddefault_workflow_task_timeout\x18\x04 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x0Duser_metadata\x18\x05 \x01(\x0B2!.temporal.api.sdk.v1.UserMetadata\"\x87\x06\x0A\x13PendingActivityInfo\x12\x13\x0A\x0Bactivity_id\x18\x01 \x01(\x09\x12;\x0A\x0Dactivity_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.ActivityType\x12:\x0A\x05state\x18\x03 \x01(\x0E2+.temporal.api.enums.v1.PendingActivityState\x12;\x0A\x11heartbeat_details\x18\x04 \x01(\x0B2 .temporal.api.common.v1.Payloads\x127\x0A\x13last_heartbeat_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x11last_started_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0F\x0A\x07attempt\x18\x07 \x01(\x05\x12\x18\x0A\x10maximum_attempts\x18\x08 \x01(\x05\x122\x0A\x0Escheduled_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\x123\x0A\x0Fexpiration_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.Timestamp\x126\x0A\x0Clast_failure\x18\x0B \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x1C\x0A\x14last_worker_identity\x18\x0C \x01(\x09\x127\x0A\x15use_workflow_build_id\x18\x0D \x01(\x0B2\x16.google.protobuf.EmptyH\x00\x12.\x0A\$last_independently_assigned_build_id\x18\x0E \x01(\x09H\x00\x12M\x0A\x19last_worker_version_stamp\x18\x0F \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStampB\x13\x0A\x11assigned_build_id\"\xB9\x01\x0A\x19PendingChildExecutionInfo\x12\x13\x0A\x0Bworkflow_id\x18\x01 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x02 \x01(\x09\x12\x1A\x0A\x12workflow_type_name\x18\x03 \x01(\x09\x12\x14\x0A\x0Cinitiated_id\x18\x04 \x01(\x03\x12E\x0A\x13parent_close_policy\x18\x05 \x01(\x0E2(.temporal.api.enums.v1.ParentClosePolicy\"\x8D\x02\x0A\x17PendingWorkflowTaskInfo\x12>\x0A\x05state\x18\x01 \x01(\x0E2/.temporal.api.enums.v1.PendingWorkflowTaskState\x122\x0A\x0Escheduled_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12;\x0A\x17original_scheduled_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x0Cstarted_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0F\x0A\x07attempt\x18\x05 \x01(\x05\"G\x0A\x0BResetPoints\x128\x0A\x06points\x18\x01 \x03(\x0B2(.temporal.api.workflow.v1.ResetPointInfo\"\xEB\x01\x0A\x0EResetPointInfo\x12\x10\x0A\x08build_id\x18\x07 \x01(\x09\x12\x17\x0A\x0Fbinary_checksum\x18\x01 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x02 \x01(\x09\x12(\x0A first_workflow_task_completed_id\x18\x03 \x01(\x03\x12/\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bexpire_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x12\x0A\x0Aresettable\x18\x06 \x01(\x08\"\x86\x06\x0A\x18NewWorkflowExecutionInfo\x12\x13\x0A\x0Bworkflow_id\x18\x01 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x128\x0A\x0Atask_queue\x18\x03 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x04 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12=\x0A\x1Aworkflow_execution_timeout\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x14workflow_run_timeout\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x12N\x0A\x18workflow_id_reuse_policy\x18\x08 \x01(\x0E2,.temporal.api.enums.v1.WorkflowIdReusePolicy\x129\x0A\x0Cretry_policy\x18\x09 \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x15\x0A\x0Dcron_schedule\x18\x0A \x01(\x09\x12*\x0A\x04memo\x18\x0B \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x0C \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12.\x0A\x06header\x18\x0D \x01(\x0B2\x1E.temporal.api.common.v1.Header\x128\x0A\x0Duser_metadata\x18\x0E \x01(\x0B2!.temporal.api.sdk.v1.UserMetadata\"\xBA\x04\x0A\x0CCallbackInfo\x122\x0A\x08callback\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Callback\x12?\x0A\x07trigger\x18\x02 \x01(\x0B2..temporal.api.workflow.v1.CallbackInfo.Trigger\x125\x0A\x11registration_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x123\x0A\x05state\x18\x04 \x01(\x0E2\$.temporal.api.enums.v1.CallbackState\x12\x0F\x0A\x07attempt\x18\x05 \x01(\x05\x12>\x0A\x1Alast_attempt_complete_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12>\x0A\x14last_attempt_failure\x18\x07 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12>\x0A\x1Anext_attempt_schedule_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x10\x0A\x0EWorkflowClosed\x1Af\x0A\x07Trigger\x12P\x0A\x0Fworkflow_closed\x18\x01 \x01(\x0B25.temporal.api.workflow.v1.CallbackInfo.WorkflowClosedH\x00B\x09\x0A\x07variant\"\xC1\x04\x0A\x19PendingNexusOperationInfo\x12\x10\x0A\x08endpoint\x18\x01 \x01(\x09\x12\x0F\x0A\x07service\x18\x02 \x01(\x09\x12\x11\x0A\x09operation\x18\x03 \x01(\x09\x12\x14\x0A\x0Coperation_id\x18\x04 \x01(\x09\x12<\x0A\x19schedule_to_close_timeout\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x122\x0A\x0Escheduled_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12@\x0A\x05state\x18\x07 \x01(\x0E21.temporal.api.enums.v1.PendingNexusOperationState\x12\x0F\x0A\x07attempt\x18\x08 \x01(\x05\x12>\x0A\x1Alast_attempt_complete_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12>\x0A\x14last_attempt_failure\x18\x0A \x01(\x0B2 .temporal.api.failure.v1.Failure\x12>\x0A\x1Anext_attempt_schedule_time\x18\x0B \x01(\x0B2\x1A.google.protobuf.Timestamp\x12S\x0A\x11cancellation_info\x18\x0C \x01(\x0B28.temporal.api.workflow.v1.NexusOperationCancellationInfo\"\xEC\x02\x0A\x1ENexusOperationCancellationInfo\x122\x0A\x0Erequested_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12E\x0A\x05state\x18\x02 \x01(\x0E26.temporal.api.enums.v1.NexusOperationCancellationState\x12\x0F\x0A\x07attempt\x18\x03 \x01(\x05\x12>\x0A\x1Alast_attempt_complete_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12>\x0A\x14last_attempt_failure\x18\x05 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12>\x0A\x1Anext_attempt_schedule_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x93\x01\x0A\x1Bio.temporal.api.workflow.v1B\x0CMessageProtoP\x01Z'go.temporal.io/api/workflow/v1;workflow\xAA\x02\x1ATemporalio.Api.Workflow.V1\xEA\x02\x1DTemporalio::Api::Workflow::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflowservice/V1/RequestResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflowservice/V1/RequestResponse.php new file mode 100644 index 0000000..49f9a94 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflowservice/V1/RequestResponse.php @@ -0,0 +1,54 @@ +internalAddGeneratedFile( + "\x0A\xEE\xE2\x01\x0A6temporal/api/workflowservice/v1/request_response.proto\x12\x1Ftemporal.api.workflowservice.v1\x1A\$temporal/api/enums/v1/workflow.proto\x1A%temporal/api/enums/v1/namespace.proto\x1A(temporal/api/enums/v1/failed_cause.proto\x1A\"temporal/api/enums/v1/common.proto\x1A!temporal/api/enums/v1/query.proto\x1A!temporal/api/enums/v1/reset.proto\x1A&temporal/api/enums/v1/task_queue.proto\x1A\"temporal/api/enums/v1/update.proto\x1A\$temporal/api/common/v1/message.proto\x1A%temporal/api/history/v1/message.proto\x1A&temporal/api/workflow/v1/message.proto\x1A%temporal/api/command/v1/message.proto\x1A%temporal/api/failure/v1/message.proto\x1A\$temporal/api/filter/v1/message.proto\x1A&temporal/api/protocol/v1/message.proto\x1A'temporal/api/namespace/v1/message.proto\x1A#temporal/api/query/v1/message.proto\x1A)temporal/api/replication/v1/message.proto\x1A&temporal/api/schedule/v1/message.proto\x1A'temporal/api/taskqueue/v1/message.proto\x1A\$temporal/api/update/v1/message.proto\x1A%temporal/api/version/v1/message.proto\x1A#temporal/api/batch/v1/message.proto\x1A0temporal/api/sdk/v1/task_complete_metadata.proto\x1A'temporal/api/sdk/v1/user_metadata.proto\x1A#temporal/api/nexus/v1/message.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x88\x05\x0A\x18RegisterNamespaceRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x13\x0A\x0Bowner_email\x18\x03 \x01(\x09\x12F\x0A#workflow_execution_retention_period\x18\x04 \x01(\x0B2\x19.google.protobuf.Duration\x12G\x0A\x08clusters\x18\x05 \x03(\x0B25.temporal.api.replication.v1.ClusterReplicationConfig\x12\x1B\x0A\x13active_cluster_name\x18\x06 \x01(\x09\x12Q\x0A\x04data\x18\x07 \x03(\x0B2C.temporal.api.workflowservice.v1.RegisterNamespaceRequest.DataEntry\x12\x16\x0A\x0Esecurity_token\x18\x08 \x01(\x09\x12\x1B\x0A\x13is_global_namespace\x18\x09 \x01(\x08\x12D\x0A\x16history_archival_state\x18\x0A \x01(\x0E2\$.temporal.api.enums.v1.ArchivalState\x12\x1C\x0A\x14history_archival_uri\x18\x0B \x01(\x09\x12G\x0A\x19visibility_archival_state\x18\x0C \x01(\x0E2\$.temporal.api.enums.v1.ArchivalState\x12\x1F\x0A\x17visibility_archival_uri\x18\x0D \x01(\x09\x1A+\x0A\x09DataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x1B\x0A\x19RegisterNamespaceResponse\"\x89\x01\x0A\x15ListNamespacesRequest\x12\x11\x0A\x09page_size\x18\x01 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\x12D\x0A\x10namespace_filter\x18\x03 \x01(\x0B2*.temporal.api.namespace.v1.NamespaceFilter\"\x81\x01\x0A\x16ListNamespacesResponse\x12N\x0A\x0Anamespaces\x18\x01 \x03(\x0B2:.temporal.api.workflowservice.v1.DescribeNamespaceResponse\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"9\x0A\x18DescribeNamespaceRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x0A\x0A\x02id\x18\x02 \x01(\x09\"\xEC\x02\x0A\x19DescribeNamespaceResponse\x12@\x0A\x0Enamespace_info\x18\x01 \x01(\x0B2(.temporal.api.namespace.v1.NamespaceInfo\x12:\x0A\x06config\x18\x02 \x01(\x0B2*.temporal.api.namespace.v1.NamespaceConfig\x12S\x0A\x12replication_config\x18\x03 \x01(\x0B27.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\x0A\x10failover_version\x18\x04 \x01(\x03\x12\x1B\x0A\x13is_global_namespace\x18\x05 \x01(\x08\x12E\x0A\x10failover_history\x18\x06 \x03(\x0B2+.temporal.api.replication.v1.FailoverStatus\"\xCF\x02\x0A\x16UpdateNamespaceRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12C\x0A\x0Bupdate_info\x18\x02 \x01(\x0B2..temporal.api.namespace.v1.UpdateNamespaceInfo\x12:\x0A\x06config\x18\x03 \x01(\x0B2*.temporal.api.namespace.v1.NamespaceConfig\x12S\x0A\x12replication_config\x18\x04 \x01(\x0B27.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x16\x0A\x0Esecurity_token\x18\x05 \x01(\x09\x12\x19\x0A\x11delete_bad_binary\x18\x06 \x01(\x09\x12\x19\x0A\x11promote_namespace\x18\x07 \x01(\x08\"\xA3\x02\x0A\x17UpdateNamespaceResponse\x12@\x0A\x0Enamespace_info\x18\x01 \x01(\x0B2(.temporal.api.namespace.v1.NamespaceInfo\x12:\x0A\x06config\x18\x02 \x01(\x0B2*.temporal.api.namespace.v1.NamespaceConfig\x12S\x0A\x12replication_config\x18\x03 \x01(\x0B27.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\x0A\x10failover_version\x18\x04 \x01(\x03\x12\x1B\x0A\x13is_global_namespace\x18\x05 \x01(\x08\"F\x0A\x19DeprecateNamespaceRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x16\x0A\x0Esecurity_token\x18\x02 \x01(\x09\"\x1C\x0A\x1ADeprecateNamespaceResponse\"\xB3\x09\x0A\x1DStartWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x128\x0A\x0Atask_queue\x18\x04 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12=\x0A\x1Aworkflow_execution_timeout\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x14workflow_run_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x12\x10\x0A\x08identity\x18\x09 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x0A \x01(\x09\x12N\x0A\x18workflow_id_reuse_policy\x18\x0B \x01(\x0E2,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12T\x0A\x1Bworkflow_id_conflict_policy\x18\x16 \x01(\x0E2/.temporal.api.enums.v1.WorkflowIdConflictPolicy\x129\x0A\x0Cretry_policy\x18\x0C \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x15\x0A\x0Dcron_schedule\x18\x0D \x01(\x09\x12*\x0A\x04memo\x18\x0E \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x0F \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12.\x0A\x06header\x18\x10 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12\x1F\x0A\x17request_eager_execution\x18\x11 \x01(\x08\x12;\x0A\x11continued_failure\x18\x12 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12@\x0A\x16last_completion_result\x18\x13 \x01(\x0B2 .temporal.api.common.v1.Payloads\x127\x0A\x14workflow_start_delay\x18\x14 \x01(\x0B2\x19.google.protobuf.Duration\x12>\x0A\x14completion_callbacks\x18\x15 \x03(\x0B2 .temporal.api.common.v1.Callback\x128\x0A\x0Duser_metadata\x18\x17 \x01(\x0B2!.temporal.api.sdk.v1.UserMetadata\"\x9E\x01\x0A\x1EStartWorkflowExecutionResponse\x12\x0E\x0A\x06run_id\x18\x01 \x01(\x09\x12\x0F\x0A\x07started\x18\x03 \x01(\x08\x12[\x0A\x13eager_workflow_task\x18\x02 \x01(\x0B2>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\"\xAA\x02\x0A\"GetWorkflowExecutionHistoryRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12<\x0A\x09execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x19\x0A\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x04 \x01(\x0C\x12\x16\x0A\x0Ewait_new_event\x18\x05 \x01(\x08\x12P\x0A\x19history_event_filter_type\x18\x06 \x01(\x0E2-.temporal.api.enums.v1.HistoryEventFilterType\x12\x15\x0A\x0Dskip_archival\x18\x07 \x01(\x08\"\xBA\x01\x0A#GetWorkflowExecutionHistoryResponse\x121\x0A\x07history\x18\x01 \x01(\x0B2 .temporal.api.history.v1.History\x125\x0A\x0Braw_history\x18\x02 \x03(\x0B2 .temporal.api.common.v1.DataBlob\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\x12\x10\x0A\x08archived\x18\x04 \x01(\x08\"\xB0\x01\x0A)GetWorkflowExecutionHistoryReverseRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12<\x0A\x09execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x19\x0A\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x04 \x01(\x0C\"x\x0A*GetWorkflowExecutionHistoryReverseResponse\x121\x0A\x07history\x18\x01 \x01(\x0B2 .temporal.api.history.v1.History\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\"\xEE\x01\x0A\x1CPollWorkflowTaskQueueRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x128\x0A\x0Atask_queue\x18\x02 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12\x17\x0A\x0Fbinary_checksum\x18\x04 \x01(\x09\x12V\x0A\x1Bworker_version_capabilities\x18\x05 \x01(\x0B21.temporal.api.common.v1.WorkerVersionCapabilities\"\xBE\x06\x0A\x1DPollWorkflowTaskQueueResponse\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12!\x0A\x19previous_started_event_id\x18\x04 \x01(\x03\x12\x18\x0A\x10started_event_id\x18\x05 \x01(\x03\x12\x0F\x0A\x07attempt\x18\x06 \x01(\x05\x12\x1A\x0A\x12backlog_count_hint\x18\x07 \x01(\x03\x121\x0A\x07history\x18\x08 \x01(\x0B2 .temporal.api.history.v1.History\x12\x17\x0A\x0Fnext_page_token\x18\x09 \x01(\x0C\x123\x0A\x05query\x18\x0A \x01(\x0B2\$.temporal.api.query.v1.WorkflowQuery\x12K\x0A\x1Dworkflow_execution_task_queue\x18\x0B \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x122\x0A\x0Escheduled_time\x18\x0C \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x0Cstarted_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\\\x0A\x07queries\x18\x0E \x03(\x0B2K.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.QueriesEntry\x123\x0A\x08messages\x18\x0F \x03(\x0B2!.temporal.api.protocol.v1.Message\x1AT\x0A\x0CQueriesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x123\x0A\x05value\x18\x02 \x01(\x0B2\$.temporal.api.query.v1.WorkflowQuery:\x028\x01\"\xA4\x06\x0A#RespondWorkflowTaskCompletedRequest\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x122\x0A\x08commands\x18\x02 \x03(\x0B2 .temporal.api.command.v1.Command\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12O\x0A\x11sticky_attributes\x18\x04 \x01(\x0B24.temporal.api.taskqueue.v1.StickyExecutionAttributes\x12 \x0A\x18return_new_workflow_task\x18\x05 \x01(\x08\x12&\x0A\x1Eforce_create_new_workflow_task\x18\x06 \x01(\x08\x12\x17\x0A\x0Fbinary_checksum\x18\x07 \x01(\x09\x12m\x0A\x0Dquery_results\x18\x08 \x03(\x0B2V.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.QueryResultsEntry\x12\x11\x0A\x09namespace\x18\x09 \x01(\x09\x12H\x0A\x14worker_version_stamp\x18\x0A \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\x123\x0A\x08messages\x18\x0B \x03(\x0B2!.temporal.api.protocol.v1.Message\x12H\x0A\x0Csdk_metadata\x18\x0C \x01(\x0B22.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12C\x0A\x11metering_metadata\x18\x0D \x01(\x0B2(.temporal.api.common.v1.MeteringMetadata\x1A_\x0A\x11QueryResultsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x129\x0A\x05value\x18\x02 \x01(\x0B2*.temporal.api.query.v1.WorkflowQueryResult:\x028\x01\"\xF5\x01\x0A\$RespondWorkflowTaskCompletedResponse\x12U\x0A\x0Dworkflow_task\x18\x01 \x01(\x0B2>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\x12V\x0A\x0Eactivity_tasks\x18\x02 \x03(\x0B2>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse\x12\x1E\x0A\x16reset_history_event_id\x18\x03 \x01(\x03\"\xDF\x02\x0A RespondWorkflowTaskFailedRequest\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x12=\x0A\x05cause\x18\x02 \x01(\x0E2..temporal.api.enums.v1.WorkflowTaskFailedCause\x121\x0A\x07failure\x18\x03 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\x12\x17\x0A\x0Fbinary_checksum\x18\x05 \x01(\x09\x12\x11\x0A\x09namespace\x18\x06 \x01(\x09\x123\x0A\x08messages\x18\x07 \x03(\x0B2!.temporal.api.protocol.v1.Message\x12B\x0A\x0Eworker_version\x18\x08 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"#\x0A!RespondWorkflowTaskFailedResponse\"\xA0\x02\x0A\x1CPollActivityTaskQueueRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x128\x0A\x0Atask_queue\x18\x02 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12I\x0A\x13task_queue_metadata\x18\x04 \x01(\x0B2,.temporal.api.taskqueue.v1.TaskQueueMetadata\x12V\x0A\x1Bworker_version_capabilities\x18\x05 \x01(\x0B21.temporal.api.common.v1.WorkerVersionCapabilities\"\xE8\x06\x0A\x1DPollActivityTaskQueueResponse\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x12\x1A\x0A\x12workflow_namespace\x18\x02 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12E\x0A\x12workflow_execution\x18\x04 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dactivity_type\x18\x05 \x01(\x0B2\$.temporal.api.common.v1.ActivityType\x12\x13\x0A\x0Bactivity_id\x18\x06 \x01(\x09\x12.\x0A\x06header\x18\x07 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12/\x0A\x05input\x18\x08 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12;\x0A\x11heartbeat_details\x18\x09 \x01(\x0B2 .temporal.api.common.v1.Payloads\x122\x0A\x0Escheduled_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x1Ecurrent_attempt_scheduled_time\x18\x0B \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x0Cstarted_time\x18\x0C \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0F\x0A\x07attempt\x18\x0D \x01(\x05\x12<\x0A\x19schedule_to_close_timeout\x18\x0E \x01(\x0B2\x19.google.protobuf.Duration\x129\x0A\x16start_to_close_timeout\x18\x0F \x01(\x0B2\x19.google.protobuf.Duration\x124\x0A\x11heartbeat_timeout\x18\x10 \x01(\x0B2\x19.google.protobuf.Duration\x129\x0A\x0Cretry_policy\x18\x11 \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\"\x90\x01\x0A\"RecordActivityTaskHeartbeatRequest\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x121\x0A\x07details\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12\x11\x0A\x09namespace\x18\x04 \x01(\x09\"?\x0A#RecordActivityTaskHeartbeatResponse\x12\x18\x0A\x10cancel_requested\x18\x01 \x01(\x08\"\xBA\x01\x0A&RecordActivityTaskHeartbeatByIdRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x03 \x01(\x09\x12\x13\x0A\x0Bactivity_id\x18\x04 \x01(\x09\x121\x0A\x07details\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x06 \x01(\x09\"C\x0A'RecordActivityTaskHeartbeatByIdResponse\x12\x18\x0A\x10cancel_requested\x18\x01 \x01(\x08\"\xD4\x01\x0A#RespondActivityTaskCompletedRequest\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x120\x0A\x06result\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12\x11\x0A\x09namespace\x18\x04 \x01(\x09\x12B\x0A\x0Eworker_version\x18\x05 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"&\x0A\$RespondActivityTaskCompletedResponse\"\xBA\x01\x0A'RespondActivityTaskCompletedByIdRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x03 \x01(\x09\x12\x13\x0A\x0Bactivity_id\x18\x04 \x01(\x09\x120\x0A\x06result\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x06 \x01(\x09\"*\x0A(RespondActivityTaskCompletedByIdResponse\"\x94\x02\x0A RespondActivityTaskFailedRequest\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x121\x0A\x07failure\x18\x02 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12\x11\x0A\x09namespace\x18\x04 \x01(\x09\x12@\x0A\x16last_heartbeat_details\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12B\x0A\x0Eworker_version\x18\x06 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"W\x0A!RespondActivityTaskFailedResponse\x122\x0A\x08failures\x18\x01 \x03(\x0B2 .temporal.api.failure.v1.Failure\"\xFA\x01\x0A\$RespondActivityTaskFailedByIdRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x03 \x01(\x09\x12\x13\x0A\x0Bactivity_id\x18\x04 \x01(\x09\x121\x0A\x07failure\x18\x05 \x01(\x0B2 .temporal.api.failure.v1.Failure\x12\x10\x0A\x08identity\x18\x06 \x01(\x09\x12@\x0A\x16last_heartbeat_details\x18\x07 \x01(\x0B2 .temporal.api.common.v1.Payloads\"[\x0A%RespondActivityTaskFailedByIdResponse\x122\x0A\x08failures\x18\x01 \x03(\x0B2 .temporal.api.failure.v1.Failure\"\xD4\x01\x0A\"RespondActivityTaskCanceledRequest\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x121\x0A\x07details\x18\x02 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12\x11\x0A\x09namespace\x18\x04 \x01(\x09\x12B\x0A\x0Eworker_version\x18\x05 \x01(\x0B2*.temporal.api.common.v1.WorkerVersionStamp\"%\x0A#RespondActivityTaskCanceledResponse\"\xBA\x01\x0A&RespondActivityTaskCanceledByIdRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12\x0E\x0A\x06run_id\x18\x03 \x01(\x09\x12\x13\x0A\x0Bactivity_id\x18\x04 \x01(\x09\x121\x0A\x07details\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x06 \x01(\x09\")\x0A'RespondActivityTaskCanceledByIdResponse\"\xD7\x01\x0A%RequestCancelWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x04 \x01(\x09\x12\x1E\x0A\x16first_execution_run_id\x18\x05 \x01(\x09\x12\x0E\x0A\x06reason\x18\x06 \x01(\x09\"(\x0A&RequestCancelWorkflowExecutionResponse\"\xCC\x02\x0A\x1ESignalWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x13\x0A\x0Bsignal_name\x18\x03 \x01(\x09\x12/\x0A\x05input\x18\x04 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x05 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x06 \x01(\x09\x12\x0F\x0A\x07control\x18\x07 \x01(\x09\x12.\x0A\x06header\x18\x08 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12#\x0A\x1Bskip_generate_workflow_task\x18\x09 \x01(\x08\"!\x0A\x1FSignalWorkflowExecutionResponse\"\xE0\x08\x0A'SignalWithStartWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bworkflow_id\x18\x02 \x01(\x09\x12;\x0A\x0Dworkflow_type\x18\x03 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x128\x0A\x0Atask_queue\x18\x04 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12/\x0A\x05input\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12=\x0A\x1Aworkflow_execution_timeout\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x14workflow_run_timeout\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x128\x0A\x15workflow_task_timeout\x18\x08 \x01(\x0B2\x19.google.protobuf.Duration\x12\x10\x0A\x08identity\x18\x09 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x0A \x01(\x09\x12N\x0A\x18workflow_id_reuse_policy\x18\x0B \x01(\x0E2,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12T\x0A\x1Bworkflow_id_conflict_policy\x18\x16 \x01(\x0E2/.temporal.api.enums.v1.WorkflowIdConflictPolicy\x12\x13\x0A\x0Bsignal_name\x18\x0C \x01(\x09\x126\x0A\x0Csignal_input\x18\x0D \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x0F\x0A\x07control\x18\x0E \x01(\x09\x129\x0A\x0Cretry_policy\x18\x0F \x01(\x0B2#.temporal.api.common.v1.RetryPolicy\x12\x15\x0A\x0Dcron_schedule\x18\x10 \x01(\x09\x12*\x0A\x04memo\x18\x11 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x12 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12.\x0A\x06header\x18\x13 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x127\x0A\x14workflow_start_delay\x18\x14 \x01(\x0B2\x19.google.protobuf.Duration\x12#\x0A\x1Bskip_generate_workflow_task\x18\x15 \x01(\x08\x128\x0A\x0Duser_metadata\x18\x17 \x01(\x0B2!.temporal.api.sdk.v1.UserMetadata\"K\x0A(SignalWithStartWorkflowExecutionResponse\x12\x0E\x0A\x06run_id\x18\x01 \x01(\x09\x12\x0F\x0A\x07started\x18\x02 \x01(\x08\"\xDE\x02\x0A\x1DResetWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x0E\x0A\x06reason\x18\x03 \x01(\x09\x12%\x0A\x1Dworkflow_task_finish_event_id\x18\x04 \x01(\x03\x12\x12\x0A\x0Arequest_id\x18\x05 \x01(\x09\x12C\x0A\x12reset_reapply_type\x18\x06 \x01(\x0E2'.temporal.api.enums.v1.ResetReapplyType\x12S\x0A\x1Breset_reapply_exclude_types\x18\x07 \x03(\x0E2..temporal.api.enums.v1.ResetReapplyExcludeType\"0\x0A\x1EResetWorkflowExecutionResponse\x12\x0E\x0A\x06run_id\x18\x01 \x01(\x09\"\xF2\x01\x0A!TerminateWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x0E\x0A\x06reason\x18\x03 \x01(\x09\x121\x0A\x07details\x18\x04 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x10\x0A\x08identity\x18\x05 \x01(\x09\x12\x1E\x0A\x16first_execution_run_id\x18\x06 \x01(\x09\"\$\x0A\"TerminateWorkflowExecutionResponse\"z\x0A\x1EDeleteWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\"!\x0A\x1FDeleteWorkflowExecutionResponse\"\xC9\x02\x0A!ListOpenWorkflowExecutionsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x19\x0A\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\x12B\x0A\x11start_time_filter\x18\x04 \x01(\x0B2'.temporal.api.filter.v1.StartTimeFilter\x12K\x0A\x10execution_filter\x18\x05 \x01(\x0B2/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12A\x0A\x0Btype_filter\x18\x06 \x01(\x0B2*.temporal.api.filter.v1.WorkflowTypeFilterH\x00B\x09\x0A\x07filters\"\x82\x01\x0A\"ListOpenWorkflowExecutionsResponse\x12C\x0A\x0Aexecutions\x18\x01 \x03(\x0B2/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"\x8A\x03\x0A#ListClosedWorkflowExecutionsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x19\x0A\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\x12B\x0A\x11start_time_filter\x18\x04 \x01(\x0B2'.temporal.api.filter.v1.StartTimeFilter\x12K\x0A\x10execution_filter\x18\x05 \x01(\x0B2/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12A\x0A\x0Btype_filter\x18\x06 \x01(\x0B2*.temporal.api.filter.v1.WorkflowTypeFilterH\x00\x12=\x0A\x0Dstatus_filter\x18\x07 \x01(\x0B2\$.temporal.api.filter.v1.StatusFilterH\x00B\x09\x0A\x07filters\"\x84\x01\x0A\$ListClosedWorkflowExecutionsResponse\x12C\x0A\x0Aexecutions\x18\x01 \x03(\x0B2/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"m\x0A\x1DListWorkflowExecutionsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\x12\x0D\x0A\x05query\x18\x04 \x01(\x09\"~\x0A\x1EListWorkflowExecutionsResponse\x12C\x0A\x0Aexecutions\x18\x01 \x03(\x0B2/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"u\x0A%ListArchivedWorkflowExecutionsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\x12\x0D\x0A\x05query\x18\x04 \x01(\x09\"\x86\x01\x0A&ListArchivedWorkflowExecutionsResponse\x12C\x0A\x0Aexecutions\x18\x01 \x03(\x0B2/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"m\x0A\x1DScanWorkflowExecutionsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\x12\x0D\x0A\x05query\x18\x04 \x01(\x09\"~\x0A\x1EScanWorkflowExecutionsResponse\x12C\x0A\x0Aexecutions\x18\x01 \x03(\x0B2/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"B\x0A\x1ECountWorkflowExecutionsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x0D\x0A\x05query\x18\x02 \x01(\x09\"\xED\x01\x0A\x1FCountWorkflowExecutionsResponse\x12\x0D\x0A\x05count\x18\x01 \x01(\x03\x12a\x0A\x06groups\x18\x02 \x03(\x0B2Q.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup\x1AX\x0A\x10AggregationGroup\x125\x0A\x0Cgroup_values\x18\x01 \x03(\x0B2\x1F.temporal.api.common.v1.Payload\x12\x0D\x0A\x05count\x18\x02 \x01(\x03\"\x1C\x0A\x1AGetSearchAttributesRequest\"\xC9\x01\x0A\x1BGetSearchAttributesResponse\x12T\x0A\x04keys\x18\x01 \x03(\x0B2F.temporal.api.workflowservice.v1.GetSearchAttributesResponse.KeysEntry\x1AT\x0A\x09KeysEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x126\x0A\x05value\x18\x02 \x01(\x0E2'.temporal.api.enums.v1.IndexedValueType:\x028\x01\"\xDE\x01\x0A RespondQueryTaskCompletedRequest\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x12>\x0A\x0Ecompleted_type\x18\x02 \x01(\x0E2&.temporal.api.enums.v1.QueryResultType\x126\x0A\x0Cquery_result\x18\x03 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12\x15\x0A\x0Derror_message\x18\x04 \x01(\x09\x12\x11\x0A\x09namespace\x18\x06 \x01(\x09J\x04\x08\x05\x10\x06\"#\x0A!RespondQueryTaskCompletedResponse\"n\x0A\x1BResetStickyTaskQueueRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12<\x0A\x09execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\"\x1E\x0A\x1CResetStickyTaskQueueResponse\"\xE9\x01\x0A\x14QueryWorkflowRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12<\x0A\x09execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x123\x0A\x05query\x18\x03 \x01(\x0B2\$.temporal.api.query.v1.WorkflowQuery\x12K\x0A\x16query_reject_condition\x18\x04 \x01(\x0E2+.temporal.api.enums.v1.QueryRejectCondition\"\x8D\x01\x0A\x15QueryWorkflowResponse\x126\x0A\x0Cquery_result\x18\x01 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12<\x0A\x0Equery_rejected\x18\x02 \x01(\x0B2\$.temporal.api.query.v1.QueryRejected\"s\x0A DescribeWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12<\x0A\x09execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\"\xC0\x04\x0A!DescribeWorkflowExecutionResponse\x12K\x0A\x10execution_config\x18\x01 \x01(\x0B21.temporal.api.workflow.v1.WorkflowExecutionConfig\x12P\x0A\x17workflow_execution_info\x18\x02 \x01(\x0B2/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12I\x0A\x12pending_activities\x18\x03 \x03(\x0B2-.temporal.api.workflow.v1.PendingActivityInfo\x12M\x0A\x10pending_children\x18\x04 \x03(\x0B23.temporal.api.workflow.v1.PendingChildExecutionInfo\x12P\x0A\x15pending_workflow_task\x18\x05 \x01(\x0B21.temporal.api.workflow.v1.PendingWorkflowTaskInfo\x129\x0A\x09callbacks\x18\x06 \x03(\x0B2&.temporal.api.workflow.v1.CallbackInfo\x12U\x0A\x18pending_nexus_operations\x18\x07 \x03(\x0B23.temporal.api.workflow.v1.PendingNexusOperationInfo\"\xE1\x03\x0A\x18DescribeTaskQueueRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x128\x0A\x0Atask_queue\x18\x02 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12=\x0A\x0Ftask_queue_type\x18\x03 \x01(\x0E2\$.temporal.api.enums.v1.TaskQueueType\x12!\x0A\x19include_task_queue_status\x18\x04 \x01(\x08\x12>\x0A\x08api_mode\x18\x05 \x01(\x0E2,.temporal.api.enums.v1.DescribeTaskQueueMode\x12F\x0A\x08versions\x18\x06 \x01(\x0B24.temporal.api.taskqueue.v1.TaskQueueVersionSelection\x12>\x0A\x10task_queue_types\x18\x07 \x03(\x0E2\$.temporal.api.enums.v1.TaskQueueType\x12\x14\x0A\x0Creport_stats\x18\x08 \x01(\x08\x12\x16\x0A\x0Ereport_pollers\x18\x09 \x01(\x08\x12 \x0A\x18report_task_reachability\x18\x0A \x01(\x08\"\xE5\x02\x0A\x19DescribeTaskQueueResponse\x126\x0A\x07pollers\x18\x01 \x03(\x0B2%.temporal.api.taskqueue.v1.PollerInfo\x12E\x0A\x11task_queue_status\x18\x02 \x01(\x0B2*.temporal.api.taskqueue.v1.TaskQueueStatus\x12c\x0A\x0Dversions_info\x18\x03 \x03(\x0B2L.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.VersionsInfoEntry\x1Ad\x0A\x11VersionsInfoEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12>\x0A\x05value\x18\x02 \x01(\x0B2/.temporal.api.taskqueue.v1.TaskQueueVersionInfo:\x028\x01\"\x17\x0A\x15GetClusterInfoRequest\"\x8B\x03\x0A\x16GetClusterInfoResponse\x12h\x0A\x11supported_clients\x18\x01 \x03(\x0B2M.temporal.api.workflowservice.v1.GetClusterInfoResponse.SupportedClientsEntry\x12\x16\x0A\x0Eserver_version\x18\x02 \x01(\x09\x12\x12\x0A\x0Acluster_id\x18\x03 \x01(\x09\x12:\x0A\x0Cversion_info\x18\x04 \x01(\x0B2\$.temporal.api.version.v1.VersionInfo\x12\x14\x0A\x0Ccluster_name\x18\x05 \x01(\x09\x12\x1B\x0A\x13history_shard_count\x18\x06 \x01(\x05\x12\x19\x0A\x11persistence_store\x18\x07 \x01(\x09\x12\x18\x0A\x10visibility_store\x18\x08 \x01(\x09\x1A7\x0A\x15SupportedClientsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x16\x0A\x14GetSystemInfoRequest\"\xF4\x03\x0A\x15GetSystemInfoResponse\x12\x16\x0A\x0Eserver_version\x18\x01 \x01(\x09\x12Y\x0A\x0Ccapabilities\x18\x02 \x01(\x0B2C.temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities\x1A\xE7\x02\x0A\x0CCapabilities\x12\x1F\x0A\x17signal_and_query_header\x18\x01 \x01(\x08\x12&\x0A\x1Einternal_error_differentiation\x18\x02 \x01(\x08\x12*\x0A\"activity_failure_include_heartbeat\x18\x03 \x01(\x08\x12\x1A\x0A\x12supports_schedules\x18\x04 \x01(\x08\x12\"\x0A\x1Aencoded_failure_attributes\x18\x05 \x01(\x08\x12!\x0A\x19build_id_based_versioning\x18\x06 \x01(\x08\x12\x13\x0A\x0Bupsert_memo\x18\x07 \x01(\x08\x12\x1C\x0A\x14eager_workflow_start\x18\x08 \x01(\x08\x12\x14\x0A\x0Csdk_metadata\x18\x09 \x01(\x08\x12'\x0A\x1Fcount_group_by_execution_status\x18\x0A \x01(\x08\x12\x0D\x0A\x05nexus\x18\x0B \x01(\x08\"m\x0A\x1EListTaskQueuePartitionsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x128\x0A\x0Atask_queue\x18\x02 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\"\xDF\x01\x0A\x1FListTaskQueuePartitionsResponse\x12]\x0A\x1Eactivity_task_queue_partitions\x18\x01 \x03(\x0B25.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata\x12]\x0A\x1Eworkflow_task_queue_partitions\x18\x02 \x03(\x0B25.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata\"\xCC\x02\x0A\x15CreateScheduleRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bschedule_id\x18\x02 \x01(\x09\x124\x0A\x08schedule\x18\x03 \x01(\x0B2\".temporal.api.schedule.v1.Schedule\x12>\x0A\x0Dinitial_patch\x18\x04 \x01(\x0B2'.temporal.api.schedule.v1.SchedulePatch\x12\x10\x0A\x08identity\x18\x05 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x06 \x01(\x09\x12*\x0A\x04memo\x18\x07 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x08 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\"0\x0A\x16CreateScheduleResponse\x12\x16\x0A\x0Econflict_token\x18\x01 \x01(\x0C\"A\x0A\x17DescribeScheduleRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bschedule_id\x18\x02 \x01(\x09\"\x8F\x02\x0A\x18DescribeScheduleResponse\x124\x0A\x08schedule\x18\x01 \x01(\x0B2\".temporal.api.schedule.v1.Schedule\x124\x0A\x04info\x18\x02 \x01(\x0B2&.temporal.api.schedule.v1.ScheduleInfo\x12*\x0A\x04memo\x18\x03 \x01(\x0B2\x1C.temporal.api.common.v1.Memo\x12C\x0A\x11search_attributes\x18\x04 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\x12\x16\x0A\x0Econflict_token\x18\x05 \x01(\x0C\"\xF8\x01\x0A\x15UpdateScheduleRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bschedule_id\x18\x02 \x01(\x09\x124\x0A\x08schedule\x18\x03 \x01(\x0B2\".temporal.api.schedule.v1.Schedule\x12\x16\x0A\x0Econflict_token\x18\x04 \x01(\x0C\x12\x10\x0A\x08identity\x18\x05 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x06 \x01(\x09\x12C\x0A\x11search_attributes\x18\x07 \x01(\x0B2(.temporal.api.common.v1.SearchAttributes\"\x18\x0A\x16UpdateScheduleResponse\"\x9C\x01\x0A\x14PatchScheduleRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bschedule_id\x18\x02 \x01(\x09\x126\x0A\x05patch\x18\x03 \x01(\x0B2'.temporal.api.schedule.v1.SchedulePatch\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\x12\x12\x0A\x0Arequest_id\x18\x05 \x01(\x09\"\x17\x0A\x15PatchScheduleResponse\"\xA8\x01\x0A ListScheduleMatchingTimesRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bschedule_id\x18\x02 \x01(\x09\x12.\x0A\x0Astart_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"S\x0A!ListScheduleMatchingTimesResponse\x12.\x0A\x0Astart_time\x18\x01 \x03(\x0B2\x1A.google.protobuf.Timestamp\"Q\x0A\x15DeleteScheduleRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x13\x0A\x0Bschedule_id\x18\x02 \x01(\x09\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\"\x18\x0A\x16DeleteScheduleResponse\"l\x0A\x14ListSchedulesRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x19\x0A\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\x12\x0D\x0A\x05query\x18\x04 \x01(\x09\"p\x0A\x15ListSchedulesResponse\x12>\x0A\x09schedules\x18\x01 \x03(\x0B2+.temporal.api.schedule.v1.ScheduleListEntry\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"\x86\x05\x0A'UpdateWorkerBuildIdCompatibilityRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x12\x0A\x0Atask_queue\x18\x02 \x01(\x09\x12-\x0A#add_new_build_id_in_new_default_set\x18\x03 \x01(\x09H\x00\x12\x87\x01\x0A\x1Badd_new_compatible_build_id\x18\x04 \x01(\x0B2`.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersionH\x00\x12!\x0A\x17promote_set_by_build_id\x18\x05 \x01(\x09H\x00\x12%\x0A\x1Bpromote_build_id_within_set\x18\x06 \x01(\x09H\x00\x12h\x0A\x0Amerge_sets\x18\x07 \x01(\x0B2R.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSetsH\x00\x1Ao\x0A\x17AddNewCompatibleVersion\x12\x14\x0A\x0Cnew_build_id\x18\x01 \x01(\x09\x12\$\x0A\x1Cexisting_compatible_build_id\x18\x02 \x01(\x09\x12\x18\x0A\x10make_set_default\x18\x03 \x01(\x08\x1AI\x0A\x09MergeSets\x12\x1C\x0A\x14primary_set_build_id\x18\x01 \x01(\x09\x12\x1E\x0A\x16secondary_set_build_id\x18\x02 \x01(\x09B\x0B\x0A\x09operation\"@\x0A(UpdateWorkerBuildIdCompatibilityResponseJ\x04\x08\x01\x10\x02R\x0Eversion_set_id\"_\x0A\$GetWorkerBuildIdCompatibilityRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x12\x0A\x0Atask_queue\x18\x02 \x01(\x09\x12\x10\x0A\x08max_sets\x18\x03 \x01(\x05\"t\x0A%GetWorkerBuildIdCompatibilityResponse\x12K\x0A\x12major_version_sets\x18\x01 \x03(\x0B2/.temporal.api.taskqueue.v1.CompatibleVersionSet\"\xB5\x0D\x0A\"UpdateWorkerVersioningRulesRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x12\x0A\x0Atask_queue\x18\x02 \x01(\x09\x12\x16\x0A\x0Econflict_token\x18\x03 \x01(\x0C\x12\x81\x01\x0A\x16insert_assignment_rule\x18\x04 \x01(\x0B2_.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRuleH\x00\x12\x83\x01\x0A\x17replace_assignment_rule\x18\x05 \x01(\x0B2`.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRuleH\x00\x12\x81\x01\x0A\x16delete_assignment_rule\x18\x06 \x01(\x0B2_.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRuleH\x00\x12\x8C\x01\x0A\x1Cadd_compatible_redirect_rule\x18\x07 \x01(\x0B2d.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRuleH\x00\x12\x94\x01\x0A replace_compatible_redirect_rule\x18\x08 \x01(\x0B2h.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRuleH\x00\x12\x92\x01\x0A\x1Fdelete_compatible_redirect_rule\x18\x09 \x01(\x0B2g.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRuleH\x00\x12l\x0A\x0Fcommit_build_id\x18\x0A \x01(\x0B2Q.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildIdH\x00\x1Aq\x0A\x1BInsertBuildIdAssignmentRule\x12\x12\x0A\x0Arule_index\x18\x01 \x01(\x05\x12>\x0A\x04rule\x18\x02 \x01(\x0B20.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x1A\x81\x01\x0A\x1CReplaceBuildIdAssignmentRule\x12\x12\x0A\x0Arule_index\x18\x01 \x01(\x05\x12>\x0A\x04rule\x18\x02 \x01(\x0B20.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x12\x0D\x0A\x05force\x18\x03 \x01(\x08\x1A@\x0A\x1BDeleteBuildIdAssignmentRule\x12\x12\x0A\x0Arule_index\x18\x01 \x01(\x05\x12\x0D\x0A\x05force\x18\x02 \x01(\x08\x1Aj\x0A AddCompatibleBuildIdRedirectRule\x12F\x0A\x04rule\x18\x01 \x01(\x0B28.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x1An\x0A\$ReplaceCompatibleBuildIdRedirectRule\x12F\x0A\x04rule\x18\x01 \x01(\x0B28.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x1A>\x0A#DeleteCompatibleBuildIdRedirectRule\x12\x17\x0A\x0Fsource_build_id\x18\x01 \x01(\x09\x1A7\x0A\x0DCommitBuildId\x12\x17\x0A\x0Ftarget_build_id\x18\x01 \x01(\x09\x12\x0D\x0A\x05force\x18\x02 \x01(\x08B\x0B\x0A\x09operation\"\xFC\x01\x0A#UpdateWorkerVersioningRulesResponse\x12U\x0A\x10assignment_rules\x18\x01 \x03(\x0B2;.temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule\x12f\x0A\x19compatible_redirect_rules\x18\x02 \x03(\x0B2C.temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule\x12\x16\x0A\x0Econflict_token\x18\x03 \x01(\x0C\"H\x0A\x1FGetWorkerVersioningRulesRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x12\x0A\x0Atask_queue\x18\x02 \x01(\x09\"\xF9\x01\x0A GetWorkerVersioningRulesResponse\x12U\x0A\x10assignment_rules\x18\x01 \x03(\x0B2;.temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule\x12f\x0A\x19compatible_redirect_rules\x18\x02 \x03(\x0B2C.temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule\x12\x16\x0A\x0Econflict_token\x18\x03 \x01(\x0C\"\x9C\x01\x0A GetWorkerTaskReachabilityRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x11\x0A\x09build_ids\x18\x02 \x03(\x09\x12\x13\x0A\x0Btask_queues\x18\x03 \x03(\x09\x12=\x0A\x0Creachability\x18\x04 \x01(\x0E2'.temporal.api.enums.v1.TaskReachability\"r\x0A!GetWorkerTaskReachabilityResponse\x12M\x0A\x15build_id_reachability\x18\x01 \x03(\x0B2..temporal.api.taskqueue.v1.BuildIdReachability\"\x85\x02\x0A\x1EUpdateWorkflowExecutionRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12E\x0A\x12workflow_execution\x18\x02 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12\x1E\x0A\x16first_execution_run_id\x18\x03 \x01(\x09\x127\x0A\x0Bwait_policy\x18\x04 \x01(\x0B2\".temporal.api.update.v1.WaitPolicy\x120\x0A\x07request\x18\x05 \x01(\x0B2\x1F.temporal.api.update.v1.Request\"\xD7\x01\x0A\x1FUpdateWorkflowExecutionResponse\x125\x0A\x0Aupdate_ref\x18\x01 \x01(\x0B2!.temporal.api.update.v1.UpdateRef\x120\x0A\x07outcome\x18\x02 \x01(\x0B2\x1F.temporal.api.update.v1.Outcome\x12K\x0A\x05stage\x18\x03 \x01(\x0E2<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\"\xDD\x04\x0A\x1AStartBatchOperationRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x18\x0A\x10visibility_query\x18\x02 \x01(\x09\x12\x0E\x0A\x06job_id\x18\x03 \x01(\x09\x12\x0E\x0A\x06reason\x18\x04 \x01(\x09\x12=\x0A\x0Aexecutions\x18\x05 \x03(\x0B2).temporal.api.common.v1.WorkflowExecution\x12!\x0A\x19max_operations_per_second\x18\x06 \x01(\x02\x12Q\x0A\x15termination_operation\x18\x0A \x01(\x0B20.temporal.api.batch.v1.BatchOperationTerminationH\x00\x12G\x0A\x10signal_operation\x18\x0B \x01(\x0B2+.temporal.api.batch.v1.BatchOperationSignalH\x00\x12S\x0A\x16cancellation_operation\x18\x0C \x01(\x0B21.temporal.api.batch.v1.BatchOperationCancellationH\x00\x12K\x0A\x12deletion_operation\x18\x0D \x01(\x0B2-.temporal.api.batch.v1.BatchOperationDeletionH\x00\x12E\x0A\x0Freset_operation\x18\x0E \x01(\x0B2*.temporal.api.batch.v1.BatchOperationResetH\x00B\x0B\x0A\x09operation\"\x1D\x0A\x1BStartBatchOperationResponse\"`\x0A\x19StopBatchOperationRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x0E\x0A\x06job_id\x18\x02 \x01(\x09\x12\x0E\x0A\x06reason\x18\x03 \x01(\x09\x12\x10\x0A\x08identity\x18\x04 \x01(\x09\"\x1C\x0A\x1AStopBatchOperationResponse\"B\x0A\x1DDescribeBatchOperationRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x0E\x0A\x06job_id\x18\x02 \x01(\x09\"\x92\x03\x0A\x1EDescribeBatchOperationResponse\x12A\x0A\x0Eoperation_type\x18\x01 \x01(\x0E2).temporal.api.enums.v1.BatchOperationType\x12\x0E\x0A\x06job_id\x18\x02 \x01(\x09\x129\x0A\x05state\x18\x03 \x01(\x0E2*.temporal.api.enums.v1.BatchOperationState\x12.\x0A\x0Astart_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12.\x0A\x0Aclose_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1D\x0A\x15total_operation_count\x18\x06 \x01(\x03\x12 \x0A\x18complete_operation_count\x18\x07 \x01(\x03\x12\x1F\x0A\x17failure_operation_count\x18\x08 \x01(\x03\x12\x10\x0A\x08identity\x18\x09 \x01(\x09\x12\x0E\x0A\x06reason\x18\x0A \x01(\x09\"[\x0A\x1AListBatchOperationsRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x17\x0A\x0Fnext_page_token\x18\x03 \x01(\x0C\"y\x0A\x1BListBatchOperationsResponse\x12A\x0A\x0Eoperation_info\x18\x01 \x03(\x0B2).temporal.api.batch.v1.BatchOperationInfo\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x0C\"\xB9\x01\x0A\"PollWorkflowExecutionUpdateRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x125\x0A\x0Aupdate_ref\x18\x02 \x01(\x0B2!.temporal.api.update.v1.UpdateRef\x12\x10\x0A\x08identity\x18\x03 \x01(\x09\x127\x0A\x0Bwait_policy\x18\x04 \x01(\x0B2\".temporal.api.update.v1.WaitPolicy\"\xDB\x01\x0A#PollWorkflowExecutionUpdateResponse\x120\x0A\x07outcome\x18\x01 \x01(\x0B2\x1F.temporal.api.update.v1.Outcome\x12K\x0A\x05stage\x18\x02 \x01(\x0E2<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\x125\x0A\x0Aupdate_ref\x18\x03 \x01(\x0B2!.temporal.api.update.v1.UpdateRef\"\xD2\x01\x0A\x19PollNexusTaskQueueRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\x128\x0A\x0Atask_queue\x18\x03 \x01(\x0B2\$.temporal.api.taskqueue.v1.TaskQueue\x12V\x0A\x1Bworker_version_capabilities\x18\x04 \x01(\x0B21.temporal.api.common.v1.WorkerVersionCapabilities\"a\x0A\x1APollNexusTaskQueueResponse\x12\x12\x0A\x0Atask_token\x18\x01 \x01(\x0C\x12/\x0A\x07request\x18\x02 \x01(\x0B2\x1E.temporal.api.nexus.v1.Request\"\x8E\x01\x0A RespondNexusTaskCompletedRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\x12\x12\x0A\x0Atask_token\x18\x03 \x01(\x0C\x121\x0A\x08response\x18\x04 \x01(\x0B2\x1F.temporal.api.nexus.v1.Response\"#\x0A!RespondNexusTaskCompletedResponse\"\x8C\x01\x0A\x1DRespondNexusTaskFailedRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12\x10\x0A\x08identity\x18\x02 \x01(\x09\x12\x12\x0A\x0Atask_token\x18\x03 \x01(\x0C\x122\x0A\x05error\x18\x04 \x01(\x0B2#.temporal.api.nexus.v1.HandlerError\" \x0A\x1ERespondNexusTaskFailedResponse\"\xDF\x02\x0A\x1CExecuteMultiOperationRequest\x12\x11\x0A\x09namespace\x18\x01 \x01(\x09\x12[\x0A\x0Aoperations\x18\x02 \x03(\x0B2G.temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation\x1A\xCE\x01\x0A\x09Operation\x12X\x0A\x0Estart_workflow\x18\x01 \x01(\x0B2>.temporal.api.workflowservice.v1.StartWorkflowExecutionRequestH\x00\x12Z\x0A\x0Fupdate_workflow\x18\x02 \x01(\x0B2?.temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequestH\x00B\x0B\x0A\x09operation\"\xCC\x02\x0A\x1DExecuteMultiOperationResponse\x12Z\x0A\x09responses\x18\x01 \x03(\x0B2G.temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response\x1A\xCE\x01\x0A\x08Response\x12Y\x0A\x0Estart_workflow\x18\x01 \x01(\x0B2?.temporal.api.workflowservice.v1.StartWorkflowExecutionResponseH\x00\x12[\x0A\x0Fupdate_workflow\x18\x02 \x01(\x0B2@.temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponseH\x00B\x0A\x0A\x08responseB\xBE\x01\x0A\"io.temporal.api.workflowservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xAA\x02!Temporalio.Api.WorkflowService.V1\xEA\x02\$Temporalio::Api::WorkflowService::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflowservice/V1/Service.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflowservice/V1/Service.php new file mode 100644 index 0000000..02801f6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/GPBMetadata/Temporal/Api/Workflowservice/V1/Service.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\x8Df\x0A-temporal/api/workflowservice/v1/service.proto\x12\x1Ftemporal.api.workflowservice.v1\x1A\x1Cgoogle/api/annotations.proto2\xDBc\x0A\x0FWorkflowService\x12\xAA\x01\x0A\x11RegisterNamespace\x129.temporal.api.workflowservice.v1.RegisterNamespaceRequest\x1A:.temporal.api.workflowservice.v1.RegisterNamespaceResponse\"\x1E\x82\xD3\xE4\x93\x02\x18\"\x13/cluster/namespaces:\x01*\x12\xB3\x01\x0A\x11DescribeNamespace\x129.temporal.api.workflowservice.v1.DescribeNamespaceRequest\x1A:.temporal.api.workflowservice.v1.DescribeNamespaceResponse\"'\x82\xD3\xE4\x93\x02!\x12\x1F/cluster/namespaces/{namespace}\x12\x9E\x01\x0A\x0EListNamespaces\x126.temporal.api.workflowservice.v1.ListNamespacesRequest\x1A7.temporal.api.workflowservice.v1.ListNamespacesResponse\"\x1B\x82\xD3\xE4\x93\x02\x15\x12\x13/cluster/namespaces\x12\xB7\x01\x0A\x0FUpdateNamespace\x127.temporal.api.workflowservice.v1.UpdateNamespaceRequest\x1A8.temporal.api.workflowservice.v1.UpdateNamespaceResponse\"1\x82\xD3\xE4\x93\x02+\"&/cluster/namespaces/{namespace}/update:\x01*\x12\x8F\x01\x0A\x12DeprecateNamespace\x12:.temporal.api.workflowservice.v1.DeprecateNamespaceRequest\x1A;.temporal.api.workflowservice.v1.DeprecateNamespaceResponse\"\x00\x12\xD5\x01\x0A\x16StartWorkflowExecution\x12>.temporal.api.workflowservice.v1.StartWorkflowExecutionRequest\x1A?.temporal.api.workflowservice.v1.StartWorkflowExecutionResponse\":\x82\xD3\xE4\x93\x024\"//namespaces/{namespace}/workflows/{workflow_id}:\x01*\x12\xDC\x01\x0A\x15ExecuteMultiOperation\x12=.temporal.api.workflowservice.v1.ExecuteMultiOperationRequest\x1A>.temporal.api.workflowservice.v1.ExecuteMultiOperationResponse\"D\x82\xD3\xE4\x93\x02>\"9/namespaces/{namespace}/workflows/execute-multi-operation:\x01*\x12\xF3\x01\x0A\x1BGetWorkflowExecutionHistory\x12C.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest\x1AD.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse\"I\x82\xD3\xE4\x93\x02C\x12A/namespaces/{namespace}/workflows/{execution.workflow_id}/history\x12\x90\x02\x0A\"GetWorkflowExecutionHistoryReverse\x12J.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest\x1AK.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse\"Q\x82\xD3\xE4\x93\x02K\x12I/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse\x12\x98\x01\x0A\x15PollWorkflowTaskQueue\x12=.temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest\x1A>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\"\x00\x12\xAD\x01\x0A\x1CRespondWorkflowTaskCompleted\x12D.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest\x1AE.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse\"\x00\x12\xA4\x01\x0A\x19RespondWorkflowTaskFailed\x12A.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest\x1AB.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse\"\x00\x12\x98\x01\x0A\x15PollActivityTaskQueue\x12=.temporal.api.workflowservice.v1.PollActivityTaskQueueRequest\x1A>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse\"\x00\x12\xE1\x01\x0A\x1BRecordActivityTaskHeartbeat\x12C.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest\x1AD.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse\"7\x82\xD3\xE4\x93\x021\",/namespaces/{namespace}/activities/heartbeat:\x01*\x12\xF3\x01\x0A\x1FRecordActivityTaskHeartbeatById\x12G.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest\x1AH.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse\"=\x82\xD3\xE4\x93\x027\"2/namespaces/{namespace}/activities/heartbeat-by-id:\x01*\x12\xE3\x01\x0A\x1CRespondActivityTaskCompleted\x12D.temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest\x1AE.temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse\"6\x82\xD3\xE4\x93\x020\"+/namespaces/{namespace}/activities/complete:\x01*\x12\xF5\x01\x0A RespondActivityTaskCompletedById\x12H.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest\x1AI.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse\"<\x82\xD3\xE4\x93\x026\"1/namespaces/{namespace}/activities/complete-by-id:\x01*\x12\xD6\x01\x0A\x19RespondActivityTaskFailed\x12A.temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest\x1AB.temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse\"2\x82\xD3\xE4\x93\x02,\"'/namespaces/{namespace}/activities/fail:\x01*\x12\xE8\x01\x0A\x1DRespondActivityTaskFailedById\x12E.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest\x1AF.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse\"8\x82\xD3\xE4\x93\x022\"-/namespaces/{namespace}/activities/fail-by-id:\x01*\x12\xDE\x01\x0A\x1BRespondActivityTaskCanceled\x12C.temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest\x1AD.temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse\"4\x82\xD3\xE4\x93\x02.\")/namespaces/{namespace}/activities/cancel:\x01*\x12\xF0\x01\x0A\x1FRespondActivityTaskCanceledById\x12G.temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest\x1AH.temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse\":\x82\xD3\xE4\x93\x024\"//namespaces/{namespace}/activities/cancel-by-id:\x01*\x12\x87\x02\x0A\x1ERequestCancelWorkflowExecution\x12F.temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest\x1AG.temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse\"T\x82\xD3\xE4\x93\x02N\"I/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel:\x01*\x12\x80\x02\x0A\x17SignalWorkflowExecution\x12?.temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest\x1A@.temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse\"b\x82\xD3\xE4\x93\x02\\\"W/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}:\x01*\x12\x93\x02\x0A SignalWithStartWorkflowExecution\x12H.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest\x1AI.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse\"Z\x82\xD3\xE4\x93\x02T\"O/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}:\x01*\x12\xEE\x01\x0A\x16ResetWorkflowExecution\x12>.temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest\x1A?.temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse\"S\x82\xD3\xE4\x93\x02M\"H/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:\x01*\x12\xFE\x01\x0A\x1ATerminateWorkflowExecution\x12B.temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest\x1AC.temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse\"W\x82\xD3\xE4\x93\x02Q\"L/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:\x01*\x12\x9E\x01\x0A\x17DeleteWorkflowExecution\x12?.temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest\x1A@.temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse\"\x00\x12\xA7\x01\x0A\x1AListOpenWorkflowExecutions\x12B.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest\x1AC.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse\"\x00\x12\xAD\x01\x0A\x1CListClosedWorkflowExecutions\x12D.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest\x1AE.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse\"\x00\x12\xC4\x01\x0A\x16ListWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest\x1A?.temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse\")\x82\xD3\xE4\x93\x02#\x12!/namespaces/{namespace}/workflows\x12\xE5\x01\x0A\x1EListArchivedWorkflowExecutions\x12F.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest\x1AG.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse\"2\x82\xD3\xE4\x93\x02,\x12*/namespaces/{namespace}/archived-workflows\x12\x9B\x01\x0A\x16ScanWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest\x1A?.temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse\"\x00\x12\xCC\x01\x0A\x17CountWorkflowExecutions\x12?.temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest\x1A@.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse\".\x82\xD3\xE4\x93\x02(\x12&/namespaces/{namespace}/workflow-count\x12\x92\x01\x0A\x13GetSearchAttributes\x12;.temporal.api.workflowservice.v1.GetSearchAttributesRequest\x1A<.temporal.api.workflowservice.v1.GetSearchAttributesResponse\"\x00\x12\xA4\x01\x0A\x19RespondQueryTaskCompleted\x12A.temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest\x1AB.temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse\"\x00\x12\x95\x01\x0A\x14ResetStickyTaskQueue\x12<.temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest\x1A=.temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse\"\x00\x12\xDD\x01\x0A\x0DQueryWorkflow\x125.temporal.api.workflowservice.v1.QueryWorkflowRequest\x1A6.temporal.api.workflowservice.v1.QueryWorkflowResponse\"]\x82\xD3\xE4\x93\x02W\"R/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:\x01*\x12\xE5\x01\x0A\x19DescribeWorkflowExecution\x12A.temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest\x1AB.temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse\"A\x82\xD3\xE4\x93\x02;\x129/namespaces/{namespace}/workflows/{execution.workflow_id}\x12\xC9\x01\x0A\x11DescribeTaskQueue\x129.temporal.api.workflowservice.v1.DescribeTaskQueueRequest\x1A:.temporal.api.workflowservice.v1.DescribeTaskQueueResponse\"=\x82\xD3\xE4\x93\x027\x125/namespaces/{namespace}/task-queues/{task_queue.name}\x12\x98\x01\x0A\x0EGetClusterInfo\x126.temporal.api.workflowservice.v1.GetClusterInfoRequest\x1A7.temporal.api.workflowservice.v1.GetClusterInfoResponse\"\x15\x82\xD3\xE4\x93\x02\x0F\x12\x0D/cluster-info\x12\x94\x01\x0A\x0DGetSystemInfo\x125.temporal.api.workflowservice.v1.GetSystemInfoRequest\x1A6.temporal.api.workflowservice.v1.GetSystemInfoResponse\"\x14\x82\xD3\xE4\x93\x02\x0E\x12\x0C/system-info\x12\x9E\x01\x0A\x17ListTaskQueuePartitions\x12?.temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest\x1A@.temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse\"\x00\x12\xBD\x01\x0A\x0ECreateSchedule\x126.temporal.api.workflowservice.v1.CreateScheduleRequest\x1A7.temporal.api.workflowservice.v1.CreateScheduleResponse\":\x82\xD3\xE4\x93\x024\"//namespaces/{namespace}/schedules/{schedule_id}:\x01*\x12\xC0\x01\x0A\x10DescribeSchedule\x128.temporal.api.workflowservice.v1.DescribeScheduleRequest\x1A9.temporal.api.workflowservice.v1.DescribeScheduleResponse\"7\x82\xD3\xE4\x93\x021\x12//namespaces/{namespace}/schedules/{schedule_id}\x12\xC4\x01\x0A\x0EUpdateSchedule\x126.temporal.api.workflowservice.v1.UpdateScheduleRequest\x1A7.temporal.api.workflowservice.v1.UpdateScheduleResponse\"A\x82\xD3\xE4\x93\x02;\"6/namespaces/{namespace}/schedules/{schedule_id}/update:\x01*\x12\xC0\x01\x0A\x0DPatchSchedule\x125.temporal.api.workflowservice.v1.PatchScheduleRequest\x1A6.temporal.api.workflowservice.v1.PatchScheduleResponse\"@\x82\xD3\xE4\x93\x02:\"5/namespaces/{namespace}/schedules/{schedule_id}/patch:\x01*\x12\xEA\x01\x0A\x19ListScheduleMatchingTimes\x12A.temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest\x1AB.temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse\"F\x82\xD3\xE4\x93\x02@\x12>/namespaces/{namespace}/schedules/{schedule_id}/matching-times\x12\xBA\x01\x0A\x0EDeleteSchedule\x126.temporal.api.workflowservice.v1.DeleteScheduleRequest\x1A7.temporal.api.workflowservice.v1.DeleteScheduleResponse\"7\x82\xD3\xE4\x93\x021*//namespaces/{namespace}/schedules/{schedule_id}\x12\xA9\x01\x0A\x0DListSchedules\x125.temporal.api.workflowservice.v1.ListSchedulesRequest\x1A6.temporal.api.workflowservice.v1.ListSchedulesResponse\")\x82\xD3\xE4\x93\x02#\x12!/namespaces/{namespace}/schedules\x12\xB9\x01\x0A UpdateWorkerBuildIdCompatibility\x12H.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest\x1AI.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse\"\x00\x12\x86\x02\x0A\x1DGetWorkerBuildIdCompatibility\x12E.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest\x1AF.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse\"V\x82\xD3\xE4\x93\x02P\x12N/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility\x12\xAA\x01\x0A\x1BUpdateWorkerVersioningRules\x12C.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest\x1AD.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse\"\x00\x12\xF1\x01\x0A\x18GetWorkerVersioningRules\x12@.temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest\x1AA.temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse\"P\x82\xD3\xE4\x93\x02J\x12H/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules\x12\xDC\x01\x0A\x19GetWorkerTaskReachability\x12A.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest\x1AB.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse\"8\x82\xD3\xE4\x93\x022\x120/namespaces/{namespace}/worker-task-reachability\x12\x87\x02\x0A\x17UpdateWorkflowExecution\x12?.temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest\x1A@.temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse\"i\x82\xD3\xE4\x93\x02c\"^/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}:\x01*\x12\xAA\x01\x0A\x1BPollWorkflowExecutionUpdate\x12C.temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest\x1AD.temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse\"\x00\x12\xCE\x01\x0A\x13StartBatchOperation\x12;.temporal.api.workflowservice.v1.StartBatchOperationRequest\x1A<.temporal.api.workflowservice.v1.StartBatchOperationResponse\"<\x82\xD3\xE4\x93\x026\"1/namespaces/{namespace}/batch-operations/{job_id}:\x01*\x12\xD0\x01\x0A\x12StopBatchOperation\x12:.temporal.api.workflowservice.v1.StopBatchOperationRequest\x1A;.temporal.api.workflowservice.v1.StopBatchOperationResponse\"A\x82\xD3\xE4\x93\x02;\"6/namespaces/{namespace}/batch-operations/{job_id}/stop:\x01*\x12\xD4\x01\x0A\x16DescribeBatchOperation\x12>.temporal.api.workflowservice.v1.DescribeBatchOperationRequest\x1A?.temporal.api.workflowservice.v1.DescribeBatchOperationResponse\"9\x82\xD3\xE4\x93\x023\x121/namespaces/{namespace}/batch-operations/{job_id}\x12\xC2\x01\x0A\x13ListBatchOperations\x12;.temporal.api.workflowservice.v1.ListBatchOperationsRequest\x1A<.temporal.api.workflowservice.v1.ListBatchOperationsResponse\"0\x82\xD3\xE4\x93\x02*\x12(/namespaces/{namespace}/batch-operations\x12\x8F\x01\x0A\x12PollNexusTaskQueue\x12:.temporal.api.workflowservice.v1.PollNexusTaskQueueRequest\x1A;.temporal.api.workflowservice.v1.PollNexusTaskQueueResponse\"\x00\x12\xA4\x01\x0A\x19RespondNexusTaskCompleted\x12A.temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest\x1AB.temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse\"\x00\x12\x9B\x01\x0A\x16RespondNexusTaskFailed\x12>.temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest\x1A?.temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse\"\x00B\xB6\x01\x0A\"io.temporal.api.workflowservice.v1B\x0CServiceProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xAA\x02!Temporalio.Api.WorkflowService.V1\xEA\x02\$Temporalio::Api::WorkflowService::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/GPBMetadata/Applogger.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/GPBMetadata/Applogger.php new file mode 100644 index 0000000..0064ae8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/GPBMetadata/Applogger.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xB3\x02\x0A\x1Capplogger/v1/applogger.proto\x12\x0Capplogger.v1\"F\x0A\x08LogEntry\x12\x0F\x0A\x07message\x18\x01 \x01(\x09\x12)\x0A\x09log_attrs\x18\x02 \x03(\x0B2\x16.applogger.v1.LogAttrs\"&\x0A\x08LogAttrs\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09\"\x0A\x0A\x08ResponseB\x80\x01Z6github.com/roadrunner-server/api/v4/build/applogger/v1\xCA\x02\x1BRoadRunner\\AppLogger\\DTO\\V1\xE2\x02'RoadRunner\\AppLogger\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/LogAttrs.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/LogAttrs.php new file mode 100644 index 0000000..2ef53e7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/LogAttrs.php @@ -0,0 +1,86 @@ +applogger.v1.LogAttrs + */ +class LogAttrs extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * @type string $value + * } + */ + public function __construct($data = NULL) { + \RoadRunner\AppLogger\DTO\V1\GPBMetadata\Applogger::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->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; + } + + /** + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field string value = 2; + * @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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/LogEntry.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/LogEntry.php new file mode 100644 index 0000000..f26cb13 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/LogEntry.php @@ -0,0 +1,86 @@ +applogger.v1.LogEntry + */ +class LogEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * Generated from protobuf field repeated .applogger.v1.LogAttrs log_attrs = 2; + */ + private $log_attrs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * @type array<\RoadRunner\AppLogger\DTO\V1\LogAttrs>|\Google\Protobuf\Internal\RepeatedField $log_attrs + * } + */ + public function __construct($data = NULL) { + \RoadRunner\AppLogger\DTO\V1\GPBMetadata\Applogger::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .applogger.v1.LogAttrs log_attrs = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogAttrs() + { + return $this->log_attrs; + } + + /** + * Generated from protobuf field repeated .applogger.v1.LogAttrs log_attrs = 2; + * @param array<\RoadRunner\AppLogger\DTO\V1\LogAttrs>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogAttrs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\AppLogger\DTO\V1\LogAttrs::class); + $this->log_attrs = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/Response.php new file mode 100644 index 0000000..ffd61d7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/AppLogger/DTO/V1/Response.php @@ -0,0 +1,32 @@ +applogger.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\AppLogger\DTO\V1\GPBMetadata\Applogger::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ApnsPushNotification.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ApnsPushNotification.php new file mode 100644 index 0000000..10ef66d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ApnsPushNotification.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.ApnsPushNotification + */ +class ApnsPushNotification extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map headers = 1; + */ + private $headers; + /** + * Generated from protobuf field bytes payload = 2; + */ + protected $payload = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $headers + * @type string $payload + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map headers = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Generated from protobuf field map headers = 1; + * @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; + } + + /** + * Generated from protobuf field bytes payload = 2; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Generated from protobuf field bytes payload = 2; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BatchRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BatchRequest.php new file mode 100644 index 0000000..eb672fc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BatchRequest.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.BatchRequest + */ +class BatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Command commands = 1; + */ + private $commands; + /** + * Generated from protobuf field bool parallel = 2; + */ + protected $parallel = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\Command>|\Google\Protobuf\Internal\RepeatedField $commands + * @type bool $parallel + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Command commands = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCommands() + { + return $this->commands; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Command commands = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\Command>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCommands($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\Command::class); + $this->commands = $arr; + + return $this; + } + + /** + * Generated from protobuf field bool parallel = 2; + * @return bool + */ + public function getParallel() + { + return $this->parallel; + } + + /** + * Generated from protobuf field bool parallel = 2; + * @param bool $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkBool($var); + $this->parallel = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BatchResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BatchResponse.php new file mode 100644 index 0000000..6db353c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BatchResponse.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.BatchResponse + */ +class BatchResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Reply replies = 1; + */ + private $replies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\Reply>|\Google\Protobuf\Internal\RepeatedField $replies + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Reply replies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplies() + { + return $this->replies; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Reply replies = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\Reply>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\Reply::class); + $this->replies = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserRequest.php new file mode 100644 index 0000000..647292a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserRequest.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.BlockUserRequest + */ +class BlockUserRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 expire_at = 1; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $expire_at + * @type string $user + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserResponse.php new file mode 100644 index 0000000..d945957 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.BlockUserResponse + */ +class BlockUserResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserResult.php new file mode 100644 index 0000000..c4e83dd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BlockUserResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.BlockUserResult + */ +class BlockUserResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BoolValue.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BoolValue.php new file mode 100644 index 0000000..57c9a51 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BoolValue.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.BoolValue + */ +class BoolValue extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool value = 1; + */ + protected $value = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $value + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool value = 1; + * @return bool + */ + public function getValue() + { + return $this->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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastRequest.php new file mode 100644 index 0000000..44f9f04 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastRequest.php @@ -0,0 +1,194 @@ +centrifugal.centrifugo.api.BroadcastRequest + */ +class BroadcastRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string channels = 1; + */ + private $channels; + /** + * Generated from protobuf field bytes data = 2; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 3; + */ + protected $b64data = ''; + /** + * Generated from protobuf field bool skip_history = 4; + */ + protected $skip_history = false; + /** + * Generated from protobuf field map tags = 5; + */ + private $tags; + /** + * Generated from protobuf field string idempotency_key = 6; + */ + protected $idempotency_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $channels + * @type string $data + * @type string $b64data + * @type bool $skip_history + * @type array|\Google\Protobuf\Internal\MapField $tags + * @type string $idempotency_key + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string channels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Generated from protobuf field repeated string channels = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channels = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 2; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string b64data = 3; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 3; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field bool skip_history = 4; + * @return bool + */ + public function getSkipHistory() + { + return $this->skip_history; + } + + /** + * Generated from protobuf field bool skip_history = 4; + * @param bool $var + * @return $this + */ + public function setSkipHistory($var) + { + GPBUtil::checkBool($var); + $this->skip_history = $var; + + return $this; + } + + /** + * Generated from protobuf field map tags = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Generated from protobuf field map tags = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Generated from protobuf field string idempotency_key = 6; + * @return string + */ + public function getIdempotencyKey() + { + return $this->idempotency_key; + } + + /** + * Generated from protobuf field string idempotency_key = 6; + * @param string $var + * @return $this + */ + public function setIdempotencyKey($var) + { + GPBUtil::checkString($var, True); + $this->idempotency_key = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastResponse.php new file mode 100644 index 0000000..b68c1eb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.BroadcastResponse + */ +class BroadcastResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastResult.php new file mode 100644 index 0000000..aa6faaf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/BroadcastResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.BroadcastResult + */ +class BroadcastResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.PublishResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\PublishResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.PublishResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.PublishResponse responses = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\PublishResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\PublishResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushRequest.php new file mode 100644 index 0000000..6c74e83 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.CancelPushRequest + */ +class CancelPushRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushResponse.php new file mode 100644 index 0000000..d13fe37 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.CancelPushResponse + */ +class CancelPushResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushResult.php new file mode 100644 index 0000000..54632b5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/CancelPushResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.CancelPushResult + */ +class CancelPushResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelContext.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelContext.php new file mode 100644 index 0000000..9252c3f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelContext.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.ChannelContext + */ +class ChannelContext extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 source = 1; + */ + protected $source = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $source + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 source = 1; + * @return int + */ + public function getSource() + { + return $this->source; + } + + /** + * Generated from protobuf field uint32 source = 1; + * @param int $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkUint32($var); + $this->source = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelInfo.php new file mode 100644 index 0000000..5ac0968 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelInfo.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.ChannelInfo + */ +class ChannelInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 num_clients = 1; + */ + protected $num_clients = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $num_clients + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 num_clients = 1; + * @return int + */ + public function getNumClients() + { + return $this->num_clients; + } + + /** + * Generated from protobuf field uint32 num_clients = 1; + * @param int $var + * @return $this + */ + public function setNumClients($var) + { + GPBUtil::checkUint32($var); + $this->num_clients = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsRequest.php new file mode 100644 index 0000000..062d312 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.ChannelsRequest + */ +class ChannelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string pattern = 1; + */ + protected $pattern = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pattern + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string pattern = 1; + * @return string + */ + public function getPattern() + { + return $this->pattern; + } + + /** + * Generated from protobuf field string pattern = 1; + * @param string $var + * @return $this + */ + public function setPattern($var) + { + GPBUtil::checkString($var, True); + $this->pattern = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsResponse.php new file mode 100644 index 0000000..3ab3d85 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.ChannelsResponse + */ +class ChannelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsResult.php new file mode 100644 index 0000000..641398a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ChannelsResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.ChannelsResult + */ +class ChannelsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map channels = 1; + */ + private $channels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $channels + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map channels = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Generated from protobuf field map channels = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\ChannelInfo::class); + $this->channels = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ClientInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ClientInfo.php new file mode 100644 index 0000000..56fa93f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ClientInfo.php @@ -0,0 +1,140 @@ +centrifugal.centrifugo.api.ClientInfo + */ +class ClientInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + /** + * Generated from protobuf field string client = 2; + */ + protected $client = ''; + /** + * Generated from protobuf field bytes conn_info = 3; + */ + protected $conn_info = ''; + /** + * Generated from protobuf field bytes chan_info = 4; + */ + protected $chan_info = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * @type string $client + * @type string $conn_info + * @type string $chan_info + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string client = 2; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 2; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes conn_info = 3; + * @return string + */ + public function getConnInfo() + { + return $this->conn_info; + } + + /** + * Generated from protobuf field bytes conn_info = 3; + * @param string $var + * @return $this + */ + public function setConnInfo($var) + { + GPBUtil::checkString($var, False); + $this->conn_info = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes chan_info = 4; + * @return string + */ + public function getChanInfo() + { + return $this->chan_info; + } + + /** + * Generated from protobuf field bytes chan_info = 4; + * @param string $var + * @return $this + */ + public function setChanInfo($var) + { + GPBUtil::checkString($var, False); + $this->chan_info = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Command.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Command.php new file mode 100644 index 0000000..fe944c5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Command.php @@ -0,0 +1,1334 @@ +centrifugal.centrifugo.api.Command + */ +class Command extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 id = 1; + */ + protected $id = 0; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Command.MethodType method = 2; + */ + protected $method = 0; + /** + * Generated from protobuf field bytes params = 3; + */ + protected $params = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishRequest publish = 4; + */ + protected $publish = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastRequest broadcast = 5; + */ + protected $broadcast = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeRequest subscribe = 6; + */ + protected $subscribe = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeRequest unsubscribe = 7; + */ + protected $unsubscribe = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectRequest disconnect = 8; + */ + protected $disconnect = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceRequest presence = 9; + */ + protected $presence = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsRequest presence_stats = 10; + */ + protected $presence_stats = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRequest history = 11; + */ + protected $history = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveRequest history_remove = 12; + */ + protected $history_remove = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoRequest info = 13; + */ + protected $info = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCRequest rpc = 14; + */ + protected $rpc = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshRequest refresh = 15; + */ + protected $refresh = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsRequest channels = 16; + */ + protected $channels = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsRequest connections = 17; + */ + protected $connections = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusRequest update_user_status = 18; + */ + protected $update_user_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusRequest get_user_status = 19; + */ + protected $get_user_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusRequest delete_user_status = 20; + */ + protected $delete_user_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserRequest block_user = 21; + */ + protected $block_user = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserRequest unblock_user = 22; + */ + protected $unblock_user = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenRequest revoke_token = 23; + */ + protected $revoke_token = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensRequest invalidate_user_tokens = 24; + */ + protected $invalidate_user_tokens = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterRequest device_register = 25; + */ + protected $device_register = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateRequest device_update = 26; + */ + protected $device_update = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveRequest device_remove = 27; + */ + protected $device_remove = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListRequest device_list = 28; + */ + protected $device_list = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListRequest device_topic_list = 29; + */ + protected $device_topic_list = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateRequest device_topic_update = 30; + */ + protected $device_topic_update = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListRequest user_topic_list = 31; + */ + protected $user_topic_list = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateRequest user_topic_update = 32; + */ + protected $user_topic_update = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationRequest send_push_notification = 33; + */ + protected $send_push_notification = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusRequest update_push_status = 34; + */ + protected $update_push_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushRequest cancel_push = 35; + */ + protected $cancel_push = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitRequest rate_limit = 50; + */ + protected $rate_limit = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $id + * @type int $method + * @type string $params + * @type \RoadRunner\Centrifugal\API\DTO\V1\PublishRequest $publish + * @type \RoadRunner\Centrifugal\API\DTO\V1\BroadcastRequest $broadcast + * @type \RoadRunner\Centrifugal\API\DTO\V1\SubscribeRequest $subscribe + * @type \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeRequest $unsubscribe + * @type \RoadRunner\Centrifugal\API\DTO\V1\DisconnectRequest $disconnect + * @type \RoadRunner\Centrifugal\API\DTO\V1\PresenceRequest $presence + * @type \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsRequest $presence_stats + * @type \RoadRunner\Centrifugal\API\DTO\V1\HistoryRequest $history + * @type \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveRequest $history_remove + * @type \RoadRunner\Centrifugal\API\DTO\V1\InfoRequest $info + * @type \RoadRunner\Centrifugal\API\DTO\V1\RPCRequest $rpc + * @type \RoadRunner\Centrifugal\API\DTO\V1\RefreshRequest $refresh + * @type \RoadRunner\Centrifugal\API\DTO\V1\ChannelsRequest $channels + * @type \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsRequest $connections + * @type \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusRequest $update_user_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusRequest $get_user_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusRequest $delete_user_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\BlockUserRequest $block_user + * @type \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserRequest $unblock_user + * @type \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenRequest $revoke_token + * @type \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensRequest $invalidate_user_tokens + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterRequest $device_register + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateRequest $device_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveRequest $device_remove + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceListRequest $device_list + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListRequest $device_topic_list + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateRequest $device_topic_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListRequest $user_topic_list + * @type \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateRequest $user_topic_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationRequest $send_push_notification + * @type \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusRequest $update_push_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\CancelPushRequest $cancel_push + * @type \RoadRunner\Centrifugal\API\DTO\V1\RateLimitRequest $rate_limit + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 id = 1; + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field uint32 id = 1; + * @param int $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint32($var); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Command.MethodType method = 2; + * @return int + */ + public function getMethod() + { + return $this->method; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Command.MethodType method = 2; + * @param int $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkEnum($var, \RoadRunner\Centrifugal\API\DTO\V1\Command\MethodType::class); + $this->method = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes params = 3; + * @return string + */ + public function getParams() + { + return $this->params; + } + + /** + * Generated from protobuf field bytes params = 3; + * @param string $var + * @return $this + */ + public function setParams($var) + { + GPBUtil::checkString($var, False); + $this->params = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishRequest publish = 4; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PublishRequest|null + */ + public function getPublish() + { + return $this->publish; + } + + public function hasPublish() + { + return isset($this->publish); + } + + public function clearPublish() + { + unset($this->publish); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishRequest publish = 4; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PublishRequest $var + * @return $this + */ + public function setPublish($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PublishRequest::class); + $this->publish = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastRequest broadcast = 5; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BroadcastRequest|null + */ + public function getBroadcast() + { + return $this->broadcast; + } + + public function hasBroadcast() + { + return isset($this->broadcast); + } + + public function clearBroadcast() + { + unset($this->broadcast); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastRequest broadcast = 5; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BroadcastRequest $var + * @return $this + */ + public function setBroadcast($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BroadcastRequest::class); + $this->broadcast = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeRequest subscribe = 6; + * @return \RoadRunner\Centrifugal\API\DTO\V1\SubscribeRequest|null + */ + public function getSubscribe() + { + return $this->subscribe; + } + + public function hasSubscribe() + { + return isset($this->subscribe); + } + + public function clearSubscribe() + { + unset($this->subscribe); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeRequest subscribe = 6; + * @param \RoadRunner\Centrifugal\API\DTO\V1\SubscribeRequest $var + * @return $this + */ + public function setSubscribe($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\SubscribeRequest::class); + $this->subscribe = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeRequest unsubscribe = 7; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeRequest|null + */ + public function getUnsubscribe() + { + return $this->unsubscribe; + } + + public function hasUnsubscribe() + { + return isset($this->unsubscribe); + } + + public function clearUnsubscribe() + { + unset($this->unsubscribe); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeRequest unsubscribe = 7; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeRequest $var + * @return $this + */ + public function setUnsubscribe($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeRequest::class); + $this->unsubscribe = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectRequest disconnect = 8; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DisconnectRequest|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectRequest disconnect = 8; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DisconnectRequest $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DisconnectRequest::class); + $this->disconnect = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceRequest presence = 9; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PresenceRequest|null + */ + public function getPresence() + { + return $this->presence; + } + + public function hasPresence() + { + return isset($this->presence); + } + + public function clearPresence() + { + unset($this->presence); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceRequest presence = 9; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PresenceRequest $var + * @return $this + */ + public function setPresence($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PresenceRequest::class); + $this->presence = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsRequest presence_stats = 10; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsRequest|null + */ + public function getPresenceStats() + { + return $this->presence_stats; + } + + public function hasPresenceStats() + { + return isset($this->presence_stats); + } + + public function clearPresenceStats() + { + unset($this->presence_stats); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsRequest presence_stats = 10; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsRequest $var + * @return $this + */ + public function setPresenceStats($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsRequest::class); + $this->presence_stats = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRequest history = 11; + * @return \RoadRunner\Centrifugal\API\DTO\V1\HistoryRequest|null + */ + public function getHistory() + { + return $this->history; + } + + public function hasHistory() + { + return isset($this->history); + } + + public function clearHistory() + { + unset($this->history); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRequest history = 11; + * @param \RoadRunner\Centrifugal\API\DTO\V1\HistoryRequest $var + * @return $this + */ + public function setHistory($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\HistoryRequest::class); + $this->history = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveRequest history_remove = 12; + * @return \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveRequest|null + */ + public function getHistoryRemove() + { + return $this->history_remove; + } + + public function hasHistoryRemove() + { + return isset($this->history_remove); + } + + public function clearHistoryRemove() + { + unset($this->history_remove); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveRequest history_remove = 12; + * @param \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveRequest $var + * @return $this + */ + public function setHistoryRemove($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveRequest::class); + $this->history_remove = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoRequest info = 13; + * @return \RoadRunner\Centrifugal\API\DTO\V1\InfoRequest|null + */ + public function getInfo() + { + return $this->info; + } + + public function hasInfo() + { + return isset($this->info); + } + + public function clearInfo() + { + unset($this->info); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoRequest info = 13; + * @param \RoadRunner\Centrifugal\API\DTO\V1\InfoRequest $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\InfoRequest::class); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCRequest rpc = 14; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RPCRequest|null + */ + public function getRpc() + { + return $this->rpc; + } + + public function hasRpc() + { + return isset($this->rpc); + } + + public function clearRpc() + { + unset($this->rpc); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCRequest rpc = 14; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RPCRequest $var + * @return $this + */ + public function setRpc($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RPCRequest::class); + $this->rpc = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshRequest refresh = 15; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RefreshRequest|null + */ + public function getRefresh() + { + return $this->refresh; + } + + public function hasRefresh() + { + return isset($this->refresh); + } + + public function clearRefresh() + { + unset($this->refresh); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshRequest refresh = 15; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RefreshRequest $var + * @return $this + */ + public function setRefresh($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RefreshRequest::class); + $this->refresh = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsRequest channels = 16; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ChannelsRequest|null + */ + public function getChannels() + { + return $this->channels; + } + + public function hasChannels() + { + return isset($this->channels); + } + + public function clearChannels() + { + unset($this->channels); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsRequest channels = 16; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ChannelsRequest $var + * @return $this + */ + public function setChannels($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ChannelsRequest::class); + $this->channels = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsRequest connections = 17; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsRequest|null + */ + public function getConnections() + { + return $this->connections; + } + + public function hasConnections() + { + return isset($this->connections); + } + + public function clearConnections() + { + unset($this->connections); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsRequest connections = 17; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsRequest $var + * @return $this + */ + public function setConnections($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsRequest::class); + $this->connections = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusRequest update_user_status = 18; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusRequest|null + */ + public function getUpdateUserStatus() + { + return $this->update_user_status; + } + + public function hasUpdateUserStatus() + { + return isset($this->update_user_status); + } + + public function clearUpdateUserStatus() + { + unset($this->update_user_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusRequest update_user_status = 18; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusRequest $var + * @return $this + */ + public function setUpdateUserStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusRequest::class); + $this->update_user_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusRequest get_user_status = 19; + * @return \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusRequest|null + */ + public function getGetUserStatus() + { + return $this->get_user_status; + } + + public function hasGetUserStatus() + { + return isset($this->get_user_status); + } + + public function clearGetUserStatus() + { + unset($this->get_user_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusRequest get_user_status = 19; + * @param \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusRequest $var + * @return $this + */ + public function setGetUserStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusRequest::class); + $this->get_user_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusRequest delete_user_status = 20; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusRequest|null + */ + public function getDeleteUserStatus() + { + return $this->delete_user_status; + } + + public function hasDeleteUserStatus() + { + return isset($this->delete_user_status); + } + + public function clearDeleteUserStatus() + { + unset($this->delete_user_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusRequest delete_user_status = 20; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusRequest $var + * @return $this + */ + public function setDeleteUserStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusRequest::class); + $this->delete_user_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserRequest block_user = 21; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BlockUserRequest|null + */ + public function getBlockUser() + { + return $this->block_user; + } + + public function hasBlockUser() + { + return isset($this->block_user); + } + + public function clearBlockUser() + { + unset($this->block_user); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserRequest block_user = 21; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BlockUserRequest $var + * @return $this + */ + public function setBlockUser($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BlockUserRequest::class); + $this->block_user = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserRequest unblock_user = 22; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserRequest|null + */ + public function getUnblockUser() + { + return $this->unblock_user; + } + + public function hasUnblockUser() + { + return isset($this->unblock_user); + } + + public function clearUnblockUser() + { + unset($this->unblock_user); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserRequest unblock_user = 22; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserRequest $var + * @return $this + */ + public function setUnblockUser($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserRequest::class); + $this->unblock_user = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenRequest revoke_token = 23; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenRequest|null + */ + public function getRevokeToken() + { + return $this->revoke_token; + } + + public function hasRevokeToken() + { + return isset($this->revoke_token); + } + + public function clearRevokeToken() + { + unset($this->revoke_token); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenRequest revoke_token = 23; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenRequest $var + * @return $this + */ + public function setRevokeToken($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenRequest::class); + $this->revoke_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensRequest invalidate_user_tokens = 24; + * @return \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensRequest|null + */ + public function getInvalidateUserTokens() + { + return $this->invalidate_user_tokens; + } + + public function hasInvalidateUserTokens() + { + return isset($this->invalidate_user_tokens); + } + + public function clearInvalidateUserTokens() + { + unset($this->invalidate_user_tokens); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensRequest invalidate_user_tokens = 24; + * @param \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensRequest $var + * @return $this + */ + public function setInvalidateUserTokens($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensRequest::class); + $this->invalidate_user_tokens = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterRequest device_register = 25; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterRequest|null + */ + public function getDeviceRegister() + { + return $this->device_register; + } + + public function hasDeviceRegister() + { + return isset($this->device_register); + } + + public function clearDeviceRegister() + { + unset($this->device_register); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterRequest device_register = 25; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterRequest $var + * @return $this + */ + public function setDeviceRegister($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterRequest::class); + $this->device_register = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateRequest device_update = 26; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateRequest|null + */ + public function getDeviceUpdate() + { + return $this->device_update; + } + + public function hasDeviceUpdate() + { + return isset($this->device_update); + } + + public function clearDeviceUpdate() + { + unset($this->device_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateRequest device_update = 26; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateRequest $var + * @return $this + */ + public function setDeviceUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateRequest::class); + $this->device_update = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveRequest device_remove = 27; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveRequest|null + */ + public function getDeviceRemove() + { + return $this->device_remove; + } + + public function hasDeviceRemove() + { + return isset($this->device_remove); + } + + public function clearDeviceRemove() + { + unset($this->device_remove); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveRequest device_remove = 27; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveRequest $var + * @return $this + */ + public function setDeviceRemove($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveRequest::class); + $this->device_remove = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListRequest device_list = 28; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceListRequest|null + */ + public function getDeviceList() + { + return $this->device_list; + } + + public function hasDeviceList() + { + return isset($this->device_list); + } + + public function clearDeviceList() + { + unset($this->device_list); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListRequest device_list = 28; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceListRequest $var + * @return $this + */ + public function setDeviceList($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceListRequest::class); + $this->device_list = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListRequest device_topic_list = 29; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListRequest|null + */ + public function getDeviceTopicList() + { + return $this->device_topic_list; + } + + public function hasDeviceTopicList() + { + return isset($this->device_topic_list); + } + + public function clearDeviceTopicList() + { + unset($this->device_topic_list); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListRequest device_topic_list = 29; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListRequest $var + * @return $this + */ + public function setDeviceTopicList($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListRequest::class); + $this->device_topic_list = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateRequest device_topic_update = 30; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateRequest|null + */ + public function getDeviceTopicUpdate() + { + return $this->device_topic_update; + } + + public function hasDeviceTopicUpdate() + { + return isset($this->device_topic_update); + } + + public function clearDeviceTopicUpdate() + { + unset($this->device_topic_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateRequest device_topic_update = 30; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateRequest $var + * @return $this + */ + public function setDeviceTopicUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateRequest::class); + $this->device_topic_update = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListRequest user_topic_list = 31; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListRequest|null + */ + public function getUserTopicList() + { + return $this->user_topic_list; + } + + public function hasUserTopicList() + { + return isset($this->user_topic_list); + } + + public function clearUserTopicList() + { + unset($this->user_topic_list); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListRequest user_topic_list = 31; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListRequest $var + * @return $this + */ + public function setUserTopicList($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListRequest::class); + $this->user_topic_list = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateRequest user_topic_update = 32; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateRequest|null + */ + public function getUserTopicUpdate() + { + return $this->user_topic_update; + } + + public function hasUserTopicUpdate() + { + return isset($this->user_topic_update); + } + + public function clearUserTopicUpdate() + { + unset($this->user_topic_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateRequest user_topic_update = 32; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateRequest $var + * @return $this + */ + public function setUserTopicUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateRequest::class); + $this->user_topic_update = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationRequest send_push_notification = 33; + * @return \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationRequest|null + */ + public function getSendPushNotification() + { + return $this->send_push_notification; + } + + public function hasSendPushNotification() + { + return isset($this->send_push_notification); + } + + public function clearSendPushNotification() + { + unset($this->send_push_notification); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationRequest send_push_notification = 33; + * @param \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationRequest $var + * @return $this + */ + public function setSendPushNotification($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationRequest::class); + $this->send_push_notification = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusRequest update_push_status = 34; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusRequest|null + */ + public function getUpdatePushStatus() + { + return $this->update_push_status; + } + + public function hasUpdatePushStatus() + { + return isset($this->update_push_status); + } + + public function clearUpdatePushStatus() + { + unset($this->update_push_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusRequest update_push_status = 34; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusRequest $var + * @return $this + */ + public function setUpdatePushStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusRequest::class); + $this->update_push_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushRequest cancel_push = 35; + * @return \RoadRunner\Centrifugal\API\DTO\V1\CancelPushRequest|null + */ + public function getCancelPush() + { + return $this->cancel_push; + } + + public function hasCancelPush() + { + return isset($this->cancel_push); + } + + public function clearCancelPush() + { + unset($this->cancel_push); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushRequest cancel_push = 35; + * @param \RoadRunner\Centrifugal\API\DTO\V1\CancelPushRequest $var + * @return $this + */ + public function setCancelPush($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\CancelPushRequest::class); + $this->cancel_push = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitRequest rate_limit = 50; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RateLimitRequest|null + */ + public function getRateLimit() + { + return $this->rate_limit; + } + + public function hasRateLimit() + { + return isset($this->rate_limit); + } + + public function clearRateLimit() + { + unset($this->rate_limit); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitRequest rate_limit = 50; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RateLimitRequest $var + * @return $this + */ + public function setRateLimit($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RateLimitRequest::class); + $this->rate_limit = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Command/MethodType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Command/MethodType.php new file mode 100644 index 0000000..8da611b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Command/MethodType.php @@ -0,0 +1,204 @@ +centrifugal.centrifugo.api.Command.MethodType + */ +class MethodType +{ + /** + * Generated from protobuf enum PUBLISH = 0; + */ + const PUBLISH = 0; + /** + * Generated from protobuf enum BROADCAST = 1; + */ + const BROADCAST = 1; + /** + * Generated from protobuf enum UNSUBSCRIBE = 2; + */ + const UNSUBSCRIBE = 2; + /** + * Generated from protobuf enum DISCONNECT = 3; + */ + const DISCONNECT = 3; + /** + * Generated from protobuf enum PRESENCE = 4; + */ + const PRESENCE = 4; + /** + * Generated from protobuf enum PRESENCE_STATS = 5; + */ + const PRESENCE_STATS = 5; + /** + * Generated from protobuf enum HISTORY = 6; + */ + const HISTORY = 6; + /** + * Generated from protobuf enum HISTORY_REMOVE = 7; + */ + const HISTORY_REMOVE = 7; + /** + * Generated from protobuf enum CHANNELS = 8; + */ + const CHANNELS = 8; + /** + * Generated from protobuf enum INFO = 9; + */ + const INFO = 9; + /** + * Generated from protobuf enum RPC = 10; + */ + const RPC = 10; + /** + * Generated from protobuf enum SUBSCRIBE = 11; + */ + const SUBSCRIBE = 11; + /** + * Generated from protobuf enum REFRESH = 12; + */ + const REFRESH = 12; + /** + * Generated from protobuf enum CONNECTIONS = 14; + */ + const CONNECTIONS = 14; + /** + * Generated from protobuf enum UPDATE_USER_STATUS = 15; + */ + const UPDATE_USER_STATUS = 15; + /** + * Generated from protobuf enum GET_USER_STATUS = 16; + */ + const GET_USER_STATUS = 16; + /** + * Generated from protobuf enum DELETE_USER_STATUS = 17; + */ + const DELETE_USER_STATUS = 17; + /** + * Generated from protobuf enum BLOCK_USER = 18; + */ + const BLOCK_USER = 18; + /** + * Generated from protobuf enum UNBLOCK_USER = 19; + */ + const UNBLOCK_USER = 19; + /** + * Generated from protobuf enum REVOKE_TOKEN = 20; + */ + const REVOKE_TOKEN = 20; + /** + * Generated from protobuf enum INVALIDATE_USER_TOKENS = 21; + */ + const INVALIDATE_USER_TOKENS = 21; + /** + * Generated from protobuf enum DEVICE_REGISTER = 22; + */ + const DEVICE_REGISTER = 22; + /** + * Generated from protobuf enum DEVICE_UPDATE = 23; + */ + const DEVICE_UPDATE = 23; + /** + * Generated from protobuf enum DEVICE_REMOVE = 24; + */ + const DEVICE_REMOVE = 24; + /** + * Generated from protobuf enum DEVICE_LIST = 25; + */ + const DEVICE_LIST = 25; + /** + * Generated from protobuf enum DEVICE_TOPIC_LIST = 26; + */ + const DEVICE_TOPIC_LIST = 26; + /** + * Generated from protobuf enum DEVICE_TOPIC_UPDATE = 27; + */ + const DEVICE_TOPIC_UPDATE = 27; + /** + * Generated from protobuf enum USER_TOPIC_LIST = 28; + */ + const USER_TOPIC_LIST = 28; + /** + * Generated from protobuf enum USER_TOPIC_UPDATE = 29; + */ + const USER_TOPIC_UPDATE = 29; + /** + * Generated from protobuf enum SEND_PUSH_NOTIFICATION = 30; + */ + const SEND_PUSH_NOTIFICATION = 30; + /** + * Generated from protobuf enum UPDATE_PUSH_STATUS = 31; + */ + const UPDATE_PUSH_STATUS = 31; + /** + * Generated from protobuf enum CANCEL_PUSH = 32; + */ + const CANCEL_PUSH = 32; + /** + * Generated from protobuf enum RATE_LIMIT = 47; + */ + const RATE_LIMIT = 47; + + private static $valueToName = [ + self::PUBLISH => 'PUBLISH', + self::BROADCAST => 'BROADCAST', + self::UNSUBSCRIBE => 'UNSUBSCRIBE', + self::DISCONNECT => 'DISCONNECT', + self::PRESENCE => 'PRESENCE', + self::PRESENCE_STATS => 'PRESENCE_STATS', + self::HISTORY => 'HISTORY', + self::HISTORY_REMOVE => 'HISTORY_REMOVE', + self::CHANNELS => 'CHANNELS', + self::INFO => 'INFO', + self::RPC => 'RPC', + self::SUBSCRIBE => 'SUBSCRIBE', + self::REFRESH => 'REFRESH', + self::CONNECTIONS => 'CONNECTIONS', + self::UPDATE_USER_STATUS => 'UPDATE_USER_STATUS', + self::GET_USER_STATUS => 'GET_USER_STATUS', + self::DELETE_USER_STATUS => 'DELETE_USER_STATUS', + self::BLOCK_USER => 'BLOCK_USER', + self::UNBLOCK_USER => 'UNBLOCK_USER', + self::REVOKE_TOKEN => 'REVOKE_TOKEN', + self::INVALIDATE_USER_TOKENS => 'INVALIDATE_USER_TOKENS', + self::DEVICE_REGISTER => 'DEVICE_REGISTER', + self::DEVICE_UPDATE => 'DEVICE_UPDATE', + self::DEVICE_REMOVE => 'DEVICE_REMOVE', + self::DEVICE_LIST => 'DEVICE_LIST', + self::DEVICE_TOPIC_LIST => 'DEVICE_TOPIC_LIST', + self::DEVICE_TOPIC_UPDATE => 'DEVICE_TOPIC_UPDATE', + self::USER_TOPIC_LIST => 'USER_TOPIC_LIST', + self::USER_TOPIC_UPDATE => 'USER_TOPIC_UPDATE', + self::SEND_PUSH_NOTIFICATION => 'SEND_PUSH_NOTIFICATION', + self::UPDATE_PUSH_STATUS => 'UPDATE_PUSH_STATUS', + self::CANCEL_PUSH => 'CANCEL_PUSH', + self::RATE_LIMIT => 'RATE_LIMIT', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionInfo.php new file mode 100644 index 0000000..0797a07 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionInfo.php @@ -0,0 +1,211 @@ +centrifugal.centrifugo.api.ConnectionInfo + */ +class ConnectionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string app_name = 1; + */ + protected $app_name = ''; + /** + * Generated from protobuf field string app_version = 2; + */ + protected $app_version = ''; + /** + * Generated from protobuf field string transport = 3; + */ + protected $transport = ''; + /** + * Generated from protobuf field string protocol = 4; + */ + protected $protocol = ''; + /** + * 5-7 dropped for backwards compatibility. + * + * Generated from protobuf field string user = 8; + */ + protected $user = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionState state = 9; + */ + protected $state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $app_name + * @type string $app_version + * @type string $transport + * @type string $protocol + * @type string $user + * 5-7 dropped for backwards compatibility. + * @type \RoadRunner\Centrifugal\API\DTO\V1\ConnectionState $state + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string app_name = 1; + * @return string + */ + public function getAppName() + { + return $this->app_name; + } + + /** + * Generated from protobuf field string app_name = 1; + * @param string $var + * @return $this + */ + public function setAppName($var) + { + GPBUtil::checkString($var, True); + $this->app_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string app_version = 2; + * @return string + */ + public function getAppVersion() + { + return $this->app_version; + } + + /** + * Generated from protobuf field string app_version = 2; + * @param string $var + * @return $this + */ + public function setAppVersion($var) + { + GPBUtil::checkString($var, True); + $this->app_version = $var; + + return $this; + } + + /** + * Generated from protobuf field string transport = 3; + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Generated from protobuf field string transport = 3; + * @param string $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkString($var, True); + $this->transport = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 4; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Generated from protobuf field string protocol = 4; + * @param string $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkString($var, True); + $this->protocol = $var; + + return $this; + } + + /** + * 5-7 dropped for backwards compatibility. + * + * Generated from protobuf field string user = 8; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * 5-7 dropped for backwards compatibility. + * + * Generated from protobuf field string user = 8; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionState state = 9; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ConnectionState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionState state = 9; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ConnectionState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ConnectionState::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionState.php new file mode 100644 index 0000000..807d789 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionState.php @@ -0,0 +1,150 @@ +centrifugal.centrifugo.api.ConnectionState + */ +class ConnectionState extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map channels = 1; + */ + private $channels; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionTokenInfo connection_token = 2; + */ + protected $connection_token = null; + /** + * Generated from protobuf field map subscription_tokens = 3; + */ + private $subscription_tokens; + /** + * Generated from protobuf field bytes meta = 4; + */ + protected $meta = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $channels + * @type \RoadRunner\Centrifugal\API\DTO\V1\ConnectionTokenInfo $connection_token + * @type array|\Google\Protobuf\Internal\MapField $subscription_tokens + * @type string $meta + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map channels = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Generated from protobuf field map channels = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\ChannelContext::class); + $this->channels = $arr; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionTokenInfo connection_token = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ConnectionTokenInfo|null + */ + public function getConnectionToken() + { + return $this->connection_token; + } + + public function hasConnectionToken() + { + return isset($this->connection_token); + } + + public function clearConnectionToken() + { + unset($this->connection_token); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionTokenInfo connection_token = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ConnectionTokenInfo $var + * @return $this + */ + public function setConnectionToken($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ConnectionTokenInfo::class); + $this->connection_token = $var; + + return $this; + } + + /** + * Generated from protobuf field map subscription_tokens = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSubscriptionTokens() + { + return $this->subscription_tokens; + } + + /** + * Generated from protobuf field map subscription_tokens = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSubscriptionTokens($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\SubscriptionTokenInfo::class); + $this->subscription_tokens = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 4; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 4; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionTokenInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionTokenInfo.php new file mode 100644 index 0000000..1bf3044 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionTokenInfo.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.ConnectionTokenInfo + */ +class ConnectionTokenInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + /** + * Generated from protobuf field int64 issued_at = 2; + */ + protected $issued_at = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * @type int|string $issued_at + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 issued_at = 2; + * @return int|string + */ + public function getIssuedAt() + { + return $this->issued_at; + } + + /** + * Generated from protobuf field int64 issued_at = 2; + * @param int|string $var + * @return $this + */ + public function setIssuedAt($var) + { + GPBUtil::checkInt64($var); + $this->issued_at = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsRequest.php new file mode 100644 index 0000000..c4adfee --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsRequest.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.ConnectionsRequest + */ +class ConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + /** + * Generated from protobuf field string expression = 2; + */ + protected $expression = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * @type string $expression + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string expression = 2; + * @return string + */ + public function getExpression() + { + return $this->expression; + } + + /** + * Generated from protobuf field string expression = 2; + * @param string $var + * @return $this + */ + public function setExpression($var) + { + GPBUtil::checkString($var, True); + $this->expression = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsResponse.php new file mode 100644 index 0000000..3f86b2d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.ConnectionsResponse + */ +class ConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsResult.php new file mode 100644 index 0000000..8ab3553 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/ConnectionsResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.ConnectionsResult + */ +class ConnectionsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map connections = 1; + */ + private $connections; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $connections + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map connections = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getConnections() + { + return $this->connections; + } + + /** + * Generated from protobuf field map connections = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setConnections($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\ConnectionInfo::class); + $this->connections = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusRequest.php new file mode 100644 index 0000000..24904b2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.DeleteUserStatusRequest + */ +class DeleteUserStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string users = 1; + */ + private $users; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $users + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string users = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsers() + { + return $this->users; + } + + /** + * Generated from protobuf field repeated string users = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->users = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusResponse.php new file mode 100644 index 0000000..0c46e5b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DeleteUserStatusResponse + */ +class DeleteUserStatusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusResult.php new file mode 100644 index 0000000..04d931a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeleteUserStatusResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.DeleteUserStatusResult + */ +class DeleteUserStatusResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Device.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Device.php new file mode 100644 index 0000000..1806617 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Device.php @@ -0,0 +1,286 @@ +centrifugal.centrifugo.api.Device + */ +class Device extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field string platform = 2; + */ + protected $platform = ''; + /** + * Generated from protobuf field string provider = 3; + */ + protected $provider = ''; + /** + * Generated from protobuf field string token = 4; + */ + protected $token = ''; + /** + * Generated from protobuf field string user = 5; + */ + protected $user = ''; + /** + * Generated from protobuf field int64 created_at = 6; + */ + protected $created_at = 0; + /** + * Generated from protobuf field int64 updated_at = 7; + */ + protected $updated_at = 0; + /** + * Generated from protobuf field map meta = 10; + */ + private $meta; + /** + *map labels = 12; + *map scores = 13; + * + * Generated from protobuf field repeated string topics = 11; + */ + private $topics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type string $platform + * @type string $provider + * @type string $token + * @type string $user + * @type int|string $created_at + * @type int|string $updated_at + * @type array|\Google\Protobuf\Internal\MapField $meta + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * map labels = 12; + * map scores = 13; + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string platform = 2; + * @return string + */ + public function getPlatform() + { + return $this->platform; + } + + /** + * Generated from protobuf field string platform = 2; + * @param string $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkString($var, True); + $this->platform = $var; + + return $this; + } + + /** + * Generated from protobuf field string provider = 3; + * @return string + */ + public function getProvider() + { + return $this->provider; + } + + /** + * Generated from protobuf field string provider = 3; + * @param string $var + * @return $this + */ + public function setProvider($var) + { + GPBUtil::checkString($var, True); + $this->provider = $var; + + return $this; + } + + /** + * Generated from protobuf field string token = 4; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Generated from protobuf field string token = 4; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 5; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 5; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 created_at = 6; + * @return int|string + */ + public function getCreatedAt() + { + return $this->created_at; + } + + /** + * Generated from protobuf field int64 created_at = 6; + * @param int|string $var + * @return $this + */ + public function setCreatedAt($var) + { + GPBUtil::checkInt64($var); + $this->created_at = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 updated_at = 7; + * @return int|string + */ + public function getUpdatedAt() + { + return $this->updated_at; + } + + /** + * Generated from protobuf field int64 updated_at = 7; + * @param int|string $var + * @return $this + */ + public function setUpdatedAt($var) + { + GPBUtil::checkInt64($var); + $this->updated_at = $var; + + return $this; + } + + /** + * Generated from protobuf field map meta = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field map meta = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMeta($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->meta = $arr; + + return $this; + } + + /** + *map labels = 12; + *map scores = 13; + * + * Generated from protobuf field repeated string topics = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + *map labels = 12; + *map scores = 13; + * + * Generated from protobuf field repeated string topics = 11; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceFilter.php new file mode 100644 index 0000000..0b41dc4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceFilter.php @@ -0,0 +1,167 @@ +centrifugal.centrifugo.api.DeviceFilter + */ +class DeviceFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string ids = 1; + */ + private $ids; + /** + * Generated from protobuf field repeated string users = 2; + */ + private $users; + /** + * Generated from protobuf field repeated string topics = 3; + */ + private $topics; + /** + * Generated from protobuf field repeated string providers = 4; + */ + private $providers; + /** + * Generated from protobuf field repeated string platforms = 5; + */ + private $platforms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ids + * @type array|\Google\Protobuf\Internal\RepeatedField $users + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * @type array|\Google\Protobuf\Internal\RepeatedField $providers + * @type array|\Google\Protobuf\Internal\RepeatedField $platforms + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string users = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsers() + { + return $this->users; + } + + /** + * Generated from protobuf field repeated string users = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->users = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string topics = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Generated from protobuf field repeated string topics = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string providers = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProviders() + { + return $this->providers; + } + + /** + * Generated from protobuf field repeated string providers = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProviders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->providers = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string platforms = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPlatforms() + { + return $this->platforms; + } + + /** + * Generated from protobuf field repeated string platforms = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPlatforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->platforms = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListRequest.php new file mode 100644 index 0000000..651e82f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListRequest.php @@ -0,0 +1,215 @@ +centrifugal.centrifugo.api.DeviceListRequest + */ +class DeviceListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceFilter filter = 1; + */ + protected $filter = null; + /** + * Generated from protobuf field bool include_total_count = 2; + */ + protected $include_total_count = false; + /** + * Generated from protobuf field bool include_meta = 3; + */ + protected $include_meta = false; + /** + *bool include_labels = 5; + *bool include_scores = 6; + * + * Generated from protobuf field bool include_topics = 4; + */ + protected $include_topics = false; + /** + * Generated from protobuf field string cursor = 10; + */ + protected $cursor = ''; + /** + * Generated from protobuf field int32 limit = 11; + */ + protected $limit = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter $filter + * @type bool $include_total_count + * @type bool $include_meta + * @type bool $include_topics + * bool include_labels = 5; + * bool include_scores = 6; + * @type string $cursor + * @type int $limit + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceFilter filter = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceFilter filter = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter::class); + $this->filter = $var; + + return $this; + } + + /** + * Generated from protobuf field bool include_total_count = 2; + * @return bool + */ + public function getIncludeTotalCount() + { + return $this->include_total_count; + } + + /** + * Generated from protobuf field bool include_total_count = 2; + * @param bool $var + * @return $this + */ + public function setIncludeTotalCount($var) + { + GPBUtil::checkBool($var); + $this->include_total_count = $var; + + return $this; + } + + /** + * Generated from protobuf field bool include_meta = 3; + * @return bool + */ + public function getIncludeMeta() + { + return $this->include_meta; + } + + /** + * Generated from protobuf field bool include_meta = 3; + * @param bool $var + * @return $this + */ + public function setIncludeMeta($var) + { + GPBUtil::checkBool($var); + $this->include_meta = $var; + + return $this; + } + + /** + *bool include_labels = 5; + *bool include_scores = 6; + * + * Generated from protobuf field bool include_topics = 4; + * @return bool + */ + public function getIncludeTopics() + { + return $this->include_topics; + } + + /** + *bool include_labels = 5; + *bool include_scores = 6; + * + * Generated from protobuf field bool include_topics = 4; + * @param bool $var + * @return $this + */ + public function setIncludeTopics($var) + { + GPBUtil::checkBool($var); + $this->include_topics = $var; + + return $this; + } + + /** + * Generated from protobuf field string cursor = 10; + * @return string + */ + public function getCursor() + { + return $this->cursor; + } + + /** + * Generated from protobuf field string cursor = 10; + * @param string $var + * @return $this + */ + public function setCursor($var) + { + GPBUtil::checkString($var, True); + $this->cursor = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 limit = 11; + * @return int + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Generated from protobuf field int32 limit = 11; + * @param int $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkInt32($var); + $this->limit = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListResponse.php new file mode 100644 index 0000000..bab70b7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DeviceListResponse + */ +class DeviceListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListResult.php new file mode 100644 index 0000000..da6a799 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceListResult.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.api.DeviceListResult + */ +class DeviceListResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Device items = 1; + */ + private $items; + /** + * Generated from protobuf field string next_cursor = 2; + */ + protected $next_cursor = ''; + /** + * Generated from protobuf field int64 total_count = 3; + */ + protected $total_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\Device>|\Google\Protobuf\Internal\RepeatedField $items + * @type string $next_cursor + * @type int|string $total_count + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Device items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Device items = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\Device>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\Device::class); + $this->items = $arr; + + return $this; + } + + /** + * Generated from protobuf field string next_cursor = 2; + * @return string + */ + public function getNextCursor() + { + return $this->next_cursor; + } + + /** + * Generated from protobuf field string next_cursor = 2; + * @param string $var + * @return $this + */ + public function setNextCursor($var) + { + GPBUtil::checkString($var, True); + $this->next_cursor = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 total_count = 3; + * @return int|string + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Generated from protobuf field int64 total_count = 3; + * @param int|string $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt64($var); + $this->total_count = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceMetaUpdate.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceMetaUpdate.php new file mode 100644 index 0000000..f68193d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceMetaUpdate.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.DeviceMetaUpdate + */ +class DeviceMetaUpdate extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map meta = 1; + */ + private $meta; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $meta + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map meta = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field map meta = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMeta($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->meta = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterRequest.php new file mode 100644 index 0000000..b4230fa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterRequest.php @@ -0,0 +1,232 @@ +centrifugal.centrifugo.api.DeviceRegisterRequest + */ +class DeviceRegisterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field string provider = 2; + */ + protected $provider = ''; + /** + * Generated from protobuf field string token = 3; + */ + protected $token = ''; + /** + * Generated from protobuf field string platform = 4; + */ + protected $platform = ''; + /** + * Generated from protobuf field string user = 5; + */ + protected $user = ''; + /** + * Generated from protobuf field map meta = 6; + */ + private $meta; + /** + *map labels = 8; + *map scores = 9; + * + * Generated from protobuf field repeated string topics = 7; + */ + private $topics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type string $provider + * @type string $token + * @type string $platform + * @type string $user + * @type array|\Google\Protobuf\Internal\MapField $meta + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * map labels = 8; + * map scores = 9; + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string provider = 2; + * @return string + */ + public function getProvider() + { + return $this->provider; + } + + /** + * Generated from protobuf field string provider = 2; + * @param string $var + * @return $this + */ + public function setProvider($var) + { + GPBUtil::checkString($var, True); + $this->provider = $var; + + return $this; + } + + /** + * Generated from protobuf field string token = 3; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Generated from protobuf field string token = 3; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * Generated from protobuf field string platform = 4; + * @return string + */ + public function getPlatform() + { + return $this->platform; + } + + /** + * Generated from protobuf field string platform = 4; + * @param string $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkString($var, True); + $this->platform = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 5; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 5; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field map meta = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field map meta = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMeta($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->meta = $arr; + + return $this; + } + + /** + *map labels = 8; + *map scores = 9; + * + * Generated from protobuf field repeated string topics = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + *map labels = 8; + *map scores = 9; + * + * Generated from protobuf field repeated string topics = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterResponse.php new file mode 100644 index 0000000..9da128c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DeviceRegisterResponse + */ +class DeviceRegisterResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterResult.php new file mode 100644 index 0000000..126d53c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRegisterResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.DeviceRegisterResult + */ +class DeviceRegisterResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveRequest.php new file mode 100644 index 0000000..72112b3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveRequest.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.DeviceRemoveRequest + */ +class DeviceRemoveRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string ids = 1; + */ + private $ids; + /** + * Generated from protobuf field repeated string users = 2; + */ + private $users; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ids + * @type array|\Google\Protobuf\Internal\RepeatedField $users + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string users = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsers() + { + return $this->users; + } + + /** + * Generated from protobuf field repeated string users = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->users = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveResponse.php new file mode 100644 index 0000000..d5190e9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DeviceRemoveResponse + */ +class DeviceRemoveResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveResult.php new file mode 100644 index 0000000..5a13876 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceRemoveResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.DeviceRemoveResult + */ +class DeviceRemoveResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopic.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopic.php new file mode 100644 index 0000000..9fccc03 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopic.php @@ -0,0 +1,123 @@ +centrifugal.centrifugo.api.DeviceTopic + */ +class DeviceTopic extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field string topic = 2; + */ + protected $topic = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Device device = 3; + */ + protected $device = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type string $topic + * @type \RoadRunner\Centrifugal\API\DTO\V1\Device $device + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string topic = 2; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * Generated from protobuf field string topic = 2; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Device device = 3; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Device|null + */ + public function getDevice() + { + return $this->device; + } + + public function hasDevice() + { + return isset($this->device); + } + + public function clearDevice() + { + unset($this->device); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Device device = 3; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Device $var + * @return $this + */ + public function setDevice($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Device::class); + $this->device = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicFilter.php new file mode 100644 index 0000000..9c61868 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicFilter.php @@ -0,0 +1,194 @@ +centrifugal.centrifugo.api.DeviceTopicFilter + */ +class DeviceTopicFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string device_ids = 1; + */ + private $device_ids; + /** + * Generated from protobuf field repeated string device_providers = 2; + */ + private $device_providers; + /** + * Generated from protobuf field repeated string device_platforms = 3; + */ + private $device_platforms; + /** + * Generated from protobuf field repeated string device_users = 4; + */ + private $device_users; + /** + * Generated from protobuf field repeated string topics = 5; + */ + private $topics; + /** + * Generated from protobuf field string topic_prefix = 6; + */ + protected $topic_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $device_ids + * @type array|\Google\Protobuf\Internal\RepeatedField $device_providers + * @type array|\Google\Protobuf\Internal\RepeatedField $device_platforms + * @type array|\Google\Protobuf\Internal\RepeatedField $device_users + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * @type string $topic_prefix + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string device_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceIds() + { + return $this->device_ids; + } + + /** + * Generated from protobuf field repeated string device_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->device_ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string device_providers = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceProviders() + { + return $this->device_providers; + } + + /** + * Generated from protobuf field repeated string device_providers = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceProviders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->device_providers = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string device_platforms = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDevicePlatforms() + { + return $this->device_platforms; + } + + /** + * Generated from protobuf field repeated string device_platforms = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDevicePlatforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->device_platforms = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string device_users = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceUsers() + { + return $this->device_users; + } + + /** + * Generated from protobuf field repeated string device_users = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->device_users = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string topics = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Generated from protobuf field repeated string topics = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + + /** + * Generated from protobuf field string topic_prefix = 6; + * @return string + */ + public function getTopicPrefix() + { + return $this->topic_prefix; + } + + /** + * Generated from protobuf field string topic_prefix = 6; + * @param string $var + * @return $this + */ + public function setTopicPrefix($var) + { + GPBUtil::checkString($var, True); + $this->topic_prefix = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListRequest.php new file mode 100644 index 0000000..669493d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListRequest.php @@ -0,0 +1,177 @@ +centrifugal.centrifugo.api.DeviceTopicListRequest + */ +class DeviceTopicListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicFilter filter = 1; + */ + protected $filter = null; + /** + * Generated from protobuf field bool include_total_count = 2; + */ + protected $include_total_count = false; + /** + * Generated from protobuf field bool include_device = 3; + */ + protected $include_device = false; + /** + * Generated from protobuf field string cursor = 10; + */ + protected $cursor = ''; + /** + * Generated from protobuf field int32 limit = 11; + */ + protected $limit = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicFilter $filter + * @type bool $include_total_count + * @type bool $include_device + * @type string $cursor + * @type int $limit + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicFilter filter = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicFilter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicFilter filter = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicFilter::class); + $this->filter = $var; + + return $this; + } + + /** + * Generated from protobuf field bool include_total_count = 2; + * @return bool + */ + public function getIncludeTotalCount() + { + return $this->include_total_count; + } + + /** + * Generated from protobuf field bool include_total_count = 2; + * @param bool $var + * @return $this + */ + public function setIncludeTotalCount($var) + { + GPBUtil::checkBool($var); + $this->include_total_count = $var; + + return $this; + } + + /** + * Generated from protobuf field bool include_device = 3; + * @return bool + */ + public function getIncludeDevice() + { + return $this->include_device; + } + + /** + * Generated from protobuf field bool include_device = 3; + * @param bool $var + * @return $this + */ + public function setIncludeDevice($var) + { + GPBUtil::checkBool($var); + $this->include_device = $var; + + return $this; + } + + /** + * Generated from protobuf field string cursor = 10; + * @return string + */ + public function getCursor() + { + return $this->cursor; + } + + /** + * Generated from protobuf field string cursor = 10; + * @param string $var + * @return $this + */ + public function setCursor($var) + { + GPBUtil::checkString($var, True); + $this->cursor = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 limit = 11; + * @return int + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Generated from protobuf field int32 limit = 11; + * @param int $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkInt32($var); + $this->limit = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListResponse.php new file mode 100644 index 0000000..9e02dbb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DeviceTopicListResponse + */ +class DeviceTopicListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListResult.php new file mode 100644 index 0000000..f207bc3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicListResult.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.api.DeviceTopicListResult + */ +class DeviceTopicListResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.DeviceTopic items = 1; + */ + private $items; + /** + * Generated from protobuf field string next_cursor = 2; + */ + protected $next_cursor = ''; + /** + * Generated from protobuf field int64 total_count = 3; + */ + protected $total_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\DeviceTopic>|\Google\Protobuf\Internal\RepeatedField $items + * @type string $next_cursor + * @type int|string $total_count + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.DeviceTopic items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.DeviceTopic items = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\DeviceTopic>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopic::class); + $this->items = $arr; + + return $this; + } + + /** + * Generated from protobuf field string next_cursor = 2; + * @return string + */ + public function getNextCursor() + { + return $this->next_cursor; + } + + /** + * Generated from protobuf field string next_cursor = 2; + * @param string $var + * @return $this + */ + public function setNextCursor($var) + { + GPBUtil::checkString($var, True); + $this->next_cursor = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 total_count = 3; + * @return int|string + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Generated from protobuf field int64 total_count = 3; + * @param int|string $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt64($var); + $this->total_count = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateRequest.php new file mode 100644 index 0000000..e24e21e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateRequest.php @@ -0,0 +1,120 @@ +centrifugal.centrifugo.api.DeviceTopicUpdateRequest + */ +class DeviceTopicUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string device_id = 1; + */ + protected $device_id = ''; + /** + * add | remove | set + * + * Generated from protobuf field string op = 2; + */ + protected $op = ''; + /** + * Generated from protobuf field repeated string topics = 3; + */ + private $topics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $device_id + * @type string $op + * add | remove | set + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string device_id = 1; + * @return string + */ + public function getDeviceId() + { + return $this->device_id; + } + + /** + * Generated from protobuf field string device_id = 1; + * @param string $var + * @return $this + */ + public function setDeviceId($var) + { + GPBUtil::checkString($var, True); + $this->device_id = $var; + + return $this; + } + + /** + * add | remove | set + * + * Generated from protobuf field string op = 2; + * @return string + */ + public function getOp() + { + return $this->op; + } + + /** + * add | remove | set + * + * Generated from protobuf field string op = 2; + * @param string $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkString($var, True); + $this->op = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string topics = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Generated from protobuf field repeated string topics = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateResponse.php new file mode 100644 index 0000000..a473de5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DeviceTopicUpdateResponse + */ +class DeviceTopicUpdateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateResult.php new file mode 100644 index 0000000..2e513d8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicUpdateResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.DeviceTopicUpdateResult + */ +class DeviceTopicUpdateResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicsUpdate.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicsUpdate.php new file mode 100644 index 0000000..ec3acc7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceTopicsUpdate.php @@ -0,0 +1,93 @@ +centrifugal.centrifugo.api.DeviceTopicsUpdate + */ +class DeviceTopicsUpdate extends \Google\Protobuf\Internal\Message +{ + /** + * add | remove | set + * + * Generated from protobuf field string op = 1; + */ + protected $op = ''; + /** + * Generated from protobuf field repeated string topics = 2; + */ + private $topics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $op + * add | remove | set + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * add | remove | set + * + * Generated from protobuf field string op = 1; + * @return string + */ + public function getOp() + { + return $this->op; + } + + /** + * add | remove | set + * + * Generated from protobuf field string op = 1; + * @param string $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkString($var, True); + $this->op = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string topics = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Generated from protobuf field repeated string topics = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateRequest.php new file mode 100644 index 0000000..455e4c0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateRequest.php @@ -0,0 +1,208 @@ +centrifugal.centrifugo.api.DeviceUpdateRequest + */ +class DeviceUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string ids = 1; + */ + private $ids; + /** + * Generated from protobuf field repeated string users = 2; + */ + private $users; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUserUpdate user_update = 4; + */ + protected $user_update = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceMetaUpdate meta_update = 5; + */ + protected $meta_update = null; + /** + *DeviceLabelsUpdate labels_update = 7; + *DeviceScoresUpdate scores_update = 8; + * + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicsUpdate topics_update = 6; + */ + protected $topics_update = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ids + * @type array|\Google\Protobuf\Internal\RepeatedField $users + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceUserUpdate $user_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceMetaUpdate $meta_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicsUpdate $topics_update + * DeviceLabelsUpdate labels_update = 7; + * DeviceScoresUpdate scores_update = 8; + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Generated from protobuf field repeated string ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string users = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsers() + { + return $this->users; + } + + /** + * Generated from protobuf field repeated string users = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->users = $arr; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUserUpdate user_update = 4; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceUserUpdate|null + */ + public function getUserUpdate() + { + return $this->user_update; + } + + public function hasUserUpdate() + { + return isset($this->user_update); + } + + public function clearUserUpdate() + { + unset($this->user_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUserUpdate user_update = 4; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceUserUpdate $var + * @return $this + */ + public function setUserUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceUserUpdate::class); + $this->user_update = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceMetaUpdate meta_update = 5; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceMetaUpdate|null + */ + public function getMetaUpdate() + { + return $this->meta_update; + } + + public function hasMetaUpdate() + { + return isset($this->meta_update); + } + + public function clearMetaUpdate() + { + unset($this->meta_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceMetaUpdate meta_update = 5; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceMetaUpdate $var + * @return $this + */ + public function setMetaUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceMetaUpdate::class); + $this->meta_update = $var; + + return $this; + } + + /** + *DeviceLabelsUpdate labels_update = 7; + *DeviceScoresUpdate scores_update = 8; + * + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicsUpdate topics_update = 6; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicsUpdate|null + */ + public function getTopicsUpdate() + { + return $this->topics_update; + } + + public function hasTopicsUpdate() + { + return isset($this->topics_update); + } + + public function clearTopicsUpdate() + { + unset($this->topics_update); + } + + /** + *DeviceLabelsUpdate labels_update = 7; + *DeviceScoresUpdate scores_update = 8; + * + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicsUpdate topics_update = 6; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicsUpdate $var + * @return $this + */ + public function setTopicsUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicsUpdate::class); + $this->topics_update = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateResponse.php new file mode 100644 index 0000000..833d4ba --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DeviceUpdateResponse + */ +class DeviceUpdateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateResult.php new file mode 100644 index 0000000..8903817 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUpdateResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.DeviceUpdateResult + */ +class DeviceUpdateResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUserUpdate.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUserUpdate.php new file mode 100644 index 0000000..b552063 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DeviceUserUpdate.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.DeviceUserUpdate + */ +class DeviceUserUpdate extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Disconnect.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Disconnect.php new file mode 100644 index 0000000..eff41a1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Disconnect.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.Disconnect + */ +class Disconnect extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string reason = 2; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * @type string $reason + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field uint32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkUint32($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string reason = 2; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Generated from protobuf field string reason = 2; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectRequest.php new file mode 100644 index 0000000..23a7e1f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectRequest.php @@ -0,0 +1,177 @@ +centrifugal.centrifugo.api.DisconnectRequest + */ +class DisconnectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Disconnect disconnect = 2; + */ + protected $disconnect = null; + /** + * Generated from protobuf field string client = 3; + */ + protected $client = ''; + /** + * Generated from protobuf field repeated string whitelist = 4; + */ + private $whitelist; + /** + * Generated from protobuf field string session = 5; + */ + protected $session = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * @type \RoadRunner\Centrifugal\API\DTO\V1\Disconnect $disconnect + * @type string $client + * @type array|\Google\Protobuf\Internal\RepeatedField $whitelist + * @type string $session + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Disconnect disconnect = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Disconnect|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Disconnect disconnect = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Disconnect $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Disconnect::class); + $this->disconnect = $var; + + return $this; + } + + /** + * Generated from protobuf field string client = 3; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 3; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string whitelist = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWhitelist() + { + return $this->whitelist; + } + + /** + * Generated from protobuf field repeated string whitelist = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWhitelist($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->whitelist = $arr; + + return $this; + } + + /** + * Generated from protobuf field string session = 5; + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Generated from protobuf field string session = 5; + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectResponse.php new file mode 100644 index 0000000..efe81ac --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.DisconnectResponse + */ +class DisconnectResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectResult.php new file mode 100644 index 0000000..96105f1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/DisconnectResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.DisconnectResult + */ +class DisconnectResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Error.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Error.php new file mode 100644 index 0000000..69a3f0b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Error.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field uint32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkUint32($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * 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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/FcmPushNotification.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/FcmPushNotification.php new file mode 100644 index 0000000..7e7c245 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/FcmPushNotification.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.FcmPushNotification + */ +class FcmPushNotification extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes message = 1; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field bytes message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, False); + $this->message = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GPBMetadata/Api.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GPBMetadata/Api.php new file mode 100644 index 0000000..56d54ae --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GPBMetadata/Api.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xEF\xB6\x01\x0A\x1Bcentrifugo/api/v1/api.proto\x12\x1Acentrifugal.centrifugo.api\"\xF8\x17\x0A\x07Command\x12\x0A\x0A\x02id\x18\x01 \x01(\x0D\x12>\x0A\x06method\x18\x02 \x01(\x0E2..centrifugal.centrifugo.api.Command.MethodType\x12\x0E\x0A\x06params\x18\x03 \x01(\x0C\x12;\x0A\x07publish\x18\x04 \x01(\x0B2*.centrifugal.centrifugo.api.PublishRequest\x12?\x0A\x09broadcast\x18\x05 \x01(\x0B2,.centrifugal.centrifugo.api.BroadcastRequest\x12?\x0A\x09subscribe\x18\x06 \x01(\x0B2,.centrifugal.centrifugo.api.SubscribeRequest\x12C\x0A\x0Bunsubscribe\x18\x07 \x01(\x0B2..centrifugal.centrifugo.api.UnsubscribeRequest\x12A\x0A\x0Adisconnect\x18\x08 \x01(\x0B2-.centrifugal.centrifugo.api.DisconnectRequest\x12=\x0A\x08presence\x18\x09 \x01(\x0B2+.centrifugal.centrifugo.api.PresenceRequest\x12H\x0A\x0Epresence_stats\x18\x0A \x01(\x0B20.centrifugal.centrifugo.api.PresenceStatsRequest\x12;\x0A\x07history\x18\x0B \x01(\x0B2*.centrifugal.centrifugo.api.HistoryRequest\x12H\x0A\x0Ehistory_remove\x18\x0C \x01(\x0B20.centrifugal.centrifugo.api.HistoryRemoveRequest\x125\x0A\x04info\x18\x0D \x01(\x0B2'.centrifugal.centrifugo.api.InfoRequest\x123\x0A\x03rpc\x18\x0E \x01(\x0B2&.centrifugal.centrifugo.api.RPCRequest\x12;\x0A\x07refresh\x18\x0F \x01(\x0B2*.centrifugal.centrifugo.api.RefreshRequest\x12=\x0A\x08channels\x18\x10 \x01(\x0B2+.centrifugal.centrifugo.api.ChannelsRequest\x12C\x0A\x0Bconnections\x18\x11 \x01(\x0B2..centrifugal.centrifugo.api.ConnectionsRequest\x12O\x0A\x12update_user_status\x18\x12 \x01(\x0B23.centrifugal.centrifugo.api.UpdateUserStatusRequest\x12I\x0A\x0Fget_user_status\x18\x13 \x01(\x0B20.centrifugal.centrifugo.api.GetUserStatusRequest\x12O\x0A\x12delete_user_status\x18\x14 \x01(\x0B23.centrifugal.centrifugo.api.DeleteUserStatusRequest\x12@\x0A\x0Ablock_user\x18\x15 \x01(\x0B2,.centrifugal.centrifugo.api.BlockUserRequest\x12D\x0A\x0Cunblock_user\x18\x16 \x01(\x0B2..centrifugal.centrifugo.api.UnblockUserRequest\x12D\x0A\x0Crevoke_token\x18\x17 \x01(\x0B2..centrifugal.centrifugo.api.RevokeTokenRequest\x12W\x0A\x16invalidate_user_tokens\x18\x18 \x01(\x0B27.centrifugal.centrifugo.api.InvalidateUserTokensRequest\x12J\x0A\x0Fdevice_register\x18\x19 \x01(\x0B21.centrifugal.centrifugo.api.DeviceRegisterRequest\x12F\x0A\x0Ddevice_update\x18\x1A \x01(\x0B2/.centrifugal.centrifugo.api.DeviceUpdateRequest\x12F\x0A\x0Ddevice_remove\x18\x1B \x01(\x0B2/.centrifugal.centrifugo.api.DeviceRemoveRequest\x12B\x0A\x0Bdevice_list\x18\x1C \x01(\x0B2-.centrifugal.centrifugo.api.DeviceListRequest\x12M\x0A\x11device_topic_list\x18\x1D \x01(\x0B22.centrifugal.centrifugo.api.DeviceTopicListRequest\x12Q\x0A\x13device_topic_update\x18\x1E \x01(\x0B24.centrifugal.centrifugo.api.DeviceTopicUpdateRequest\x12I\x0A\x0Fuser_topic_list\x18\x1F \x01(\x0B20.centrifugal.centrifugo.api.UserTopicListRequest\x12M\x0A\x11user_topic_update\x18 \x01(\x0B22.centrifugal.centrifugo.api.UserTopicUpdateRequest\x12W\x0A\x16send_push_notification\x18! \x01(\x0B27.centrifugal.centrifugo.api.SendPushNotificationRequest\x12O\x0A\x12update_push_status\x18\" \x01(\x0B23.centrifugal.centrifugo.api.UpdatePushStatusRequest\x12B\x0A\x0Bcancel_push\x18# \x01(\x0B2-.centrifugal.centrifugo.api.CancelPushRequest\x12@\x0A\x0Arate_limit\x182 \x01(\x0B2,.centrifugal.centrifugo.api.RateLimitRequest\"\xEC\x04\x0A\x0AMethodType\x12\x0B\x0A\x07PUBLISH\x10\x00\x12\x0D\x0A\x09BROADCAST\x10\x01\x12\x0F\x0A\x0BUNSUBSCRIBE\x10\x02\x12\x0E\x0A\x0ADISCONNECT\x10\x03\x12\x0C\x0A\x08PRESENCE\x10\x04\x12\x12\x0A\x0EPRESENCE_STATS\x10\x05\x12\x0B\x0A\x07HISTORY\x10\x06\x12\x12\x0A\x0EHISTORY_REMOVE\x10\x07\x12\x0C\x0A\x08CHANNELS\x10\x08\x12\x08\x0A\x04INFO\x10\x09\x12\x07\x0A\x03RPC\x10\x0A\x12\x0D\x0A\x09SUBSCRIBE\x10\x0B\x12\x0B\x0A\x07REFRESH\x10\x0C\x12\x0F\x0A\x0BCONNECTIONS\x10\x0E\x12\x16\x0A\x12UPDATE_USER_STATUS\x10\x0F\x12\x13\x0A\x0FGET_USER_STATUS\x10\x10\x12\x16\x0A\x12DELETE_USER_STATUS\x10\x11\x12\x0E\x0A\x0ABLOCK_USER\x10\x12\x12\x10\x0A\x0CUNBLOCK_USER\x10\x13\x12\x10\x0A\x0CREVOKE_TOKEN\x10\x14\x12\x1A\x0A\x16INVALIDATE_USER_TOKENS\x10\x15\x12\x13\x0A\x0FDEVICE_REGISTER\x10\x16\x12\x11\x0A\x0DDEVICE_UPDATE\x10\x17\x12\x11\x0A\x0DDEVICE_REMOVE\x10\x18\x12\x0F\x0A\x0BDEVICE_LIST\x10\x19\x12\x15\x0A\x11DEVICE_TOPIC_LIST\x10\x1A\x12\x17\x0A\x13DEVICE_TOPIC_UPDATE\x10\x1B\x12\x13\x0A\x0FUSER_TOPIC_LIST\x10\x1C\x12\x15\x0A\x11USER_TOPIC_UPDATE\x10\x1D\x12\x1A\x0A\x16SEND_PUSH_NOTIFICATION\x10\x1E\x12\x16\x0A\x12UPDATE_PUSH_STATUS\x10\x1F\x12\x0F\x0A\x0BCANCEL_PUSH\x10 \x12\x0E\x0A\x0ARATE_LIMIT\x10/\"&\x0A\x05Error\x12\x0C\x0A\x04code\x18\x01 \x01(\x0D\x12\x0F\x0A\x07message\x18\x02 \x01(\x09\"\xD8\x12\x0A\x05Reply\x12\x0A\x0A\x02id\x18\x01 \x01(\x0D\x120\x0A\x05error\x18\x02 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12\x0E\x0A\x06result\x18\x03 \x01(\x0C\x12:\x0A\x07publish\x18\x04 \x01(\x0B2).centrifugal.centrifugo.api.PublishResult\x12>\x0A\x09broadcast\x18\x05 \x01(\x0B2+.centrifugal.centrifugo.api.BroadcastResult\x12>\x0A\x09subscribe\x18\x06 \x01(\x0B2+.centrifugal.centrifugo.api.SubscribeResult\x12B\x0A\x0Bunsubscribe\x18\x07 \x01(\x0B2-.centrifugal.centrifugo.api.UnsubscribeResult\x12@\x0A\x0Adisconnect\x18\x08 \x01(\x0B2,.centrifugal.centrifugo.api.DisconnectResult\x12<\x0A\x08presence\x18\x09 \x01(\x0B2*.centrifugal.centrifugo.api.PresenceResult\x12G\x0A\x0Epresence_stats\x18\x0A \x01(\x0B2/.centrifugal.centrifugo.api.PresenceStatsResult\x12:\x0A\x07history\x18\x0B \x01(\x0B2).centrifugal.centrifugo.api.HistoryResult\x12G\x0A\x0Ehistory_remove\x18\x0C \x01(\x0B2/.centrifugal.centrifugo.api.HistoryRemoveResult\x124\x0A\x04info\x18\x0D \x01(\x0B2&.centrifugal.centrifugo.api.InfoResult\x122\x0A\x03rpc\x18\x0E \x01(\x0B2%.centrifugal.centrifugo.api.RPCResult\x12:\x0A\x07refresh\x18\x0F \x01(\x0B2).centrifugal.centrifugo.api.RefreshResult\x12<\x0A\x08channels\x18\x10 \x01(\x0B2*.centrifugal.centrifugo.api.ChannelsResult\x12B\x0A\x0Bconnections\x18\x11 \x01(\x0B2-.centrifugal.centrifugo.api.ConnectionsResult\x12N\x0A\x12update_user_status\x18\x12 \x01(\x0B22.centrifugal.centrifugo.api.UpdateUserStatusResult\x12H\x0A\x0Fget_user_status\x18\x13 \x01(\x0B2/.centrifugal.centrifugo.api.GetUserStatusResult\x12N\x0A\x12delete_user_status\x18\x14 \x01(\x0B22.centrifugal.centrifugo.api.DeleteUserStatusResult\x12?\x0A\x0Ablock_user\x18\x15 \x01(\x0B2+.centrifugal.centrifugo.api.BlockUserResult\x12C\x0A\x0Cunblock_user\x18\x16 \x01(\x0B2-.centrifugal.centrifugo.api.UnblockUserResult\x12C\x0A\x0Crevoke_token\x18\x17 \x01(\x0B2-.centrifugal.centrifugo.api.RevokeTokenResult\x12V\x0A\x16invalidate_user_tokens\x18\x18 \x01(\x0B26.centrifugal.centrifugo.api.InvalidateUserTokensResult\x12I\x0A\x0Fdevice_register\x18\x19 \x01(\x0B20.centrifugal.centrifugo.api.DeviceRegisterResult\x12E\x0A\x0Ddevice_update\x18\x1A \x01(\x0B2..centrifugal.centrifugo.api.DeviceUpdateResult\x12E\x0A\x0Ddevice_remove\x18\x1B \x01(\x0B2..centrifugal.centrifugo.api.DeviceRemoveResult\x12A\x0A\x0Bdevice_list\x18\x1C \x01(\x0B2,.centrifugal.centrifugo.api.DeviceListResult\x12L\x0A\x11device_topic_list\x18\x1D \x01(\x0B21.centrifugal.centrifugo.api.DeviceTopicListResult\x12P\x0A\x13device_topic_update\x18\x1E \x01(\x0B23.centrifugal.centrifugo.api.DeviceTopicUpdateResult\x12H\x0A\x0Fuser_topic_list\x18\x1F \x01(\x0B2/.centrifugal.centrifugo.api.UserTopicListResult\x12L\x0A\x11user_topic_update\x18 \x01(\x0B21.centrifugal.centrifugo.api.UserTopicUpdateResult\x12V\x0A\x16send_push_notification\x18! \x01(\x0B26.centrifugal.centrifugo.api.SendPushNotificationResult\x12N\x0A\x12update_push_status\x18\" \x01(\x0B22.centrifugal.centrifugo.api.UpdatePushStatusResult\x12A\x0A\x0Bcancel_push\x18# \x01(\x0B2,.centrifugal.centrifugo.api.CancelPushResult\x12?\x0A\x0Arate_limit\x182 \x01(\x0B2+.centrifugal.centrifugo.api.RateLimitResult\"\x1A\x0A\x09BoolValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x08\"\x1B\x0A\x0AInt32Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x05\"\xD4\x02\x0A\x17SubscribeOptionOverride\x127\x0A\x08presence\x18\x01 \x01(\x0B2%.centrifugal.centrifugo.api.BoolValue\x129\x0A\x0Ajoin_leave\x18\x02 \x01(\x0B2%.centrifugal.centrifugo.api.BoolValue\x12=\x0A\x0Eforce_recovery\x18\x03 \x01(\x0B2%.centrifugal.centrifugo.api.BoolValue\x12@\x0A\x11force_positioning\x18\x04 \x01(\x0B2%.centrifugal.centrifugo.api.BoolValue\x12D\x0A\x15force_push_join_leave\x18\x05 \x01(\x0B2%.centrifugal.centrifugo.api.BoolValue\"W\x0A\x0CBatchRequest\x125\x0A\x08commands\x18\x01 \x03(\x0B2#.centrifugal.centrifugo.api.Command\x12\x10\x0A\x08parallel\x18\x02 \x01(\x08\"C\x0A\x0DBatchResponse\x122\x0A\x07replies\x18\x01 \x03(\x0B2!.centrifugal.centrifugo.api.Reply\"\xE0\x01\x0A\x0EPublishRequest\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\x12\x0C\x0A\x04data\x18\x02 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x03 \x01(\x09\x12\x14\x0A\x0Cskip_history\x18\x04 \x01(\x08\x12B\x0A\x04tags\x18\x05 \x03(\x0B24.centrifugal.centrifugo.api.PublishRequest.TagsEntry\x12\x17\x0A\x0Fidempotency_key\x18\x06 \x01(\x09\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"~\x0A\x0FPublishResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x129\x0A\x06result\x18\x02 \x01(\x0B2).centrifugal.centrifugo.api.PublishResult\".\x0A\x0DPublishResult\x12\x0E\x0A\x06offset\x18\x01 \x01(\x04\x12\x0D\x0A\x05epoch\x18\x02 \x01(\x09\"\xE5\x01\x0A\x10BroadcastRequest\x12\x10\x0A\x08channels\x18\x01 \x03(\x09\x12\x0C\x0A\x04data\x18\x02 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x03 \x01(\x09\x12\x14\x0A\x0Cskip_history\x18\x04 \x01(\x08\x12D\x0A\x04tags\x18\x05 \x03(\x0B26.centrifugal.centrifugo.api.BroadcastRequest.TagsEntry\x12\x17\x0A\x0Fidempotency_key\x18\x06 \x01(\x09\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x82\x01\x0A\x11BroadcastResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12;\x0A\x06result\x18\x02 \x01(\x0B2+.centrifugal.centrifugo.api.BroadcastResult\"Q\x0A\x0FBroadcastResult\x12>\x0A\x09responses\x18\x01 \x03(\x0B2+.centrifugal.centrifugo.api.PublishResponse\"\xAD\x02\x0A\x10SubscribeRequest\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\x12\x0C\x0A\x04user\x18\x02 \x01(\x09\x12\x11\x0A\x09expire_at\x18\x03 \x01(\x03\x12\x0C\x0A\x04info\x18\x04 \x01(\x0C\x12\x0F\x0A\x07b64info\x18\x05 \x01(\x09\x12\x0E\x0A\x06client\x18\x06 \x01(\x09\x12\x0C\x0A\x04data\x18\x07 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x08 \x01(\x09\x12A\x0A\x0Drecover_since\x18\x09 \x01(\x0B2*.centrifugal.centrifugo.api.StreamPosition\x12E\x0A\x08override\x18\x0A \x01(\x0B23.centrifugal.centrifugo.api.SubscribeOptionOverride\x12\x0F\x0A\x07session\x18\x0B \x01(\x09\"\x82\x01\x0A\x11SubscribeResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12;\x0A\x06result\x18\x02 \x01(\x0B2+.centrifugal.centrifugo.api.SubscribeResult\"\x11\x0A\x0FSubscribeResult\"T\x0A\x12UnsubscribeRequest\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\x12\x0C\x0A\x04user\x18\x02 \x01(\x09\x12\x0E\x0A\x06client\x18\x03 \x01(\x09\x12\x0F\x0A\x07session\x18\x04 \x01(\x09\"\x86\x01\x0A\x13UnsubscribeResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12=\x0A\x06result\x18\x02 \x01(\x0B2-.centrifugal.centrifugo.api.UnsubscribeResult\"\x13\x0A\x11UnsubscribeResult\"0\x0A\x0ADisconnect\x12\x0C\x0A\x04code\x18\x01 \x01(\x0D\x12\x0E\x0A\x06reason\x18\x02 \x01(\x09J\x04\x08\x03\x10\x04\"\x91\x01\x0A\x11DisconnectRequest\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\x12:\x0A\x0Adisconnect\x18\x02 \x01(\x0B2&.centrifugal.centrifugo.api.Disconnect\x12\x0E\x0A\x06client\x18\x03 \x01(\x09\x12\x11\x0A\x09whitelist\x18\x04 \x03(\x09\x12\x0F\x0A\x07session\x18\x05 \x01(\x09\"\x84\x01\x0A\x12DisconnectResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12<\x0A\x06result\x18\x02 \x01(\x0B2,.centrifugal.centrifugo.api.DisconnectResult\"\x12\x0A\x10DisconnectResult\"\"\x0A\x0FPresenceRequest\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\"\x80\x01\x0A\x10PresenceResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12:\x0A\x06result\x18\x02 \x01(\x0B2*.centrifugal.centrifugo.api.PresenceResult\"P\x0A\x0AClientInfo\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\x12\x0E\x0A\x06client\x18\x02 \x01(\x09\x12\x11\x0A\x09conn_info\x18\x03 \x01(\x0C\x12\x11\x0A\x09chan_info\x18\x04 \x01(\x0C\"\xB5\x01\x0A\x0EPresenceResult\x12J\x0A\x08presence\x18\x01 \x03(\x0B28.centrifugal.centrifugo.api.PresenceResult.PresenceEntry\x1AW\x0A\x0DPresenceEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x125\x0A\x05value\x18\x02 \x01(\x0B2&.centrifugal.centrifugo.api.ClientInfo:\x028\x01\"'\x0A\x14PresenceStatsRequest\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\"\x8A\x01\x0A\x15PresenceStatsResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12?\x0A\x06result\x18\x02 \x01(\x0B2/.centrifugal.centrifugo.api.PresenceStatsResult\"=\x0A\x13PresenceStatsResult\x12\x13\x0A\x0Bnum_clients\x18\x01 \x01(\x0D\x12\x11\x0A\x09num_users\x18\x02 \x01(\x0D\"/\x0A\x0EStreamPosition\x12\x0E\x0A\x06offset\x18\x01 \x01(\x04\x12\x0D\x0A\x05epoch\x18\x02 \x01(\x09\"|\x0A\x0EHistoryRequest\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\x12\x0D\x0A\x05limit\x18\x02 \x01(\x05\x129\x0A\x05since\x18\x03 \x01(\x0B2*.centrifugal.centrifugo.api.StreamPosition\x12\x0F\x0A\x07reverse\x18\x04 \x01(\x08\"~\x0A\x0FHistoryResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x129\x0A\x06result\x18\x02 \x01(\x0B2).centrifugal.centrifugo.api.HistoryResult\"\xCF\x01\x0A\x0BPublication\x12\x0C\x0A\x04data\x18\x02 \x01(\x0C\x124\x0A\x04info\x18\x03 \x01(\x0B2&.centrifugal.centrifugo.api.ClientInfo\x12\x0E\x0A\x06offset\x18\x04 \x01(\x04\x12?\x0A\x04tags\x18\x05 \x03(\x0B21.centrifugal.centrifugo.api.Publication.TagsEntry\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"m\x0A\x0DHistoryResult\x12=\x0A\x0Cpublications\x18\x01 \x03(\x0B2'.centrifugal.centrifugo.api.Publication\x12\x0D\x0A\x05epoch\x18\x02 \x01(\x09\x12\x0E\x0A\x06offset\x18\x03 \x01(\x04\"'\x0A\x14HistoryRemoveRequest\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\"\x8A\x01\x0A\x15HistoryRemoveResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12?\x0A\x06result\x18\x02 \x01(\x0B2/.centrifugal.centrifugo.api.HistoryRemoveResult\"\x15\x0A\x13HistoryRemoveResult\"\x0D\x0A\x0BInfoRequest\"x\x0A\x0CInfoResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x126\x0A\x06result\x18\x02 \x01(\x0B2&.centrifugal.centrifugo.api.InfoResult\"C\x0A\x0AInfoResult\x125\x0A\x05nodes\x18\x01 \x03(\x0B2&.centrifugal.centrifugo.api.NodeResult\",\x0A\x0ARPCRequest\x12\x0E\x0A\x06method\x18\x01 \x01(\x09\x12\x0E\x0A\x06params\x18\x02 \x01(\x0C\"v\x0A\x0BRPCResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x125\x0A\x06result\x18\x02 \x01(\x0B2%.centrifugal.centrifugo.api.RPCResult\"\x19\x0A\x09RPCResult\x12\x0C\x0A\x04data\x18\x01 \x01(\x0C\"q\x0A\x0ERefreshRequest\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\x12\x0E\x0A\x06client\x18\x02 \x01(\x09\x12\x0F\x0A\x07expired\x18\x03 \x01(\x08\x12\x11\x0A\x09expire_at\x18\x04 \x01(\x03\x12\x0C\x0A\x04info\x18\x05 \x01(\x0C\x12\x0F\x0A\x07session\x18\x06 \x01(\x09\"~\x0A\x0FRefreshResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x129\x0A\x06result\x18\x02 \x01(\x0B2).centrifugal.centrifugo.api.RefreshResult\"\x0F\x0A\x0DRefreshResult\"\x84\x02\x0A\x0ANodeResult\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\x12\x0C\x0A\x04name\x18\x02 \x01(\x09\x12\x0F\x0A\x07version\x18\x03 \x01(\x09\x12\x13\x0A\x0Bnum_clients\x18\x04 \x01(\x0D\x12\x11\x0A\x09num_users\x18\x05 \x01(\x0D\x12\x14\x0A\x0Cnum_channels\x18\x06 \x01(\x0D\x12\x0E\x0A\x06uptime\x18\x07 \x01(\x0D\x124\x0A\x07metrics\x18\x08 \x01(\x0B2#.centrifugal.centrifugo.api.Metrics\x124\x0A\x07process\x18\x09 \x01(\x0B2#.centrifugal.centrifugo.api.Process\x12\x10\x0A\x08num_subs\x18\x0A \x01(\x0D\"\x88\x01\x0A\x07Metrics\x12\x10\x0A\x08interval\x18\x01 \x01(\x01\x12=\x0A\x05items\x18\x02 \x03(\x0B2..centrifugal.centrifugo.api.Metrics.ItemsEntry\x1A,\x0A\x0AItemsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x01:\x028\x01\"#\x0A\x07Process\x12\x0B\x0A\x03cpu\x18\x01 \x01(\x01\x12\x0B\x0A\x03rss\x18\x02 \x01(\x03\"\"\x0A\x0FChannelsRequest\x12\x0F\x0A\x07pattern\x18\x01 \x01(\x09\"\x80\x01\x0A\x10ChannelsResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12:\x0A\x06result\x18\x02 \x01(\x0B2*.centrifugal.centrifugo.api.ChannelsResult\"\xB6\x01\x0A\x0EChannelsResult\x12J\x0A\x08channels\x18\x01 \x03(\x0B28.centrifugal.centrifugo.api.ChannelsResult.ChannelsEntry\x1AX\x0A\x0DChannelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x126\x0A\x05value\x18\x02 \x01(\x0B2'.centrifugal.centrifugo.api.ChannelInfo:\x028\x01\"\"\x0A\x0BChannelInfo\x12\x13\x0A\x0Bnum_clients\x18\x01 \x01(\x0D\"6\x0A\x12ConnectionsRequest\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\x12\x12\x0A\x0Aexpression\x18\x02 \x01(\x09\"\x86\x01\x0A\x13ConnectionsResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12=\x0A\x06result\x18\x02 \x01(\x0B2-.centrifugal.centrifugo.api.ConnectionsResult\"\xC8\x01\x0A\x11ConnectionsResult\x12S\x0A\x0Bconnections\x18\x01 \x03(\x0B2>.centrifugal.centrifugo.api.ConnectionsResult.ConnectionsEntry\x1A^\x0A\x10ConnectionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x129\x0A\x05value\x18\x02 \x01(\x0B2*.centrifugal.centrifugo.api.ConnectionInfo:\x028\x01\"\xA6\x01\x0A\x0EConnectionInfo\x12\x10\x0A\x08app_name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bapp_version\x18\x02 \x01(\x09\x12\x11\x0A\x09transport\x18\x03 \x01(\x09\x12\x10\x0A\x08protocol\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x08 \x01(\x09\x12:\x0A\x05state\x18\x09 \x01(\x0B2+.centrifugal.centrifugo.api.ConnectionState\"\xE4\x03\x0A\x0FConnectionState\x12K\x0A\x08channels\x18\x01 \x03(\x0B29.centrifugal.centrifugo.api.ConnectionState.ChannelsEntry\x12I\x0A\x10connection_token\x18\x02 \x01(\x0B2/.centrifugal.centrifugo.api.ConnectionTokenInfo\x12`\x0A\x13subscription_tokens\x18\x03 \x03(\x0B2C.centrifugal.centrifugo.api.ConnectionState.SubscriptionTokensEntry\x12\x0C\x0A\x04meta\x18\x04 \x01(\x0C\x1A[\x0A\x0DChannelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x129\x0A\x05value\x18\x02 \x01(\x0B2*.centrifugal.centrifugo.api.ChannelContext:\x028\x01\x1Al\x0A\x17SubscriptionTokensEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12@\x0A\x05value\x18\x02 \x01(\x0B21.centrifugal.centrifugo.api.SubscriptionTokenInfo:\x028\x01\" \x0A\x0EChannelContext\x12\x0E\x0A\x06source\x18\x01 \x01(\x0D\"5\x0A\x13ConnectionTokenInfo\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\x12\x11\x0A\x09issued_at\x18\x02 \x01(\x03\"7\x0A\x15SubscriptionTokenInfo\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\x12\x11\x0A\x09issued_at\x18\x02 \x01(\x03\"7\x0A\x17UpdateUserStatusRequest\x12\x0D\x0A\x05users\x18\x01 \x03(\x09\x12\x0D\x0A\x05state\x18\x02 \x01(\x09\"\x90\x01\x0A\x18UpdateUserStatusResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12B\x0A\x06result\x18\x02 \x01(\x0B22.centrifugal.centrifugo.api.UpdateUserStatusResult\"\x18\x0A\x16UpdateUserStatusResult\"%\x0A\x14GetUserStatusRequest\x12\x0D\x0A\x05users\x18\x01 \x03(\x09\"\x8A\x01\x0A\x15GetUserStatusResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12?\x0A\x06result\x18\x02 \x01(\x0B2/.centrifugal.centrifugo.api.GetUserStatusResult\"O\x0A\x13GetUserStatusResult\x128\x0A\x08statuses\x18\x01 \x03(\x0B2&.centrifugal.centrifugo.api.UserStatus\"I\x0A\x0AUserStatus\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\x12\x0E\x0A\x06active\x18\x02 \x01(\x03\x12\x0E\x0A\x06online\x18\x03 \x01(\x03\x12\x0D\x0A\x05state\x18\x04 \x01(\x09\"(\x0A\x17DeleteUserStatusRequest\x12\x0D\x0A\x05users\x18\x01 \x03(\x09\"\x90\x01\x0A\x18DeleteUserStatusResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12B\x0A\x06result\x18\x02 \x01(\x0B22.centrifugal.centrifugo.api.DeleteUserStatusResult\"\x18\x0A\x16DeleteUserStatusResult\"3\x0A\x10BlockUserRequest\x12\x11\x0A\x09expire_at\x18\x01 \x01(\x03\x12\x0C\x0A\x04user\x18\x02 \x01(\x09\"\x11\x0A\x0FBlockUserResult\"\x82\x01\x0A\x11BlockUserResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12;\x0A\x06result\x18\x02 \x01(\x0B2+.centrifugal.centrifugo.api.BlockUserResult\"\"\x0A\x12UnblockUserRequest\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\"\x13\x0A\x11UnblockUserResult\"\x86\x01\x0A\x13UnblockUserResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12=\x0A\x06result\x18\x02 \x01(\x0B2-.centrifugal.centrifugo.api.UnblockUserResult\"4\x0A\x12RevokeTokenRequest\x12\x11\x0A\x09expire_at\x18\x01 \x01(\x03\x12\x0B\x0A\x03uid\x18\x02 \x01(\x09\"\x13\x0A\x11RevokeTokenResult\"\x86\x01\x0A\x13RevokeTokenResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12=\x0A\x06result\x18\x02 \x01(\x0B2-.centrifugal.centrifugo.api.RevokeTokenResult\"f\x0A\x1BInvalidateUserTokensRequest\x12\x11\x0A\x09expire_at\x18\x01 \x01(\x03\x12\x0C\x0A\x04user\x18\x02 \x01(\x09\x12\x15\x0A\x0Dissued_before\x18\x03 \x01(\x03\x12\x0F\x0A\x07channel\x18\x04 \x01(\x09\"\x1C\x0A\x1AInvalidateUserTokensResult\"\x98\x01\x0A\x1CInvalidateUserTokensResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12F\x0A\x06result\x18\x02 \x01(\x0B26.centrifugal.centrifugo.api.InvalidateUserTokensResult\"\xEC\x01\x0A\x15DeviceRegisterRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x10\x0A\x08provider\x18\x02 \x01(\x09\x12\x0D\x0A\x05token\x18\x03 \x01(\x09\x12\x10\x0A\x08platform\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x05 \x01(\x09\x12I\x0A\x04meta\x18\x06 \x03(\x0B2;.centrifugal.centrifugo.api.DeviceRegisterRequest.MetaEntry\x12\x0E\x0A\x06topics\x18\x07 \x03(\x09\x1A+\x0A\x09MetaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xFE\x01\x0A\x13DeviceUpdateRequest\x12\x0B\x0A\x03ids\x18\x01 \x03(\x09\x12\x0D\x0A\x05users\x18\x02 \x03(\x09\x12A\x0A\x0Buser_update\x18\x04 \x01(\x0B2,.centrifugal.centrifugo.api.DeviceUserUpdate\x12A\x0A\x0Bmeta_update\x18\x05 \x01(\x0B2,.centrifugal.centrifugo.api.DeviceMetaUpdate\x12E\x0A\x0Dtopics_update\x18\x06 \x01(\x0B2..centrifugal.centrifugo.api.DeviceTopicsUpdate\"1\x0A\x13DeviceRemoveRequest\x12\x0B\x0A\x03ids\x18\x01 \x03(\x09\x12\x0D\x0A\x05users\x18\x02 \x03(\x09\" \x0A\x10DeviceUserUpdate\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\"\x85\x01\x0A\x10DeviceMetaUpdate\x12D\x0A\x04meta\x18\x01 \x03(\x0B26.centrifugal.centrifugo.api.DeviceMetaUpdate.MetaEntry\x1A+\x0A\x09MetaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"0\x0A\x12DeviceTopicsUpdate\x12\x0A\x0A\x02op\x18\x01 \x01(\x09\x12\x0E\x0A\x06topics\x18\x02 \x03(\x09\"`\x0A\x0CDeviceFilter\x12\x0B\x0A\x03ids\x18\x01 \x03(\x09\x12\x0D\x0A\x05users\x18\x02 \x03(\x09\x12\x0E\x0A\x06topics\x18\x03 \x03(\x09\x12\x11\x0A\x09providers\x18\x04 \x03(\x09\x12\x11\x0A\x09platforms\x18\x05 \x03(\x09\"\xB7\x01\x0A\x11DeviceListRequest\x128\x0A\x06filter\x18\x01 \x01(\x0B2(.centrifugal.centrifugo.api.DeviceFilter\x12\x1B\x0A\x13include_total_count\x18\x02 \x01(\x08\x12\x14\x0A\x0Cinclude_meta\x18\x03 \x01(\x08\x12\x16\x0A\x0Einclude_topics\x18\x04 \x01(\x08\x12\x0E\x0A\x06cursor\x18\x0A \x01(\x09\x12\x0D\x0A\x05limit\x18\x0B \x01(\x05\"\x97\x01\x0A\x11DeviceTopicFilter\x12\x12\x0A\x0Adevice_ids\x18\x01 \x03(\x09\x12\x18\x0A\x10device_providers\x18\x02 \x03(\x09\x12\x18\x0A\x10device_platforms\x18\x03 \x03(\x09\x12\x14\x0A\x0Cdevice_users\x18\x04 \x03(\x09\x12\x0E\x0A\x06topics\x18\x05 \x03(\x09\x12\x14\x0A\x0Ctopic_prefix\x18\x06 \x01(\x09\"\xAB\x01\x0A\x16DeviceTopicListRequest\x12=\x0A\x06filter\x18\x01 \x01(\x0B2-.centrifugal.centrifugo.api.DeviceTopicFilter\x12\x1B\x0A\x13include_total_count\x18\x02 \x01(\x08\x12\x16\x0A\x0Einclude_device\x18\x03 \x01(\x08\x12\x0E\x0A\x06cursor\x18\x0A \x01(\x09\x12\x0D\x0A\x05limit\x18\x0B \x01(\x05\"F\x0A\x0FUserTopicFilter\x12\x0D\x0A\x05users\x18\x01 \x03(\x09\x12\x0E\x0A\x06topics\x18\x02 \x03(\x09\x12\x14\x0A\x0Ctopic_prefix\x18\x03 \x01(\x09\"\x8F\x01\x0A\x14UserTopicListRequest\x12;\x0A\x06filter\x18\x01 \x01(\x0B2+.centrifugal.centrifugo.api.UserTopicFilter\x12\x1B\x0A\x13include_total_count\x18\x02 \x01(\x08\x12\x0E\x0A\x06cursor\x18\x0A \x01(\x09\x12\x0D\x0A\x05limit\x18\x0B \x01(\x05\"I\x0A\x18DeviceTopicUpdateRequest\x12\x11\x0A\x09device_id\x18\x01 \x01(\x09\x12\x0A\x0A\x02op\x18\x02 \x01(\x09\x12\x0E\x0A\x06topics\x18\x03 \x03(\x09\"B\x0A\x16UserTopicUpdateRequest\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\x12\x0A\x0A\x02op\x18\x02 \x01(\x09\x12\x0E\x0A\x06topics\x18\x03 \x03(\x09\"\x8C\x01\x0A\x16DeviceRegisterResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12@\x0A\x06result\x18\x02 \x01(\x0B20.centrifugal.centrifugo.api.DeviceRegisterResult\"\x88\x01\x0A\x14DeviceUpdateResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12>\x0A\x06result\x18\x02 \x01(\x0B2..centrifugal.centrifugo.api.DeviceUpdateResult\"\x88\x01\x0A\x14DeviceRemoveResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12>\x0A\x06result\x18\x02 \x01(\x0B2..centrifugal.centrifugo.api.DeviceRemoveResult\"\x84\x01\x0A\x12DeviceListResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12<\x0A\x06result\x18\x02 \x01(\x0B2,.centrifugal.centrifugo.api.DeviceListResult\"\x8E\x01\x0A\x17DeviceTopicListResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12A\x0A\x06result\x18\x02 \x01(\x0B21.centrifugal.centrifugo.api.DeviceTopicListResult\"\x8A\x01\x0A\x15UserTopicListResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12?\x0A\x06result\x18\x02 \x01(\x0B2/.centrifugal.centrifugo.api.UserTopicListResult\"\x92\x01\x0A\x19DeviceTopicUpdateResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12C\x0A\x06result\x18\x02 \x01(\x0B23.centrifugal.centrifugo.api.DeviceTopicUpdateResult\"\x8E\x01\x0A\x17UserTopicUpdateResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12A\x0A\x06result\x18\x02 \x01(\x0B21.centrifugal.centrifugo.api.UserTopicUpdateResult\"\"\x0A\x14DeviceRegisterResult\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\"\x14\x0A\x12DeviceUpdateResult\"\x14\x0A\x12DeviceRemoveResult\"o\x0A\x10DeviceListResult\x121\x0A\x05items\x18\x01 \x03(\x0B2\".centrifugal.centrifugo.api.Device\x12\x13\x0A\x0Bnext_cursor\x18\x02 \x01(\x09\x12\x13\x0A\x0Btotal_count\x18\x03 \x01(\x03\"\xF6\x01\x0A\x06Device\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x10\x0A\x08platform\x18\x02 \x01(\x09\x12\x10\x0A\x08provider\x18\x03 \x01(\x09\x12\x0D\x0A\x05token\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x05 \x01(\x09\x12\x12\x0A\x0Acreated_at\x18\x06 \x01(\x03\x12\x12\x0A\x0Aupdated_at\x18\x07 \x01(\x03\x12:\x0A\x04meta\x18\x0A \x03(\x0B2,.centrifugal.centrifugo.api.Device.MetaEntry\x12\x0E\x0A\x06topics\x18\x0B \x03(\x09\x1A+\x0A\x09MetaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"y\x0A\x15DeviceTopicListResult\x126\x0A\x05items\x18\x01 \x03(\x0B2'.centrifugal.centrifugo.api.DeviceTopic\x12\x13\x0A\x0Bnext_cursor\x18\x02 \x01(\x09\x12\x13\x0A\x0Btotal_count\x18\x03 \x01(\x03\"\\\x0A\x0BDeviceTopic\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0D\x0A\x05topic\x18\x02 \x01(\x09\x122\x0A\x06device\x18\x03 \x01(\x0B2\".centrifugal.centrifugo.api.Device\"u\x0A\x13UserTopicListResult\x124\x0A\x05items\x18\x01 \x03(\x0B2%.centrifugal.centrifugo.api.UserTopic\x12\x13\x0A\x0Bnext_cursor\x18\x02 \x01(\x09\x12\x13\x0A\x0Btotal_count\x18\x03 \x01(\x03\"\x19\x0A\x17DeviceTopicUpdateResult\"\x17\x0A\x15UserTopicUpdateResult\"4\x0A\x09UserTopic\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0C\x0A\x04user\x18\x02 \x01(\x09\x12\x0D\x0A\x05topic\x18\x03 \x01(\x09\"\xDA\x01\x0A\x0DPushRecipient\x128\x0A\x06filter\x18\x01 \x01(\x0B2(.centrifugal.centrifugo.api.DeviceFilter\x12\x12\x0A\x0Afcm_tokens\x18\x02 \x03(\x09\x12\x11\x0A\x09fcm_topic\x18\x03 \x01(\x09\x12\x15\x0A\x0Dfcm_condition\x18\x04 \x01(\x09\x12\x12\x0A\x0Ahms_tokens\x18\x05 \x03(\x09\x12\x11\x0A\x09hms_topic\x18\x06 \x01(\x09\x12\x15\x0A\x0Dhms_condition\x18\x07 \x01(\x09\x12\x13\x0A\x0Bapns_tokens\x18\x08 \x03(\x09\"\xE1\x01\x0A\x10PushNotification\x12<\x0A\x03fcm\x18\x01 \x01(\x0B2/.centrifugal.centrifugo.api.FcmPushNotification\x12<\x0A\x03hms\x18\x02 \x01(\x0B2/.centrifugal.centrifugo.api.HmsPushNotification\x12>\x0A\x04apns\x18\x03 \x01(\x0B20.centrifugal.centrifugo.api.ApnsPushNotification\x12\x11\x0A\x09expire_at\x18\x05 \x01(\x03\"&\x0A\x13FcmPushNotification\x12\x0F\x0A\x07message\x18\x01 \x01(\x0C\"&\x0A\x13HmsPushNotification\x12\x0F\x0A\x07message\x18\x01 \x01(\x0C\"\xA7\x01\x0A\x14ApnsPushNotification\x12N\x0A\x07headers\x18\x01 \x03(\x0B2=.centrifugal.centrifugo.api.ApnsPushNotification.HeadersEntry\x12\x0F\x0A\x07payload\x18\x02 \x01(\x0C\x1A.\x0A\x0CHeadersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xBD\x01\x0A\x1BSendPushNotificationRequest\x12<\x0A\x09recipient\x18\x01 \x01(\x0B2).centrifugal.centrifugo.api.PushRecipient\x12B\x0A\x0Cnotification\x18\x02 \x01(\x0B2,.centrifugal.centrifugo.api.PushNotification\x12\x0B\x0A\x03uid\x18\x03 \x01(\x09\x12\x0F\x0A\x07send_at\x18\x04 \x01(\x03\"\x98\x01\x0A\x1CSendPushNotificationResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12F\x0A\x06result\x18\x02 \x01(\x0B26.centrifugal.centrifugo.api.SendPushNotificationResult\")\x0A\x1ASendPushNotificationResult\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\"Y\x0A\x17UpdatePushStatusRequest\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\x12\x0E\x0A\x06status\x18\x02 \x01(\x09\x12\x11\x0A\x09device_id\x18\x03 \x01(\x09\x12\x0E\x0A\x06msg_id\x18\x04 \x01(\x09\"\x90\x01\x0A\x18UpdatePushStatusResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12B\x0A\x06result\x18\x02 \x01(\x0B22.centrifugal.centrifugo.api.UpdatePushStatusResult\"\x18\x0A\x16UpdatePushStatusResult\" \x0A\x11CancelPushRequest\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\"\x84\x01\x0A\x12CancelPushResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12<\x0A\x06result\x18\x02 \x01(\x0B2,.centrifugal.centrifugo.api.CancelPushResult\"\x12\x0A\x10CancelPushResult\"\x12\x0A\x10RateLimitRequest\"\x82\x01\x0A\x11RateLimitResponse\x120\x0A\x05error\x18\x01 \x01(\x0B2!.centrifugal.centrifugo.api.Error\x12;\x0A\x06result\x18\x02 \x01(\x0B2+.centrifugal.centrifugo.api.RateLimitResult\"\x11\x0A\x0FRateLimitResult2\xD4\x1E\x0A\x0DCentrifugoApi\x12^\x0A\x05Batch\x12(.centrifugal.centrifugo.api.BatchRequest\x1A).centrifugal.centrifugo.api.BatchResponse\"\x00\x12d\x0A\x07Publish\x12*.centrifugal.centrifugo.api.PublishRequest\x1A+.centrifugal.centrifugo.api.PublishResponse\"\x00\x12j\x0A\x09Broadcast\x12,.centrifugal.centrifugo.api.BroadcastRequest\x1A-.centrifugal.centrifugo.api.BroadcastResponse\"\x00\x12j\x0A\x09Subscribe\x12,.centrifugal.centrifugo.api.SubscribeRequest\x1A-.centrifugal.centrifugo.api.SubscribeResponse\"\x00\x12p\x0A\x0BUnsubscribe\x12..centrifugal.centrifugo.api.UnsubscribeRequest\x1A/.centrifugal.centrifugo.api.UnsubscribeResponse\"\x00\x12m\x0A\x0ADisconnect\x12-.centrifugal.centrifugo.api.DisconnectRequest\x1A..centrifugal.centrifugo.api.DisconnectResponse\"\x00\x12g\x0A\x08Presence\x12+.centrifugal.centrifugo.api.PresenceRequest\x1A,.centrifugal.centrifugo.api.PresenceResponse\"\x00\x12v\x0A\x0DPresenceStats\x120.centrifugal.centrifugo.api.PresenceStatsRequest\x1A1.centrifugal.centrifugo.api.PresenceStatsResponse\"\x00\x12d\x0A\x07History\x12*.centrifugal.centrifugo.api.HistoryRequest\x1A+.centrifugal.centrifugo.api.HistoryResponse\"\x00\x12v\x0A\x0DHistoryRemove\x120.centrifugal.centrifugo.api.HistoryRemoveRequest\x1A1.centrifugal.centrifugo.api.HistoryRemoveResponse\"\x00\x12[\x0A\x04Info\x12'.centrifugal.centrifugo.api.InfoRequest\x1A(.centrifugal.centrifugo.api.InfoResponse\"\x00\x12X\x0A\x03RPC\x12&.centrifugal.centrifugo.api.RPCRequest\x1A'.centrifugal.centrifugo.api.RPCResponse\"\x00\x12d\x0A\x07Refresh\x12*.centrifugal.centrifugo.api.RefreshRequest\x1A+.centrifugal.centrifugo.api.RefreshResponse\"\x00\x12g\x0A\x08Channels\x12+.centrifugal.centrifugo.api.ChannelsRequest\x1A,.centrifugal.centrifugo.api.ChannelsResponse\"\x00\x12p\x0A\x0BConnections\x12..centrifugal.centrifugo.api.ConnectionsRequest\x1A/.centrifugal.centrifugo.api.ConnectionsResponse\"\x00\x12\x7F\x0A\x10UpdateUserStatus\x123.centrifugal.centrifugo.api.UpdateUserStatusRequest\x1A4.centrifugal.centrifugo.api.UpdateUserStatusResponse\"\x00\x12v\x0A\x0DGetUserStatus\x120.centrifugal.centrifugo.api.GetUserStatusRequest\x1A1.centrifugal.centrifugo.api.GetUserStatusResponse\"\x00\x12\x7F\x0A\x10DeleteUserStatus\x123.centrifugal.centrifugo.api.DeleteUserStatusRequest\x1A4.centrifugal.centrifugo.api.DeleteUserStatusResponse\"\x00\x12j\x0A\x09BlockUser\x12,.centrifugal.centrifugo.api.BlockUserRequest\x1A-.centrifugal.centrifugo.api.BlockUserResponse\"\x00\x12p\x0A\x0BUnblockUser\x12..centrifugal.centrifugo.api.UnblockUserRequest\x1A/.centrifugal.centrifugo.api.UnblockUserResponse\"\x00\x12p\x0A\x0BRevokeToken\x12..centrifugal.centrifugo.api.RevokeTokenRequest\x1A/.centrifugal.centrifugo.api.RevokeTokenResponse\"\x00\x12\x8B\x01\x0A\x14InvalidateUserTokens\x127.centrifugal.centrifugo.api.InvalidateUserTokensRequest\x1A8.centrifugal.centrifugo.api.InvalidateUserTokensResponse\"\x00\x12y\x0A\x0EDeviceRegister\x121.centrifugal.centrifugo.api.DeviceRegisterRequest\x1A2.centrifugal.centrifugo.api.DeviceRegisterResponse\"\x00\x12s\x0A\x0CDeviceUpdate\x12/.centrifugal.centrifugo.api.DeviceUpdateRequest\x1A0.centrifugal.centrifugo.api.DeviceUpdateResponse\"\x00\x12s\x0A\x0CDeviceRemove\x12/.centrifugal.centrifugo.api.DeviceRemoveRequest\x1A0.centrifugal.centrifugo.api.DeviceRemoveResponse\"\x00\x12m\x0A\x0ADeviceList\x12-.centrifugal.centrifugo.api.DeviceListRequest\x1A..centrifugal.centrifugo.api.DeviceListResponse\"\x00\x12|\x0A\x0FDeviceTopicList\x122.centrifugal.centrifugo.api.DeviceTopicListRequest\x1A3.centrifugal.centrifugo.api.DeviceTopicListResponse\"\x00\x12\x82\x01\x0A\x11DeviceTopicUpdate\x124.centrifugal.centrifugo.api.DeviceTopicUpdateRequest\x1A5.centrifugal.centrifugo.api.DeviceTopicUpdateResponse\"\x00\x12v\x0A\x0DUserTopicList\x120.centrifugal.centrifugo.api.UserTopicListRequest\x1A1.centrifugal.centrifugo.api.UserTopicListResponse\"\x00\x12|\x0A\x0FUserTopicUpdate\x122.centrifugal.centrifugo.api.UserTopicUpdateRequest\x1A3.centrifugal.centrifugo.api.UserTopicUpdateResponse\"\x00\x12\x8B\x01\x0A\x14SendPushNotification\x127.centrifugal.centrifugo.api.SendPushNotificationRequest\x1A8.centrifugal.centrifugo.api.SendPushNotificationResponse\"\x00\x12\x7F\x0A\x10UpdatePushStatus\x123.centrifugal.centrifugo.api.UpdatePushStatusRequest\x1A4.centrifugal.centrifugo.api.UpdatePushStatusResponse\"\x00\x12m\x0A\x0ACancelPush\x12-.centrifugal.centrifugo.api.CancelPushRequest\x1A..centrifugal.centrifugo.api.CancelPushResponse\"\x00\x12j\x0A\x09RateLimit\x12,.centrifugal.centrifugo.api.RateLimitRequest\x1A-.centrifugal.centrifugo.api.RateLimitResponse\"\x00BgZ\x11centrifugo/api/v1\xCA\x02!RoadRunner\\Centrifugal\\API\\DTO\\V1\xE2\x02-RoadRunner\\Centrifugal\\API\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusRequest.php new file mode 100644 index 0000000..cbcbd08 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.GetUserStatusRequest + */ +class GetUserStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string users = 1; + */ + private $users; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $users + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string users = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsers() + { + return $this->users; + } + + /** + * Generated from protobuf field repeated string users = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->users = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusResponse.php new file mode 100644 index 0000000..5c76ccf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.GetUserStatusResponse + */ +class GetUserStatusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusResult.php new file mode 100644 index 0000000..6fcef3b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/GetUserStatusResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.GetUserStatusResult + */ +class GetUserStatusResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.UserStatus statuses = 1; + */ + private $statuses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\UserStatus>|\Google\Protobuf\Internal\RepeatedField $statuses + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.UserStatus statuses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatuses() + { + return $this->statuses; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.UserStatus statuses = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\UserStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\UserStatus::class); + $this->statuses = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveRequest.php new file mode 100644 index 0000000..2c093d0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.HistoryRemoveRequest + */ +class HistoryRemoveRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveResponse.php new file mode 100644 index 0000000..1a35c02 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.HistoryRemoveResponse + */ +class HistoryRemoveResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveResult.php new file mode 100644 index 0000000..434f072 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRemoveResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.HistoryRemoveResult + */ +class HistoryRemoveResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRequest.php new file mode 100644 index 0000000..6009b24 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryRequest.php @@ -0,0 +1,150 @@ +centrifugal.centrifugo.api.HistoryRequest + */ +class HistoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + /** + * Generated from protobuf field int32 limit = 2; + */ + protected $limit = 0; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.StreamPosition since = 3; + */ + protected $since = null; + /** + * Generated from protobuf field bool reverse = 4; + */ + protected $reverse = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * @type int $limit + * @type \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition $since + * @type bool $reverse + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 limit = 2; + * @return int + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Generated from protobuf field int32 limit = 2; + * @param int $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkInt32($var); + $this->limit = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.StreamPosition since = 3; + * @return \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition|null + */ + public function getSince() + { + return $this->since; + } + + public function hasSince() + { + return isset($this->since); + } + + public function clearSince() + { + unset($this->since); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.StreamPosition since = 3; + * @param \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition $var + * @return $this + */ + public function setSince($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition::class); + $this->since = $var; + + return $this; + } + + /** + * Generated from protobuf field bool reverse = 4; + * @return bool + */ + public function getReverse() + { + return $this->reverse; + } + + /** + * Generated from protobuf field bool reverse = 4; + * @param bool $var + * @return $this + */ + public function setReverse($var) + { + GPBUtil::checkBool($var); + $this->reverse = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryResponse.php new file mode 100644 index 0000000..3935a2e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.HistoryResponse + */ +class HistoryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryResult.php new file mode 100644 index 0000000..0ec3bc1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HistoryResult.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.api.HistoryResult + */ +class HistoryResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Publication publications = 1; + */ + private $publications; + /** + * Generated from protobuf field string epoch = 2; + */ + protected $epoch = ''; + /** + * Generated from protobuf field uint64 offset = 3; + */ + protected $offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\Publication>|\Google\Protobuf\Internal\RepeatedField $publications + * @type string $epoch + * @type int|string $offset + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Publication publications = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPublications() + { + return $this->publications; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.Publication publications = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\Publication>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPublications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\Publication::class); + $this->publications = $arr; + + return $this; + } + + /** + * Generated from protobuf field string epoch = 2; + * @return string + */ + public function getEpoch() + { + return $this->epoch; + } + + /** + * Generated from protobuf field string epoch = 2; + * @param string $var + * @return $this + */ + public function setEpoch($var) + { + GPBUtil::checkString($var, True); + $this->epoch = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 offset = 3; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Generated from protobuf field uint64 offset = 3; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkUint64($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HmsPushNotification.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HmsPushNotification.php new file mode 100644 index 0000000..a51dcc8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/HmsPushNotification.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.HmsPushNotification + */ +class HmsPushNotification extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes message = 1; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field bytes message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, False); + $this->message = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoRequest.php new file mode 100644 index 0000000..01c5e8c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoRequest.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.InfoRequest + */ +class InfoRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoResponse.php new file mode 100644 index 0000000..57d8c59 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.InfoResponse + */ +class InfoResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\InfoResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\InfoResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\InfoResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\InfoResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoResult.php new file mode 100644 index 0000000..e9d5475 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InfoResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.InfoResult + */ +class InfoResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.NodeResult nodes = 1; + */ + private $nodes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\NodeResult>|\Google\Protobuf\Internal\RepeatedField $nodes + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.NodeResult nodes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.NodeResult nodes = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\NodeResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\NodeResult::class); + $this->nodes = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Int32Value.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Int32Value.php new file mode 100644 index 0000000..0579188 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Int32Value.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.Int32Value + */ +class Int32Value extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 value = 1; + */ + protected $value = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $value + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 value = 1; + * @return int + */ + public function getValue() + { + return $this->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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensRequest.php new file mode 100644 index 0000000..fcefc45 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensRequest.php @@ -0,0 +1,140 @@ +centrifugal.centrifugo.api.InvalidateUserTokensRequest + */ +class InvalidateUserTokensRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 expire_at = 1; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * Generated from protobuf field int64 issued_before = 3; + */ + protected $issued_before = 0; + /** + * Generated from protobuf field string channel = 4; + */ + protected $channel = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $expire_at + * @type string $user + * @type int|string $issued_before + * @type string $channel + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 issued_before = 3; + * @return int|string + */ + public function getIssuedBefore() + { + return $this->issued_before; + } + + /** + * Generated from protobuf field int64 issued_before = 3; + * @param int|string $var + * @return $this + */ + public function setIssuedBefore($var) + { + GPBUtil::checkInt64($var); + $this->issued_before = $var; + + return $this; + } + + /** + * Generated from protobuf field string channel = 4; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 4; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensResponse.php new file mode 100644 index 0000000..b1f9c5d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.InvalidateUserTokensResponse + */ +class InvalidateUserTokensResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensResult.php new file mode 100644 index 0000000..d419c3a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/InvalidateUserTokensResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.InvalidateUserTokensResult + */ +class InvalidateUserTokensResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Metrics.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Metrics.php new file mode 100644 index 0000000..45b6a22 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Metrics.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field double interval = 1; + */ + protected $interval = 0.0; + /** + * Generated from protobuf field map items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $interval + * @type array|\Google\Protobuf\Internal\MapField $items + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field double interval = 1; + * @return float + */ + public function getInterval() + { + return $this->interval; + } + + /** + * Generated from protobuf field double interval = 1; + * @param float $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkDouble($var); + $this->interval = $var; + + return $this; + } + + /** + * Generated from protobuf field map items = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field map items = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->items = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/NodeResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/NodeResult.php new file mode 100644 index 0000000..be20a84 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/NodeResult.php @@ -0,0 +1,322 @@ +centrifugal.centrifugo.api.NodeResult + */ +class NodeResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + /** + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Generated from protobuf field string version = 3; + */ + protected $version = ''; + /** + * Generated from protobuf field uint32 num_clients = 4; + */ + protected $num_clients = 0; + /** + * Generated from protobuf field uint32 num_users = 5; + */ + protected $num_users = 0; + /** + * Generated from protobuf field uint32 num_channels = 6; + */ + protected $num_channels = 0; + /** + * Generated from protobuf field uint32 uptime = 7; + */ + protected $uptime = 0; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Metrics metrics = 8; + */ + protected $metrics = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Process process = 9; + */ + protected $process = null; + /** + * Generated from protobuf field uint32 num_subs = 10; + */ + protected $num_subs = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * @type string $name + * @type string $version + * @type int $num_clients + * @type int $num_users + * @type int $num_channels + * @type int $uptime + * @type \RoadRunner\Centrifugal\API\DTO\V1\Metrics $metrics + * @type \RoadRunner\Centrifugal\API\DTO\V1\Process $process + * @type int $num_subs + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string version = 3; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Generated from protobuf field string version = 3; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 num_clients = 4; + * @return int + */ + public function getNumClients() + { + return $this->num_clients; + } + + /** + * Generated from protobuf field uint32 num_clients = 4; + * @param int $var + * @return $this + */ + public function setNumClients($var) + { + GPBUtil::checkUint32($var); + $this->num_clients = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 num_users = 5; + * @return int + */ + public function getNumUsers() + { + return $this->num_users; + } + + /** + * Generated from protobuf field uint32 num_users = 5; + * @param int $var + * @return $this + */ + public function setNumUsers($var) + { + GPBUtil::checkUint32($var); + $this->num_users = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 num_channels = 6; + * @return int + */ + public function getNumChannels() + { + return $this->num_channels; + } + + /** + * Generated from protobuf field uint32 num_channels = 6; + * @param int $var + * @return $this + */ + public function setNumChannels($var) + { + GPBUtil::checkUint32($var); + $this->num_channels = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 uptime = 7; + * @return int + */ + public function getUptime() + { + return $this->uptime; + } + + /** + * Generated from protobuf field uint32 uptime = 7; + * @param int $var + * @return $this + */ + public function setUptime($var) + { + GPBUtil::checkUint32($var); + $this->uptime = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Metrics metrics = 8; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Metrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Metrics metrics = 8; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Metrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Metrics::class); + $this->metrics = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Process process = 9; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Process|null + */ + public function getProcess() + { + return $this->process; + } + + public function hasProcess() + { + return isset($this->process); + } + + public function clearProcess() + { + unset($this->process); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Process process = 9; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Process $var + * @return $this + */ + public function setProcess($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Process::class); + $this->process = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 num_subs = 10; + * @return int + */ + public function getNumSubs() + { + return $this->num_subs; + } + + /** + * Generated from protobuf field uint32 num_subs = 10; + * @param int $var + * @return $this + */ + public function setNumSubs($var) + { + GPBUtil::checkUint32($var); + $this->num_subs = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceRequest.php new file mode 100644 index 0000000..37ca7bd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.PresenceRequest + */ +class PresenceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceResponse.php new file mode 100644 index 0000000..07b9616 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.PresenceResponse + */ +class PresenceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceResult.php new file mode 100644 index 0000000..c9a12ef --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.PresenceResult + */ +class PresenceResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map presence = 1; + */ + private $presence; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $presence + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map presence = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPresence() + { + return $this->presence; + } + + /** + * Generated from protobuf field map presence = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPresence($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\ClientInfo::class); + $this->presence = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsRequest.php new file mode 100644 index 0000000..4ae24f6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.PresenceStatsRequest + */ +class PresenceStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsResponse.php new file mode 100644 index 0000000..8eccef8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.PresenceStatsResponse + */ +class PresenceStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsResult.php new file mode 100644 index 0000000..b510c89 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PresenceStatsResult.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.PresenceStatsResult + */ +class PresenceStatsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 num_clients = 1; + */ + protected $num_clients = 0; + /** + * Generated from protobuf field uint32 num_users = 2; + */ + protected $num_users = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $num_clients + * @type int $num_users + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 num_clients = 1; + * @return int + */ + public function getNumClients() + { + return $this->num_clients; + } + + /** + * Generated from protobuf field uint32 num_clients = 1; + * @param int $var + * @return $this + */ + public function setNumClients($var) + { + GPBUtil::checkUint32($var); + $this->num_clients = $var; + + return $this; + } + + /** + * Generated from protobuf field uint32 num_users = 2; + * @return int + */ + public function getNumUsers() + { + return $this->num_users; + } + + /** + * Generated from protobuf field uint32 num_users = 2; + * @param int $var + * @return $this + */ + public function setNumUsers($var) + { + GPBUtil::checkUint32($var); + $this->num_users = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Process.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Process.php new file mode 100644 index 0000000..f83a3c2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Process.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.Process + */ +class Process extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field double cpu = 1; + */ + protected $cpu = 0.0; + /** + * Generated from protobuf field int64 rss = 2; + */ + protected $rss = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu + * @type int|string $rss + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field double cpu = 1; + * @return float + */ + public function getCpu() + { + return $this->cpu; + } + + /** + * Generated from protobuf field double cpu = 1; + * @param float $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkDouble($var); + $this->cpu = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 rss = 2; + * @return int|string + */ + public function getRss() + { + return $this->rss; + } + + /** + * Generated from protobuf field int64 rss = 2; + * @param int|string $var + * @return $this + */ + public function setRss($var) + { + GPBUtil::checkInt64($var); + $this->rss = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Publication.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Publication.php new file mode 100644 index 0000000..8e7d3cd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Publication.php @@ -0,0 +1,157 @@ +centrifugal.centrifugo.api.Publication + */ +class Publication extends \Google\Protobuf\Internal\Message +{ + /** + * Removed: string uid = 1; + * + * Generated from protobuf field bytes data = 2; + */ + protected $data = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ClientInfo info = 3; + */ + protected $info = null; + /** + * Generated from protobuf field uint64 offset = 4; + */ + protected $offset = 0; + /** + * Generated from protobuf field map tags = 5; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * Removed: string uid = 1; + * @type \RoadRunner\Centrifugal\API\DTO\V1\ClientInfo $info + * @type int|string $offset + * @type array|\Google\Protobuf\Internal\MapField $tags + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Removed: string uid = 1; + * + * Generated from protobuf field bytes data = 2; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Removed: string uid = 1; + * + * 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; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ClientInfo info = 3; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ClientInfo|null + */ + public function getInfo() + { + return $this->info; + } + + public function hasInfo() + { + return isset($this->info); + } + + public function clearInfo() + { + unset($this->info); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ClientInfo info = 3; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ClientInfo $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ClientInfo::class); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 offset = 4; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Generated from protobuf field uint64 offset = 4; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkUint64($var); + $this->offset = $var; + + return $this; + } + + /** + * Generated from protobuf field map tags = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Generated from protobuf field map tags = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishRequest.php new file mode 100644 index 0000000..c5ccb19 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishRequest.php @@ -0,0 +1,194 @@ +centrifugal.centrifugo.api.PublishRequest + */ +class PublishRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + /** + * Generated from protobuf field bytes data = 2; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 3; + */ + protected $b64data = ''; + /** + * Generated from protobuf field bool skip_history = 4; + */ + protected $skip_history = false; + /** + * Generated from protobuf field map tags = 5; + */ + private $tags; + /** + * Generated from protobuf field string idempotency_key = 6; + */ + protected $idempotency_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * @type string $data + * @type string $b64data + * @type bool $skip_history + * @type array|\Google\Protobuf\Internal\MapField $tags + * @type string $idempotency_key + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 2; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string b64data = 3; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 3; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field bool skip_history = 4; + * @return bool + */ + public function getSkipHistory() + { + return $this->skip_history; + } + + /** + * Generated from protobuf field bool skip_history = 4; + * @param bool $var + * @return $this + */ + public function setSkipHistory($var) + { + GPBUtil::checkBool($var); + $this->skip_history = $var; + + return $this; + } + + /** + * Generated from protobuf field map tags = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Generated from protobuf field map tags = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Generated from protobuf field string idempotency_key = 6; + * @return string + */ + public function getIdempotencyKey() + { + return $this->idempotency_key; + } + + /** + * Generated from protobuf field string idempotency_key = 6; + * @param string $var + * @return $this + */ + public function setIdempotencyKey($var) + { + GPBUtil::checkString($var, True); + $this->idempotency_key = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishResponse.php new file mode 100644 index 0000000..6837982 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.PublishResponse + */ +class PublishResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\PublishResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PublishResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PublishResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PublishResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishResult.php new file mode 100644 index 0000000..618970e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PublishResult.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.PublishResult + */ +class PublishResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint64 offset = 1; + */ + protected $offset = 0; + /** + * Generated from protobuf field string epoch = 2; + */ + protected $epoch = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offset + * @type string $epoch + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint64 offset = 1; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Generated from protobuf field uint64 offset = 1; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkUint64($var); + $this->offset = $var; + + return $this; + } + + /** + * Generated from protobuf field string epoch = 2; + * @return string + */ + public function getEpoch() + { + return $this->epoch; + } + + /** + * Generated from protobuf field string epoch = 2; + * @param string $var + * @return $this + */ + public function setEpoch($var) + { + GPBUtil::checkString($var, True); + $this->epoch = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PushNotification.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PushNotification.php new file mode 100644 index 0000000..ef363da --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PushNotification.php @@ -0,0 +1,177 @@ +centrifugal.centrifugo.api.PushNotification + */ +class PushNotification extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.FcmPushNotification fcm = 1; + */ + protected $fcm = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HmsPushNotification hms = 2; + */ + protected $hms = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ApnsPushNotification apns = 3; + */ + protected $apns = null; + /** + * timestamp in the future when Centrifugo should stop trying to send push notification. + * + * Generated from protobuf field int64 expire_at = 5; + */ + protected $expire_at = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\FcmPushNotification $fcm + * @type \RoadRunner\Centrifugal\API\DTO\V1\HmsPushNotification $hms + * @type \RoadRunner\Centrifugal\API\DTO\V1\ApnsPushNotification $apns + * @type int|string $expire_at + * timestamp in the future when Centrifugo should stop trying to send push notification. + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.FcmPushNotification fcm = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\FcmPushNotification|null + */ + public function getFcm() + { + return $this->fcm; + } + + public function hasFcm() + { + return isset($this->fcm); + } + + public function clearFcm() + { + unset($this->fcm); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.FcmPushNotification fcm = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\FcmPushNotification $var + * @return $this + */ + public function setFcm($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\FcmPushNotification::class); + $this->fcm = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HmsPushNotification hms = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\HmsPushNotification|null + */ + public function getHms() + { + return $this->hms; + } + + public function hasHms() + { + return isset($this->hms); + } + + public function clearHms() + { + unset($this->hms); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HmsPushNotification hms = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\HmsPushNotification $var + * @return $this + */ + public function setHms($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\HmsPushNotification::class); + $this->hms = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ApnsPushNotification apns = 3; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ApnsPushNotification|null + */ + public function getApns() + { + return $this->apns; + } + + public function hasApns() + { + return isset($this->apns); + } + + public function clearApns() + { + unset($this->apns); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ApnsPushNotification apns = 3; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ApnsPushNotification $var + * @return $this + */ + public function setApns($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ApnsPushNotification::class); + $this->apns = $var; + + return $this; + } + + /** + * timestamp in the future when Centrifugo should stop trying to send push notification. + * + * Generated from protobuf field int64 expire_at = 5; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * timestamp in the future when Centrifugo should stop trying to send push notification. + * + * Generated from protobuf field int64 expire_at = 5; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PushRecipient.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PushRecipient.php new file mode 100644 index 0000000..8039dd8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/PushRecipient.php @@ -0,0 +1,258 @@ +centrifugal.centrifugo.api.PushRecipient + */ +class PushRecipient extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceFilter filter = 1; + */ + protected $filter = null; + /** + * Generated from protobuf field repeated string fcm_tokens = 2; + */ + private $fcm_tokens; + /** + * Generated from protobuf field string fcm_topic = 3; + */ + protected $fcm_topic = ''; + /** + * Generated from protobuf field string fcm_condition = 4; + */ + protected $fcm_condition = ''; + /** + * Generated from protobuf field repeated string hms_tokens = 5; + */ + private $hms_tokens; + /** + * Generated from protobuf field string hms_topic = 6; + */ + protected $hms_topic = ''; + /** + * Generated from protobuf field string hms_condition = 7; + */ + protected $hms_condition = ''; + /** + * Generated from protobuf field repeated string apns_tokens = 8; + */ + private $apns_tokens; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter $filter + * @type array|\Google\Protobuf\Internal\RepeatedField $fcm_tokens + * @type string $fcm_topic + * @type string $fcm_condition + * @type array|\Google\Protobuf\Internal\RepeatedField $hms_tokens + * @type string $hms_topic + * @type string $hms_condition + * @type array|\Google\Protobuf\Internal\RepeatedField $apns_tokens + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceFilter filter = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceFilter filter = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceFilter::class); + $this->filter = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string fcm_tokens = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFcmTokens() + { + return $this->fcm_tokens; + } + + /** + * Generated from protobuf field repeated string fcm_tokens = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFcmTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->fcm_tokens = $arr; + + return $this; + } + + /** + * Generated from protobuf field string fcm_topic = 3; + * @return string + */ + public function getFcmTopic() + { + return $this->fcm_topic; + } + + /** + * Generated from protobuf field string fcm_topic = 3; + * @param string $var + * @return $this + */ + public function setFcmTopic($var) + { + GPBUtil::checkString($var, True); + $this->fcm_topic = $var; + + return $this; + } + + /** + * Generated from protobuf field string fcm_condition = 4; + * @return string + */ + public function getFcmCondition() + { + return $this->fcm_condition; + } + + /** + * Generated from protobuf field string fcm_condition = 4; + * @param string $var + * @return $this + */ + public function setFcmCondition($var) + { + GPBUtil::checkString($var, True); + $this->fcm_condition = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string hms_tokens = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHmsTokens() + { + return $this->hms_tokens; + } + + /** + * Generated from protobuf field repeated string hms_tokens = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHmsTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->hms_tokens = $arr; + + return $this; + } + + /** + * Generated from protobuf field string hms_topic = 6; + * @return string + */ + public function getHmsTopic() + { + return $this->hms_topic; + } + + /** + * Generated from protobuf field string hms_topic = 6; + * @param string $var + * @return $this + */ + public function setHmsTopic($var) + { + GPBUtil::checkString($var, True); + $this->hms_topic = $var; + + return $this; + } + + /** + * Generated from protobuf field string hms_condition = 7; + * @return string + */ + public function getHmsCondition() + { + return $this->hms_condition; + } + + /** + * Generated from protobuf field string hms_condition = 7; + * @param string $var + * @return $this + */ + public function setHmsCondition($var) + { + GPBUtil::checkString($var, True); + $this->hms_condition = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string apns_tokens = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getApnsTokens() + { + return $this->apns_tokens; + } + + /** + * Generated from protobuf field repeated string apns_tokens = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setApnsTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->apns_tokens = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCRequest.php new file mode 100644 index 0000000..367567f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCRequest.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.RPCRequest + */ +class RPCRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string method = 1; + */ + protected $method = ''; + /** + * Generated from protobuf field bytes params = 2; + */ + protected $params = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $method + * @type string $params + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string method = 1; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * Generated from protobuf field string method = 1; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes params = 2; + * @return string + */ + public function getParams() + { + return $this->params; + } + + /** + * Generated from protobuf field bytes params = 2; + * @param string $var + * @return $this + */ + public function setParams($var) + { + GPBUtil::checkString($var, False); + $this->params = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCResponse.php new file mode 100644 index 0000000..4fb90f1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.RPCResponse + */ +class RPCResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\RPCResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RPCResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RPCResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RPCResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCResult.php new file mode 100644 index 0000000..19eeb89 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RPCResult.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.RPCResult + */ +class RPCResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes data = 1; + */ + protected $data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes data = 1; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 1; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitRequest.php new file mode 100644 index 0000000..91c22e0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitRequest.php @@ -0,0 +1,37 @@ +centrifugal.centrifugo.api.RateLimitRequest + */ +class RateLimitRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitResponse.php new file mode 100644 index 0000000..d53165e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.RateLimitResponse + */ +class RateLimitResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitResult.php new file mode 100644 index 0000000..af6b0aa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RateLimitResult.php @@ -0,0 +1,37 @@ +centrifugal.centrifugo.api.RateLimitResult + */ +class RateLimitResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshRequest.php new file mode 100644 index 0000000..f0f09f4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshRequest.php @@ -0,0 +1,194 @@ +centrifugal.centrifugo.api.RefreshRequest + */ +class RefreshRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + /** + * Generated from protobuf field string client = 2; + */ + protected $client = ''; + /** + * Generated from protobuf field bool expired = 3; + */ + protected $expired = false; + /** + * Generated from protobuf field int64 expire_at = 4; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field bytes info = 5; + */ + protected $info = ''; + /** + * Generated from protobuf field string session = 6; + */ + protected $session = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * @type string $client + * @type bool $expired + * @type int|string $expire_at + * @type string $info + * @type string $session + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string client = 2; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 2; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field bool expired = 3; + * @return bool + */ + public function getExpired() + { + return $this->expired; + } + + /** + * Generated from protobuf field bool expired = 3; + * @param bool $var + * @return $this + */ + public function setExpired($var) + { + GPBUtil::checkBool($var); + $this->expired = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 expire_at = 4; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 4; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes info = 5; + * @return string + */ + public function getInfo() + { + return $this->info; + } + + /** + * Generated from protobuf field bytes info = 5; + * @param string $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkString($var, False); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field string session = 6; + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Generated from protobuf field string session = 6; + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshResponse.php new file mode 100644 index 0000000..b60707e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.RefreshResponse + */ +class RefreshResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshResult.php new file mode 100644 index 0000000..03bf565 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RefreshResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.RefreshResult + */ +class RefreshResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Reply.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Reply.php new file mode 100644 index 0000000..5b3bd00 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/Reply.php @@ -0,0 +1,1344 @@ +centrifugal.centrifugo.api.Reply + */ +class Reply extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 id = 1; + */ + protected $id = 0; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 2; + */ + protected $error = null; + /** + * Generated from protobuf field bytes result = 3; + */ + protected $result = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishResult publish = 4; + */ + protected $publish = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastResult broadcast = 5; + */ + protected $broadcast = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeResult subscribe = 6; + */ + protected $subscribe = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeResult unsubscribe = 7; + */ + protected $unsubscribe = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectResult disconnect = 8; + */ + protected $disconnect = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceResult presence = 9; + */ + protected $presence = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsResult presence_stats = 10; + */ + protected $presence_stats = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryResult history = 11; + */ + protected $history = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveResult history_remove = 12; + */ + protected $history_remove = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoResult info = 13; + */ + protected $info = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCResult rpc = 14; + */ + protected $rpc = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshResult refresh = 15; + */ + protected $refresh = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsResult channels = 16; + */ + protected $channels = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsResult connections = 17; + */ + protected $connections = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusResult update_user_status = 18; + */ + protected $update_user_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusResult get_user_status = 19; + */ + protected $get_user_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusResult delete_user_status = 20; + */ + protected $delete_user_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserResult block_user = 21; + */ + protected $block_user = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserResult unblock_user = 22; + */ + protected $unblock_user = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenResult revoke_token = 23; + */ + protected $revoke_token = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensResult invalidate_user_tokens = 24; + */ + protected $invalidate_user_tokens = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterResult device_register = 25; + */ + protected $device_register = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateResult device_update = 26; + */ + protected $device_update = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveResult device_remove = 27; + */ + protected $device_remove = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListResult device_list = 28; + */ + protected $device_list = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListResult device_topic_list = 29; + */ + protected $device_topic_list = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateResult device_topic_update = 30; + */ + protected $device_topic_update = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListResult user_topic_list = 31; + */ + protected $user_topic_list = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateResult user_topic_update = 32; + */ + protected $user_topic_update = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationResult send_push_notification = 33; + */ + protected $send_push_notification = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusResult update_push_status = 34; + */ + protected $update_push_status = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushResult cancel_push = 35; + */ + protected $cancel_push = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitResult rate_limit = 50; + */ + protected $rate_limit = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $id + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type string $result + * @type \RoadRunner\Centrifugal\API\DTO\V1\PublishResult $publish + * @type \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult $broadcast + * @type \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult $subscribe + * @type \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult $unsubscribe + * @type \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult $disconnect + * @type \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult $presence + * @type \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult $presence_stats + * @type \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult $history + * @type \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult $history_remove + * @type \RoadRunner\Centrifugal\API\DTO\V1\InfoResult $info + * @type \RoadRunner\Centrifugal\API\DTO\V1\RPCResult $rpc + * @type \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult $refresh + * @type \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult $channels + * @type \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult $connections + * @type \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult $update_user_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult $get_user_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult $delete_user_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult $block_user + * @type \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult $unblock_user + * @type \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult $revoke_token + * @type \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult $invalidate_user_tokens + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult $device_register + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult $device_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult $device_remove + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult $device_list + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult $device_topic_list + * @type \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult $device_topic_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult $user_topic_list + * @type \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult $user_topic_update + * @type \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult $send_push_notification + * @type \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult $update_push_status + * @type \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult $cancel_push + * @type \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult $rate_limit + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 id = 1; + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field uint32 id = 1; + * @param int $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint32($var); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes result = 3; + * @return string + */ + public function getResult() + { + return $this->result; + } + + /** + * Generated from protobuf field bytes result = 3; + * @param string $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkString($var, False); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishResult publish = 4; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PublishResult|null + */ + public function getPublish() + { + return $this->publish; + } + + public function hasPublish() + { + return isset($this->publish); + } + + public function clearPublish() + { + unset($this->publish); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PublishResult publish = 4; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PublishResult $var + * @return $this + */ + public function setPublish($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PublishResult::class); + $this->publish = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastResult broadcast = 5; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult|null + */ + public function getBroadcast() + { + return $this->broadcast; + } + + public function hasBroadcast() + { + return isset($this->broadcast); + } + + public function clearBroadcast() + { + unset($this->broadcast); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BroadcastResult broadcast = 5; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult $var + * @return $this + */ + public function setBroadcast($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BroadcastResult::class); + $this->broadcast = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeResult subscribe = 6; + * @return \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult|null + */ + public function getSubscribe() + { + return $this->subscribe; + } + + public function hasSubscribe() + { + return isset($this->subscribe); + } + + public function clearSubscribe() + { + unset($this->subscribe); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeResult subscribe = 6; + * @param \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult $var + * @return $this + */ + public function setSubscribe($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult::class); + $this->subscribe = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeResult unsubscribe = 7; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult|null + */ + public function getUnsubscribe() + { + return $this->unsubscribe; + } + + public function hasUnsubscribe() + { + return isset($this->unsubscribe); + } + + public function clearUnsubscribe() + { + unset($this->unsubscribe); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeResult unsubscribe = 7; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult $var + * @return $this + */ + public function setUnsubscribe($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult::class); + $this->unsubscribe = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectResult disconnect = 8; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DisconnectResult disconnect = 8; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DisconnectResult::class); + $this->disconnect = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceResult presence = 9; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult|null + */ + public function getPresence() + { + return $this->presence; + } + + public function hasPresence() + { + return isset($this->presence); + } + + public function clearPresence() + { + unset($this->presence); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceResult presence = 9; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult $var + * @return $this + */ + public function setPresence($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PresenceResult::class); + $this->presence = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsResult presence_stats = 10; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult|null + */ + public function getPresenceStats() + { + return $this->presence_stats; + } + + public function hasPresenceStats() + { + return isset($this->presence_stats); + } + + public function clearPresenceStats() + { + unset($this->presence_stats); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PresenceStatsResult presence_stats = 10; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult $var + * @return $this + */ + public function setPresenceStats($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PresenceStatsResult::class); + $this->presence_stats = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryResult history = 11; + * @return \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult|null + */ + public function getHistory() + { + return $this->history; + } + + public function hasHistory() + { + return isset($this->history); + } + + public function clearHistory() + { + unset($this->history); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryResult history = 11; + * @param \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult $var + * @return $this + */ + public function setHistory($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\HistoryResult::class); + $this->history = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveResult history_remove = 12; + * @return \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult|null + */ + public function getHistoryRemove() + { + return $this->history_remove; + } + + public function hasHistoryRemove() + { + return isset($this->history_remove); + } + + public function clearHistoryRemove() + { + unset($this->history_remove); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.HistoryRemoveResult history_remove = 12; + * @param \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult $var + * @return $this + */ + public function setHistoryRemove($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\HistoryRemoveResult::class); + $this->history_remove = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoResult info = 13; + * @return \RoadRunner\Centrifugal\API\DTO\V1\InfoResult|null + */ + public function getInfo() + { + return $this->info; + } + + public function hasInfo() + { + return isset($this->info); + } + + public function clearInfo() + { + unset($this->info); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InfoResult info = 13; + * @param \RoadRunner\Centrifugal\API\DTO\V1\InfoResult $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\InfoResult::class); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCResult rpc = 14; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RPCResult|null + */ + public function getRpc() + { + return $this->rpc; + } + + public function hasRpc() + { + return isset($this->rpc); + } + + public function clearRpc() + { + unset($this->rpc); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RPCResult rpc = 14; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RPCResult $var + * @return $this + */ + public function setRpc($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RPCResult::class); + $this->rpc = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshResult refresh = 15; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult|null + */ + public function getRefresh() + { + return $this->refresh; + } + + public function hasRefresh() + { + return isset($this->refresh); + } + + public function clearRefresh() + { + unset($this->refresh); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RefreshResult refresh = 15; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult $var + * @return $this + */ + public function setRefresh($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RefreshResult::class); + $this->refresh = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsResult channels = 16; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult|null + */ + public function getChannels() + { + return $this->channels; + } + + public function hasChannels() + { + return isset($this->channels); + } + + public function clearChannels() + { + unset($this->channels); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ChannelsResult channels = 16; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult $var + * @return $this + */ + public function setChannels($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ChannelsResult::class); + $this->channels = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsResult connections = 17; + * @return \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult|null + */ + public function getConnections() + { + return $this->connections; + } + + public function hasConnections() + { + return isset($this->connections); + } + + public function clearConnections() + { + unset($this->connections); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.ConnectionsResult connections = 17; + * @param \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult $var + * @return $this + */ + public function setConnections($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\ConnectionsResult::class); + $this->connections = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusResult update_user_status = 18; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult|null + */ + public function getUpdateUserStatus() + { + return $this->update_user_status; + } + + public function hasUpdateUserStatus() + { + return isset($this->update_user_status); + } + + public function clearUpdateUserStatus() + { + unset($this->update_user_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusResult update_user_status = 18; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult $var + * @return $this + */ + public function setUpdateUserStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult::class); + $this->update_user_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusResult get_user_status = 19; + * @return \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult|null + */ + public function getGetUserStatus() + { + return $this->get_user_status; + } + + public function hasGetUserStatus() + { + return isset($this->get_user_status); + } + + public function clearGetUserStatus() + { + unset($this->get_user_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.GetUserStatusResult get_user_status = 19; + * @param \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult $var + * @return $this + */ + public function setGetUserStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\GetUserStatusResult::class); + $this->get_user_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusResult delete_user_status = 20; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult|null + */ + public function getDeleteUserStatus() + { + return $this->delete_user_status; + } + + public function hasDeleteUserStatus() + { + return isset($this->delete_user_status); + } + + public function clearDeleteUserStatus() + { + unset($this->delete_user_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeleteUserStatusResult delete_user_status = 20; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult $var + * @return $this + */ + public function setDeleteUserStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeleteUserStatusResult::class); + $this->delete_user_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserResult block_user = 21; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult|null + */ + public function getBlockUser() + { + return $this->block_user; + } + + public function hasBlockUser() + { + return isset($this->block_user); + } + + public function clearBlockUser() + { + unset($this->block_user); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BlockUserResult block_user = 21; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult $var + * @return $this + */ + public function setBlockUser($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BlockUserResult::class); + $this->block_user = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserResult unblock_user = 22; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult|null + */ + public function getUnblockUser() + { + return $this->unblock_user; + } + + public function hasUnblockUser() + { + return isset($this->unblock_user); + } + + public function clearUnblockUser() + { + unset($this->unblock_user); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserResult unblock_user = 22; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult $var + * @return $this + */ + public function setUnblockUser($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult::class); + $this->unblock_user = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenResult revoke_token = 23; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult|null + */ + public function getRevokeToken() + { + return $this->revoke_token; + } + + public function hasRevokeToken() + { + return isset($this->revoke_token); + } + + public function clearRevokeToken() + { + unset($this->revoke_token); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenResult revoke_token = 23; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult $var + * @return $this + */ + public function setRevokeToken($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult::class); + $this->revoke_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensResult invalidate_user_tokens = 24; + * @return \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult|null + */ + public function getInvalidateUserTokens() + { + return $this->invalidate_user_tokens; + } + + public function hasInvalidateUserTokens() + { + return isset($this->invalidate_user_tokens); + } + + public function clearInvalidateUserTokens() + { + unset($this->invalidate_user_tokens); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.InvalidateUserTokensResult invalidate_user_tokens = 24; + * @param \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult $var + * @return $this + */ + public function setInvalidateUserTokens($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\InvalidateUserTokensResult::class); + $this->invalidate_user_tokens = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterResult device_register = 25; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult|null + */ + public function getDeviceRegister() + { + return $this->device_register; + } + + public function hasDeviceRegister() + { + return isset($this->device_register); + } + + public function clearDeviceRegister() + { + unset($this->device_register); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRegisterResult device_register = 25; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult $var + * @return $this + */ + public function setDeviceRegister($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceRegisterResult::class); + $this->device_register = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateResult device_update = 26; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult|null + */ + public function getDeviceUpdate() + { + return $this->device_update; + } + + public function hasDeviceUpdate() + { + return isset($this->device_update); + } + + public function clearDeviceUpdate() + { + unset($this->device_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceUpdateResult device_update = 26; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult $var + * @return $this + */ + public function setDeviceUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceUpdateResult::class); + $this->device_update = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveResult device_remove = 27; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult|null + */ + public function getDeviceRemove() + { + return $this->device_remove; + } + + public function hasDeviceRemove() + { + return isset($this->device_remove); + } + + public function clearDeviceRemove() + { + unset($this->device_remove); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceRemoveResult device_remove = 27; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult $var + * @return $this + */ + public function setDeviceRemove($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceRemoveResult::class); + $this->device_remove = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListResult device_list = 28; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult|null + */ + public function getDeviceList() + { + return $this->device_list; + } + + public function hasDeviceList() + { + return isset($this->device_list); + } + + public function clearDeviceList() + { + unset($this->device_list); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceListResult device_list = 28; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult $var + * @return $this + */ + public function setDeviceList($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceListResult::class); + $this->device_list = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListResult device_topic_list = 29; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult|null + */ + public function getDeviceTopicList() + { + return $this->device_topic_list; + } + + public function hasDeviceTopicList() + { + return isset($this->device_topic_list); + } + + public function clearDeviceTopicList() + { + unset($this->device_topic_list); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicListResult device_topic_list = 29; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult $var + * @return $this + */ + public function setDeviceTopicList($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicListResult::class); + $this->device_topic_list = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateResult device_topic_update = 30; + * @return \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult|null + */ + public function getDeviceTopicUpdate() + { + return $this->device_topic_update; + } + + public function hasDeviceTopicUpdate() + { + return isset($this->device_topic_update); + } + + public function clearDeviceTopicUpdate() + { + unset($this->device_topic_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.DeviceTopicUpdateResult device_topic_update = 30; + * @param \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult $var + * @return $this + */ + public function setDeviceTopicUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\DeviceTopicUpdateResult::class); + $this->device_topic_update = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListResult user_topic_list = 31; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult|null + */ + public function getUserTopicList() + { + return $this->user_topic_list; + } + + public function hasUserTopicList() + { + return isset($this->user_topic_list); + } + + public function clearUserTopicList() + { + unset($this->user_topic_list); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListResult user_topic_list = 31; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult $var + * @return $this + */ + public function setUserTopicList($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult::class); + $this->user_topic_list = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateResult user_topic_update = 32; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult|null + */ + public function getUserTopicUpdate() + { + return $this->user_topic_update; + } + + public function hasUserTopicUpdate() + { + return isset($this->user_topic_update); + } + + public function clearUserTopicUpdate() + { + unset($this->user_topic_update); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateResult user_topic_update = 32; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult $var + * @return $this + */ + public function setUserTopicUpdate($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult::class); + $this->user_topic_update = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationResult send_push_notification = 33; + * @return \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult|null + */ + public function getSendPushNotification() + { + return $this->send_push_notification; + } + + public function hasSendPushNotification() + { + return isset($this->send_push_notification); + } + + public function clearSendPushNotification() + { + unset($this->send_push_notification); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationResult send_push_notification = 33; + * @param \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult $var + * @return $this + */ + public function setSendPushNotification($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult::class); + $this->send_push_notification = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusResult update_push_status = 34; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult|null + */ + public function getUpdatePushStatus() + { + return $this->update_push_status; + } + + public function hasUpdatePushStatus() + { + return isset($this->update_push_status); + } + + public function clearUpdatePushStatus() + { + unset($this->update_push_status); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusResult update_push_status = 34; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult $var + * @return $this + */ + public function setUpdatePushStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult::class); + $this->update_push_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushResult cancel_push = 35; + * @return \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult|null + */ + public function getCancelPush() + { + return $this->cancel_push; + } + + public function hasCancelPush() + { + return isset($this->cancel_push); + } + + public function clearCancelPush() + { + unset($this->cancel_push); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.CancelPushResult cancel_push = 35; + * @param \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult $var + * @return $this + */ + public function setCancelPush($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\CancelPushResult::class); + $this->cancel_push = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitResult rate_limit = 50; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult|null + */ + public function getRateLimit() + { + return $this->rate_limit; + } + + public function hasRateLimit() + { + return isset($this->rate_limit); + } + + public function clearRateLimit() + { + unset($this->rate_limit); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RateLimitResult rate_limit = 50; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult $var + * @return $this + */ + public function setRateLimit($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RateLimitResult::class); + $this->rate_limit = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenRequest.php new file mode 100644 index 0000000..9ee9aea --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenRequest.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.RevokeTokenRequest + */ +class RevokeTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 expire_at = 1; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field string uid = 2; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $expire_at + * @type string $uid + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field string uid = 2; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Generated from protobuf field string uid = 2; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenResponse.php new file mode 100644 index 0000000..899bba5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.RevokeTokenResponse + */ +class RevokeTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.RevokeTokenResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\RevokeTokenResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenResult.php new file mode 100644 index 0000000..ea1c897 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/RevokeTokenResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.RevokeTokenResult + */ +class RevokeTokenResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationRequest.php new file mode 100644 index 0000000..5b097ce --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationRequest.php @@ -0,0 +1,167 @@ +centrifugal.centrifugo.api.SendPushNotificationRequest + */ +class SendPushNotificationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PushRecipient recipient = 1; + */ + protected $recipient = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PushNotification notification = 2; + */ + protected $notification = null; + /** + * unique identifier for push notification, used for matching in Centrifugo analytics. + * + * Generated from protobuf field string uid = 3; + */ + protected $uid = ''; + /** + * Generated from protobuf field int64 send_at = 4; + */ + protected $send_at = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\PushRecipient $recipient + * @type \RoadRunner\Centrifugal\API\DTO\V1\PushNotification $notification + * @type string $uid + * unique identifier for push notification, used for matching in Centrifugo analytics. + * @type int|string $send_at + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PushRecipient recipient = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PushRecipient|null + */ + public function getRecipient() + { + return $this->recipient; + } + + public function hasRecipient() + { + return isset($this->recipient); + } + + public function clearRecipient() + { + unset($this->recipient); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PushRecipient recipient = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PushRecipient $var + * @return $this + */ + public function setRecipient($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PushRecipient::class); + $this->recipient = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PushNotification notification = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\PushNotification|null + */ + public function getNotification() + { + return $this->notification; + } + + public function hasNotification() + { + return isset($this->notification); + } + + public function clearNotification() + { + unset($this->notification); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.PushNotification notification = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\PushNotification $var + * @return $this + */ + public function setNotification($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\PushNotification::class); + $this->notification = $var; + + return $this; + } + + /** + * unique identifier for push notification, used for matching in Centrifugo analytics. + * + * Generated from protobuf field string uid = 3; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * unique identifier for push notification, used for matching in Centrifugo analytics. + * + * Generated from protobuf field string uid = 3; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 send_at = 4; + * @return int|string + */ + public function getSendAt() + { + return $this->send_at; + } + + /** + * Generated from protobuf field int64 send_at = 4; + * @param int|string $var + * @return $this + */ + public function setSendAt($var) + { + GPBUtil::checkInt64($var); + $this->send_at = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationResponse.php new file mode 100644 index 0000000..b786157 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.SendPushNotificationResponse + */ +class SendPushNotificationResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SendPushNotificationResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\SendPushNotificationResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationResult.php new file mode 100644 index 0000000..6a870d8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SendPushNotificationResult.php @@ -0,0 +1,66 @@ +centrifugal.centrifugo.api.SendPushNotificationResult + */ +class SendPushNotificationResult extends \Google\Protobuf\Internal\Message +{ + /** + * Unique identifier of notification send request (it's not a FCM message id). + * + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * Unique identifier of notification send request (it's not a FCM message id). + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Unique identifier of notification send request (it's not a FCM message id). + * + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Unique identifier of notification send request (it's not a FCM message id). + * + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/StreamPosition.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/StreamPosition.php new file mode 100644 index 0000000..c50a299 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/StreamPosition.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.StreamPosition + */ +class StreamPosition extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint64 offset = 1; + */ + protected $offset = 0; + /** + * Generated from protobuf field string epoch = 2; + */ + protected $epoch = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offset + * @type string $epoch + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint64 offset = 1; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Generated from protobuf field uint64 offset = 1; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkUint64($var); + $this->offset = $var; + + return $this; + } + + /** + * Generated from protobuf field string epoch = 2; + * @return string + */ + public function getEpoch() + { + return $this->epoch; + } + + /** + * Generated from protobuf field string epoch = 2; + * @param string $var + * @return $this + */ + public function setEpoch($var) + { + GPBUtil::checkString($var, True); + $this->epoch = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeOptionOverride.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeOptionOverride.php new file mode 100644 index 0000000..5462b95 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeOptionOverride.php @@ -0,0 +1,217 @@ +centrifugal.centrifugo.api.SubscribeOptionOverride + */ +class SubscribeOptionOverride extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue presence = 1; + */ + protected $presence = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue join_leave = 2; + */ + protected $join_leave = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_recovery = 3; + */ + protected $force_recovery = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_positioning = 4; + */ + protected $force_positioning = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_push_join_leave = 5; + */ + protected $force_push_join_leave = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $presence + * @type \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $join_leave + * @type \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $force_recovery + * @type \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $force_positioning + * @type \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $force_push_join_leave + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue presence = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BoolValue|null + */ + public function getPresence() + { + return $this->presence; + } + + public function hasPresence() + { + return isset($this->presence); + } + + public function clearPresence() + { + unset($this->presence); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue presence = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $var + * @return $this + */ + public function setPresence($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BoolValue::class); + $this->presence = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue join_leave = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BoolValue|null + */ + public function getJoinLeave() + { + return $this->join_leave; + } + + public function hasJoinLeave() + { + return isset($this->join_leave); + } + + public function clearJoinLeave() + { + unset($this->join_leave); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue join_leave = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $var + * @return $this + */ + public function setJoinLeave($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BoolValue::class); + $this->join_leave = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_recovery = 3; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BoolValue|null + */ + public function getForceRecovery() + { + return $this->force_recovery; + } + + public function hasForceRecovery() + { + return isset($this->force_recovery); + } + + public function clearForceRecovery() + { + unset($this->force_recovery); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_recovery = 3; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $var + * @return $this + */ + public function setForceRecovery($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BoolValue::class); + $this->force_recovery = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_positioning = 4; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BoolValue|null + */ + public function getForcePositioning() + { + return $this->force_positioning; + } + + public function hasForcePositioning() + { + return isset($this->force_positioning); + } + + public function clearForcePositioning() + { + unset($this->force_positioning); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_positioning = 4; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $var + * @return $this + */ + public function setForcePositioning($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BoolValue::class); + $this->force_positioning = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_push_join_leave = 5; + * @return \RoadRunner\Centrifugal\API\DTO\V1\BoolValue|null + */ + public function getForcePushJoinLeave() + { + return $this->force_push_join_leave; + } + + public function hasForcePushJoinLeave() + { + return isset($this->force_push_join_leave); + } + + public function clearForcePushJoinLeave() + { + unset($this->force_push_join_leave); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.BoolValue force_push_join_leave = 5; + * @param \RoadRunner\Centrifugal\API\DTO\V1\BoolValue $var + * @return $this + */ + public function setForcePushJoinLeave($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\BoolValue::class); + $this->force_push_join_leave = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeRequest.php new file mode 100644 index 0000000..2d8057a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeRequest.php @@ -0,0 +1,349 @@ +centrifugal.centrifugo.api.SubscribeRequest + */ +class SubscribeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + /** + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * Generated from protobuf field int64 expire_at = 3; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field bytes info = 4; + */ + protected $info = ''; + /** + * Generated from protobuf field string b64info = 5; + */ + protected $b64info = ''; + /** + * Generated from protobuf field string client = 6; + */ + protected $client = ''; + /** + * Generated from protobuf field bytes data = 7; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 8; + */ + protected $b64data = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.StreamPosition recover_since = 9; + */ + protected $recover_since = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeOptionOverride override = 10; + */ + protected $override = null; + /** + * Generated from protobuf field string session = 11; + */ + protected $session = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * @type string $user + * @type int|string $expire_at + * @type string $info + * @type string $b64info + * @type string $client + * @type string $data + * @type string $b64data + * @type \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition $recover_since + * @type \RoadRunner\Centrifugal\API\DTO\V1\SubscribeOptionOverride $override + * @type string $session + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 expire_at = 3; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 3; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes info = 4; + * @return string + */ + public function getInfo() + { + return $this->info; + } + + /** + * Generated from protobuf field bytes info = 4; + * @param string $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkString($var, False); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64info = 5; + * @return string + */ + public function getB64Info() + { + return $this->b64info; + } + + /** + * Generated from protobuf field string b64info = 5; + * @param string $var + * @return $this + */ + public function setB64Info($var) + { + GPBUtil::checkString($var, True); + $this->b64info = $var; + + return $this; + } + + /** + * Generated from protobuf field string client = 6; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 6; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 7; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 7; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 8; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 8; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.StreamPosition recover_since = 9; + * @return \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition|null + */ + public function getRecoverSince() + { + return $this->recover_since; + } + + public function hasRecoverSince() + { + return isset($this->recover_since); + } + + public function clearRecoverSince() + { + unset($this->recover_since); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.StreamPosition recover_since = 9; + * @param \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition $var + * @return $this + */ + public function setRecoverSince($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\StreamPosition::class); + $this->recover_since = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeOptionOverride override = 10; + * @return \RoadRunner\Centrifugal\API\DTO\V1\SubscribeOptionOverride|null + */ + public function getOverride() + { + return $this->override; + } + + public function hasOverride() + { + return isset($this->override); + } + + public function clearOverride() + { + unset($this->override); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeOptionOverride override = 10; + * @param \RoadRunner\Centrifugal\API\DTO\V1\SubscribeOptionOverride $var + * @return $this + */ + public function setOverride($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\SubscribeOptionOverride::class); + $this->override = $var; + + return $this; + } + + /** + * Generated from protobuf field string session = 11; + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Generated from protobuf field string session = 11; + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeResponse.php new file mode 100644 index 0000000..aa37052 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.SubscribeResponse + */ +class SubscribeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.SubscribeResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\SubscribeResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeResult.php new file mode 100644 index 0000000..ef17a50 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscribeResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.SubscribeResult + */ +class SubscribeResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscriptionTokenInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscriptionTokenInfo.php new file mode 100644 index 0000000..0347b77 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/SubscriptionTokenInfo.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.SubscriptionTokenInfo + */ +class SubscriptionTokenInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + /** + * Generated from protobuf field int64 issued_at = 2; + */ + protected $issued_at = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * @type int|string $issued_at + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 issued_at = 2; + * @return int|string + */ + public function getIssuedAt() + { + return $this->issued_at; + } + + /** + * Generated from protobuf field int64 issued_at = 2; + * @param int|string $var + * @return $this + */ + public function setIssuedAt($var) + { + GPBUtil::checkInt64($var); + $this->issued_at = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserRequest.php new file mode 100644 index 0000000..93964cf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.api.UnblockUserRequest + */ +class UnblockUserRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserResponse.php new file mode 100644 index 0000000..3fb84ac --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.UnblockUserResponse + */ +class UnblockUserResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnblockUserResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UnblockUserResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserResult.php new file mode 100644 index 0000000..6b1dc8b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnblockUserResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.UnblockUserResult + */ +class UnblockUserResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeRequest.php new file mode 100644 index 0000000..ac920d2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeRequest.php @@ -0,0 +1,140 @@ +centrifugal.centrifugo.api.UnsubscribeRequest + */ +class UnsubscribeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + /** + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * Generated from protobuf field string client = 3; + */ + protected $client = ''; + /** + * Generated from protobuf field string session = 4; + */ + protected $session = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * @type string $user + * @type string $client + * @type string $session + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string client = 3; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 3; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field string session = 4; + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Generated from protobuf field string session = 4; + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeResponse.php new file mode 100644 index 0000000..c1b7a31 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.UnsubscribeResponse + */ +class UnsubscribeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UnsubscribeResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UnsubscribeResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeResult.php new file mode 100644 index 0000000..9674dd8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UnsubscribeResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.UnsubscribeResult + */ +class UnsubscribeResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusRequest.php new file mode 100644 index 0000000..409e6cb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusRequest.php @@ -0,0 +1,168 @@ +centrifugal.centrifugo.api.UpdatePushStatusRequest + */ +class UpdatePushStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * uid of push notification (matches SendPushNotificationResult.uid) + * + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + /** + * failed | sent | delivered | interacted + * + * Generated from protobuf field string status = 2; + */ + protected $status = ''; + /** + * Centrifugo device id. + * + * Generated from protobuf field string device_id = 3; + */ + protected $device_id = ''; + /** + * Provider issued message id. + * + * Generated from protobuf field string msg_id = 4; + */ + protected $msg_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * uid of push notification (matches SendPushNotificationResult.uid) + * @type string $status + * failed | sent | delivered | interacted + * @type string $device_id + * Centrifugo device id. + * @type string $msg_id + * Provider issued message id. + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * uid of push notification (matches SendPushNotificationResult.uid) + * + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * uid of push notification (matches SendPushNotificationResult.uid) + * + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * failed | sent | delivered | interacted + * + * Generated from protobuf field string status = 2; + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * failed | sent | delivered | interacted + * + * Generated from protobuf field string status = 2; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + + /** + * Centrifugo device id. + * + * Generated from protobuf field string device_id = 3; + * @return string + */ + public function getDeviceId() + { + return $this->device_id; + } + + /** + * Centrifugo device id. + * + * Generated from protobuf field string device_id = 3; + * @param string $var + * @return $this + */ + public function setDeviceId($var) + { + GPBUtil::checkString($var, True); + $this->device_id = $var; + + return $this; + } + + /** + * Provider issued message id. + * + * Generated from protobuf field string msg_id = 4; + * @return string + */ + public function getMsgId() + { + return $this->msg_id; + } + + /** + * Provider issued message id. + * + * Generated from protobuf field string msg_id = 4; + * @param string $var + * @return $this + */ + public function setMsgId($var) + { + GPBUtil::checkString($var, True); + $this->msg_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusResponse.php new file mode 100644 index 0000000..7010365 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.UpdatePushStatusResponse + */ +class UpdatePushStatusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdatePushStatusResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UpdatePushStatusResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusResult.php new file mode 100644 index 0000000..385aa2e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdatePushStatusResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.UpdatePushStatusResult + */ +class UpdatePushStatusResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusRequest.php new file mode 100644 index 0000000..6158f13 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusRequest.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.api.UpdateUserStatusRequest + */ +class UpdateUserStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string users = 1; + */ + private $users; + /** + * Generated from protobuf field string state = 2; + */ + protected $state = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $users + * @type string $state + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string users = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsers() + { + return $this->users; + } + + /** + * Generated from protobuf field repeated string users = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->users = $arr; + + return $this; + } + + /** + * Generated from protobuf field string state = 2; + * @return string + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field string state = 2; + * @param string $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkString($var, True); + $this->state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusResponse.php new file mode 100644 index 0000000..c1f3bf2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.UpdateUserStatusResponse + */ +class UpdateUserStatusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UpdateUserStatusResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UpdateUserStatusResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusResult.php new file mode 100644 index 0000000..ad2c101 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UpdateUserStatusResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.UpdateUserStatusResult + */ +class UpdateUserStatusResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserStatus.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserStatus.php new file mode 100644 index 0000000..eb92724 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserStatus.php @@ -0,0 +1,140 @@ +centrifugal.centrifugo.api.UserStatus + */ +class UserStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + /** + * Generated from protobuf field int64 active = 2; + */ + protected $active = 0; + /** + * Generated from protobuf field int64 online = 3; + */ + protected $online = 0; + /** + * Generated from protobuf field string state = 4; + */ + protected $state = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * @type int|string $active + * @type int|string $online + * @type string $state + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 active = 2; + * @return int|string + */ + public function getActive() + { + return $this->active; + } + + /** + * Generated from protobuf field int64 active = 2; + * @param int|string $var + * @return $this + */ + public function setActive($var) + { + GPBUtil::checkInt64($var); + $this->active = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 online = 3; + * @return int|string + */ + public function getOnline() + { + return $this->online; + } + + /** + * Generated from protobuf field int64 online = 3; + * @param int|string $var + * @return $this + */ + public function setOnline($var) + { + GPBUtil::checkInt64($var); + $this->online = $var; + + return $this; + } + + /** + * Generated from protobuf field string state = 4; + * @return string + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field string state = 4; + * @param string $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkString($var, True); + $this->state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopic.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopic.php new file mode 100644 index 0000000..51a2bc7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopic.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.api.UserTopic + */ +class UserTopic extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * Generated from protobuf field string topic = 3; + */ + protected $topic = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type string $user + * @type string $topic + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string topic = 3; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * Generated from protobuf field string topic = 3; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicFilter.php new file mode 100644 index 0000000..b13b645 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicFilter.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.api.UserTopicFilter + */ +class UserTopicFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string users = 1; + */ + private $users; + /** + * Generated from protobuf field repeated string topics = 2; + */ + private $topics; + /** + * Generated from protobuf field string topic_prefix = 3; + */ + protected $topic_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $users + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * @type string $topic_prefix + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string users = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUsers() + { + return $this->users; + } + + /** + * Generated from protobuf field repeated string users = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->users = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string topics = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Generated from protobuf field repeated string topics = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + + /** + * Generated from protobuf field string topic_prefix = 3; + * @return string + */ + public function getTopicPrefix() + { + return $this->topic_prefix; + } + + /** + * Generated from protobuf field string topic_prefix = 3; + * @param string $var + * @return $this + */ + public function setTopicPrefix($var) + { + GPBUtil::checkString($var, True); + $this->topic_prefix = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListRequest.php new file mode 100644 index 0000000..c6052fb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListRequest.php @@ -0,0 +1,150 @@ +centrifugal.centrifugo.api.UserTopicListRequest + */ +class UserTopicListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicFilter filter = 1; + */ + protected $filter = null; + /** + * Generated from protobuf field bool include_total_count = 2; + */ + protected $include_total_count = false; + /** + * Generated from protobuf field string cursor = 10; + */ + protected $cursor = ''; + /** + * Generated from protobuf field int32 limit = 11; + */ + protected $limit = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\UserTopicFilter $filter + * @type bool $include_total_count + * @type string $cursor + * @type int $limit + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicFilter filter = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UserTopicFilter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicFilter filter = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UserTopicFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UserTopicFilter::class); + $this->filter = $var; + + return $this; + } + + /** + * Generated from protobuf field bool include_total_count = 2; + * @return bool + */ + public function getIncludeTotalCount() + { + return $this->include_total_count; + } + + /** + * Generated from protobuf field bool include_total_count = 2; + * @param bool $var + * @return $this + */ + public function setIncludeTotalCount($var) + { + GPBUtil::checkBool($var); + $this->include_total_count = $var; + + return $this; + } + + /** + * Generated from protobuf field string cursor = 10; + * @return string + */ + public function getCursor() + { + return $this->cursor; + } + + /** + * Generated from protobuf field string cursor = 10; + * @param string $var + * @return $this + */ + public function setCursor($var) + { + GPBUtil::checkString($var, True); + $this->cursor = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 limit = 11; + * @return int + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Generated from protobuf field int32 limit = 11; + * @param int $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkInt32($var); + $this->limit = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListResponse.php new file mode 100644 index 0000000..355fe73 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.UserTopicListResponse + */ +class UserTopicListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicListResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UserTopicListResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListResult.php new file mode 100644 index 0000000..711aecf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicListResult.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.api.UserTopicListResult + */ +class UserTopicListResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.UserTopic items = 1; + */ + private $items; + /** + * Generated from protobuf field string next_cursor = 2; + */ + protected $next_cursor = ''; + /** + * Generated from protobuf field int64 total_count = 3; + */ + protected $total_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\API\DTO\V1\UserTopic>|\Google\Protobuf\Internal\RepeatedField $items + * @type string $next_cursor + * @type int|string $total_count + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.UserTopic items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.api.UserTopic items = 1; + * @param array<\RoadRunner\Centrifugal\API\DTO\V1\UserTopic>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\API\DTO\V1\UserTopic::class); + $this->items = $arr; + + return $this; + } + + /** + * Generated from protobuf field string next_cursor = 2; + * @return string + */ + public function getNextCursor() + { + return $this->next_cursor; + } + + /** + * Generated from protobuf field string next_cursor = 2; + * @param string $var + * @return $this + */ + public function setNextCursor($var) + { + GPBUtil::checkString($var, True); + $this->next_cursor = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 total_count = 3; + * @return int|string + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Generated from protobuf field int64 total_count = 3; + * @param int|string $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt64($var); + $this->total_count = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateRequest.php new file mode 100644 index 0000000..85e07f2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateRequest.php @@ -0,0 +1,120 @@ +centrifugal.centrifugo.api.UserTopicUpdateRequest + */ +class UserTopicUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + /** + * add | remove | set + * + * Generated from protobuf field string op = 2; + */ + protected $op = ''; + /** + * Generated from protobuf field repeated string topics = 3; + */ + private $topics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * @type string $op + * add | remove | set + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * add | remove | set + * + * Generated from protobuf field string op = 2; + * @return string + */ + public function getOp() + { + return $this->op; + } + + /** + * add | remove | set + * + * Generated from protobuf field string op = 2; + * @param string $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkString($var, True); + $this->op = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string topics = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Generated from protobuf field repeated string topics = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateResponse.php new file mode 100644 index 0000000..21c1c5b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.api.UserTopicUpdateResponse + */ +class UserTopicUpdateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateResult result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\API\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult $result + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @return \RoadRunner\Centrifugal\API\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.Error error = 1; + * @param \RoadRunner\Centrifugal\API\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateResult result = 2; + * @return \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.api.UserTopicUpdateResult result = 2; + * @param \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\API\DTO\V1\UserTopicUpdateResult::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateResult.php new file mode 100644 index 0000000..9131d38 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/API/DTO/V1/UserTopicUpdateResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.api.UserTopicUpdateResult + */ +class UserTopicUpdateResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\API\DTO\V1\GPBMetadata\Api::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/BoolValue.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/BoolValue.php new file mode 100644 index 0000000..4a7bbff --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/BoolValue.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.proxy.BoolValue + */ +class BoolValue extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool value = 1; + */ + protected $value = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $value + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool value = 1; + * @return bool + */ + public function getValue() + { + return $this->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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ChannelEvent.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ChannelEvent.php new file mode 100644 index 0000000..301eb6e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ChannelEvent.php @@ -0,0 +1,120 @@ +centrifugal.centrifugo.proxy.ChannelEvent + */ +class ChannelEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 time_ms = 1; + */ + protected $time_ms = 0; + /** + * Generated from protobuf field string channel = 2; + */ + protected $channel = ''; + /** + * "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop. + * + * Generated from protobuf field string type = 3; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $time_ms + * @type string $channel + * @type string $type + * "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop. + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 time_ms = 1; + * @return int|string + */ + public function getTimeMs() + { + return $this->time_ms; + } + + /** + * Generated from protobuf field int64 time_ms = 1; + * @param int|string $var + * @return $this + */ + public function setTimeMs($var) + { + GPBUtil::checkInt64($var); + $this->time_ms = $var; + + return $this; + } + + /** + * Generated from protobuf field string channel = 2; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 2; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop. + * + * Generated from protobuf field string type = 3; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * "occupied" | "vacated" | could be more in the future. Not using enums for better JSON interop. + * + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ChannelsCapability.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ChannelsCapability.php new file mode 100644 index 0000000..1f5ffea --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ChannelsCapability.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.proxy.ChannelsCapability + */ +class ChannelsCapability extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string channels = 1; + */ + private $channels; + /** + * Generated from protobuf field repeated string allow = 2; + */ + private $allow; + /** + * Generated from protobuf field string match = 3; + */ + protected $match = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $channels + * @type array|\Google\Protobuf\Internal\RepeatedField $allow + * @type string $match + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string channels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Generated from protobuf field repeated string channels = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channels = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string allow = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllow() + { + return $this->allow; + } + + /** + * Generated from protobuf field repeated string allow = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllow($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allow = $arr; + + return $this; + } + + /** + * Generated from protobuf field string match = 3; + * @return string + */ + public function getMatch() + { + return $this->match; + } + + /** + * Generated from protobuf field string match = 3; + * @param string $var + * @return $this + */ + public function setMatch($var) + { + GPBUtil::checkString($var, True); + $this->match = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectRequest.php new file mode 100644 index 0000000..943f3ae --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectRequest.php @@ -0,0 +1,275 @@ +centrifugal.centrifugo.proxy.ConnectRequest + */ +class ConnectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string client = 1; + */ + protected $client = ''; + /** + * Generated from protobuf field string transport = 2; + */ + protected $transport = ''; + /** + * Generated from protobuf field string protocol = 3; + */ + protected $protocol = ''; + /** + * Generated from protobuf field string encoding = 4; + */ + protected $encoding = ''; + /** + * Generated from protobuf field bytes data = 10; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 11; + */ + protected $b64data = ''; + /** + * Generated from protobuf field string name = 12; + */ + protected $name = ''; + /** + * Generated from protobuf field string version = 13; + */ + protected $version = ''; + /** + * Generated from protobuf field repeated string channels = 14; + */ + private $channels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client + * @type string $transport + * @type string $protocol + * @type string $encoding + * @type string $data + * @type string $b64data + * @type string $name + * @type string $version + * @type array|\Google\Protobuf\Internal\RepeatedField $channels + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string client = 1; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 1; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field string transport = 2; + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Generated from protobuf field string transport = 2; + * @param string $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkString($var, True); + $this->transport = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 3; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string encoding = 4; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Generated from protobuf field string encoding = 4; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 10; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 10; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 11; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 11; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field string name = 12; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field string name = 12; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Generated from protobuf field string version = 13; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Generated from protobuf field string version = 13; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string channels = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Generated from protobuf field repeated string channels = 14; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channels = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectResponse.php new file mode 100644 index 0000000..6245e68 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectResponse.php @@ -0,0 +1,143 @@ +centrifugal.centrifugo.proxy.ConnectResponse + */ +class ConnectResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.ConnectResult result = 1; + */ + protected $result = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + */ + protected $disconnect = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\ConnectResult $result + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $disconnect + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.ConnectResult result = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\ConnectResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.ConnectResult result = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\ConnectResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\ConnectResult::class); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect::class); + $this->disconnect = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectResult.php new file mode 100644 index 0000000..b7352bd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/ConnectResult.php @@ -0,0 +1,302 @@ +centrifugal.centrifugo.proxy.ConnectResult + */ +class ConnectResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string user = 1; + */ + protected $user = ''; + /** + * Generated from protobuf field int64 expire_at = 2; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field bytes info = 3; + */ + protected $info = ''; + /** + * Generated from protobuf field string b64info = 4; + */ + protected $b64info = ''; + /** + * Generated from protobuf field bytes data = 5; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 6; + */ + protected $b64data = ''; + /** + * Generated from protobuf field repeated string channels = 7; + */ + private $channels; + /** + * Generated from protobuf field map subs = 8; + */ + private $subs; + /** + * Generated from protobuf field bytes meta = 9; + */ + protected $meta = ''; + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelsCapability caps = 10; + */ + private $caps; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * @type int|string $expire_at + * @type string $info + * @type string $b64info + * @type string $data + * @type string $b64data + * @type array|\Google\Protobuf\Internal\RepeatedField $channels + * @type array|\Google\Protobuf\Internal\MapField $subs + * @type string $meta + * @type array<\RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelsCapability>|\Google\Protobuf\Internal\RepeatedField $caps + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 expire_at = 2; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 2; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes info = 3; + * @return string + */ + public function getInfo() + { + return $this->info; + } + + /** + * Generated from protobuf field bytes info = 3; + * @param string $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkString($var, False); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64info = 4; + * @return string + */ + public function getB64Info() + { + return $this->b64info; + } + + /** + * Generated from protobuf field string b64info = 4; + * @param string $var + * @return $this + */ + public function setB64Info($var) + { + GPBUtil::checkString($var, True); + $this->b64info = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 5; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 5; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 6; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 6; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string channels = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Generated from protobuf field repeated string channels = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channels = $arr; + + return $this; + } + + /** + * Generated from protobuf field map subs = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSubs() + { + return $this->subs; + } + + /** + * Generated from protobuf field map subs = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSubs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptions::class); + $this->subs = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 9; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 9; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelsCapability caps = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCaps() + { + return $this->caps; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelsCapability caps = 10; + * @param array<\RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelsCapability>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelsCapability::class); + $this->caps = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Disconnect.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Disconnect.php new file mode 100644 index 0000000..88246cf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Disconnect.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.proxy.Disconnect + */ +class Disconnect extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string reason = 2; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * @type string $reason + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field uint32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkUint32($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string reason = 2; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Generated from protobuf field string reason = 2; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Error.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Error.php new file mode 100644 index 0000000..aa9a1ac --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Error.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.proxy.Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field uint32 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Generated from protobuf field bool temporary = 3; + */ + protected $temporary = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * @type string $message + * @type bool $temporary + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field uint32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field uint32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkUint32($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * 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; + } + + /** + * Generated from protobuf field bool temporary = 3; + * @return bool + */ + public function getTemporary() + { + return $this->temporary; + } + + /** + * Generated from protobuf field bool temporary = 3; + * @param bool $var + * @return $this + */ + public function setTemporary($var) + { + GPBUtil::checkBool($var); + $this->temporary = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/GPBMetadata/Proxy.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/GPBMetadata/Proxy.php new file mode 100644 index 0000000..3e13662 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/GPBMetadata/Proxy.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xF6-\x0A\x1Fcentrifugo/proxy/v1/proxy.proto\x12\x1Ccentrifugal.centrifugo.proxy\"0\x0A\x0ADisconnect\x12\x0C\x0A\x04code\x18\x01 \x01(\x0D\x12\x0E\x0A\x06reason\x18\x02 \x01(\x09J\x04\x08\x03\x10\x04\"9\x0A\x05Error\x12\x0C\x0A\x04code\x18\x01 \x01(\x0D\x12\x0F\x0A\x07message\x18\x02 \x01(\x09\x12\x11\x0A\x09temporary\x18\x03 \x01(\x08\"\xA7\x01\x0A\x0EConnectRequest\x12\x0E\x0A\x06client\x18\x01 \x01(\x09\x12\x11\x0A\x09transport\x18\x02 \x01(\x09\x12\x10\x0A\x08protocol\x18\x03 \x01(\x09\x12\x10\x0A\x08encoding\x18\x04 \x01(\x09\x12\x0C\x0A\x04data\x18\x0A \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x0B \x01(\x09\x12\x0C\x0A\x04name\x18\x0C \x01(\x09\x12\x0F\x0A\x07version\x18\x0D \x01(\x09\x12\x10\x0A\x08channels\x18\x0E \x03(\x09\"\xAC\x01\x0A\x10SubscribeOptions\x12\x11\x0A\x09expire_at\x18\x01 \x01(\x03\x12\x0C\x0A\x04info\x18\x02 \x01(\x0C\x12\x0F\x0A\x07b64info\x18\x03 \x01(\x09\x12\x0C\x0A\x04data\x18\x04 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x05 \x01(\x09\x12G\x0A\x08override\x18\x06 \x01(\x0B25.centrifugal.centrifugo.proxy.SubscribeOptionOverride\"\xF0\x02\x0A\x0DConnectResult\x12\x0C\x0A\x04user\x18\x01 \x01(\x09\x12\x11\x0A\x09expire_at\x18\x02 \x01(\x03\x12\x0C\x0A\x04info\x18\x03 \x01(\x0C\x12\x0F\x0A\x07b64info\x18\x04 \x01(\x09\x12\x0C\x0A\x04data\x18\x05 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x06 \x01(\x09\x12\x10\x0A\x08channels\x18\x07 \x03(\x09\x12C\x0A\x04subs\x18\x08 \x03(\x0B25.centrifugal.centrifugo.proxy.ConnectResult.SubsEntry\x12\x0C\x0A\x04meta\x18\x09 \x01(\x0C\x12>\x0A\x04caps\x18\x0A \x03(\x0B20.centrifugal.centrifugo.proxy.ChannelsCapability\x1A[\x0A\x09SubsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12=\x0A\x05value\x18\x02 \x01(\x0B2..centrifugal.centrifugo.proxy.SubscribeOptions:\x028\x01\"D\x0A\x12ChannelsCapability\x12\x10\x0A\x08channels\x18\x01 \x03(\x09\x12\x0D\x0A\x05allow\x18\x02 \x03(\x09\x12\x0D\x0A\x05match\x18\x03 \x01(\x09\"\xC0\x01\x0A\x0FConnectResponse\x12;\x0A\x06result\x18\x01 \x01(\x0B2+.centrifugal.centrifugo.proxy.ConnectResult\x122\x0A\x05error\x18\x02 \x01(\x0B2#.centrifugal.centrifugo.proxy.Error\x12<\x0A\x0Adisconnect\x18\x03 \x01(\x0B2(.centrifugal.centrifugo.proxy.Disconnect\"s\x0A\x0ERefreshRequest\x12\x0E\x0A\x06client\x18\x01 \x01(\x09\x12\x11\x0A\x09transport\x18\x02 \x01(\x09\x12\x10\x0A\x08protocol\x18\x03 \x01(\x09\x12\x10\x0A\x08encoding\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x0A \x01(\x09\x12\x0C\x0A\x04meta\x18\x0B \x01(\x0C\"\xA0\x01\x0A\x0DRefreshResult\x12\x0F\x0A\x07expired\x18\x01 \x01(\x08\x12\x11\x0A\x09expire_at\x18\x02 \x01(\x03\x12\x0C\x0A\x04info\x18\x03 \x01(\x0C\x12\x0F\x0A\x07b64info\x18\x04 \x01(\x09\x12\x0C\x0A\x04meta\x18\x05 \x01(\x0C\x12>\x0A\x04caps\x18\x06 \x03(\x0B20.centrifugal.centrifugo.proxy.ChannelsCapability\"\xC0\x01\x0A\x0FRefreshResponse\x12;\x0A\x06result\x18\x01 \x01(\x0B2+.centrifugal.centrifugo.proxy.RefreshResult\x122\x0A\x05error\x18\x02 \x01(\x0B2#.centrifugal.centrifugo.proxy.Error\x12<\x0A\x0Adisconnect\x18\x03 \x01(\x0B2(.centrifugal.centrifugo.proxy.Disconnect\"\xB4\x01\x0A\x10SubscribeRequest\x12\x0E\x0A\x06client\x18\x01 \x01(\x09\x12\x11\x0A\x09transport\x18\x02 \x01(\x09\x12\x10\x0A\x08protocol\x18\x03 \x01(\x09\x12\x10\x0A\x08encoding\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x0A \x01(\x09\x12\x0F\x0A\x07channel\x18\x0B \x01(\x09\x12\x0D\x0A\x05token\x18\x0C \x01(\x09\x12\x0C\x0A\x04meta\x18\x0D \x01(\x0C\x12\x0C\x0A\x04data\x18\x0E \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x0F \x01(\x09\"\x1A\x0A\x09BoolValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x08\"\x1B\x0A\x0AInt32Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x05\"\xDE\x02\x0A\x17SubscribeOptionOverride\x129\x0A\x08presence\x18\x01 \x01(\x0B2'.centrifugal.centrifugo.proxy.BoolValue\x12;\x0A\x0Ajoin_leave\x18\x02 \x01(\x0B2'.centrifugal.centrifugo.proxy.BoolValue\x12?\x0A\x0Eforce_recovery\x18\x03 \x01(\x0B2'.centrifugal.centrifugo.proxy.BoolValue\x12B\x0A\x11force_positioning\x18\x04 \x01(\x0B2'.centrifugal.centrifugo.proxy.BoolValue\x12F\x0A\x15force_push_join_leave\x18\x05 \x01(\x0B2'.centrifugal.centrifugo.proxy.BoolValue\"\xBA\x01\x0A\x0FSubscribeResult\x12\x11\x0A\x09expire_at\x18\x01 \x01(\x03\x12\x0C\x0A\x04info\x18\x02 \x01(\x0C\x12\x0F\x0A\x07b64info\x18\x03 \x01(\x09\x12\x0C\x0A\x04data\x18\x04 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x05 \x01(\x09\x12G\x0A\x08override\x18\x06 \x01(\x0B25.centrifugal.centrifugo.proxy.SubscribeOptionOverride\x12\x0D\x0A\x05allow\x18\x07 \x03(\x09\"\xC4\x01\x0A\x11SubscribeResponse\x12=\x0A\x06result\x18\x01 \x01(\x0B2-.centrifugal.centrifugo.proxy.SubscribeResult\x122\x0A\x05error\x18\x02 \x01(\x0B2#.centrifugal.centrifugo.proxy.Error\x12<\x0A\x0Adisconnect\x18\x03 \x01(\x0B2(.centrifugal.centrifugo.proxy.Disconnect\"\xA3\x01\x0A\x0EPublishRequest\x12\x0E\x0A\x06client\x18\x01 \x01(\x09\x12\x11\x0A\x09transport\x18\x02 \x01(\x09\x12\x10\x0A\x08protocol\x18\x03 \x01(\x09\x12\x10\x0A\x08encoding\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x0A \x01(\x09\x12\x0F\x0A\x07channel\x18\x0B \x01(\x09\x12\x0C\x0A\x04data\x18\x0C \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x0D \x01(\x09\x12\x0C\x0A\x04meta\x18\x0E \x01(\x0C\"D\x0A\x0DPublishResult\x12\x0C\x0A\x04data\x18\x01 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x02 \x01(\x09\x12\x14\x0A\x0Cskip_history\x18\x03 \x01(\x08\"\xC0\x01\x0A\x0FPublishResponse\x12;\x0A\x06result\x18\x01 \x01(\x0B2+.centrifugal.centrifugo.proxy.PublishResult\x122\x0A\x05error\x18\x02 \x01(\x0B2#.centrifugal.centrifugo.proxy.Error\x12<\x0A\x0Adisconnect\x18\x03 \x01(\x0B2(.centrifugal.centrifugo.proxy.Disconnect\"\x9E\x01\x0A\x0ARPCRequest\x12\x0E\x0A\x06client\x18\x01 \x01(\x09\x12\x11\x0A\x09transport\x18\x02 \x01(\x09\x12\x10\x0A\x08protocol\x18\x03 \x01(\x09\x12\x10\x0A\x08encoding\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x0A \x01(\x09\x12\x0E\x0A\x06method\x18\x0B \x01(\x09\x12\x0C\x0A\x04data\x18\x0C \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x0D \x01(\x09\x12\x0C\x0A\x04meta\x18\x0E \x01(\x0C\"*\x0A\x09RPCResult\x12\x0C\x0A\x04data\x18\x01 \x01(\x0C\x12\x0F\x0A\x07b64data\x18\x02 \x01(\x09\"\xB8\x01\x0A\x0BRPCResponse\x127\x0A\x06result\x18\x01 \x01(\x0B2'.centrifugal.centrifugo.proxy.RPCResult\x122\x0A\x05error\x18\x02 \x01(\x0B2#.centrifugal.centrifugo.proxy.Error\x12<\x0A\x0Adisconnect\x18\x03 \x01(\x0B2(.centrifugal.centrifugo.proxy.Disconnect\"\x87\x01\x0A\x11SubRefreshRequest\x12\x0E\x0A\x06client\x18\x01 \x01(\x09\x12\x11\x0A\x09transport\x18\x02 \x01(\x09\x12\x10\x0A\x08protocol\x18\x03 \x01(\x09\x12\x10\x0A\x08encoding\x18\x04 \x01(\x09\x12\x0C\x0A\x04user\x18\x0A \x01(\x09\x12\x0F\x0A\x07channel\x18\x0B \x01(\x09\x12\x0C\x0A\x04meta\x18\x0C \x01(\x0C\"U\x0A\x10SubRefreshResult\x12\x0F\x0A\x07expired\x18\x01 \x01(\x08\x12\x11\x0A\x09expire_at\x18\x02 \x01(\x03\x12\x0C\x0A\x04info\x18\x03 \x01(\x0C\x12\x0F\x0A\x07b64info\x18\x04 \x01(\x09\"\xC6\x01\x0A\x12SubRefreshResponse\x12>\x0A\x06result\x18\x01 \x01(\x0B2..centrifugal.centrifugo.proxy.SubRefreshResult\x122\x0A\x05error\x18\x02 \x01(\x0B2#.centrifugal.centrifugo.proxy.Error\x12<\x0A\x0Adisconnect\x18\x03 \x01(\x0B2(.centrifugal.centrifugo.proxy.Disconnect\"\xA9\x01\x0A\x0BPublication\x12\x0C\x0A\x04data\x18\x04 \x01(\x0C\x12A\x0A\x04tags\x18\x07 \x03(\x0B23.centrifugal.centrifugo.proxy.Publication.TagsEntry\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07\"\xA3\x01\x0A\x16StreamSubscribeRequest\x12I\x0A\x11subscribe_request\x18\x01 \x01(\x0B2..centrifugal.centrifugo.proxy.SubscribeRequest\x12>\x0A\x0Bpublication\x18\x02 \x01(\x0B2).centrifugal.centrifugo.proxy.Publication\"\xA6\x01\x0A\x17StreamSubscribeResponse\x12K\x0A\x12subscribe_response\x18\x01 \x01(\x0B2/.centrifugal.centrifugo.proxy.SubscribeResponse\x12>\x0A\x0Bpublication\x18\x02 \x01(\x0B2).centrifugal.centrifugo.proxy.Publication\"W\x0A\x19NotifyChannelStateRequest\x12:\x0A\x06events\x18\x01 \x03(\x0B2*.centrifugal.centrifugo.proxy.ChannelEvent\">\x0A\x0CChannelEvent\x12\x0F\x0A\x07time_ms\x18\x01 \x01(\x03\x12\x0F\x0A\x07channel\x18\x02 \x01(\x09\x12\x0C\x0A\x04type\x18\x03 \x01(\x09\"\x98\x01\x0A\x1ANotifyChannelStateResponse\x12F\x0A\x06result\x18\x01 \x01(\x0B26.centrifugal.centrifugo.proxy.NotifyChannelStateResult\x122\x0A\x05error\x18\x02 \x01(\x0B2#.centrifugal.centrifugo.proxy.Error\"\x1A\x0A\x18NotifyChannelStateResult2\x9F\x08\x0A\x0FCentrifugoProxy\x12f\x0A\x07Connect\x12,.centrifugal.centrifugo.proxy.ConnectRequest\x1A-.centrifugal.centrifugo.proxy.ConnectResponse\x12f\x0A\x07Refresh\x12,.centrifugal.centrifugo.proxy.RefreshRequest\x1A-.centrifugal.centrifugo.proxy.RefreshResponse\x12l\x0A\x09Subscribe\x12..centrifugal.centrifugo.proxy.SubscribeRequest\x1A/.centrifugal.centrifugo.proxy.SubscribeResponse\x12f\x0A\x07Publish\x12,.centrifugal.centrifugo.proxy.PublishRequest\x1A-.centrifugal.centrifugo.proxy.PublishResponse\x12Z\x0A\x03RPC\x12(.centrifugal.centrifugo.proxy.RPCRequest\x1A).centrifugal.centrifugo.proxy.RPCResponse\x12o\x0A\x0ASubRefresh\x12/.centrifugal.centrifugo.proxy.SubRefreshRequest\x1A0.centrifugal.centrifugo.proxy.SubRefreshResponse\x12\x82\x01\x0A\x17SubscribeUnidirectional\x12..centrifugal.centrifugo.proxy.SubscribeRequest\x1A5.centrifugal.centrifugo.proxy.StreamSubscribeResponse0\x01\x12\x89\x01\x0A\x16SubscribeBidirectional\x124.centrifugal.centrifugo.proxy.StreamSubscribeRequest\x1A5.centrifugal.centrifugo.proxy.StreamSubscribeResponse(\x010\x01\x12\x87\x01\x0A\x12NotifyChannelState\x127.centrifugal.centrifugo.proxy.NotifyChannelStateRequest\x1A8.centrifugal.centrifugo.proxy.NotifyChannelStateResponseBmZ\x13centrifugo/proxy/v1\xCA\x02#RoadRunner\\Centrifugal\\Proxy\\DTO\\V1\xE2\x02/RoadRunner\\Centrifugal\\Proxy\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Int32Value.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Int32Value.php new file mode 100644 index 0000000..a27df0f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Int32Value.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.proxy.Int32Value + */ +class Int32Value extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 value = 1; + */ + protected $value = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $value + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 value = 1; + * @return int + */ + public function getValue() + { + return $this->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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateRequest.php new file mode 100644 index 0000000..262cc3b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateRequest.php @@ -0,0 +1,59 @@ +centrifugal.centrifugo.proxy.NotifyChannelStateRequest + */ +class NotifyChannelStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelEvent events = 1; + */ + private $events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelEvent>|\Google\Protobuf\Internal\RepeatedField $events + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelEvent events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelEvent events = 1; + * @param array<\RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelEvent::class); + $this->events = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateResponse.php new file mode 100644 index 0000000..a2c24e8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateResponse.php @@ -0,0 +1,106 @@ +centrifugal.centrifugo.proxy.NotifyChannelStateResponse + */ +class NotifyChannelStateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.NotifyChannelStateResult result = 1; + */ + protected $result = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\NotifyChannelStateResult $result + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $error + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.NotifyChannelStateResult result = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\NotifyChannelStateResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.NotifyChannelStateResult result = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\NotifyChannelStateResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\NotifyChannelStateResult::class); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateResult.php new file mode 100644 index 0000000..0b7934d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/NotifyChannelStateResult.php @@ -0,0 +1,32 @@ +centrifugal.centrifugo.proxy.NotifyChannelStateResult + */ +class NotifyChannelStateResult extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Publication.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Publication.php new file mode 100644 index 0000000..bf93a68 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/Publication.php @@ -0,0 +1,90 @@ +centrifugal.centrifugo.proxy.Publication + */ +class Publication extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes data = 4; + */ + protected $data = ''; + /** + * Generated from protobuf field map tags = 7; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * @type array|\Google\Protobuf\Internal\MapField $tags + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes data = 4; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 4; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field map tags = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Generated from protobuf field map tags = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishRequest.php new file mode 100644 index 0000000..c2787d9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishRequest.php @@ -0,0 +1,275 @@ +centrifugal.centrifugo.proxy.PublishRequest + */ +class PublishRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string client = 1; + */ + protected $client = ''; + /** + * Generated from protobuf field string transport = 2; + */ + protected $transport = ''; + /** + * Generated from protobuf field string protocol = 3; + */ + protected $protocol = ''; + /** + * Generated from protobuf field string encoding = 4; + */ + protected $encoding = ''; + /** + * Generated from protobuf field string user = 10; + */ + protected $user = ''; + /** + * Generated from protobuf field string channel = 11; + */ + protected $channel = ''; + /** + * Generated from protobuf field bytes data = 12; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 13; + */ + protected $b64data = ''; + /** + * Generated from protobuf field bytes meta = 14; + */ + protected $meta = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client + * @type string $transport + * @type string $protocol + * @type string $encoding + * @type string $user + * @type string $channel + * @type string $data + * @type string $b64data + * @type string $meta + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string client = 1; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 1; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field string transport = 2; + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Generated from protobuf field string transport = 2; + * @param string $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkString($var, True); + $this->transport = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 3; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string encoding = 4; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Generated from protobuf field string encoding = 4; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 10; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 10; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string channel = 11; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 11; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 12; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 12; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 13; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 13; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 14; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 14; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishResponse.php new file mode 100644 index 0000000..2caf4ec --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishResponse.php @@ -0,0 +1,143 @@ +centrifugal.centrifugo.proxy.PublishResponse + */ +class PublishResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.PublishResult result = 1; + */ + protected $result = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + */ + protected $disconnect = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\PublishResult $result + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $disconnect + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.PublishResult result = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\PublishResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.PublishResult result = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\PublishResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\PublishResult::class); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect::class); + $this->disconnect = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishResult.php new file mode 100644 index 0000000..3c7fe13 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/PublishResult.php @@ -0,0 +1,113 @@ +centrifugal.centrifugo.proxy.PublishResult + */ +class PublishResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes data = 1; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 2; + */ + protected $b64data = ''; + /** + * Generated from protobuf field bool skip_history = 3; + */ + protected $skip_history = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * @type string $b64data + * @type bool $skip_history + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes data = 1; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 1; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 2; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 2; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field bool skip_history = 3; + * @return bool + */ + public function getSkipHistory() + { + return $this->skip_history; + } + + /** + * Generated from protobuf field bool skip_history = 3; + * @param bool $var + * @return $this + */ + public function setSkipHistory($var) + { + GPBUtil::checkBool($var); + $this->skip_history = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCRequest.php new file mode 100644 index 0000000..023074b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCRequest.php @@ -0,0 +1,275 @@ +centrifugal.centrifugo.proxy.RPCRequest + */ +class RPCRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string client = 1; + */ + protected $client = ''; + /** + * Generated from protobuf field string transport = 2; + */ + protected $transport = ''; + /** + * Generated from protobuf field string protocol = 3; + */ + protected $protocol = ''; + /** + * Generated from protobuf field string encoding = 4; + */ + protected $encoding = ''; + /** + * Generated from protobuf field string user = 10; + */ + protected $user = ''; + /** + * Generated from protobuf field string method = 11; + */ + protected $method = ''; + /** + * Generated from protobuf field bytes data = 12; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 13; + */ + protected $b64data = ''; + /** + * Generated from protobuf field bytes meta = 14; + */ + protected $meta = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client + * @type string $transport + * @type string $protocol + * @type string $encoding + * @type string $user + * @type string $method + * @type string $data + * @type string $b64data + * @type string $meta + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string client = 1; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 1; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field string transport = 2; + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Generated from protobuf field string transport = 2; + * @param string $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkString($var, True); + $this->transport = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 3; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string encoding = 4; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Generated from protobuf field string encoding = 4; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 10; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 10; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string method = 11; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * Generated from protobuf field string method = 11; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 12; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 12; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 13; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 13; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 14; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 14; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCResponse.php new file mode 100644 index 0000000..82d30c8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCResponse.php @@ -0,0 +1,143 @@ +centrifugal.centrifugo.proxy.RPCResponse + */ +class RPCResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.RPCResult result = 1; + */ + protected $result = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + */ + protected $disconnect = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\RPCResult $result + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $disconnect + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.RPCResult result = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\RPCResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.RPCResult result = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\RPCResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\RPCResult::class); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect::class); + $this->disconnect = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCResult.php new file mode 100644 index 0000000..a7fc8d0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RPCResult.php @@ -0,0 +1,86 @@ +centrifugal.centrifugo.proxy.RPCResult + */ +class RPCResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes data = 1; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 2; + */ + protected $b64data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * @type string $b64data + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes data = 1; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 1; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 2; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 2; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshRequest.php new file mode 100644 index 0000000..36ac071 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshRequest.php @@ -0,0 +1,194 @@ +centrifugal.centrifugo.proxy.RefreshRequest + */ +class RefreshRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string client = 1; + */ + protected $client = ''; + /** + * Generated from protobuf field string transport = 2; + */ + protected $transport = ''; + /** + * Generated from protobuf field string protocol = 3; + */ + protected $protocol = ''; + /** + * Generated from protobuf field string encoding = 4; + */ + protected $encoding = ''; + /** + * Generated from protobuf field string user = 10; + */ + protected $user = ''; + /** + * Generated from protobuf field bytes meta = 11; + */ + protected $meta = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client + * @type string $transport + * @type string $protocol + * @type string $encoding + * @type string $user + * @type string $meta + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string client = 1; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 1; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field string transport = 2; + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Generated from protobuf field string transport = 2; + * @param string $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkString($var, True); + $this->transport = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 3; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string encoding = 4; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Generated from protobuf field string encoding = 4; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 10; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 10; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 11; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 11; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshResponse.php new file mode 100644 index 0000000..2fdee25 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshResponse.php @@ -0,0 +1,143 @@ +centrifugal.centrifugo.proxy.RefreshResponse + */ +class RefreshResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.RefreshResult result = 1; + */ + protected $result = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + */ + protected $disconnect = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\RefreshResult $result + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $disconnect + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.RefreshResult result = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\RefreshResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.RefreshResult result = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\RefreshResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\RefreshResult::class); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect::class); + $this->disconnect = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshResult.php new file mode 100644 index 0000000..4b34d40 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/RefreshResult.php @@ -0,0 +1,194 @@ +centrifugal.centrifugo.proxy.RefreshResult + */ +class RefreshResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool expired = 1; + */ + protected $expired = false; + /** + * Generated from protobuf field int64 expire_at = 2; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field bytes info = 3; + */ + protected $info = ''; + /** + * Generated from protobuf field string b64info = 4; + */ + protected $b64info = ''; + /** + * Generated from protobuf field bytes meta = 5; + */ + protected $meta = ''; + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelsCapability caps = 6; + */ + private $caps; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $expired + * @type int|string $expire_at + * @type string $info + * @type string $b64info + * @type string $meta + * @type array<\RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelsCapability>|\Google\Protobuf\Internal\RepeatedField $caps + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool expired = 1; + * @return bool + */ + public function getExpired() + { + return $this->expired; + } + + /** + * Generated from protobuf field bool expired = 1; + * @param bool $var + * @return $this + */ + public function setExpired($var) + { + GPBUtil::checkBool($var); + $this->expired = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 expire_at = 2; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 2; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes info = 3; + * @return string + */ + public function getInfo() + { + return $this->info; + } + + /** + * Generated from protobuf field bytes info = 3; + * @param string $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkString($var, False); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64info = 4; + * @return string + */ + public function getB64Info() + { + return $this->b64info; + } + + /** + * Generated from protobuf field string b64info = 4; + * @param string $var + * @return $this + */ + public function setB64Info($var) + { + GPBUtil::checkString($var, True); + $this->b64info = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 5; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 5; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelsCapability caps = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCaps() + { + return $this->caps; + } + + /** + * Generated from protobuf field repeated .centrifugal.centrifugo.proxy.ChannelsCapability caps = 6; + * @param array<\RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelsCapability>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Centrifugal\Proxy\DTO\V1\ChannelsCapability::class); + $this->caps = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/StreamSubscribeRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/StreamSubscribeRequest.php new file mode 100644 index 0000000..565ebde --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/StreamSubscribeRequest.php @@ -0,0 +1,128 @@ +centrifugal.centrifugo.proxy.StreamSubscribeRequest + */ +class StreamSubscribeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Centrifugo always sends this within the first message upon user subscription request. + * It's always not set in the following StreamRequest messages from Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeRequest subscribe_request = 1; + */ + protected $subscribe_request = null; + /** + * Publication may be set when client publishes to the on-demand stream. If you are using + * bidirectional stream then Centrifugo assumes publications from client-side are allowed. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.Publication publication = 2; + */ + protected $publication = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeRequest $subscribe_request + * Centrifugo always sends this within the first message upon user subscription request. + * It's always not set in the following StreamRequest messages from Centrifugo. + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication $publication + * Publication may be set when client publishes to the on-demand stream. If you are using + * bidirectional stream then Centrifugo assumes publications from client-side are allowed. + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Centrifugo always sends this within the first message upon user subscription request. + * It's always not set in the following StreamRequest messages from Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeRequest subscribe_request = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeRequest|null + */ + public function getSubscribeRequest() + { + return $this->subscribe_request; + } + + public function hasSubscribeRequest() + { + return isset($this->subscribe_request); + } + + public function clearSubscribeRequest() + { + unset($this->subscribe_request); + } + + /** + * Centrifugo always sends this within the first message upon user subscription request. + * It's always not set in the following StreamRequest messages from Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeRequest subscribe_request = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeRequest $var + * @return $this + */ + public function setSubscribeRequest($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeRequest::class); + $this->subscribe_request = $var; + + return $this; + } + + /** + * Publication may be set when client publishes to the on-demand stream. If you are using + * bidirectional stream then Centrifugo assumes publications from client-side are allowed. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.Publication publication = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication|null + */ + public function getPublication() + { + return $this->publication; + } + + public function hasPublication() + { + return isset($this->publication); + } + + public function clearPublication() + { + unset($this->publication); + } + + /** + * Publication may be set when client publishes to the on-demand stream. If you are using + * bidirectional stream then Centrifugo assumes publications from client-side are allowed. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.Publication publication = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication $var + * @return $this + */ + public function setPublication($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication::class); + $this->publication = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/StreamSubscribeResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/StreamSubscribeResponse.php new file mode 100644 index 0000000..368bfe7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/StreamSubscribeResponse.php @@ -0,0 +1,120 @@ +centrifugal.centrifugo.proxy.StreamSubscribeResponse + */ +class StreamSubscribeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * SubscribeResponse may optionally be set in the first message from backend to Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeResponse subscribe_response = 1; + */ + protected $subscribe_response = null; + /** + * Publication goes to client. Can't be set in the first message from backend to Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.Publication publication = 2; + */ + protected $publication = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResponse $subscribe_response + * SubscribeResponse may optionally be set in the first message from backend to Centrifugo. + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication $publication + * Publication goes to client. Can't be set in the first message from backend to Centrifugo. + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * SubscribeResponse may optionally be set in the first message from backend to Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeResponse subscribe_response = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResponse|null + */ + public function getSubscribeResponse() + { + return $this->subscribe_response; + } + + public function hasSubscribeResponse() + { + return isset($this->subscribe_response); + } + + public function clearSubscribeResponse() + { + unset($this->subscribe_response); + } + + /** + * SubscribeResponse may optionally be set in the first message from backend to Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeResponse subscribe_response = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResponse $var + * @return $this + */ + public function setSubscribeResponse($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResponse::class); + $this->subscribe_response = $var; + + return $this; + } + + /** + * Publication goes to client. Can't be set in the first message from backend to Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.Publication publication = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication|null + */ + public function getPublication() + { + return $this->publication; + } + + public function hasPublication() + { + return isset($this->publication); + } + + public function clearPublication() + { + unset($this->publication); + } + + /** + * Publication goes to client. Can't be set in the first message from backend to Centrifugo. + * + * Generated from protobuf field .centrifugal.centrifugo.proxy.Publication publication = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication $var + * @return $this + */ + public function setPublication($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Publication::class); + $this->publication = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshRequest.php new file mode 100644 index 0000000..6988baa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshRequest.php @@ -0,0 +1,221 @@ +centrifugal.centrifugo.proxy.SubRefreshRequest + */ +class SubRefreshRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string client = 1; + */ + protected $client = ''; + /** + * Generated from protobuf field string transport = 2; + */ + protected $transport = ''; + /** + * Generated from protobuf field string protocol = 3; + */ + protected $protocol = ''; + /** + * Generated from protobuf field string encoding = 4; + */ + protected $encoding = ''; + /** + * Generated from protobuf field string user = 10; + */ + protected $user = ''; + /** + * Generated from protobuf field string channel = 11; + */ + protected $channel = ''; + /** + * Generated from protobuf field bytes meta = 12; + */ + protected $meta = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client + * @type string $transport + * @type string $protocol + * @type string $encoding + * @type string $user + * @type string $channel + * @type string $meta + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string client = 1; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 1; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field string transport = 2; + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Generated from protobuf field string transport = 2; + * @param string $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkString($var, True); + $this->transport = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 3; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string encoding = 4; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Generated from protobuf field string encoding = 4; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 10; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 10; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string channel = 11; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 11; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 12; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 12; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshResponse.php new file mode 100644 index 0000000..25c85e3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshResponse.php @@ -0,0 +1,143 @@ +centrifugal.centrifugo.proxy.SubRefreshResponse + */ +class SubRefreshResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubRefreshResult result = 1; + */ + protected $result = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + */ + protected $disconnect = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\SubRefreshResult $result + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $disconnect + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubRefreshResult result = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\SubRefreshResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubRefreshResult result = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\SubRefreshResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\SubRefreshResult::class); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect::class); + $this->disconnect = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshResult.php new file mode 100644 index 0000000..bde2637 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubRefreshResult.php @@ -0,0 +1,140 @@ +centrifugal.centrifugo.proxy.SubRefreshResult + */ +class SubRefreshResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool expired = 1; + */ + protected $expired = false; + /** + * Generated from protobuf field int64 expire_at = 2; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field bytes info = 3; + */ + protected $info = ''; + /** + * Generated from protobuf field string b64info = 4; + */ + protected $b64info = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $expired + * @type int|string $expire_at + * @type string $info + * @type string $b64info + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool expired = 1; + * @return bool + */ + public function getExpired() + { + return $this->expired; + } + + /** + * Generated from protobuf field bool expired = 1; + * @param bool $var + * @return $this + */ + public function setExpired($var) + { + GPBUtil::checkBool($var); + $this->expired = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 expire_at = 2; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 2; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes info = 3; + * @return string + */ + public function getInfo() + { + return $this->info; + } + + /** + * Generated from protobuf field bytes info = 3; + * @param string $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkString($var, False); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64info = 4; + * @return string + */ + public function getB64Info() + { + return $this->b64info; + } + + /** + * Generated from protobuf field string b64info = 4; + * @param string $var + * @return $this + */ + public function setB64Info($var) + { + GPBUtil::checkString($var, True); + $this->b64info = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeOptionOverride.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeOptionOverride.php new file mode 100644 index 0000000..30cc452 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeOptionOverride.php @@ -0,0 +1,217 @@ +centrifugal.centrifugo.proxy.SubscribeOptionOverride + */ +class SubscribeOptionOverride extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue presence = 1; + */ + protected $presence = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue join_leave = 2; + */ + protected $join_leave = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_recovery = 3; + */ + protected $force_recovery = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_positioning = 4; + */ + protected $force_positioning = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_push_join_leave = 5; + */ + protected $force_push_join_leave = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $presence + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $join_leave + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $force_recovery + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $force_positioning + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $force_push_join_leave + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue presence = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue|null + */ + public function getPresence() + { + return $this->presence; + } + + public function hasPresence() + { + return isset($this->presence); + } + + public function clearPresence() + { + unset($this->presence); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue presence = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $var + * @return $this + */ + public function setPresence($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue::class); + $this->presence = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue join_leave = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue|null + */ + public function getJoinLeave() + { + return $this->join_leave; + } + + public function hasJoinLeave() + { + return isset($this->join_leave); + } + + public function clearJoinLeave() + { + unset($this->join_leave); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue join_leave = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $var + * @return $this + */ + public function setJoinLeave($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue::class); + $this->join_leave = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_recovery = 3; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue|null + */ + public function getForceRecovery() + { + return $this->force_recovery; + } + + public function hasForceRecovery() + { + return isset($this->force_recovery); + } + + public function clearForceRecovery() + { + unset($this->force_recovery); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_recovery = 3; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $var + * @return $this + */ + public function setForceRecovery($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue::class); + $this->force_recovery = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_positioning = 4; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue|null + */ + public function getForcePositioning() + { + return $this->force_positioning; + } + + public function hasForcePositioning() + { + return isset($this->force_positioning); + } + + public function clearForcePositioning() + { + unset($this->force_positioning); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_positioning = 4; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $var + * @return $this + */ + public function setForcePositioning($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue::class); + $this->force_positioning = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_push_join_leave = 5; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue|null + */ + public function getForcePushJoinLeave() + { + return $this->force_push_join_leave; + } + + public function hasForcePushJoinLeave() + { + return isset($this->force_push_join_leave); + } + + public function clearForcePushJoinLeave() + { + unset($this->force_push_join_leave); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.BoolValue force_push_join_leave = 5; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue $var + * @return $this + */ + public function setForcePushJoinLeave($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\BoolValue::class); + $this->force_push_join_leave = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeOptions.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeOptions.php new file mode 100644 index 0000000..e6899a5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeOptions.php @@ -0,0 +1,204 @@ +centrifugal.centrifugo.proxy.SubscribeOptions + */ +class SubscribeOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 expire_at = 1; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field bytes info = 2; + */ + protected $info = ''; + /** + * Generated from protobuf field string b64info = 3; + */ + protected $b64info = ''; + /** + * Generated from protobuf field bytes data = 4; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 5; + */ + protected $b64data = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeOptionOverride override = 6; + */ + protected $override = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $expire_at + * @type string $info + * @type string $b64info + * @type string $data + * @type string $b64data + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride $override + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes info = 2; + * @return string + */ + public function getInfo() + { + return $this->info; + } + + /** + * Generated from protobuf field bytes info = 2; + * @param string $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkString($var, False); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64info = 3; + * @return string + */ + public function getB64Info() + { + return $this->b64info; + } + + /** + * Generated from protobuf field string b64info = 3; + * @param string $var + * @return $this + */ + public function setB64Info($var) + { + GPBUtil::checkString($var, True); + $this->b64info = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 4; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 4; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 5; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 5; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeOptionOverride override = 6; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride|null + */ + public function getOverride() + { + return $this->override; + } + + public function hasOverride() + { + return isset($this->override); + } + + public function clearOverride() + { + unset($this->override); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeOptionOverride override = 6; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride $var + * @return $this + */ + public function setOverride($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride::class); + $this->override = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeRequest.php new file mode 100644 index 0000000..7084d1b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeRequest.php @@ -0,0 +1,302 @@ +centrifugal.centrifugo.proxy.SubscribeRequest + */ +class SubscribeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string client = 1; + */ + protected $client = ''; + /** + * Generated from protobuf field string transport = 2; + */ + protected $transport = ''; + /** + * Generated from protobuf field string protocol = 3; + */ + protected $protocol = ''; + /** + * Generated from protobuf field string encoding = 4; + */ + protected $encoding = ''; + /** + * Generated from protobuf field string user = 10; + */ + protected $user = ''; + /** + * Generated from protobuf field string channel = 11; + */ + protected $channel = ''; + /** + * Generated from protobuf field string token = 12; + */ + protected $token = ''; + /** + * Generated from protobuf field bytes meta = 13; + */ + protected $meta = ''; + /** + * Generated from protobuf field bytes data = 14; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 15; + */ + protected $b64data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client + * @type string $transport + * @type string $protocol + * @type string $encoding + * @type string $user + * @type string $channel + * @type string $token + * @type string $meta + * @type string $data + * @type string $b64data + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string client = 1; + * @return string + */ + public function getClient() + { + return $this->client; + } + + /** + * Generated from protobuf field string client = 1; + * @param string $var + * @return $this + */ + public function setClient($var) + { + GPBUtil::checkString($var, True); + $this->client = $var; + + return $this; + } + + /** + * Generated from protobuf field string transport = 2; + * @return string + */ + public function getTransport() + { + return $this->transport; + } + + /** + * Generated from protobuf field string transport = 2; + * @param string $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkString($var, True); + $this->transport = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 3; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string encoding = 4; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Generated from protobuf field string encoding = 4; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Generated from protobuf field string user = 10; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Generated from protobuf field string user = 10; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Generated from protobuf field string channel = 11; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Generated from protobuf field string channel = 11; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Generated from protobuf field string token = 12; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Generated from protobuf field string token = 12; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes meta = 13; + * @return string + */ + public function getMeta() + { + return $this->meta; + } + + /** + * Generated from protobuf field bytes meta = 13; + * @param string $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkString($var, False); + $this->meta = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 14; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 14; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 15; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 15; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeResponse.php new file mode 100644 index 0000000..c3a0b1d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeResponse.php @@ -0,0 +1,143 @@ +centrifugal.centrifugo.proxy.SubscribeResponse + */ +class SubscribeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeResult result = 1; + */ + protected $result = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + */ + protected $error = null; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + */ + protected $disconnect = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResult $result + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $error + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $disconnect + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeResult result = 1; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeResult result = 1; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeResult::class); + $this->result = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Error error = 2; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect|null + */ + public function getDisconnect() + { + return $this->disconnect; + } + + public function hasDisconnect() + { + return isset($this->disconnect); + } + + public function clearDisconnect() + { + unset($this->disconnect); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.Disconnect disconnect = 3; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect $var + * @return $this + */ + public function setDisconnect($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\Disconnect::class); + $this->disconnect = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeResult.php new file mode 100644 index 0000000..d10d44c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Centrifugal/Proxy/DTO/V1/SubscribeResult.php @@ -0,0 +1,231 @@ +centrifugal.centrifugo.proxy.SubscribeResult + */ +class SubscribeResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 expire_at = 1; + */ + protected $expire_at = 0; + /** + * Generated from protobuf field bytes info = 2; + */ + protected $info = ''; + /** + * Generated from protobuf field string b64info = 3; + */ + protected $b64info = ''; + /** + * Generated from protobuf field bytes data = 4; + */ + protected $data = ''; + /** + * Generated from protobuf field string b64data = 5; + */ + protected $b64data = ''; + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeOptionOverride override = 6; + */ + protected $override = null; + /** + * Generated from protobuf field repeated string allow = 7; + */ + private $allow; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $expire_at + * @type string $info + * @type string $b64info + * @type string $data + * @type string $b64data + * @type \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride $override + * @type array|\Google\Protobuf\Internal\RepeatedField $allow + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Centrifugal\Proxy\DTO\V1\GPBMetadata\Proxy::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @return int|string + */ + public function getExpireAt() + { + return $this->expire_at; + } + + /** + * Generated from protobuf field int64 expire_at = 1; + * @param int|string $var + * @return $this + */ + public function setExpireAt($var) + { + GPBUtil::checkInt64($var); + $this->expire_at = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes info = 2; + * @return string + */ + public function getInfo() + { + return $this->info; + } + + /** + * Generated from protobuf field bytes info = 2; + * @param string $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkString($var, False); + $this->info = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64info = 3; + * @return string + */ + public function getB64Info() + { + return $this->b64info; + } + + /** + * Generated from protobuf field string b64info = 3; + * @param string $var + * @return $this + */ + public function setB64Info($var) + { + GPBUtil::checkString($var, True); + $this->b64info = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 4; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Generated from protobuf field bytes data = 4; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Generated from protobuf field string b64data = 5; + * @return string + */ + public function getB64Data() + { + return $this->b64data; + } + + /** + * Generated from protobuf field string b64data = 5; + * @param string $var + * @return $this + */ + public function setB64Data($var) + { + GPBUtil::checkString($var, True); + $this->b64data = $var; + + return $this; + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeOptionOverride override = 6; + * @return \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride|null + */ + public function getOverride() + { + return $this->override; + } + + public function hasOverride() + { + return isset($this->override); + } + + public function clearOverride() + { + unset($this->override); + } + + /** + * Generated from protobuf field .centrifugal.centrifugo.proxy.SubscribeOptionOverride override = 6; + * @param \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride $var + * @return $this + */ + public function setOverride($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Centrifugal\Proxy\DTO\V1\SubscribeOptionOverride::class); + $this->override = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string allow = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllow() + { + return $this->allow; + } + + /** + * Generated from protobuf field repeated string allow = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllow($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allow = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Common/DTO/V1/GPBMetadata/GrpcStatus.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Common/DTO/V1/GPBMetadata/GrpcStatus.php new file mode 100644 index 0000000..312c2cb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Common/DTO/V1/GPBMetadata/GrpcStatus.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\x83\x02\x0A\x1Bcommon/v1/grpc_status.proto\x12\x09common.v1\"N\x0A\x06Status\x12\x0C\x0A\x04code\x18\x01 \x01(\x05\x12\x0F\x0A\x07message\x18\x02 \x01(\x09\x12%\x0A\x07details\x18\x03 \x03(\x0B2\x14.google.protobuf.AnyB\x80\x01Zcommon.v1.Status + */ +class Status extends \Google\Protobuf\Internal\Message +{ + /** + * A simple error code that can be easily handled by the client. The + * actual error code is defined by `google.rpc.Code`. + * + * Generated from protobuf field int32 code = 1; + */ + protected $code = 0; + /** + * A developer-facing human-readable error message in English. It should + * both explain the error and offer an actionable resolution to it. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Additional error information that the client code can use to handle + * the error, such as retry info or a help link. + * + * 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 + * A simple error code that can be easily handled by the client. The + * actual error code is defined by `google.rpc.Code`. + * @type string $message + * A developer-facing human-readable error message in English. It should + * both explain the error and offer an actionable resolution to it. + * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $details + * Additional error information that the client code can use to handle + * the error, such as retry info or a help link. + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Common\DTO\V1\GPBMetadata\GrpcStatus::initOnce(); + parent::__construct($data); + } + + /** + * A simple error code that can be easily handled by the client. The + * actual error code is defined by `google.rpc.Code`. + * + * Generated from protobuf field int32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * A simple error code that can be easily handled by the client. The + * actual error code is defined by `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 human-readable error message in English. It should + * both explain the error and offer an actionable resolution to it. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * A developer-facing human-readable error message in English. It should + * both explain the error and offer an actionable resolution to it. + * + * 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; + } + + /** + * Additional error information that the client code can use to handle + * the error, such as retry info or a help link. + * + * Generated from protobuf field repeated .google.protobuf.Any details = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Additional error information that the client code can use to handle + * the error, such as retry info or a help link. + * + * 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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/GPBMetadata/Http.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/GPBMetadata/Http.php new file mode 100644 index 0000000..6394c4f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/GPBMetadata/Http.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xB9\x07\x0A\x12http/v1/http.proto\x12\x07http.v1\"\xE9\x03\x0A\x07Request\x12\x13\x0A\x0Bremote_addr\x18\x01 \x01(\x09\x12\x10\x0A\x08protocol\x18\x02 \x01(\x09\x12\x0E\x0A\x06method\x18\x03 \x01(\x09\x12\x0B\x0A\x03uri\x18\x04 \x01(\x09\x12,\x0A\x06header\x18\x05 \x03(\x0B2\x1C.http.v1.Request.HeaderEntry\x12.\x0A\x07cookies\x18\x06 \x03(\x0B2\x1D.http.v1.Request.CookiesEntry\x12\x11\x0A\x09raw_query\x18\x07 \x01(\x09\x12\x0E\x0A\x06parsed\x18\x08 \x01(\x08\x12\x0F\x0A\x07uploads\x18\x09 \x01(\x0C\x124\x0A\x0Aattributes\x18\x0A \x03(\x0B2 .http.v1.Request.AttributesEntry\x1AC\x0A\x0BHeaderEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12#\x0A\x05value\x18\x02 \x01(\x0B2\x14.http.v1.HeaderValue:\x028\x01\x1AD\x0A\x0CCookiesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12#\x0A\x05value\x18\x02 \x01(\x0B2\x14.http.v1.HeaderValue:\x028\x01\x1AG\x0A\x0FAttributesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12#\x0A\x05value\x18\x02 \x01(\x0B2\x14.http.v1.HeaderValue:\x028\x01\"z\x0A\x06Header\x12+\x0A\x06header\x18\x01 \x03(\x0B2\x1B.http.v1.Header.HeaderEntry\x1AC\x0A\x0BHeaderEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12#\x0A\x05value\x18\x02 \x01(\x0B2\x14.http.v1.HeaderValue:\x028\x01\"\x91\x01\x0A\x08Response\x12\x0E\x0A\x06status\x18\x01 \x01(\x03\x12/\x0A\x07headers\x18\x02 \x03(\x0B2\x1E.http.v1.Response.HeadersEntry\x1AD\x0A\x0CHeadersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12#\x0A\x05value\x18\x02 \x01(\x0B2\x14.http.v1.HeaderValue:\x028\x01\"\x1C\x0A\x0BHeaderValue\x12\x0D\x0A\x05value\x18\x01 \x03(\x09BxZ8github.com/roadrunner-server/api/v4/build/http/v1;httpV1\xCA\x02\x16RoadRunner\\HTTP\\DTO\\V1\xE2\x02\"RoadRunner\\HTTP\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Header.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Header.php new file mode 100644 index 0000000..1376a0a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Header.php @@ -0,0 +1,59 @@ +http.v1.Header + */ +class Header extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map header = 1; + */ + private $header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $header + * } + */ + public function __construct($data = NULL) { + \RoadRunner\HTTP\DTO\V1\GPBMetadata\Http::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map header = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeader() + { + return $this->header; + } + + /** + * Generated from protobuf field map header = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeader($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class); + $this->header = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/HeaderValue.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/HeaderValue.php new file mode 100644 index 0000000..a695a94 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/HeaderValue.php @@ -0,0 +1,59 @@ +http.v1.HeaderValue + */ +class HeaderValue extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string value = 1; + */ + private $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $value + * } + */ + public function __construct($data = NULL) { + \RoadRunner\HTTP\DTO\V1\GPBMetadata\Http::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string value = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field repeated string value = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValue($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->value = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Request.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Request.php new file mode 100644 index 0000000..97f6ee8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Request.php @@ -0,0 +1,304 @@ +http.v1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string remote_addr = 1; + */ + protected $remote_addr = ''; + /** + * Generated from protobuf field string protocol = 2; + */ + protected $protocol = ''; + /** + * Generated from protobuf field string method = 3; + */ + protected $method = ''; + /** + * Generated from protobuf field string uri = 4; + */ + protected $uri = ''; + /** + * Generated from protobuf field map header = 5; + */ + private $header; + /** + * Generated from protobuf field map cookies = 6; + */ + private $cookies; + /** + * Generated from protobuf field string raw_query = 7; + */ + protected $raw_query = ''; + /** + * Generated from protobuf field bool parsed = 8; + */ + protected $parsed = false; + /** + * Generated from protobuf field bytes uploads = 9; + */ + protected $uploads = ''; + /** + * Generated from protobuf field map attributes = 10; + */ + private $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $remote_addr + * @type string $protocol + * @type string $method + * @type string $uri + * @type array|\Google\Protobuf\Internal\MapField $header + * @type array|\Google\Protobuf\Internal\MapField $cookies + * @type string $raw_query + * @type bool $parsed + * @type string $uploads + * @type array|\Google\Protobuf\Internal\MapField $attributes + * } + */ + public function __construct($data = NULL) { + \RoadRunner\HTTP\DTO\V1\GPBMetadata\Http::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string remote_addr = 1; + * @return string + */ + public function getRemoteAddr() + { + return $this->remote_addr; + } + + /** + * Generated from protobuf field string remote_addr = 1; + * @param string $var + * @return $this + */ + public function setRemoteAddr($var) + { + GPBUtil::checkString($var, True); + $this->remote_addr = $var; + + return $this; + } + + /** + * Generated from protobuf field string protocol = 2; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Generated from protobuf field string protocol = 2; + * @param string $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkString($var, True); + $this->protocol = $var; + + return $this; + } + + /** + * Generated from protobuf field string method = 3; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * Generated from protobuf field string method = 3; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * Generated from protobuf field string uri = 4; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Generated from protobuf field string uri = 4; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Generated from protobuf field map header = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeader() + { + return $this->header; + } + + /** + * Generated from protobuf field map header = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeader($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class); + $this->header = $arr; + + return $this; + } + + /** + * Generated from protobuf field map cookies = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCookies() + { + return $this->cookies; + } + + /** + * Generated from protobuf field map cookies = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCookies($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class); + $this->cookies = $arr; + + return $this; + } + + /** + * Generated from protobuf field string raw_query = 7; + * @return string + */ + public function getRawQuery() + { + return $this->raw_query; + } + + /** + * Generated from protobuf field string raw_query = 7; + * @param string $var + * @return $this + */ + public function setRawQuery($var) + { + GPBUtil::checkString($var, True); + $this->raw_query = $var; + + return $this; + } + + /** + * Generated from protobuf field bool parsed = 8; + * @return bool + */ + public function getParsed() + { + return $this->parsed; + } + + /** + * Generated from protobuf field bool parsed = 8; + * @param bool $var + * @return $this + */ + public function setParsed($var) + { + GPBUtil::checkBool($var); + $this->parsed = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes uploads = 9; + * @return string + */ + public function getUploads() + { + return $this->uploads; + } + + /** + * Generated from protobuf field bytes uploads = 9; + * @param string $var + * @return $this + */ + public function setUploads($var) + { + GPBUtil::checkString($var, False); + $this->uploads = $var; + + return $this; + } + + /** + * Generated from protobuf field map attributes = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Generated from protobuf field map attributes = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class); + $this->attributes = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Response.php new file mode 100644 index 0000000..39041da --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/HTTP/DTO/V1/Response.php @@ -0,0 +1,86 @@ +http.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 status = 1; + */ + protected $status = 0; + /** + * Generated from protobuf field map headers = 2; + */ + private $headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $status + * @type array|\Google\Protobuf\Internal\MapField $headers + * } + */ + public function __construct($data = NULL) { + \RoadRunner\HTTP\DTO\V1\GPBMetadata\Http::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 status = 1; + * @return int|string + */ + public function getStatus() + { + return $this->status; + } + + /** + * Generated from protobuf field int64 status = 1; + * @param int|string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkInt64($var); + $this->status = $var; + + return $this; + } + + /** + * Generated from protobuf field map headers = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Generated from protobuf field map headers = 2; + * @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::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class); + $this->headers = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/DeclareRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/DeclareRequest.php new file mode 100644 index 0000000..5ede32c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/DeclareRequest.php @@ -0,0 +1,63 @@ + Declare(req *jobsProto.DeclareRequest, _ *jobsProto.Empty) + * response `message Empty` + * + * Generated from protobuf message jobs.v1.DeclareRequest + */ +class DeclareRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map pipeline = 1; + */ + private $pipeline; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $pipeline + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map pipeline = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPipeline() + { + return $this->pipeline; + } + + /** + * Generated from protobuf field map pipeline = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPipeline($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->pipeline = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/GPBMetadata/Jobs.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/GPBMetadata/Jobs.php new file mode 100644 index 0000000..81ec33f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/GPBMetadata/Jobs.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xCD\x07\x0A\x12jobs/v1/jobs.proto\x12\x07jobs.v1\"(\x0A\x0BPushRequest\x12\x19\x0A\x03job\x18\x01 \x01(\x0B2\x0C.jobs.v1.Job\".\x0A\x10PushBatchRequest\x12\x1A\x0A\x04jobs\x18\x01 \x03(\x0B2\x0C.jobs.v1.Job\"\xC4\x01\x0A\x03Job\x12\x0B\x0A\x03job\x18\x01 \x01(\x09\x12\x0A\x0A\x02id\x18\x02 \x01(\x09\x12\x0F\x0A\x07payload\x18\x03 \x01(\x0C\x12*\x0A\x07headers\x18\x04 \x03(\x0B2\x19.jobs.v1.Job.HeadersEntry\x12!\x0A\x07options\x18\x05 \x01(\x0B2\x10.jobs.v1.Options\x1AD\x0A\x0CHeadersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12#\x0A\x05value\x18\x02 \x01(\x0B2\x14.jobs.v1.HeaderValue:\x028\x01\"\x92\x01\x0A\x07Options\x12\x10\x0A\x08priority\x18\x01 \x01(\x03\x12\x10\x0A\x08pipeline\x18\x02 \x01(\x09\x12\x0D\x0A\x05delay\x18\x03 \x01(\x03\x12\x10\x0A\x08auto_ack\x18\x06 \x01(\x08\x12\x0D\x0A\x05topic\x18\x07 \x01(\x09\x12\x10\x0A\x08metadata\x18\x08 \x01(\x09\x12\x0E\x0A\x06offset\x18\x09 \x01(\x03\x12\x11\x0A\x09partition\x18\x0A \x01(\x05\"\x1C\x0A\x0BHeaderValue\x12\x0D\x0A\x05value\x18\x01 \x03(\x09\"z\x0A\x0EDeclareRequest\x127\x0A\x08pipeline\x18\x01 \x03(\x0B2%.jobs.v1.DeclareRequest.PipelineEntry\x1A/\x0A\x0DPipelineEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"%\x0A\x05Stats\x12\x1C\x0A\x05stats\x18\x01 \x03(\x0B2\x0D.jobs.v1.Stat\"\x8B\x01\x0A\x04Stat\x12\x10\x0A\x08pipeline\x18\x01 \x01(\x09\x12\x0E\x0A\x06driver\x18\x02 \x01(\x09\x12\x0D\x0A\x05queue\x18\x03 \x01(\x09\x12\x0E\x0A\x06active\x18\x04 \x01(\x03\x12\x0F\x0A\x07delayed\x18\x05 \x01(\x03\x12\x10\x0A\x08reserved\x18\x06 \x01(\x03\x12\x0D\x0A\x05ready\x18\x07 \x01(\x08\x12\x10\x0A\x08priority\x18\x08 \x01(\x04\"\x1E\x0A\x09Pipelines\x12\x11\x0A\x09pipelines\x18\x01 \x03(\x09\"\x07\x0A\x05EmptyBxZ8github.com/roadrunner-server/api/v4/build/jobs/v1;jobsV1\xCA\x02\x16RoadRunner\\Jobs\\DTO\\V1\xE2\x02\"RoadRunner\\Jobs\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/HeaderValue.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/HeaderValue.php new file mode 100644 index 0000000..62b9c91 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/HeaderValue.php @@ -0,0 +1,61 @@ +jobs.v1.HeaderValue + */ +class HeaderValue extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string value = 1; + */ + private $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $value + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string value = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field repeated string value = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValue($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->value = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Job.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Job.php new file mode 100644 index 0000000..3e6de28 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Job.php @@ -0,0 +1,214 @@ +jobs.v1.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * job name, usually PHP class + * + * Generated from protobuf field string job = 1; + */ + protected $job = ''; + /** + * unique job id + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * payload, might be embedded json or just byte-string + * + * Generated from protobuf field bytes payload = 3; + */ + protected $payload = ''; + /** + * headers map[string][]string + * + * Generated from protobuf field map headers = 4; + */ + private $headers; + /** + * job options, contains common and driver specific fields + * + * Generated from protobuf field .jobs.v1.Options options = 5; + */ + protected $options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $job + * job name, usually PHP class + * @type string $id + * unique job id + * @type string $payload + * payload, might be embedded json or just byte-string + * @type array|\Google\Protobuf\Internal\MapField $headers + * headers map[string][]string + * @type \RoadRunner\Jobs\DTO\V1\Options $options + * job options, contains common and driver specific fields + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * job name, usually PHP class + * + * Generated from protobuf field string job = 1; + * @return string + */ + public function getJob() + { + return $this->job; + } + + /** + * job name, usually PHP class + * + * Generated from protobuf field string job = 1; + * @param string $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkString($var, True); + $this->job = $var; + + return $this; + } + + /** + * unique job id + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * unique job id + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * payload, might be embedded json or just byte-string + * + * Generated from protobuf field bytes payload = 3; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * payload, might be embedded json or just byte-string + * + * Generated from protobuf field bytes payload = 3; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + + /** + * headers map[string][]string + * + * Generated from protobuf field map headers = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * headers map[string][]string + * + * Generated from protobuf field map headers = 4; + * @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::MESSAGE, \RoadRunner\Jobs\DTO\V1\HeaderValue::class); + $this->headers = $arr; + + return $this; + } + + /** + * job options, contains common and driver specific fields + * + * Generated from protobuf field .jobs.v1.Options options = 5; + * @return \RoadRunner\Jobs\DTO\V1\Options|null + */ + public function getOptions() + { + return $this->options; + } + + public function hasOptions() + { + return isset($this->options); + } + + public function clearOptions() + { + unset($this->options); + } + + /** + * job options, contains common and driver specific fields + * + * Generated from protobuf field .jobs.v1.Options options = 5; + * @param \RoadRunner\Jobs\DTO\V1\Options $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Jobs\DTO\V1\Options::class); + $this->options = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Options.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Options.php new file mode 100644 index 0000000..cc482ac --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Options.php @@ -0,0 +1,268 @@ +jobs.v1.Options + */ +class Options extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 priority = 1; + */ + protected $priority = 0; + /** + * Generated from protobuf field string pipeline = 2; + */ + protected $pipeline = ''; + /** + * Generated from protobuf field int64 delay = 3; + */ + protected $delay = 0; + /** + * new in 2.10 + * + * Generated from protobuf field bool auto_ack = 6; + */ + protected $auto_ack = false; + /** + *-------------- + * new in 2.11 (kafka related) + * + * Generated from protobuf field string topic = 7; + */ + protected $topic = ''; + /** + * Generated from protobuf field string metadata = 8; + */ + protected $metadata = ''; + /** + * Generated from protobuf field int64 offset = 9; + */ + protected $offset = 0; + /** + * Generated from protobuf field int32 partition = 10; + */ + protected $partition = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $priority + * @type string $pipeline + * @type int|string $delay + * @type bool $auto_ack + * new in 2.10 + * @type string $topic + * -------------- + * new in 2.11 (kafka related) + * @type string $metadata + * @type int|string $offset + * @type int $partition + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 priority = 1; + * @return int|string + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Generated from protobuf field int64 priority = 1; + * @param int|string $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt64($var); + $this->priority = $var; + + return $this; + } + + /** + * Generated from protobuf field string pipeline = 2; + * @return string + */ + public function getPipeline() + { + return $this->pipeline; + } + + /** + * Generated from protobuf field string pipeline = 2; + * @param string $var + * @return $this + */ + public function setPipeline($var) + { + GPBUtil::checkString($var, True); + $this->pipeline = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 delay = 3; + * @return int|string + */ + public function getDelay() + { + return $this->delay; + } + + /** + * Generated from protobuf field int64 delay = 3; + * @param int|string $var + * @return $this + */ + public function setDelay($var) + { + GPBUtil::checkInt64($var); + $this->delay = $var; + + return $this; + } + + /** + * new in 2.10 + * + * Generated from protobuf field bool auto_ack = 6; + * @return bool + */ + public function getAutoAck() + { + return $this->auto_ack; + } + + /** + * new in 2.10 + * + * Generated from protobuf field bool auto_ack = 6; + * @param bool $var + * @return $this + */ + public function setAutoAck($var) + { + GPBUtil::checkBool($var); + $this->auto_ack = $var; + + return $this; + } + + /** + *-------------- + * new in 2.11 (kafka related) + * + * Generated from protobuf field string topic = 7; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + *-------------- + * new in 2.11 (kafka related) + * + * Generated from protobuf field string topic = 7; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + + /** + * Generated from protobuf field string metadata = 8; + * @return string + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field string metadata = 8; + * @param string $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkString($var, True); + $this->metadata = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 offset = 9; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Generated from protobuf field int64 offset = 9; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 partition = 10; + * @return int + */ + public function getPartition() + { + return $this->partition; + } + + /** + * Generated from protobuf field int32 partition = 10; + * @param int $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkInt32($var); + $this->partition = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PBEmpty.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PBEmpty.php new file mode 100644 index 0000000..d2f6953 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PBEmpty.php @@ -0,0 +1,35 @@ +jobs.v1.Empty + */ +class PBEmpty extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Pipelines.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Pipelines.php new file mode 100644 index 0000000..3096370 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Pipelines.php @@ -0,0 +1,62 @@ +jobs.v1.Pipelines + */ +class Pipelines extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string pipelines = 1; + */ + private $pipelines; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $pipelines + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string pipelines = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPipelines() + { + return $this->pipelines; + } + + /** + * Generated from protobuf field repeated string pipelines = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPipelines($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->pipelines = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PushBatchRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PushBatchRequest.php new file mode 100644 index 0000000..ef8d1af --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PushBatchRequest.php @@ -0,0 +1,62 @@ + PushBatch(j *jobsProto.PushBatchRequest, _ *jobsProto.Empty) + * response `message Empty` + * + * Generated from protobuf message jobs.v1.PushBatchRequest + */ +class PushBatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .jobs.v1.Job jobs = 1; + */ + private $jobs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Jobs\DTO\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .jobs.v1.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Generated from protobuf field repeated .jobs.v1.Job jobs = 1; + * @param array<\RoadRunner\Jobs\DTO\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Jobs\DTO\V1\Job::class); + $this->jobs = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PushRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PushRequest.php new file mode 100644 index 0000000..bbec3aa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/PushRequest.php @@ -0,0 +1,72 @@ + Push(j *jobsProto.PushRequest, _ *jobsProto.Empty) + * response `message Empty` + * + * Generated from protobuf message jobs.v1.PushRequest + */ +class PushRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .jobs.v1.Job job = 1; + */ + protected $job = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Jobs\DTO\V1\Job $job + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .jobs.v1.Job job = 1; + * @return \RoadRunner\Jobs\DTO\V1\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Generated from protobuf field .jobs.v1.Job job = 1; + * @param \RoadRunner\Jobs\DTO\V1\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Jobs\DTO\V1\Job::class); + $this->job = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Stat.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Stat.php new file mode 100644 index 0000000..d6dcd22 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Stat.php @@ -0,0 +1,257 @@ +jobs.v1.Stat + */ +class Stat extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string pipeline = 1; + */ + protected $pipeline = ''; + /** + * Generated from protobuf field string driver = 2; + */ + protected $driver = ''; + /** + * Generated from protobuf field string queue = 3; + */ + protected $queue = ''; + /** + * Generated from protobuf field int64 active = 4; + */ + protected $active = 0; + /** + * Generated from protobuf field int64 delayed = 5; + */ + protected $delayed = 0; + /** + * Generated from protobuf field int64 reserved = 6; + */ + protected $reserved = 0; + /** + * Generated from protobuf field bool ready = 7; + */ + protected $ready = false; + /** + * new in 2.10.5 + * + * Generated from protobuf field uint64 priority = 8; + */ + protected $priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pipeline + * @type string $driver + * @type string $queue + * @type int|string $active + * @type int|string $delayed + * @type int|string $reserved + * @type bool $ready + * @type int|string $priority + * new in 2.10.5 + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string pipeline = 1; + * @return string + */ + public function getPipeline() + { + return $this->pipeline; + } + + /** + * Generated from protobuf field string pipeline = 1; + * @param string $var + * @return $this + */ + public function setPipeline($var) + { + GPBUtil::checkString($var, True); + $this->pipeline = $var; + + return $this; + } + + /** + * Generated from protobuf field string driver = 2; + * @return string + */ + public function getDriver() + { + return $this->driver; + } + + /** + * Generated from protobuf field string driver = 2; + * @param string $var + * @return $this + */ + public function setDriver($var) + { + GPBUtil::checkString($var, True); + $this->driver = $var; + + return $this; + } + + /** + * Generated from protobuf field string queue = 3; + * @return string + */ + public function getQueue() + { + return $this->queue; + } + + /** + * Generated from protobuf field string queue = 3; + * @param string $var + * @return $this + */ + public function setQueue($var) + { + GPBUtil::checkString($var, True); + $this->queue = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 active = 4; + * @return int|string + */ + public function getActive() + { + return $this->active; + } + + /** + * Generated from protobuf field int64 active = 4; + * @param int|string $var + * @return $this + */ + public function setActive($var) + { + GPBUtil::checkInt64($var); + $this->active = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 delayed = 5; + * @return int|string + */ + public function getDelayed() + { + return $this->delayed; + } + + /** + * Generated from protobuf field int64 delayed = 5; + * @param int|string $var + * @return $this + */ + public function setDelayed($var) + { + GPBUtil::checkInt64($var); + $this->delayed = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 reserved = 6; + * @return int|string + */ + public function getReserved() + { + return $this->reserved; + } + + /** + * Generated from protobuf field int64 reserved = 6; + * @param int|string $var + * @return $this + */ + public function setReserved($var) + { + GPBUtil::checkInt64($var); + $this->reserved = $var; + + return $this; + } + + /** + * Generated from protobuf field bool ready = 7; + * @return bool + */ + public function getReady() + { + return $this->ready; + } + + /** + * Generated from protobuf field bool ready = 7; + * @param bool $var + * @return $this + */ + public function setReady($var) + { + GPBUtil::checkBool($var); + $this->ready = $var; + + return $this; + } + + /** + * new in 2.10.5 + * + * Generated from protobuf field uint64 priority = 8; + * @return int|string + */ + public function getPriority() + { + return $this->priority; + } + + /** + * new in 2.10.5 + * + * Generated from protobuf field uint64 priority = 8; + * @param int|string $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkUint64($var); + $this->priority = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Stats.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Stats.php new file mode 100644 index 0000000..efd6bdf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Jobs/DTO/V1/Stats.php @@ -0,0 +1,59 @@ +jobs.v1.Stats + */ +class Stats extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .jobs.v1.Stat stats = 1; + */ + private $stats; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Jobs\DTO\V1\Stat>|\Google\Protobuf\Internal\RepeatedField $stats + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Jobs\DTO\V1\GPBMetadata\Jobs::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .jobs.v1.Stat stats = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStats() + { + return $this->stats; + } + + /** + * Generated from protobuf field repeated .jobs.v1.Stat stats = 1; + * @param array<\RoadRunner\Jobs\DTO\V1\Stat>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Jobs\DTO\V1\Stat::class); + $this->stats = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/GPBMetadata/Kv.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/GPBMetadata/Kv.php new file mode 100644 index 0000000..fb897e8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/GPBMetadata/Kv.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xA6\x02\x0A\x0Ekv/v1/kv.proto\x12\x05kv.v1\"6\x0A\x07Request\x12\x0F\x0A\x07storage\x18\x01 \x01(\x09\x12\x1A\x0A\x05items\x18\x02 \x03(\x0B2\x0B.kv.v1.Item\"3\x0A\x04Item\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x0C\x12\x0F\x0A\x07timeout\x18\x03 \x01(\x09\"&\x0A\x08Response\x12\x1A\x0A\x05items\x18\x01 \x03(\x0B2\x0B.kv.v1.ItemBpZ4github.com/roadrunner-server/api/v4/build/kv/v1;kvV1\xCA\x02\x14RoadRunner\\KV\\DTO\\V1\xE2\x02 RoadRunner\\KV\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Item.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Item.php new file mode 100644 index 0000000..7a0e263 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Item.php @@ -0,0 +1,120 @@ +kv.v1.Item + */ +class Item extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * Generated from protobuf field bytes value = 2; + */ + protected $value = ''; + /** + * RFC 3339 + * + * Generated from protobuf field string timeout = 3; + */ + protected $timeout = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * @type string $value + * @type string $timeout + * RFC 3339 + * } + */ + public function __construct($data = NULL) { + \RoadRunner\KV\DTO\V1\GPBMetadata\Kv::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->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; + } + + /** + * Generated from protobuf field bytes value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * 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; + } + + /** + * RFC 3339 + * + * Generated from protobuf field string timeout = 3; + * @return string + */ + public function getTimeout() + { + return $this->timeout; + } + + /** + * RFC 3339 + * + * Generated from protobuf field string timeout = 3; + * @param string $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkString($var, True); + $this->timeout = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Request.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Request.php new file mode 100644 index 0000000..bb17a97 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Request.php @@ -0,0 +1,93 @@ +kv.v1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * could be an enum in the future + * + * Generated from protobuf field string storage = 1; + */ + protected $storage = ''; + /** + * Generated from protobuf field repeated .kv.v1.Item items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $storage + * could be an enum in the future + * @type array<\RoadRunner\KV\DTO\V1\Item>|\Google\Protobuf\Internal\RepeatedField $items + * } + */ + public function __construct($data = NULL) { + \RoadRunner\KV\DTO\V1\GPBMetadata\Kv::initOnce(); + parent::__construct($data); + } + + /** + * could be an enum in the future + * + * Generated from protobuf field string storage = 1; + * @return string + */ + public function getStorage() + { + return $this->storage; + } + + /** + * could be an enum in the future + * + * Generated from protobuf field string storage = 1; + * @param string $var + * @return $this + */ + public function setStorage($var) + { + GPBUtil::checkString($var, True); + $this->storage = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .kv.v1.Item items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .kv.v1.Item items = 2; + * @param array<\RoadRunner\KV\DTO\V1\Item>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\KV\DTO\V1\Item::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Response.php new file mode 100644 index 0000000..36743ec --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/KV/DTO/V1/Response.php @@ -0,0 +1,61 @@ +kv.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .kv.v1.Item items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\KV\DTO\V1\Item>|\Google\Protobuf\Internal\RepeatedField $items + * } + */ + public function __construct($data = NULL) { + \RoadRunner\KV\DTO\V1\GPBMetadata\Kv::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .kv.v1.Item items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .kv.v1.Item items = 1; + * @param array<\RoadRunner\KV\DTO\V1\Item>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\KV\DTO\V1\Item::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/GPBMetadata/Lock.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/GPBMetadata/Lock.php new file mode 100644 index 0000000..cea5737 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/GPBMetadata/Lock.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xB5\x02\x0A\x17lock/v1beta1/lock.proto\x12\x0Clock.v1beta1\"]\x0A\x07Request\x12\x10\x0A\x08resource\x18\x01 \x01(\x09\x12\x0A\x0A\x02id\x18\x02 \x01(\x09\x12\x10\x0A\x03ttl\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x11\x0A\x04wait\x18\x04 \x01(\x03H\x01\x88\x01\x01B\x06\x0A\x04_ttlB\x07\x0A\x05_wait\"\x16\x0A\x08Response\x12\x0A\x0A\x02ok\x18\x01 \x01(\x08B\x8C\x01ZBgithub.com/roadrunner-server/api/v4/build/lock/v1beta1;lockV1Beta1\xCA\x02\x1BRoadRunner\\Lock\\DTO\\V1BETA1\xE2\x02'RoadRunner\\Lock\\DTO\\V1BETA1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/Request.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/Request.php new file mode 100644 index 0000000..8fd0a5a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/Request.php @@ -0,0 +1,160 @@ +lock.v1beta1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string resource = 1; + */ + protected $resource = ''; + /** + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * Generated from protobuf field optional int64 ttl = 3; + */ + protected $ttl = null; + /** + * Generated from protobuf field optional int64 wait = 4; + */ + protected $wait = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource + * @type string $id + * @type int|string $ttl + * @type int|string $wait + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Lock\DTO\V1BETA1\GPBMetadata\Lock::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string resource = 1; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Generated from protobuf field string resource = 1; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field optional int64 ttl = 3; + * @return int|string + */ + public function getTtl() + { + return isset($this->ttl) ? $this->ttl : 0; + } + + public function hasTtl() + { + return isset($this->ttl); + } + + public function clearTtl() + { + unset($this->ttl); + } + + /** + * Generated from protobuf field optional int64 ttl = 3; + * @param int|string $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkInt64($var); + $this->ttl = $var; + + return $this; + } + + /** + * Generated from protobuf field optional int64 wait = 4; + * @return int|string + */ + public function getWait() + { + return isset($this->wait) ? $this->wait : 0; + } + + public function hasWait() + { + return isset($this->wait); + } + + public function clearWait() + { + unset($this->wait); + } + + /** + * Generated from protobuf field optional int64 wait = 4; + * @param int|string $var + * @return $this + */ + public function setWait($var) + { + GPBUtil::checkInt64($var); + $this->wait = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/Response.php new file mode 100644 index 0000000..b9b4650 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Lock/DTO/V1BETA1/Response.php @@ -0,0 +1,59 @@ +lock.v1beta1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool ok = 1; + */ + protected $ok = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $ok + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Lock\DTO\V1BETA1\GPBMetadata\Lock::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool ok = 1; + * @return bool + */ + public function getOk() + { + return $this->ok; + } + + /** + * Generated from protobuf field bool ok = 1; + * @param bool $var + * @return $this + */ + public function setOk($var) + { + GPBUtil::checkBool($var); + $this->ok = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Create.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Create.php new file mode 100644 index 0000000..09ede39 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Create.php @@ -0,0 +1,282 @@ +service.v1.Create + */ +class Create extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Generated from protobuf field string command = 2; + */ + protected $command = ''; + /** + * Generated from protobuf field int64 process_num = 3; + */ + protected $process_num = 0; + /** + * Generated from protobuf field int64 exec_timeout = 4; + */ + protected $exec_timeout = 0; + /** + * Generated from protobuf field bool remain_after_exit = 5; + */ + protected $remain_after_exit = false; + /** + * Generated from protobuf field map env = 6; + */ + private $env; + /** + * Generated from protobuf field uint64 restart_sec = 7; + */ + protected $restart_sec = 0; + /** + * new in 2023.2 + * + * Generated from protobuf field bool service_name_in_logs = 8; + */ + protected $service_name_in_logs = false; + /** + * Generated from protobuf field uint64 timeout_stop_sec = 9; + */ + protected $timeout_stop_sec = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * @type string $command + * @type int|string $process_num + * @type int|string $exec_timeout + * @type bool $remain_after_exit + * @type array|\Google\Protobuf\Internal\MapField $env + * @type int|string $restart_sec + * @type bool $service_name_in_logs + * new in 2023.2 + * @type int|string $timeout_stop_sec + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Service\DTO\V1\GPBMetadata\Service::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->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; + } + + /** + * Generated from protobuf field string command = 2; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Generated from protobuf field string command = 2; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 process_num = 3; + * @return int|string + */ + public function getProcessNum() + { + return $this->process_num; + } + + /** + * Generated from protobuf field int64 process_num = 3; + * @param int|string $var + * @return $this + */ + public function setProcessNum($var) + { + GPBUtil::checkInt64($var); + $this->process_num = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 exec_timeout = 4; + * @return int|string + */ + public function getExecTimeout() + { + return $this->exec_timeout; + } + + /** + * Generated from protobuf field int64 exec_timeout = 4; + * @param int|string $var + * @return $this + */ + public function setExecTimeout($var) + { + GPBUtil::checkInt64($var); + $this->exec_timeout = $var; + + return $this; + } + + /** + * Generated from protobuf field bool remain_after_exit = 5; + * @return bool + */ + public function getRemainAfterExit() + { + return $this->remain_after_exit; + } + + /** + * Generated from protobuf field bool remain_after_exit = 5; + * @param bool $var + * @return $this + */ + public function setRemainAfterExit($var) + { + GPBUtil::checkBool($var); + $this->remain_after_exit = $var; + + return $this; + } + + /** + * Generated from protobuf field map env = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnv() + { + return $this->env; + } + + /** + * Generated from protobuf field map env = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnv($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->env = $arr; + + return $this; + } + + /** + * Generated from protobuf field uint64 restart_sec = 7; + * @return int|string + */ + public function getRestartSec() + { + return $this->restart_sec; + } + + /** + * Generated from protobuf field uint64 restart_sec = 7; + * @param int|string $var + * @return $this + */ + public function setRestartSec($var) + { + GPBUtil::checkUint64($var); + $this->restart_sec = $var; + + return $this; + } + + /** + * new in 2023.2 + * + * Generated from protobuf field bool service_name_in_logs = 8; + * @return bool + */ + public function getServiceNameInLogs() + { + return $this->service_name_in_logs; + } + + /** + * new in 2023.2 + * + * Generated from protobuf field bool service_name_in_logs = 8; + * @param bool $var + * @return $this + */ + public function setServiceNameInLogs($var) + { + GPBUtil::checkBool($var); + $this->service_name_in_logs = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 timeout_stop_sec = 9; + * @return int|string + */ + public function getTimeoutStopSec() + { + return $this->timeout_stop_sec; + } + + /** + * Generated from protobuf field uint64 timeout_stop_sec = 9; + * @param int|string $var + * @return $this + */ + public function setTimeoutStopSec($var) + { + GPBUtil::checkUint64($var); + $this->timeout_stop_sec = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/GPBMetadata/Service.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/GPBMetadata/Service.php new file mode 100644 index 0000000..7e114ad --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/GPBMetadata/Service.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xCA\x05\x0A\x18service/v1/service.proto\x12\x0Aservice.v1\"'\x0A\x08Response\x12\x0F\x0A\x07message\x18\x01 \x01(\x09\x12\x0A\x0A\x02ok\x18\x02 \x01(\x08\"\x90\x02\x0A\x06Create\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0F\x0A\x07command\x18\x02 \x01(\x09\x12\x13\x0A\x0Bprocess_num\x18\x03 \x01(\x03\x12\x14\x0A\x0Cexec_timeout\x18\x04 \x01(\x03\x12\x19\x0A\x11remain_after_exit\x18\x05 \x01(\x08\x12(\x0A\x03env\x18\x06 \x03(\x0B2\x1B.service.v1.Create.EnvEntry\x12\x13\x0A\x0Brestart_sec\x18\x07 \x01(\x04\x12\x1C\x0A\x14service_name_in_logs\x18\x08 \x01(\x08\x12\x18\x0A\x10timeout_stop_sec\x18\x09 \x01(\x04\x1A*\x0A\x08EnvEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\".\x0A\x08Statuses\x12\"\x0A\x06status\x18\x01 \x03(\x0B2\x12.service.v1.Status\"t\x0A\x06Status\x12\x13\x0A\x0Bcpu_percent\x18\x01 \x01(\x02\x12\x0B\x0A\x03pid\x18\x02 \x01(\x05\x12\x14\x0A\x0Cmemory_usage\x18\x03 \x01(\x04\x12\x0F\x0A\x07command\x18\x04 \x01(\x09\x12!\x0A\x06status\x18\x05 \x01(\x0B2\x11.common.v1.Status\"\x17\x0A\x07Service\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"\x18\x0A\x04List\x12\x10\x0A\x08services\x18\x01 \x03(\x09B\x84\x01Z>github.com/roadrunner-server/api/v4/build/service/v1;serviceV1\xCA\x02\x19RoadRunner\\Service\\DTO\\V1\xE2\x02%RoadRunner\\Service\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/PBList.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/PBList.php new file mode 100644 index 0000000..c78f09a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/PBList.php @@ -0,0 +1,59 @@ +service.v1.List + */ +class PBList extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string services = 1; + */ + private $services; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $services + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Service\DTO\V1\GPBMetadata\Service::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string services = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServices() + { + return $this->services; + } + + /** + * Generated from protobuf field repeated string services = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->services = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Response.php new file mode 100644 index 0000000..073e66c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Response.php @@ -0,0 +1,86 @@ +service.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * Generated from protobuf field bool ok = 2; + */ + protected $ok = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * @type bool $ok + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Service\DTO\V1\GPBMetadata\Service::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Generated from protobuf field bool ok = 2; + * @return bool + */ + public function getOk() + { + return $this->ok; + } + + /** + * Generated from protobuf field bool ok = 2; + * @param bool $var + * @return $this + */ + public function setOk($var) + { + GPBUtil::checkBool($var); + $this->ok = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Service.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Service.php new file mode 100644 index 0000000..2b0c2da --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Service.php @@ -0,0 +1,59 @@ +service.v1.Service + */ +class Service extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Service\DTO\V1\GPBMetadata\Service::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Status.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Status.php new file mode 100644 index 0000000..92024d4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Status.php @@ -0,0 +1,184 @@ +service.v1.Status + */ +class Status extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field float cpu_percent = 1; + */ + protected $cpu_percent = 0.0; + /** + * Generated from protobuf field int32 pid = 2; + */ + protected $pid = 0; + /** + * Generated from protobuf field uint64 memory_usage = 3; + */ + protected $memory_usage = 0; + /** + * Generated from protobuf field string command = 4; + */ + protected $command = ''; + /** + * error state + * + * Generated from protobuf field .common.v1.Status status = 5; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu_percent + * @type int $pid + * @type int|string $memory_usage + * @type string $command + * @type \RoadRunner\Common\DTO\V1\Status $status + * error state + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Service\DTO\V1\GPBMetadata\Service::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field float cpu_percent = 1; + * @return float + */ + public function getCpuPercent() + { + return $this->cpu_percent; + } + + /** + * Generated from protobuf field float cpu_percent = 1; + * @param float $var + * @return $this + */ + public function setCpuPercent($var) + { + GPBUtil::checkFloat($var); + $this->cpu_percent = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 pid = 2; + * @return int + */ + public function getPid() + { + return $this->pid; + } + + /** + * Generated from protobuf field int32 pid = 2; + * @param int $var + * @return $this + */ + public function setPid($var) + { + GPBUtil::checkInt32($var); + $this->pid = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 memory_usage = 3; + * @return int|string + */ + public function getMemoryUsage() + { + return $this->memory_usage; + } + + /** + * Generated from protobuf field uint64 memory_usage = 3; + * @param int|string $var + * @return $this + */ + public function setMemoryUsage($var) + { + GPBUtil::checkUint64($var); + $this->memory_usage = $var; + + return $this; + } + + /** + * Generated from protobuf field string command = 4; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Generated from protobuf field string command = 4; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * error state + * + * Generated from protobuf field .common.v1.Status status = 5; + * @return \RoadRunner\Common\DTO\V1\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * error state + * + * Generated from protobuf field .common.v1.Status status = 5; + * @param \RoadRunner\Common\DTO\V1\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Common\DTO\V1\Status::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Statuses.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Statuses.php new file mode 100644 index 0000000..09b16fa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Service/DTO/V1/Statuses.php @@ -0,0 +1,59 @@ +service.v1.Statuses + */ +class Statuses extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .service.v1.Status status = 1; + */ + private $status; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Service\DTO\V1\Status>|\Google\Protobuf\Internal\RepeatedField $status + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Service\DTO\V1\GPBMetadata\Service::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .service.v1.Status status = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatus() + { + return $this->status; + } + + /** + * Generated from protobuf field repeated .service.v1.Status status = 1; + * @param array<\RoadRunner\Service\DTO\V1\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatus($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Service\DTO\V1\Status::class); + $this->status = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1/GPBMetadata/Status.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1/GPBMetadata/Status.php new file mode 100644 index 0000000..f5d560b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1/GPBMetadata/Status.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xF4\x01\x0A\x16status/v1/status.proto\x12\x09status.v1\"\x19\x0A\x07Request\x12\x0E\x0A\x06plugin\x18\x01 \x01(\x09\")\x0A\x08Response\x12\x0C\x0A\x04code\x18\x01 \x01(\x03\x12\x0F\x0A\x07message\x18\x02 \x01(\x09B\x80\x01Zstatus.v1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string plugin = 1; + */ + protected $plugin = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plugin + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Status\DTO\V1\GPBMetadata\Status::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string plugin = 1; + * @return string + */ + public function getPlugin() + { + return $this->plugin; + } + + /** + * Generated from protobuf field string plugin = 1; + * @param string $var + * @return $this + */ + public function setPlugin($var) + { + GPBUtil::checkString($var, True); + $this->plugin = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1/Response.php new file mode 100644 index 0000000..84de9d9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1/Response.php @@ -0,0 +1,86 @@ +status.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Status\DTO\V1\GPBMetadata\Status::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * 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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/GPBMetadata/Status.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/GPBMetadata/Status.php new file mode 100644 index 0000000..360982c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/GPBMetadata/Status.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\x92\x02\x0A\x1Bstatus/v1beta1/status.proto\x12\x0Estatus.v1beta1\"\x19\x0A\x07Request\x12\x0E\x0A\x06plugin\x18\x01 \x01(\x09\")\x0A\x08Response\x12\x0C\x0A\x04code\x18\x01 \x01(\x03\x12\x0F\x0A\x07message\x18\x02 \x01(\x09B\x94\x01ZFgithub.com/roadrunner-server/api/v4/build/status/v1beta1;statusV1Beta1\xCA\x02\x1DRoadRunner\\Status\\DTO\\V1BETA1\xE2\x02)RoadRunner\\Status\\DTO\\V1BETA1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/Request.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/Request.php new file mode 100644 index 0000000..efd09c6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/Request.php @@ -0,0 +1,59 @@ +status.v1beta1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string plugin = 1; + */ + protected $plugin = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plugin + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Status\DTO\V1BETA1\GPBMetadata\Status::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string plugin = 1; + * @return string + */ + public function getPlugin() + { + return $this->plugin; + } + + /** + * Generated from protobuf field string plugin = 1; + * @param string $var + * @return $this + */ + public function setPlugin($var) + { + GPBUtil::checkString($var, True); + $this->plugin = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/Response.php new file mode 100644 index 0000000..61992fa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Status/DTO/V1BETA1/Response.php @@ -0,0 +1,86 @@ +status.v1beta1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Status\DTO\V1BETA1\GPBMetadata\Status::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * 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/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/Frame.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/Frame.php new file mode 100644 index 0000000..57f094a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/Frame.php @@ -0,0 +1,59 @@ +temporal.v1.Frame + */ +class Frame extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.v1.Message messages = 1; + */ + private $messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Temporal\DTO\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Temporal\DTO\V1\GPBMetadata\Temporal::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.v1.Message messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Generated from protobuf field repeated .temporal.v1.Message messages = 1; + * @param array<\RoadRunner\Temporal\DTO\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Temporal\DTO\V1\Message::class); + $this->messages = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/GPBMetadata/Temporal.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/GPBMetadata/Temporal.php new file mode 100644 index 0000000..97b2702 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/GPBMetadata/Temporal.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xCA\x07\x0A\x1Atemporal/v1/temporal.proto\x12\x0Btemporal.v1\x1A\$temporal/api/common/v1/message.proto\x1A%temporal/api/failure/v1/message.proto\x1A%temporal/api/history/v1/message.proto\"/\x0A\x05Frame\x12&\x0A\x08messages\x18\x01 \x03(\x0B2\x14.temporal.v1.Message\"\xF6\x01\x0A\x07Message\x12\x0A\x0A\x02id\x18\x01 \x01(\x04\x12\x0F\x0A\x07command\x18\x02 \x01(\x09\x12\x0F\x0A\x07options\x18\x03 \x01(\x0C\x121\x0A\x07failure\x18\x04 \x01(\x0B2 .temporal.api.failure.v1.Failure\x122\x0A\x08payloads\x18\x05 \x01(\x0B2 .temporal.api.common.v1.Payloads\x12.\x0A\x06header\x18\x06 \x01(\x0B2\x1E.temporal.api.common.v1.Header\x12\x16\x0A\x0Ehistory_length\x18\x07 \x01(\x03\x12\x0E\x0A\x06run_id\x18\x08 \x01(\x09\"\xBD\x01\x0A\x0DReplayRequest\x12E\x0A\x12workflow_execution\x18\x01 \x01(\x0B2).temporal.api.common.v1.WorkflowExecution\x12;\x0A\x0Dworkflow_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.WorkflowType\x12\x11\x0A\x09save_path\x18\x03 \x01(\x09\x12\x15\x0A\x0Dlast_event_id\x18\x04 \x01(\x03\"3\x0A\x0EReplayResponse\x12!\x0A\x06status\x18\x01 \x01(\x0B2\x11.common.v1.Status\"y\x0A\x07History\x121\x0A\x07history\x18\x01 \x01(\x0B2 .temporal.api.history.v1.History\x12;\x0A\x0Dworkflow_type\x18\x02 \x01(\x0B2\$.temporal.api.common.v1.WorkflowTypeB\x88\x01Z@github.com/roadrunner-server/api/v4/build/temporal/v1;temporalV1\xCA\x02\x1ARoadRunner\\Temporal\\DTO\\V1\xE2\x02&RoadRunner\\Temporal\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/History.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/History.php new file mode 100644 index 0000000..aa08688 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/History.php @@ -0,0 +1,106 @@ +temporal.v1.History + */ +class History extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + */ + protected $history = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + */ + protected $workflow_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\History\V1\History $history + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Temporal\DTO\V1\GPBMetadata\Temporal::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @return \Temporal\Api\History\V1\History|null + */ + public function getHistory() + { + return $this->history; + } + + public function hasHistory() + { + return isset($this->history); + } + + public function clearHistory() + { + unset($this->history); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @param \Temporal\Api\History\V1\History $var + * @return $this + */ + public function setHistory($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\History::class); + $this->history = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/Message.php new file mode 100644 index 0000000..1addf34 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/Message.php @@ -0,0 +1,336 @@ +temporal.v1.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * unique ID of the message (counter) + * + * Generated from protobuf field uint64 id = 1; + */ + protected $id = 0; + /** + * command name (if any) + * + * Generated from protobuf field string command = 2; + */ + protected $command = ''; + /** + * command options in json format. + * + * Generated from protobuf field bytes options = 3; + */ + protected $options = ''; + /** + * error response. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + */ + protected $failure = null; + /** + * invocation or result payloads. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads payloads = 5; + */ + protected $payloads = null; + /** + * invocation or result payloads. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 6; + */ + protected $header = null; + /** + * workflow history length + * + * Generated from protobuf field int64 history_length = 7; + */ + protected $history_length = 0; + /** + * rr_run id + * + * Generated from protobuf field string run_id = 8; + */ + protected $run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * unique ID of the message (counter) + * @type string $command + * command name (if any) + * @type string $options + * command options in json format. + * @type \Temporal\Api\Failure\V1\Failure $failure + * error response. + * @type \Temporal\Api\Common\V1\Payloads $payloads + * invocation or result payloads. + * @type \Temporal\Api\Common\V1\Header $header + * invocation or result payloads. + * @type int|string $history_length + * workflow history length + * @type string $run_id + * rr_run id + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Temporal\DTO\V1\GPBMetadata\Temporal::initOnce(); + parent::__construct($data); + } + + /** + * unique ID of the message (counter) + * + * Generated from protobuf field uint64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * unique ID of the message (counter) + * + * Generated from protobuf field uint64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint64($var); + $this->id = $var; + + return $this; + } + + /** + * command name (if any) + * + * Generated from protobuf field string command = 2; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * command name (if any) + * + * Generated from protobuf field string command = 2; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * command options in json format. + * + * Generated from protobuf field bytes options = 3; + * @return string + */ + public function getOptions() + { + return $this->options; + } + + /** + * command options in json format. + * + * Generated from protobuf field bytes options = 3; + * @param string $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkString($var, False); + $this->options = $var; + + return $this; + } + + /** + * error response. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * error response. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * invocation or result payloads. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads payloads = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getPayloads() + { + return $this->payloads; + } + + public function hasPayloads() + { + return isset($this->payloads); + } + + public function clearPayloads() + { + unset($this->payloads); + } + + /** + * invocation or result payloads. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads payloads = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setPayloads($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->payloads = $var; + + return $this; + } + + /** + * invocation or result payloads. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 6; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * invocation or result payloads. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 6; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * workflow history length + * + * Generated from protobuf field int64 history_length = 7; + * @return int|string + */ + public function getHistoryLength() + { + return $this->history_length; + } + + /** + * workflow history length + * + * Generated from protobuf field int64 history_length = 7; + * @param int|string $var + * @return $this + */ + public function setHistoryLength($var) + { + GPBUtil::checkInt64($var); + $this->history_length = $var; + + return $this; + } + + /** + * rr_run id + * + * Generated from protobuf field string run_id = 8; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * rr_run id + * + * Generated from protobuf field string run_id = 8; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/ReplayRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/ReplayRequest.php new file mode 100644 index 0000000..7a5a37a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/ReplayRequest.php @@ -0,0 +1,160 @@ +temporal.v1.ReplayRequest + */ +class ReplayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field string save_path = 3; + */ + protected $save_path = ''; + /** + * Generated from protobuf field int64 last_event_id = 4; + */ + protected $last_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type string $save_path + * @type int|string $last_event_id + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Temporal\DTO\V1\GPBMetadata\Temporal::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field string save_path = 3; + * @return string + */ + public function getSavePath() + { + return $this->save_path; + } + + /** + * Generated from protobuf field string save_path = 3; + * @param string $var + * @return $this + */ + public function setSavePath($var) + { + GPBUtil::checkString($var, True); + $this->save_path = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 last_event_id = 4; + * @return int|string + */ + public function getLastEventId() + { + return $this->last_event_id; + } + + /** + * Generated from protobuf field int64 last_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setLastEventId($var) + { + GPBUtil::checkInt64($var); + $this->last_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/ReplayResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/ReplayResponse.php new file mode 100644 index 0000000..e1bd17d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Temporal/DTO/V1/ReplayResponse.php @@ -0,0 +1,71 @@ +temporal.v1.ReplayResponse + */ +class ReplayResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .common.v1.Status status = 1; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \RoadRunner\Common\DTO\V1\Status $status + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Temporal\DTO\V1\GPBMetadata\Temporal::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .common.v1.Status status = 1; + * @return \RoadRunner\Common\DTO\V1\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Generated from protobuf field .common.v1.Status status = 1; + * @param \RoadRunner\Common\DTO\V1\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \RoadRunner\Common\DTO\V1\Status::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/GPBMetadata/Websockets.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/GPBMetadata/Websockets.php new file mode 100644 index 0000000..5435269 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/GPBMetadata/Websockets.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xD4\x02\x0A\x1Ewebsockets/v1/websockets.proto\x12\x0Dwebsockets.v1\";\x0A\x07Message\x12\x0F\x0A\x07command\x18\x01 \x01(\x09\x12\x0E\x0A\x06topics\x18\x02 \x03(\x09\x12\x0F\x0A\x07payload\x18\x03 \x01(\x0C\"3\x0A\x07Request\x12(\x0A\x08messages\x18\x01 \x03(\x0B2\x16.websockets.v1.Message\"\x16\x0A\x08Response\x12\x0A\x0A\x02ok\x18\x01 \x01(\x08B\x90\x01ZDgithub.com/roadrunner-server/api/v4/build/websockets/v1;websocketsV1\xCA\x02\x1CRoadRunner\\Websockets\\DTO\\V1\xE2\x02(RoadRunner\\Websockets\\DTO\\V1\\GPBMetadatab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Message.php new file mode 100644 index 0000000..6cdfe23 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Message.php @@ -0,0 +1,113 @@ +websockets.v1.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string command = 1; + */ + protected $command = ''; + /** + * Generated from protobuf field repeated string topics = 2; + */ + private $topics; + /** + * Generated from protobuf field bytes payload = 3; + */ + protected $payload = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $command + * @type array|\Google\Protobuf\Internal\RepeatedField $topics + * @type string $payload + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Websockets\DTO\V1\GPBMetadata\Websockets::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string command = 1; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Generated from protobuf field string command = 1; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated string topics = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Generated from protobuf field repeated string topics = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->topics = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes payload = 3; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Generated from protobuf field bytes payload = 3; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Request.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Request.php new file mode 100644 index 0000000..135cac4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Request.php @@ -0,0 +1,61 @@ +websockets.v1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .websockets.v1.Message messages = 1; + */ + private $messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\RoadRunner\Websockets\DTO\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Websockets\DTO\V1\GPBMetadata\Websockets::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .websockets.v1.Message messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Generated from protobuf field repeated .websockets.v1.Message messages = 1; + * @param array<\RoadRunner\Websockets\DTO\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\Websockets\DTO\V1\Message::class); + $this->messages = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Response.php new file mode 100644 index 0000000..e53e733 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/RoadRunner/Websockets/DTO/V1/Response.php @@ -0,0 +1,61 @@ +websockets.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool ok = 1; + */ + protected $ok = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $ok + * } + */ + public function __construct($data = NULL) { + \RoadRunner\Websockets\DTO\V1\GPBMetadata\Websockets::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool ok = 1; + * @return bool + */ + public function getOk() + { + return $this->ok; + } + + /** + * Generated from protobuf field bool ok = 1; + * @param bool $var + * @return $this + */ + public function setOk($var) + { + GPBUtil::checkBool($var); + $this->ok = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationCancellation.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationCancellation.php new file mode 100644 index 0000000..929f66f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationCancellation.php @@ -0,0 +1,70 @@ +temporal.api.batch.v1.BatchOperationCancellation + */ +class BatchOperationCancellation extends \Google\Protobuf\Internal\Message +{ + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 1; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $identity + * The identity of the worker/client + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 1; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 1; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationDeletion.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationDeletion.php new file mode 100644 index 0000000..1ef4f3d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationDeletion.php @@ -0,0 +1,69 @@ +temporal.api.batch.v1.BatchOperationDeletion + */ +class BatchOperationDeletion extends \Google\Protobuf\Internal\Message +{ + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 1; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $identity + * The identity of the worker/client + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 1; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 1; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationInfo.php new file mode 100644 index 0000000..3fb9a93 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationInfo.php @@ -0,0 +1,188 @@ +temporal.api.batch.v1.BatchOperationInfo + */ +class BatchOperationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Batch job ID + * + * Generated from protobuf field string job_id = 1; + */ + protected $job_id = ''; + /** + * Batch operation state + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationState state = 2; + */ + protected $state = 0; + /** + * Batch operation start time + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * Batch operation close time + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 4; + */ + protected $close_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $job_id + * Batch job ID + * @type int $state + * Batch operation state + * @type \Google\Protobuf\Timestamp $start_time + * Batch operation start time + * @type \Google\Protobuf\Timestamp $close_time + * Batch operation close time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Batch job ID + * + * Generated from protobuf field string job_id = 1; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Batch job ID + * + * Generated from protobuf field string job_id = 1; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * Batch operation state + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationState state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Batch operation state + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationState state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\BatchOperationState::class); + $this->state = $var; + + return $this; + } + + /** + * Batch operation start time + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @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); + } + + /** + * Batch operation start time + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Batch operation close time + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCloseTime() + { + return $this->close_time; + } + + public function hasCloseTime() + { + return isset($this->close_time); + } + + public function clearCloseTime() + { + unset($this->close_time); + } + + /** + * Batch operation close time + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCloseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->close_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationReset.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationReset.php new file mode 100644 index 0000000..a4e9980 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationReset.php @@ -0,0 +1,181 @@ +temporal.api.batch.v1.BatchOperationReset + */ +class BatchOperationReset extends \Google\Protobuf\Internal\Message +{ + /** + * The identity of the worker/client. + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored. + * + * Generated from protobuf field .temporal.api.common.v1.ResetOptions options = 4; + */ + protected $options = null; + /** + * Reset type (deprecated, use `options`). + * + * Generated from protobuf field .temporal.api.enums.v1.ResetType reset_type = 1; + */ + protected $reset_type = 0; + /** + * History event reapply options (deprecated, use `options`). + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 2; + */ + protected $reset_reapply_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $identity + * The identity of the worker/client. + * @type \Temporal\Api\Common\V1\ResetOptions $options + * Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored. + * @type int $reset_type + * Reset type (deprecated, use `options`). + * @type int $reset_reapply_type + * History event reapply options (deprecated, use `options`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The identity of the worker/client. + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client. + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored. + * + * Generated from protobuf field .temporal.api.common.v1.ResetOptions options = 4; + * @return \Temporal\Api\Common\V1\ResetOptions|null + */ + public function getOptions() + { + return $this->options; + } + + public function hasOptions() + { + return isset($this->options); + } + + public function clearOptions() + { + unset($this->options); + } + + /** + * Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored. + * + * Generated from protobuf field .temporal.api.common.v1.ResetOptions options = 4; + * @param \Temporal\Api\Common\V1\ResetOptions $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\ResetOptions::class); + $this->options = $var; + + return $this; + } + + /** + * Reset type (deprecated, use `options`). + * + * Generated from protobuf field .temporal.api.enums.v1.ResetType reset_type = 1; + * @return int + */ + public function getResetType() + { + return $this->reset_type; + } + + /** + * Reset type (deprecated, use `options`). + * + * Generated from protobuf field .temporal.api.enums.v1.ResetType reset_type = 1; + * @param int $var + * @return $this + */ + public function setResetType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ResetType::class); + $this->reset_type = $var; + + return $this; + } + + /** + * History event reapply options (deprecated, use `options`). + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 2; + * @return int + */ + public function getResetReapplyType() + { + return $this->reset_reapply_type; + } + + /** + * History event reapply options (deprecated, use `options`). + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 2; + * @param int $var + * @return $this + */ + public function setResetReapplyType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ResetReapplyType::class); + $this->reset_reapply_type = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationSignal.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationSignal.php new file mode 100644 index 0000000..e83ec1e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationSignal.php @@ -0,0 +1,195 @@ +temporal.api.batch.v1.BatchOperationSignal + */ +class BatchOperationSignal extends \Google\Protobuf\Internal\Message +{ + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal = 1; + */ + protected $signal = ''; + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 2; + */ + protected $input = null; + /** + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + */ + protected $header = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signal + * The workflow author-defined name of the signal to send to the workflow + * @type \Temporal\Api\Common\V1\Payloads $input + * Serialized value(s) to provide with the signal + * @type \Temporal\Api\Common\V1\Header $header + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * @type string $identity + * The identity of the worker/client + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal = 1; + * @return string + */ + public function getSignal() + { + return $this->signal; + } + + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal = 1; + * @param string $var + * @return $this + */ + public function setSignal($var) + { + GPBUtil::checkString($var, True); + $this->signal = $var; + + return $this; + } + + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationTermination.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationTermination.php new file mode 100644 index 0000000..2573cfc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Batch/V1/BatchOperationTermination.php @@ -0,0 +1,114 @@ +temporal.api.batch.v1.BatchOperationTermination + */ +class BatchOperationTermination extends \Google\Protobuf\Internal\Message +{ + /** + * Serialized value(s) to provide to the termination event + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + */ + protected $details = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $details + * Serialized value(s) to provide to the termination event + * @type string $identity + * The identity of the worker/client + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Serialized value(s) to provide to the termination event + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Serialized value(s) to provide to the termination event + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CancelTimerCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CancelTimerCommandAttributes.php new file mode 100644 index 0000000..25f23df --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CancelTimerCommandAttributes.php @@ -0,0 +1,66 @@ +temporal.api.command.v1.CancelTimerCommandAttributes + */ +class CancelTimerCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The same timer id from the start timer command + * + * Generated from protobuf field string timer_id = 1; + */ + protected $timer_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $timer_id + * The same timer id from the start timer command + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The same timer id from the start timer command + * + * Generated from protobuf field string timer_id = 1; + * @return string + */ + public function getTimerId() + { + return $this->timer_id; + } + + /** + * The same timer id from the start timer command + * + * Generated from protobuf field string timer_id = 1; + * @param string $var + * @return $this + */ + public function setTimerId($var) + { + GPBUtil::checkString($var, True); + $this->timer_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CancelWorkflowExecutionCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CancelWorkflowExecutionCommandAttributes.php new file mode 100644 index 0000000..310eff7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CancelWorkflowExecutionCommandAttributes.php @@ -0,0 +1,69 @@ +temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes + */ +class CancelWorkflowExecutionCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + */ + protected $details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/Command.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/Command.php new file mode 100644 index 0000000..bb4115c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/Command.php @@ -0,0 +1,625 @@ +temporal.api.command.v1.Command + */ +class Command extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.CommandType command_type = 1; + */ + protected $command_type = 0; + /** + * Metadata on the command. This is sometimes carried over to the history event if one is + * created as a result of the command. Most commands won't have this information, and how this + * information is used is dependent upon the interface that reads it. + * Current well-known uses: + * * start_child_workflow_execution_command_attributes - populates + * temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details + * are used by user interfaces to show fixed as-of-start workflow summary and details. + * * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer + * started where the summary is used to identify the timer. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 301; + */ + protected $user_metadata = null; + protected $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $command_type + * @type \Temporal\Api\Sdk\V1\UserMetadata $user_metadata + * Metadata on the command. This is sometimes carried over to the history event if one is + * created as a result of the command. Most commands won't have this information, and how this + * information is used is dependent upon the interface that reads it. + * Current well-known uses: + * * start_child_workflow_execution_command_attributes - populates + * temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details + * are used by user interfaces to show fixed as-of-start workflow summary and details. + * * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer + * started where the summary is used to identify the timer. + * @type \Temporal\Api\Command\V1\ScheduleActivityTaskCommandAttributes $schedule_activity_task_command_attributes + * @type \Temporal\Api\Command\V1\StartTimerCommandAttributes $start_timer_command_attributes + * @type \Temporal\Api\Command\V1\CompleteWorkflowExecutionCommandAttributes $complete_workflow_execution_command_attributes + * @type \Temporal\Api\Command\V1\FailWorkflowExecutionCommandAttributes $fail_workflow_execution_command_attributes + * @type \Temporal\Api\Command\V1\RequestCancelActivityTaskCommandAttributes $request_cancel_activity_task_command_attributes + * @type \Temporal\Api\Command\V1\CancelTimerCommandAttributes $cancel_timer_command_attributes + * @type \Temporal\Api\Command\V1\CancelWorkflowExecutionCommandAttributes $cancel_workflow_execution_command_attributes + * @type \Temporal\Api\Command\V1\RequestCancelExternalWorkflowExecutionCommandAttributes $request_cancel_external_workflow_execution_command_attributes + * @type \Temporal\Api\Command\V1\RecordMarkerCommandAttributes $record_marker_command_attributes + * @type \Temporal\Api\Command\V1\ContinueAsNewWorkflowExecutionCommandAttributes $continue_as_new_workflow_execution_command_attributes + * @type \Temporal\Api\Command\V1\StartChildWorkflowExecutionCommandAttributes $start_child_workflow_execution_command_attributes + * @type \Temporal\Api\Command\V1\SignalExternalWorkflowExecutionCommandAttributes $signal_external_workflow_execution_command_attributes + * @type \Temporal\Api\Command\V1\UpsertWorkflowSearchAttributesCommandAttributes $upsert_workflow_search_attributes_command_attributes + * @type \Temporal\Api\Command\V1\ProtocolMessageCommandAttributes $protocol_message_command_attributes + * @type \Temporal\Api\Command\V1\ModifyWorkflowPropertiesCommandAttributes $modify_workflow_properties_command_attributes + * 16 is available for use - it was used as part of a prototype that never made it into a release + * @type \Temporal\Api\Command\V1\ScheduleNexusOperationCommandAttributes $schedule_nexus_operation_command_attributes + * @type \Temporal\Api\Command\V1\RequestCancelNexusOperationCommandAttributes $request_cancel_nexus_operation_command_attributes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.CommandType command_type = 1; + * @return int + */ + public function getCommandType() + { + return $this->command_type; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.CommandType command_type = 1; + * @param int $var + * @return $this + */ + public function setCommandType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\CommandType::class); + $this->command_type = $var; + + return $this; + } + + /** + * Metadata on the command. This is sometimes carried over to the history event if one is + * created as a result of the command. Most commands won't have this information, and how this + * information is used is dependent upon the interface that reads it. + * Current well-known uses: + * * start_child_workflow_execution_command_attributes - populates + * temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details + * are used by user interfaces to show fixed as-of-start workflow summary and details. + * * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer + * started where the summary is used to identify the timer. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 301; + * @return \Temporal\Api\Sdk\V1\UserMetadata|null + */ + public function getUserMetadata() + { + return $this->user_metadata; + } + + public function hasUserMetadata() + { + return isset($this->user_metadata); + } + + public function clearUserMetadata() + { + unset($this->user_metadata); + } + + /** + * Metadata on the command. This is sometimes carried over to the history event if one is + * created as a result of the command. Most commands won't have this information, and how this + * information is used is dependent upon the interface that reads it. + * Current well-known uses: + * * start_child_workflow_execution_command_attributes - populates + * temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details + * are used by user interfaces to show fixed as-of-start workflow summary and details. + * * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer + * started where the summary is used to identify the timer. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 301; + * @param \Temporal\Api\Sdk\V1\UserMetadata $var + * @return $this + */ + public function setUserMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\UserMetadata::class); + $this->user_metadata = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ScheduleActivityTaskCommandAttributes schedule_activity_task_command_attributes = 2; + * @return \Temporal\Api\Command\V1\ScheduleActivityTaskCommandAttributes|null + */ + public function getScheduleActivityTaskCommandAttributes() + { + return $this->readOneof(2); + } + + public function hasScheduleActivityTaskCommandAttributes() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ScheduleActivityTaskCommandAttributes schedule_activity_task_command_attributes = 2; + * @param \Temporal\Api\Command\V1\ScheduleActivityTaskCommandAttributes $var + * @return $this + */ + public function setScheduleActivityTaskCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\ScheduleActivityTaskCommandAttributes::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.StartTimerCommandAttributes start_timer_command_attributes = 3; + * @return \Temporal\Api\Command\V1\StartTimerCommandAttributes|null + */ + public function getStartTimerCommandAttributes() + { + return $this->readOneof(3); + } + + public function hasStartTimerCommandAttributes() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.StartTimerCommandAttributes start_timer_command_attributes = 3; + * @param \Temporal\Api\Command\V1\StartTimerCommandAttributes $var + * @return $this + */ + public function setStartTimerCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\StartTimerCommandAttributes::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes complete_workflow_execution_command_attributes = 4; + * @return \Temporal\Api\Command\V1\CompleteWorkflowExecutionCommandAttributes|null + */ + public function getCompleteWorkflowExecutionCommandAttributes() + { + return $this->readOneof(4); + } + + public function hasCompleteWorkflowExecutionCommandAttributes() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes complete_workflow_execution_command_attributes = 4; + * @param \Temporal\Api\Command\V1\CompleteWorkflowExecutionCommandAttributes $var + * @return $this + */ + public function setCompleteWorkflowExecutionCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\CompleteWorkflowExecutionCommandAttributes::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.FailWorkflowExecutionCommandAttributes fail_workflow_execution_command_attributes = 5; + * @return \Temporal\Api\Command\V1\FailWorkflowExecutionCommandAttributes|null + */ + public function getFailWorkflowExecutionCommandAttributes() + { + return $this->readOneof(5); + } + + public function hasFailWorkflowExecutionCommandAttributes() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.FailWorkflowExecutionCommandAttributes fail_workflow_execution_command_attributes = 5; + * @param \Temporal\Api\Command\V1\FailWorkflowExecutionCommandAttributes $var + * @return $this + */ + public function setFailWorkflowExecutionCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\FailWorkflowExecutionCommandAttributes::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes request_cancel_activity_task_command_attributes = 6; + * @return \Temporal\Api\Command\V1\RequestCancelActivityTaskCommandAttributes|null + */ + public function getRequestCancelActivityTaskCommandAttributes() + { + return $this->readOneof(6); + } + + public function hasRequestCancelActivityTaskCommandAttributes() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes request_cancel_activity_task_command_attributes = 6; + * @param \Temporal\Api\Command\V1\RequestCancelActivityTaskCommandAttributes $var + * @return $this + */ + public function setRequestCancelActivityTaskCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\RequestCancelActivityTaskCommandAttributes::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.CancelTimerCommandAttributes cancel_timer_command_attributes = 7; + * @return \Temporal\Api\Command\V1\CancelTimerCommandAttributes|null + */ + public function getCancelTimerCommandAttributes() + { + return $this->readOneof(7); + } + + public function hasCancelTimerCommandAttributes() + { + return $this->hasOneof(7); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.CancelTimerCommandAttributes cancel_timer_command_attributes = 7; + * @param \Temporal\Api\Command\V1\CancelTimerCommandAttributes $var + * @return $this + */ + public function setCancelTimerCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\CancelTimerCommandAttributes::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes cancel_workflow_execution_command_attributes = 8; + * @return \Temporal\Api\Command\V1\CancelWorkflowExecutionCommandAttributes|null + */ + public function getCancelWorkflowExecutionCommandAttributes() + { + return $this->readOneof(8); + } + + public function hasCancelWorkflowExecutionCommandAttributes() + { + return $this->hasOneof(8); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes cancel_workflow_execution_command_attributes = 8; + * @param \Temporal\Api\Command\V1\CancelWorkflowExecutionCommandAttributes $var + * @return $this + */ + public function setCancelWorkflowExecutionCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\CancelWorkflowExecutionCommandAttributes::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes request_cancel_external_workflow_execution_command_attributes = 9; + * @return \Temporal\Api\Command\V1\RequestCancelExternalWorkflowExecutionCommandAttributes|null + */ + public function getRequestCancelExternalWorkflowExecutionCommandAttributes() + { + return $this->readOneof(9); + } + + public function hasRequestCancelExternalWorkflowExecutionCommandAttributes() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes request_cancel_external_workflow_execution_command_attributes = 9; + * @param \Temporal\Api\Command\V1\RequestCancelExternalWorkflowExecutionCommandAttributes $var + * @return $this + */ + public function setRequestCancelExternalWorkflowExecutionCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\RequestCancelExternalWorkflowExecutionCommandAttributes::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RecordMarkerCommandAttributes record_marker_command_attributes = 10; + * @return \Temporal\Api\Command\V1\RecordMarkerCommandAttributes|null + */ + public function getRecordMarkerCommandAttributes() + { + return $this->readOneof(10); + } + + public function hasRecordMarkerCommandAttributes() + { + return $this->hasOneof(10); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RecordMarkerCommandAttributes record_marker_command_attributes = 10; + * @param \Temporal\Api\Command\V1\RecordMarkerCommandAttributes $var + * @return $this + */ + public function setRecordMarkerCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\RecordMarkerCommandAttributes::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes continue_as_new_workflow_execution_command_attributes = 11; + * @return \Temporal\Api\Command\V1\ContinueAsNewWorkflowExecutionCommandAttributes|null + */ + public function getContinueAsNewWorkflowExecutionCommandAttributes() + { + return $this->readOneof(11); + } + + public function hasContinueAsNewWorkflowExecutionCommandAttributes() + { + return $this->hasOneof(11); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes continue_as_new_workflow_execution_command_attributes = 11; + * @param \Temporal\Api\Command\V1\ContinueAsNewWorkflowExecutionCommandAttributes $var + * @return $this + */ + public function setContinueAsNewWorkflowExecutionCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\ContinueAsNewWorkflowExecutionCommandAttributes::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes start_child_workflow_execution_command_attributes = 12; + * @return \Temporal\Api\Command\V1\StartChildWorkflowExecutionCommandAttributes|null + */ + public function getStartChildWorkflowExecutionCommandAttributes() + { + return $this->readOneof(12); + } + + public function hasStartChildWorkflowExecutionCommandAttributes() + { + return $this->hasOneof(12); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes start_child_workflow_execution_command_attributes = 12; + * @param \Temporal\Api\Command\V1\StartChildWorkflowExecutionCommandAttributes $var + * @return $this + */ + public function setStartChildWorkflowExecutionCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\StartChildWorkflowExecutionCommandAttributes::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes signal_external_workflow_execution_command_attributes = 13; + * @return \Temporal\Api\Command\V1\SignalExternalWorkflowExecutionCommandAttributes|null + */ + public function getSignalExternalWorkflowExecutionCommandAttributes() + { + return $this->readOneof(13); + } + + public function hasSignalExternalWorkflowExecutionCommandAttributes() + { + return $this->hasOneof(13); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes signal_external_workflow_execution_command_attributes = 13; + * @param \Temporal\Api\Command\V1\SignalExternalWorkflowExecutionCommandAttributes $var + * @return $this + */ + public function setSignalExternalWorkflowExecutionCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\SignalExternalWorkflowExecutionCommandAttributes::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes upsert_workflow_search_attributes_command_attributes = 14; + * @return \Temporal\Api\Command\V1\UpsertWorkflowSearchAttributesCommandAttributes|null + */ + public function getUpsertWorkflowSearchAttributesCommandAttributes() + { + return $this->readOneof(14); + } + + public function hasUpsertWorkflowSearchAttributesCommandAttributes() + { + return $this->hasOneof(14); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes upsert_workflow_search_attributes_command_attributes = 14; + * @param \Temporal\Api\Command\V1\UpsertWorkflowSearchAttributesCommandAttributes $var + * @return $this + */ + public function setUpsertWorkflowSearchAttributesCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\UpsertWorkflowSearchAttributesCommandAttributes::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ProtocolMessageCommandAttributes protocol_message_command_attributes = 15; + * @return \Temporal\Api\Command\V1\ProtocolMessageCommandAttributes|null + */ + public function getProtocolMessageCommandAttributes() + { + return $this->readOneof(15); + } + + public function hasProtocolMessageCommandAttributes() + { + return $this->hasOneof(15); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ProtocolMessageCommandAttributes protocol_message_command_attributes = 15; + * @param \Temporal\Api\Command\V1\ProtocolMessageCommandAttributes $var + * @return $this + */ + public function setProtocolMessageCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\ProtocolMessageCommandAttributes::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * 16 is available for use - it was used as part of a prototype that never made it into a release + * + * Generated from protobuf field .temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes modify_workflow_properties_command_attributes = 17; + * @return \Temporal\Api\Command\V1\ModifyWorkflowPropertiesCommandAttributes|null + */ + public function getModifyWorkflowPropertiesCommandAttributes() + { + return $this->readOneof(17); + } + + public function hasModifyWorkflowPropertiesCommandAttributes() + { + return $this->hasOneof(17); + } + + /** + * 16 is available for use - it was used as part of a prototype that never made it into a release + * + * Generated from protobuf field .temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes modify_workflow_properties_command_attributes = 17; + * @param \Temporal\Api\Command\V1\ModifyWorkflowPropertiesCommandAttributes $var + * @return $this + */ + public function setModifyWorkflowPropertiesCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\ModifyWorkflowPropertiesCommandAttributes::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ScheduleNexusOperationCommandAttributes schedule_nexus_operation_command_attributes = 18; + * @return \Temporal\Api\Command\V1\ScheduleNexusOperationCommandAttributes|null + */ + public function getScheduleNexusOperationCommandAttributes() + { + return $this->readOneof(18); + } + + public function hasScheduleNexusOperationCommandAttributes() + { + return $this->hasOneof(18); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.ScheduleNexusOperationCommandAttributes schedule_nexus_operation_command_attributes = 18; + * @param \Temporal\Api\Command\V1\ScheduleNexusOperationCommandAttributes $var + * @return $this + */ + public function setScheduleNexusOperationCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\ScheduleNexusOperationCommandAttributes::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes request_cancel_nexus_operation_command_attributes = 19; + * @return \Temporal\Api\Command\V1\RequestCancelNexusOperationCommandAttributes|null + */ + public function getRequestCancelNexusOperationCommandAttributes() + { + return $this->readOneof(19); + } + + public function hasRequestCancelNexusOperationCommandAttributes() + { + return $this->hasOneof(19); + } + + /** + * Generated from protobuf field .temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes request_cancel_nexus_operation_command_attributes = 19; + * @param \Temporal\Api\Command\V1\RequestCancelNexusOperationCommandAttributes $var + * @return $this + */ + public function setRequestCancelNexusOperationCommandAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Command\V1\RequestCancelNexusOperationCommandAttributes::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * @return string + */ + public function getAttributes() + { + return $this->whichOneof("attributes"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CompleteWorkflowExecutionCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CompleteWorkflowExecutionCommandAttributes.php new file mode 100644 index 0000000..7834f4a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/CompleteWorkflowExecutionCommandAttributes.php @@ -0,0 +1,69 @@ +temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes + */ +class CompleteWorkflowExecutionCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $result + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ContinueAsNewWorkflowExecutionCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ContinueAsNewWorkflowExecutionCommandAttributes.php new file mode 100644 index 0000000..f5e4e63 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ContinueAsNewWorkflowExecutionCommandAttributes.php @@ -0,0 +1,617 @@ +temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes + */ +class ContinueAsNewWorkflowExecutionCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 1; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + */ + protected $task_queue = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 3; + */ + protected $input = null; + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 4; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 5; + */ + protected $workflow_task_timeout = null; + /** + * How long the workflow start will be delayed - not really a "backoff" in the traditional sense. + * + * Generated from protobuf field .google.protobuf.Duration backoff_start_interval = 6; + */ + protected $backoff_start_interval = null; + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 7; + */ + protected $retry_policy = null; + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 8; + */ + protected $initiator = 0; + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 9; + */ + protected $failure = null; + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 10; + */ + protected $last_completion_result = null; + /** + * Should be removed. Not necessarily unused but unclear and not exposed by SDKs. + * + * Generated from protobuf field string cron_schedule = 11; + */ + protected $cron_schedule = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 12; + */ + protected $header = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 13; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 14; + */ + protected $search_attributes = null; + /** + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * + * Generated from protobuf field bool inherit_build_id = 15; + */ + protected $inherit_build_id = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Payloads $input + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run. + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task. + * @type \Google\Protobuf\Duration $backoff_start_interval + * How long the workflow start will be delayed - not really a "backoff" in the traditional sense. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * @type int $initiator + * Should be removed + * @type \Temporal\Api\Failure\V1\Failure $failure + * Should be removed + * @type \Temporal\Api\Common\V1\Payloads $last_completion_result + * Should be removed + * @type string $cron_schedule + * Should be removed. Not necessarily unused but unclear and not exposed by SDKs. + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type bool $inherit_build_id + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 1; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 1; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 3; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 3; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * How long the workflow start will be delayed - not really a "backoff" in the traditional sense. + * + * Generated from protobuf field .google.protobuf.Duration backoff_start_interval = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getBackoffStartInterval() + { + return $this->backoff_start_interval; + } + + public function hasBackoffStartInterval() + { + return isset($this->backoff_start_interval); + } + + public function clearBackoffStartInterval() + { + unset($this->backoff_start_interval); + } + + /** + * How long the workflow start will be delayed - not really a "backoff" in the traditional sense. + * + * Generated from protobuf field .google.protobuf.Duration backoff_start_interval = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBackoffStartInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->backoff_start_interval = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 7; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 7; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 8; + * @return int + */ + public function getInitiator() + { + return $this->initiator; + } + + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 8; + * @param int $var + * @return $this + */ + public function setInitiator($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ContinueAsNewInitiator::class); + $this->initiator = $var; + + return $this; + } + + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 9; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 9; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 10; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastCompletionResult() + { + return $this->last_completion_result; + } + + public function hasLastCompletionResult() + { + return isset($this->last_completion_result); + } + + public function clearLastCompletionResult() + { + unset($this->last_completion_result); + } + + /** + * Should be removed + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 10; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastCompletionResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_completion_result = $var; + + return $this; + } + + /** + * Should be removed. Not necessarily unused but unclear and not exposed by SDKs. + * + * Generated from protobuf field string cron_schedule = 11; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * Should be removed. Not necessarily unused but unclear and not exposed by SDKs. + * + * Generated from protobuf field string cron_schedule = 11; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 12; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 12; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 13; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 13; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 14; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 14; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * + * Generated from protobuf field bool inherit_build_id = 15; + * @return bool + */ + public function getInheritBuildId() + { + return $this->inherit_build_id; + } + + /** + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * + * Generated from protobuf field bool inherit_build_id = 15; + * @param bool $var + * @return $this + */ + public function setInheritBuildId($var) + { + GPBUtil::checkBool($var); + $this->inherit_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/FailWorkflowExecutionCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/FailWorkflowExecutionCommandAttributes.php new file mode 100644 index 0000000..1e394ce --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/FailWorkflowExecutionCommandAttributes.php @@ -0,0 +1,69 @@ +temporal.api.command.v1.FailWorkflowExecutionCommandAttributes + */ +class FailWorkflowExecutionCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Failure\V1\Failure $failure + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ModifyWorkflowPropertiesCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ModifyWorkflowPropertiesCommandAttributes.php new file mode 100644 index 0000000..7133246 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ModifyWorkflowPropertiesCommandAttributes.php @@ -0,0 +1,84 @@ +temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes + */ +class ModifyWorkflowPropertiesCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 1; + */ + protected $upserted_memo = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Memo $upserted_memo + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 1; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getUpsertedMemo() + { + return $this->upserted_memo; + } + + public function hasUpsertedMemo() + { + return isset($this->upserted_memo); + } + + public function clearUpsertedMemo() + { + unset($this->upserted_memo); + } + + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 1; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setUpsertedMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->upserted_memo = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ProtocolMessageCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ProtocolMessageCommandAttributes.php new file mode 100644 index 0000000..3e96dd7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ProtocolMessageCommandAttributes.php @@ -0,0 +1,66 @@ +temporal.api.command.v1.ProtocolMessageCommandAttributes + */ +class ProtocolMessageCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The message ID of the message to which this command is a pointer. + * + * Generated from protobuf field string message_id = 1; + */ + protected $message_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message_id + * The message ID of the message to which this command is a pointer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The message ID of the message to which this command is a pointer. + * + * Generated from protobuf field string message_id = 1; + * @return string + */ + public function getMessageId() + { + return $this->message_id; + } + + /** + * The message ID of the message to which this command is a pointer. + * + * Generated from protobuf field string message_id = 1; + * @param string $var + * @return $this + */ + public function setMessageId($var) + { + GPBUtil::checkString($var, True); + $this->message_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RecordMarkerCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RecordMarkerCommandAttributes.php new file mode 100644 index 0000000..a84280b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RecordMarkerCommandAttributes.php @@ -0,0 +1,160 @@ +temporal.api.command.v1.RecordMarkerCommandAttributes + */ +class RecordMarkerCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string marker_name = 1; + */ + protected $marker_name = ''; + /** + * Generated from protobuf field map details = 2; + */ + private $details; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + */ + protected $header = null; + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $marker_name + * @type array|\Google\Protobuf\Internal\MapField $details + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Failure\V1\Failure $failure + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string marker_name = 1; + * @return string + */ + public function getMarkerName() + { + return $this->marker_name; + } + + /** + * Generated from protobuf field string marker_name = 1; + * @param string $var + * @return $this + */ + public function setMarkerName($var) + { + GPBUtil::checkString($var, True); + $this->marker_name = $var; + + return $this; + } + + /** + * Generated from protobuf field map details = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Generated from protobuf field map details = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $arr; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelActivityTaskCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelActivityTaskCommandAttributes.php new file mode 100644 index 0000000..ec74bfe --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelActivityTaskCommandAttributes.php @@ -0,0 +1,66 @@ +temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes + */ +class RequestCancelActivityTaskCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The `ACTIVITY_TASK_SCHEDULED` event id for the activity being cancelled. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The `ACTIVITY_TASK_SCHEDULED` event id for the activity being cancelled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The `ACTIVITY_TASK_SCHEDULED` event id for the activity being cancelled. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The `ACTIVITY_TASK_SCHEDULED` event id for the activity being cancelled. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelExternalWorkflowExecutionCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelExternalWorkflowExecutionCommandAttributes.php new file mode 100644 index 0000000..6107c2d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelExternalWorkflowExecutionCommandAttributes.php @@ -0,0 +1,223 @@ +temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes + */ +class RequestCancelExternalWorkflowExecutionCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field string run_id = 3; + */ + protected $run_id = ''; + /** + * Deprecated. + * + * Generated from protobuf field string control = 4; + */ + protected $control = ''; + /** + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * + * Generated from protobuf field bool child_workflow_only = 5; + */ + protected $child_workflow_only = false; + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $workflow_id + * @type string $run_id + * @type string $control + * Deprecated. + * @type bool $child_workflow_only + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * @type string $reason + * Reason for requesting the cancellation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string run_id = 3; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Generated from protobuf field string run_id = 3; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * Deprecated. + * + * Generated from protobuf field string control = 4; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated. + * + * Generated from protobuf field string control = 4; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * + * Generated from protobuf field bool child_workflow_only = 5; + * @return bool + */ + public function getChildWorkflowOnly() + { + return $this->child_workflow_only; + } + + /** + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * + * Generated from protobuf field bool child_workflow_only = 5; + * @param bool $var + * @return $this + */ + public function setChildWorkflowOnly($var) + { + GPBUtil::checkBool($var); + $this->child_workflow_only = $var; + + return $this; + } + + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelNexusOperationCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelNexusOperationCommandAttributes.php new file mode 100644 index 0000000..626d325 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/RequestCancelNexusOperationCommandAttributes.php @@ -0,0 +1,70 @@ +temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes + */ +class RequestCancelNexusOperationCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The `NEXUS_OPERATION_SCHEDULED` event ID (a unique identifier) for the operation to be canceled. + * The operation may ignore cancellation and end up with any completion state. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The `NEXUS_OPERATION_SCHEDULED` event ID (a unique identifier) for the operation to be canceled. + * The operation may ignore cancellation and end up with any completion state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The `NEXUS_OPERATION_SCHEDULED` event ID (a unique identifier) for the operation to be canceled. + * The operation may ignore cancellation and end up with any completion state. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The `NEXUS_OPERATION_SCHEDULED` event ID (a unique identifier) for the operation to be canceled. + * The operation may ignore cancellation and end up with any completion state. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ScheduleActivityTaskCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ScheduleActivityTaskCommandAttributes.php new file mode 100644 index 0000000..26f8099 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ScheduleActivityTaskCommandAttributes.php @@ -0,0 +1,575 @@ +temporal.api.command.v1.ScheduleActivityTaskCommandAttributes + */ +class ScheduleActivityTaskCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string activity_id = 1; + */ + protected $activity_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + */ + protected $activity_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + */ + protected $task_queue = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + */ + protected $header = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + */ + protected $input = null; + /** + * Indicates how long the caller is willing to wait for activity completion. The "schedule" time + * is when the activity is initially scheduled, not when the most recent retry is scheduled. + * Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be + * specified. When not specified, defaults to the workflow execution timeout. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 7; + */ + protected $schedule_to_close_timeout = null; + /** + * Limits the time an activity task can stay in a task queue before a worker picks it up. The + * "schedule" time is when the most recent retry is scheduled. This timeout should usually not + * be set: it's useful in specific scenarios like worker-specific task queues. This timeout is + * always non retryable, as all a retry would achieve is to put it back into the same queue. + * Defaults to `schedule_to_close_timeout` or workflow execution timeout if that is not + * specified. More info: + * https://docs.temporal.io/docs/content/what-is-a-schedule-to-start-timeout/ + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 8; + */ + protected $schedule_to_start_timeout = null; + /** + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 9; + */ + protected $start_to_close_timeout = null; + /** + * Maximum permitted time between successful worker heartbeats. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 10; + */ + protected $heartbeat_timeout = null; + /** + * Activities are provided by a default retry policy which is controlled through the service's + * dynamic configuration. Retries will be attempted until `schedule_to_close_timeout` has + * elapsed. To disable retries set retry_policy.maximum_attempts to 1. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 11; + */ + protected $retry_policy = null; + /** + * Request to start the activity directly bypassing matching service and worker polling + * The slot for executing the activity should be reserved when setting this field to true. + * + * Generated from protobuf field bool request_eager_execution = 12; + */ + protected $request_eager_execution = false; + /** + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * + * Generated from protobuf field bool use_workflow_build_id = 13; + */ + protected $use_workflow_build_id = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $activity_id + * @type \Temporal\Api\Common\V1\ActivityType $activity_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Common\V1\Payloads $input + * @type \Google\Protobuf\Duration $schedule_to_close_timeout + * Indicates how long the caller is willing to wait for activity completion. The "schedule" time + * is when the activity is initially scheduled, not when the most recent retry is scheduled. + * Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be + * specified. When not specified, defaults to the workflow execution timeout. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $schedule_to_start_timeout + * Limits the time an activity task can stay in a task queue before a worker picks it up. The + * "schedule" time is when the most recent retry is scheduled. This timeout should usually not + * be set: it's useful in specific scenarios like worker-specific task queues. This timeout is + * always non retryable, as all a retry would achieve is to put it back into the same queue. + * Defaults to `schedule_to_close_timeout` or workflow execution timeout if that is not + * specified. More info: + * https://docs.temporal.io/docs/content/what-is-a-schedule-to-start-timeout/ + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $start_to_close_timeout + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $heartbeat_timeout + * Maximum permitted time between successful worker heartbeats. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * Activities are provided by a default retry policy which is controlled through the service's + * dynamic configuration. Retries will be attempted until `schedule_to_close_timeout` has + * elapsed. To disable retries set retry_policy.maximum_attempts to 1. + * @type bool $request_eager_execution + * Request to start the activity directly bypassing matching service and worker polling + * The slot for executing the activity should be reserved when setting this field to true. + * @type bool $use_workflow_build_id + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string activity_id = 1; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * Generated from protobuf field string activity_id = 1; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + * @return \Temporal\Api\Common\V1\ActivityType|null + */ + public function getActivityType() + { + return $this->activity_type; + } + + public function hasActivityType() + { + return isset($this->activity_type); + } + + public function clearActivityType() + { + unset($this->activity_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + * @param \Temporal\Api\Common\V1\ActivityType $var + * @return $this + */ + public function setActivityType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\ActivityType::class); + $this->activity_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Indicates how long the caller is willing to wait for activity completion. The "schedule" time + * is when the activity is initially scheduled, not when the most recent retry is scheduled. + * Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be + * specified. When not specified, defaults to the workflow execution timeout. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToCloseTimeout() + { + return $this->schedule_to_close_timeout; + } + + public function hasScheduleToCloseTimeout() + { + return isset($this->schedule_to_close_timeout); + } + + public function clearScheduleToCloseTimeout() + { + unset($this->schedule_to_close_timeout); + } + + /** + * Indicates how long the caller is willing to wait for activity completion. The "schedule" time + * is when the activity is initially scheduled, not when the most recent retry is scheduled. + * Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be + * specified. When not specified, defaults to the workflow execution timeout. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_close_timeout = $var; + + return $this; + } + + /** + * Limits the time an activity task can stay in a task queue before a worker picks it up. The + * "schedule" time is when the most recent retry is scheduled. This timeout should usually not + * be set: it's useful in specific scenarios like worker-specific task queues. This timeout is + * always non retryable, as all a retry would achieve is to put it back into the same queue. + * Defaults to `schedule_to_close_timeout` or workflow execution timeout if that is not + * specified. More info: + * https://docs.temporal.io/docs/content/what-is-a-schedule-to-start-timeout/ + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToStartTimeout() + { + return $this->schedule_to_start_timeout; + } + + public function hasScheduleToStartTimeout() + { + return isset($this->schedule_to_start_timeout); + } + + public function clearScheduleToStartTimeout() + { + unset($this->schedule_to_start_timeout); + } + + /** + * Limits the time an activity task can stay in a task queue before a worker picks it up. The + * "schedule" time is when the most recent retry is scheduled. This timeout should usually not + * be set: it's useful in specific scenarios like worker-specific task queues. This timeout is + * always non retryable, as all a retry would achieve is to put it back into the same queue. + * Defaults to `schedule_to_close_timeout` or workflow execution timeout if that is not + * specified. More info: + * https://docs.temporal.io/docs/content/what-is-a-schedule-to-start-timeout/ + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToStartTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_start_timeout = $var; + + return $this; + } + + /** + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getStartToCloseTimeout() + { + return $this->start_to_close_timeout; + } + + public function hasStartToCloseTimeout() + { + return isset($this->start_to_close_timeout); + } + + public function clearStartToCloseTimeout() + { + unset($this->start_to_close_timeout); + } + + /** + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_to_close_timeout = $var; + + return $this; + } + + /** + * Maximum permitted time between successful worker heartbeats. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getHeartbeatTimeout() + { + return $this->heartbeat_timeout; + } + + public function hasHeartbeatTimeout() + { + return isset($this->heartbeat_timeout); + } + + public function clearHeartbeatTimeout() + { + unset($this->heartbeat_timeout); + } + + /** + * Maximum permitted time between successful worker heartbeats. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setHeartbeatTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->heartbeat_timeout = $var; + + return $this; + } + + /** + * Activities are provided by a default retry policy which is controlled through the service's + * dynamic configuration. Retries will be attempted until `schedule_to_close_timeout` has + * elapsed. To disable retries set retry_policy.maximum_attempts to 1. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 11; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Activities are provided by a default retry policy which is controlled through the service's + * dynamic configuration. Retries will be attempted until `schedule_to_close_timeout` has + * elapsed. To disable retries set retry_policy.maximum_attempts to 1. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 11; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * Request to start the activity directly bypassing matching service and worker polling + * The slot for executing the activity should be reserved when setting this field to true. + * + * Generated from protobuf field bool request_eager_execution = 12; + * @return bool + */ + public function getRequestEagerExecution() + { + return $this->request_eager_execution; + } + + /** + * Request to start the activity directly bypassing matching service and worker polling + * The slot for executing the activity should be reserved when setting this field to true. + * + * Generated from protobuf field bool request_eager_execution = 12; + * @param bool $var + * @return $this + */ + public function setRequestEagerExecution($var) + { + GPBUtil::checkBool($var); + $this->request_eager_execution = $var; + + return $this; + } + + /** + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * + * Generated from protobuf field bool use_workflow_build_id = 13; + * @return bool + */ + public function getUseWorkflowBuildId() + { + return $this->use_workflow_build_id; + } + + /** + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * + * Generated from protobuf field bool use_workflow_build_id = 13; + * @param bool $var + * @return $this + */ + public function setUseWorkflowBuildId($var) + { + GPBUtil::checkBool($var); + $this->use_workflow_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ScheduleNexusOperationCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ScheduleNexusOperationCommandAttributes.php new file mode 100644 index 0000000..8335e85 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/ScheduleNexusOperationCommandAttributes.php @@ -0,0 +1,300 @@ +temporal.api.command.v1.ScheduleNexusOperationCommandAttributes + */ +class ScheduleNexusOperationCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Endpoint name, must exist in the endpoint registry or this command will fail. + * + * Generated from protobuf field string endpoint = 1; + */ + protected $endpoint = ''; + /** + * Service name. + * + * Generated from protobuf field string service = 2; + */ + protected $service = ''; + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + */ + protected $operation = ''; + /** + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload sent in this command. + * + * Generated from protobuf field .temporal.api.common.v1.Payload input = 4; + */ + protected $input = null; + /** + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + */ + protected $schedule_to_close_timeout = null; + /** + * Header to attach to the Nexus request. + * Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and + * transmitted to external services as-is. + * This is useful for propagating tracing information. + * Note these headers are not the same as Temporal headers on internal activities and child workflows, these are + * transmitted to Nexus operations that may be external and are not traditional payloads. + * + * Generated from protobuf field map nexus_header = 6; + */ + private $nexus_header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $endpoint + * Endpoint name, must exist in the endpoint registry or this command will fail. + * @type string $service + * Service name. + * @type string $operation + * Operation name. + * @type \Temporal\Api\Common\V1\Payload $input + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload sent in this command. + * @type \Google\Protobuf\Duration $schedule_to_close_timeout + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type array|\Google\Protobuf\Internal\MapField $nexus_header + * Header to attach to the Nexus request. + * Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and + * transmitted to external services as-is. + * This is useful for propagating tracing information. + * Note these headers are not the same as Temporal headers on internal activities and child workflows, these are + * transmitted to Nexus operations that may be external and are not traditional payloads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Endpoint name, must exist in the endpoint registry or this command will fail. + * + * Generated from protobuf field string endpoint = 1; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Endpoint name, must exist in the endpoint registry or this command will fail. + * + * Generated from protobuf field string endpoint = 1; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Service name. + * + * Generated from protobuf field string service = 2; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Service name. + * + * 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; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload sent in this command. + * + * Generated from protobuf field .temporal.api.common.v1.Payload input = 4; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload sent in this command. + * + * Generated from protobuf field .temporal.api.common.v1.Payload input = 4; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->input = $var; + + return $this; + } + + /** + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToCloseTimeout() + { + return $this->schedule_to_close_timeout; + } + + public function hasScheduleToCloseTimeout() + { + return isset($this->schedule_to_close_timeout); + } + + public function clearScheduleToCloseTimeout() + { + unset($this->schedule_to_close_timeout); + } + + /** + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_close_timeout = $var; + + return $this; + } + + /** + * Header to attach to the Nexus request. + * Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and + * transmitted to external services as-is. + * This is useful for propagating tracing information. + * Note these headers are not the same as Temporal headers on internal activities and child workflows, these are + * transmitted to Nexus operations that may be external and are not traditional payloads. + * + * Generated from protobuf field map nexus_header = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNexusHeader() + { + return $this->nexus_header; + } + + /** + * Header to attach to the Nexus request. + * Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and + * transmitted to external services as-is. + * This is useful for propagating tracing information. + * Note these headers are not the same as Temporal headers on internal activities and child workflows, these are + * transmitted to Nexus operations that may be external and are not traditional payloads. + * + * Generated from protobuf field map nexus_header = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNexusHeader($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->nexus_header = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/SignalExternalWorkflowExecutionCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/SignalExternalWorkflowExecutionCommandAttributes.php new file mode 100644 index 0000000..da610b0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/SignalExternalWorkflowExecutionCommandAttributes.php @@ -0,0 +1,298 @@ +temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes + */ +class SignalExternalWorkflowExecutionCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + */ + protected $execution = null; + /** + * The workflow author-defined name of the signal to send to the workflow. + * + * Generated from protobuf field string signal_name = 3; + */ + protected $signal_name = ''; + /** + * Serialized value(s) to provide with the signal. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + */ + protected $input = null; + /** + * Deprecated + * + * Generated from protobuf field string control = 5; + */ + protected $control = ''; + /** + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * + * Generated from protobuf field bool child_workflow_only = 6; + */ + protected $child_workflow_only = false; + /** + * Headers that are passed by the workflow that is sending a signal to the external + * workflow that is receiving this signal. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 7; + */ + protected $header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $execution + * @type string $signal_name + * The workflow author-defined name of the signal to send to the workflow. + * @type \Temporal\Api\Common\V1\Payloads $input + * Serialized value(s) to provide with the signal. + * @type string $control + * Deprecated + * @type bool $child_workflow_only + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * @type \Temporal\Api\Common\V1\Header $header + * Headers that are passed by the workflow that is sending a signal to the external + * workflow that is receiving this signal. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->execution = $var; + + return $this; + } + + /** + * The workflow author-defined name of the signal to send to the workflow. + * + * Generated from protobuf field string signal_name = 3; + * @return string + */ + public function getSignalName() + { + return $this->signal_name; + } + + /** + * The workflow author-defined name of the signal to send to the workflow. + * + * Generated from protobuf field string signal_name = 3; + * @param string $var + * @return $this + */ + public function setSignalName($var) + { + GPBUtil::checkString($var, True); + $this->signal_name = $var; + + return $this; + } + + /** + * Serialized value(s) to provide with the signal. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Serialized value(s) to provide with the signal. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 5; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 5; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * + * Generated from protobuf field bool child_workflow_only = 6; + * @return bool + */ + public function getChildWorkflowOnly() + { + return $this->child_workflow_only; + } + + /** + * Set this to true if the workflow being cancelled is a child of the workflow originating this + * command. The request will be rejected if it is set to true and the target workflow is *not* + * a child of the requesting workflow. + * + * Generated from protobuf field bool child_workflow_only = 6; + * @param bool $var + * @return $this + */ + public function setChildWorkflowOnly($var) + { + GPBUtil::checkBool($var); + $this->child_workflow_only = $var; + + return $this; + } + + /** + * Headers that are passed by the workflow that is sending a signal to the external + * workflow that is receiving this signal. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 7; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Headers that are passed by the workflow that is sending a signal to the external + * workflow that is receiving this signal. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 7; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/StartChildWorkflowExecutionCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/StartChildWorkflowExecutionCommandAttributes.php new file mode 100644 index 0000000..e77a0dd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/StartChildWorkflowExecutionCommandAttributes.php @@ -0,0 +1,644 @@ +temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes + */ +class StartChildWorkflowExecutionCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + */ + protected $task_queue = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + */ + protected $input = null; + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + */ + protected $workflow_execution_timeout = null; + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + */ + protected $workflow_task_timeout = null; + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9; + */ + protected $parent_close_policy = 0; + /** + * Generated from protobuf field string control = 10; + */ + protected $control = ''; + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + */ + protected $workflow_id_reuse_policy = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + */ + protected $retry_policy = null; + /** + * Establish a cron schedule for the child workflow. + * + * Generated from protobuf field string cron_schedule = 13; + */ + protected $cron_schedule = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 14; + */ + protected $header = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 15; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 16; + */ + protected $search_attributes = null; + /** + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * + * Generated from protobuf field bool inherit_build_id = 17; + */ + protected $inherit_build_id = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $workflow_id + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Payloads $input + * @type \Google\Protobuf\Duration $workflow_execution_timeout + * Total workflow execution timeout including retries and continue as new. + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run. + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task. + * @type int $parent_close_policy + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * @type string $control + * @type int $workflow_id_reuse_policy + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * @type string $cron_schedule + * Establish a cron schedule for the child workflow. + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type bool $inherit_build_id + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionTimeout() + { + return $this->workflow_execution_timeout; + } + + public function hasWorkflowExecutionTimeout() + { + return isset($this->workflow_execution_timeout); + } + + public function clearWorkflowExecutionTimeout() + { + unset($this->workflow_execution_timeout); + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9; + * @return int + */ + public function getParentClosePolicy() + { + return $this->parent_close_policy; + } + + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9; + * @param int $var + * @return $this + */ + public function setParentClosePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ParentClosePolicy::class); + $this->parent_close_policy = $var; + + return $this; + } + + /** + * Generated from protobuf field string control = 10; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Generated from protobuf field string control = 10; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + * @return int + */ + public function getWorkflowIdReusePolicy() + { + return $this->workflow_id_reuse_policy; + } + + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + * @param int $var + * @return $this + */ + public function setWorkflowIdReusePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdReusePolicy::class); + $this->workflow_id_reuse_policy = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * Establish a cron schedule for the child workflow. + * + * Generated from protobuf field string cron_schedule = 13; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * Establish a cron schedule for the child workflow. + * + * Generated from protobuf field string cron_schedule = 13; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 14; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 14; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 15; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 15; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 16; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 16; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * + * Generated from protobuf field bool inherit_build_id = 17; + * @return bool + */ + public function getInheritBuildId() + { + return $this->inherit_build_id; + } + + /** + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * + * Generated from protobuf field bool inherit_build_id = 17; + * @param bool $var + * @return $this + */ + public function setInheritBuildId($var) + { + GPBUtil::checkBool($var); + $this->inherit_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/StartTimerCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/StartTimerCommandAttributes.php new file mode 100644 index 0000000..8c693ef --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/StartTimerCommandAttributes.php @@ -0,0 +1,122 @@ +temporal.api.command.v1.StartTimerCommandAttributes + */ +class StartTimerCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * An id for the timer, currently live timers must have different ids. Typically autogenerated + * by the SDK. + * + * Generated from protobuf field string timer_id = 1; + */ + protected $timer_id = ''; + /** + * How long until the timer fires, producing a `TIMER_FIRED` event. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_fire_timeout = 2; + */ + protected $start_to_fire_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $timer_id + * An id for the timer, currently live timers must have different ids. Typically autogenerated + * by the SDK. + * @type \Google\Protobuf\Duration $start_to_fire_timeout + * How long until the timer fires, producing a `TIMER_FIRED` event. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * An id for the timer, currently live timers must have different ids. Typically autogenerated + * by the SDK. + * + * Generated from protobuf field string timer_id = 1; + * @return string + */ + public function getTimerId() + { + return $this->timer_id; + } + + /** + * An id for the timer, currently live timers must have different ids. Typically autogenerated + * by the SDK. + * + * Generated from protobuf field string timer_id = 1; + * @param string $var + * @return $this + */ + public function setTimerId($var) + { + GPBUtil::checkString($var, True); + $this->timer_id = $var; + + return $this; + } + + /** + * How long until the timer fires, producing a `TIMER_FIRED` event. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_fire_timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getStartToFireTimeout() + { + return $this->start_to_fire_timeout; + } + + public function hasStartToFireTimeout() + { + return isset($this->start_to_fire_timeout); + } + + public function clearStartToFireTimeout() + { + unset($this->start_to_fire_timeout); + } + + /** + * How long until the timer fires, producing a `TIMER_FIRED` event. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_fire_timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartToFireTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_to_fire_timeout = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/UpsertWorkflowSearchAttributesCommandAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/UpsertWorkflowSearchAttributesCommandAttributes.php new file mode 100644 index 0000000..65fff3a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Command/V1/UpsertWorkflowSearchAttributesCommandAttributes.php @@ -0,0 +1,69 @@ +temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes + */ +class UpsertWorkflowSearchAttributesCommandAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 1; + */ + protected $search_attributes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Command\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 1; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 1; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/ActivityType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/ActivityType.php new file mode 100644 index 0000000..f584c1f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/ActivityType.php @@ -0,0 +1,62 @@ +temporal.api.common.v1.ActivityType + */ +class ActivityType extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Callback.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Callback.php new file mode 100644 index 0000000..8b3095b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Callback.php @@ -0,0 +1,71 @@ +temporal.api.common.v1.Callback + */ +class Callback extends \Google\Protobuf\Internal\Message +{ + protected $variant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Callback\Nexus $nexus + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Callback.Nexus nexus = 2; + * @return \Temporal\Api\Common\V1\Callback\Nexus|null + */ + public function getNexus() + { + return $this->readOneof(2); + } + + public function hasNexus() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Callback.Nexus nexus = 2; + * @param \Temporal\Api\Common\V1\Callback\Nexus $var + * @return $this + */ + public function setNexus($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Callback\Nexus::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getVariant() + { + return $this->whichOneof("variant"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Callback/Nexus.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Callback/Nexus.php new file mode 100644 index 0000000..463b22f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Callback/Nexus.php @@ -0,0 +1,100 @@ +temporal.api.common.v1.Callback.Nexus + */ +class Nexus extends \Google\Protobuf\Internal\Message +{ + /** + * Callback URL. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * Header to attach to callback request. + * + * Generated from protobuf field map header = 2; + */ + private $header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Callback URL. + * @type array|\Google\Protobuf\Internal\MapField $header + * Header to attach to callback request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Callback URL. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Callback URL. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * Header to attach to callback request. + * + * Generated from protobuf field map header = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeader() + { + return $this->header; + } + + /** + * Header to attach to callback request. + * + * Generated from protobuf field map header = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeader($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->header = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/DataBlob.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/DataBlob.php new file mode 100644 index 0000000..9e4634d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/DataBlob.php @@ -0,0 +1,86 @@ +temporal.api.common.v1.DataBlob + */ +class DataBlob extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.EncodingType encoding_type = 1; + */ + protected $encoding_type = 0; + /** + * Generated from protobuf field bytes data = 2; + */ + protected $data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $encoding_type + * @type string $data + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.EncodingType encoding_type = 1; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.EncodingType encoding_type = 1; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 2; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Header.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Header.php new file mode 100644 index 0000000..7bec44d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Header.php @@ -0,0 +1,62 @@ +temporal.api.common.v1.Header + */ +class Header extends \Google\Protobuf\Internal\Message +{ + /** + * 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 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map fields = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * 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, \Temporal\Api\Common\V1\Payload::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Memo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Memo.php new file mode 100644 index 0000000..bbfbc22 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Memo.php @@ -0,0 +1,61 @@ +temporal.api.common.v1.Memo + */ +class Memo extends \Google\Protobuf\Internal\Message +{ + /** + * 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 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map fields = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * 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, \Temporal\Api\Common\V1\Payload::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/MeteringMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/MeteringMetadata.php new file mode 100644 index 0000000..c9caf06 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/MeteringMetadata.php @@ -0,0 +1,84 @@ +temporal.api.common.v1.MeteringMetadata + */ +class MeteringMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Count of local activities which have begun an execution attempt during this workflow task, + * and whose first attempt occurred in some previous task. This is used for metering + * purposes, and does not affect workflow state. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: Negative values make no sense to represent. --) + * + * Generated from protobuf field uint32 nonfirst_local_activity_execution_attempts = 13; + */ + protected $nonfirst_local_activity_execution_attempts = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $nonfirst_local_activity_execution_attempts + * Count of local activities which have begun an execution attempt during this workflow task, + * and whose first attempt occurred in some previous task. This is used for metering + * purposes, and does not affect workflow state. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: Negative values make no sense to represent. --) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Count of local activities which have begun an execution attempt during this workflow task, + * and whose first attempt occurred in some previous task. This is used for metering + * purposes, and does not affect workflow state. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: Negative values make no sense to represent. --) + * + * Generated from protobuf field uint32 nonfirst_local_activity_execution_attempts = 13; + * @return int + */ + public function getNonfirstLocalActivityExecutionAttempts() + { + return $this->nonfirst_local_activity_execution_attempts; + } + + /** + * Count of local activities which have begun an execution attempt during this workflow task, + * and whose first attempt occurred in some previous task. This is used for metering + * purposes, and does not affect workflow state. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: Negative values make no sense to represent. --) + * + * Generated from protobuf field uint32 nonfirst_local_activity_execution_attempts = 13; + * @param int $var + * @return $this + */ + public function setNonfirstLocalActivityExecutionAttempts($var) + { + GPBUtil::checkUint32($var); + $this->nonfirst_local_activity_execution_attempts = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Payload.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Payload.php new file mode 100644 index 0000000..586690b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Payload.php @@ -0,0 +1,90 @@ +temporal.api.common.v1.Payload + */ +class Payload extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map metadata = 1; + */ + private $metadata; + /** + * Generated from protobuf field bytes data = 2; + */ + protected $data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $metadata + * @type string $data + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map metadata = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field map metadata = 1; + * @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::BYTES); + $this->metadata = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes data = 2; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Payloads.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Payloads.php new file mode 100644 index 0000000..a88a4dd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/Payloads.php @@ -0,0 +1,61 @@ +temporal.api.common.v1.Payloads + */ +class Payloads extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.common.v1.Payload payloads = 1; + */ + private $payloads; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Common\V1\Payload>|\Google\Protobuf\Internal\RepeatedField $payloads + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.common.v1.Payload payloads = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPayloads() + { + return $this->payloads; + } + + /** + * Generated from protobuf field repeated .temporal.api.common.v1.Payload payloads = 1; + * @param array<\Temporal\Api\Common\V1\Payload>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPayloads($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Payload::class); + $this->payloads = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/ResetOptions.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/ResetOptions.php new file mode 100644 index 0000000..fe5c4c2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/ResetOptions.php @@ -0,0 +1,304 @@ +temporal.api.common.v1.ResetOptions + */ +class ResetOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 10; + */ + protected $reset_reapply_type = 0; + /** + * If true, limit the reset to only within the current run. (Applies to build_id targets and + * possibly others in the future.) + * + * Generated from protobuf field bool current_run_only = 11; + */ + protected $current_run_only = false; + /** + * Event types not to be reapplied + * + * Generated from protobuf field repeated .temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 12; + */ + private $reset_reapply_exclude_types; + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\GPBEmpty $first_workflow_task + * Resets to the first workflow task completed or started event. + * @type \Google\Protobuf\GPBEmpty $last_workflow_task + * Resets to the last workflow task completed or started event. + * @type int|string $workflow_task_id + * The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or + * `WORKFLOW_TASK_STARTED` event to reset to. + * Note that this option doesn't make sense when used as part of a batch request. + * @type string $build_id + * Resets to the first workflow task processed by this build id. + * If the workflow was not processed by the build id, or the workflow task can't be + * determined, no reset will be performed. + * Note that by default, this reset is allowed to be to a prior run in a chain of + * continue-as-new. + * @type int $reset_reapply_type + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * @type bool $current_run_only + * If true, limit the reset to only within the current run. (Applies to build_id targets and + * possibly others in the future.) + * @type array|\Google\Protobuf\Internal\RepeatedField $reset_reapply_exclude_types + * Event types not to be reapplied + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Resets to the first workflow task completed or started event. + * + * Generated from protobuf field .google.protobuf.Empty first_workflow_task = 1; + * @return \Google\Protobuf\GPBEmpty|null + */ + public function getFirstWorkflowTask() + { + return $this->readOneof(1); + } + + public function hasFirstWorkflowTask() + { + return $this->hasOneof(1); + } + + /** + * Resets to the first workflow task completed or started event. + * + * Generated from protobuf field .google.protobuf.Empty first_workflow_task = 1; + * @param \Google\Protobuf\GPBEmpty $var + * @return $this + */ + public function setFirstWorkflowTask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\GPBEmpty::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Resets to the last workflow task completed or started event. + * + * Generated from protobuf field .google.protobuf.Empty last_workflow_task = 2; + * @return \Google\Protobuf\GPBEmpty|null + */ + public function getLastWorkflowTask() + { + return $this->readOneof(2); + } + + public function hasLastWorkflowTask() + { + return $this->hasOneof(2); + } + + /** + * Resets to the last workflow task completed or started event. + * + * Generated from protobuf field .google.protobuf.Empty last_workflow_task = 2; + * @param \Google\Protobuf\GPBEmpty $var + * @return $this + */ + public function setLastWorkflowTask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\GPBEmpty::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or + * `WORKFLOW_TASK_STARTED` event to reset to. + * Note that this option doesn't make sense when used as part of a batch request. + * + * Generated from protobuf field int64 workflow_task_id = 3; + * @return int|string + */ + public function getWorkflowTaskId() + { + return $this->readOneof(3); + } + + public function hasWorkflowTaskId() + { + return $this->hasOneof(3); + } + + /** + * The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or + * `WORKFLOW_TASK_STARTED` event to reset to. + * Note that this option doesn't make sense when used as part of a batch request. + * + * Generated from protobuf field int64 workflow_task_id = 3; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskId($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Resets to the first workflow task processed by this build id. + * If the workflow was not processed by the build id, or the workflow task can't be + * determined, no reset will be performed. + * Note that by default, this reset is allowed to be to a prior run in a chain of + * continue-as-new. + * + * Generated from protobuf field string build_id = 4; + * @return string + */ + public function getBuildId() + { + return $this->readOneof(4); + } + + public function hasBuildId() + { + return $this->hasOneof(4); + } + + /** + * Resets to the first workflow task processed by this build id. + * If the workflow was not processed by the build id, or the workflow task can't be + * determined, no reset will be performed. + * Note that by default, this reset is allowed to be to a prior run in a chain of + * continue-as-new. + * + * Generated from protobuf field string build_id = 4; + * @param string $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 10; + * @return int + */ + public function getResetReapplyType() + { + return $this->reset_reapply_type; + } + + /** + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 10; + * @param int $var + * @return $this + */ + public function setResetReapplyType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ResetReapplyType::class); + $this->reset_reapply_type = $var; + + return $this; + } + + /** + * If true, limit the reset to only within the current run. (Applies to build_id targets and + * possibly others in the future.) + * + * Generated from protobuf field bool current_run_only = 11; + * @return bool + */ + public function getCurrentRunOnly() + { + return $this->current_run_only; + } + + /** + * If true, limit the reset to only within the current run. (Applies to build_id targets and + * possibly others in the future.) + * + * Generated from protobuf field bool current_run_only = 11; + * @param bool $var + * @return $this + */ + public function setCurrentRunOnly($var) + { + GPBUtil::checkBool($var); + $this->current_run_only = $var; + + return $this; + } + + /** + * Event types not to be reapplied + * + * Generated from protobuf field repeated .temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResetReapplyExcludeTypes() + { + return $this->reset_reapply_exclude_types; + } + + /** + * Event types not to be reapplied + * + * Generated from protobuf field repeated .temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 12; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResetReapplyExcludeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\ResetReapplyExcludeType::class); + $this->reset_reapply_exclude_types = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/RetryPolicy.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/RetryPolicy.php new file mode 100644 index 0000000..e816d95 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/RetryPolicy.php @@ -0,0 +1,244 @@ +temporal.api.common.v1.RetryPolicy + */ +class RetryPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries. + * + * Generated from protobuf field .google.protobuf.Duration initial_interval = 1; + */ + protected $initial_interval = null; + /** + * Coefficient used to calculate the next retry interval. + * The next retry interval is previous interval multiplied by the coefficient. + * Must be 1 or larger. + * + * Generated from protobuf field double backoff_coefficient = 2; + */ + protected $backoff_coefficient = 0.0; + /** + * Maximum interval between retries. Exponential backoff leads to interval increase. + * This value is the cap of the increase. Default is 100x of the initial interval. + * + * Generated from protobuf field .google.protobuf.Duration maximum_interval = 3; + */ + protected $maximum_interval = null; + /** + * Maximum number of attempts. When exceeded the retries stop even if not expired yet. + * 1 disables retries. 0 means unlimited (up to the timeouts) + * + * Generated from protobuf field int32 maximum_attempts = 4; + */ + protected $maximum_attempts = 0; + /** + * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that + * this is not a substring match, the error *type* (not message) must match exactly. + * + * Generated from protobuf field repeated string non_retryable_error_types = 5; + */ + private $non_retryable_error_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $initial_interval + * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries. + * @type float $backoff_coefficient + * Coefficient used to calculate the next retry interval. + * The next retry interval is previous interval multiplied by the coefficient. + * Must be 1 or larger. + * @type \Google\Protobuf\Duration $maximum_interval + * Maximum interval between retries. Exponential backoff leads to interval increase. + * This value is the cap of the increase. Default is 100x of the initial interval. + * @type int $maximum_attempts + * Maximum number of attempts. When exceeded the retries stop even if not expired yet. + * 1 disables retries. 0 means unlimited (up to the timeouts) + * @type array|\Google\Protobuf\Internal\RepeatedField $non_retryable_error_types + * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that + * this is not a substring match, the error *type* (not message) must match exactly. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries. + * + * Generated from protobuf field .google.protobuf.Duration initial_interval = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getInitialInterval() + { + return $this->initial_interval; + } + + public function hasInitialInterval() + { + return isset($this->initial_interval); + } + + public function clearInitialInterval() + { + unset($this->initial_interval); + } + + /** + * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries. + * + * Generated from protobuf field .google.protobuf.Duration initial_interval = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInitialInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->initial_interval = $var; + + return $this; + } + + /** + * Coefficient used to calculate the next retry interval. + * The next retry interval is previous interval multiplied by the coefficient. + * Must be 1 or larger. + * + * Generated from protobuf field double backoff_coefficient = 2; + * @return float + */ + public function getBackoffCoefficient() + { + return $this->backoff_coefficient; + } + + /** + * Coefficient used to calculate the next retry interval. + * The next retry interval is previous interval multiplied by the coefficient. + * Must be 1 or larger. + * + * Generated from protobuf field double backoff_coefficient = 2; + * @param float $var + * @return $this + */ + public function setBackoffCoefficient($var) + { + GPBUtil::checkDouble($var); + $this->backoff_coefficient = $var; + + return $this; + } + + /** + * Maximum interval between retries. Exponential backoff leads to interval increase. + * This value is the cap of the increase. Default is 100x of the initial interval. + * + * Generated from protobuf field .google.protobuf.Duration maximum_interval = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getMaximumInterval() + { + return $this->maximum_interval; + } + + public function hasMaximumInterval() + { + return isset($this->maximum_interval); + } + + public function clearMaximumInterval() + { + unset($this->maximum_interval); + } + + /** + * Maximum interval between retries. Exponential backoff leads to interval increase. + * This value is the cap of the increase. Default is 100x of the initial interval. + * + * Generated from protobuf field .google.protobuf.Duration maximum_interval = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaximumInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->maximum_interval = $var; + + return $this; + } + + /** + * Maximum number of attempts. When exceeded the retries stop even if not expired yet. + * 1 disables retries. 0 means unlimited (up to the timeouts) + * + * Generated from protobuf field int32 maximum_attempts = 4; + * @return int + */ + public function getMaximumAttempts() + { + return $this->maximum_attempts; + } + + /** + * Maximum number of attempts. When exceeded the retries stop even if not expired yet. + * 1 disables retries. 0 means unlimited (up to the timeouts) + * + * Generated from protobuf field int32 maximum_attempts = 4; + * @param int $var + * @return $this + */ + public function setMaximumAttempts($var) + { + GPBUtil::checkInt32($var); + $this->maximum_attempts = $var; + + return $this; + } + + /** + * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that + * this is not a substring match, the error *type* (not message) must match exactly. + * + * Generated from protobuf field repeated string non_retryable_error_types = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNonRetryableErrorTypes() + { + return $this->non_retryable_error_types; + } + + /** + * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that + * this is not a substring match, the error *type* (not message) must match exactly. + * + * Generated from protobuf field repeated string non_retryable_error_types = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNonRetryableErrorTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->non_retryable_error_types = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/SearchAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/SearchAttributes.php new file mode 100644 index 0000000..bec8efc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/SearchAttributes.php @@ -0,0 +1,62 @@ +temporal.api.common.v1.SearchAttributes + */ +class SearchAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map indexed_fields = 1; + */ + private $indexed_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $indexed_fields + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map indexed_fields = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getIndexedFields() + { + return $this->indexed_fields; + } + + /** + * Generated from protobuf field map indexed_fields = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setIndexedFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Payload::class); + $this->indexed_fields = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkerVersionCapabilities.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkerVersionCapabilities.php new file mode 100644 index 0000000..98f2024 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkerVersionCapabilities.php @@ -0,0 +1,108 @@ +temporal.api.common.v1.WorkerVersionCapabilities + */ +class WorkerVersionCapabilities extends \Google\Protobuf\Internal\Message +{ + /** + * An opaque whole-worker identifier + * + * Generated from protobuf field string build_id = 1; + */ + protected $build_id = ''; + /** + * If set, the worker is opting in to worker versioning, and wishes to only receive appropriate + * tasks. + * + * Generated from protobuf field bool use_versioning = 2; + */ + protected $use_versioning = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_id + * An opaque whole-worker identifier + * @type bool $use_versioning + * If set, the worker is opting in to worker versioning, and wishes to only receive appropriate + * tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * An opaque whole-worker identifier + * + * Generated from protobuf field string build_id = 1; + * @return string + */ + public function getBuildId() + { + return $this->build_id; + } + + /** + * An opaque whole-worker identifier + * + * Generated from protobuf field string build_id = 1; + * @param string $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkString($var, True); + $this->build_id = $var; + + return $this; + } + + /** + * If set, the worker is opting in to worker versioning, and wishes to only receive appropriate + * tasks. + * + * Generated from protobuf field bool use_versioning = 2; + * @return bool + */ + public function getUseVersioning() + { + return $this->use_versioning; + } + + /** + * If set, the worker is opting in to worker versioning, and wishes to only receive appropriate + * tasks. + * + * Generated from protobuf field bool use_versioning = 2; + * @param bool $var + * @return $this + */ + public function setUseVersioning($var) + { + GPBUtil::checkBool($var); + $this->use_versioning = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkerVersionStamp.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkerVersionStamp.php new file mode 100644 index 0000000..1ea153e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkerVersionStamp.php @@ -0,0 +1,110 @@ +temporal.api.common.v1.WorkerVersionStamp + */ +class WorkerVersionStamp extends \Google\Protobuf\Internal\Message +{ + /** + * An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this + * message is included in requests which previously used that. + * + * Generated from protobuf field string build_id = 1; + */ + protected $build_id = ''; + /** + * If set, the worker is opting in to worker versioning. Otherwise, this is used only as a + * marker for workflow reset points and the BuildIDs search attribute. + * + * Generated from protobuf field bool use_versioning = 3; + */ + protected $use_versioning = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_id + * An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this + * message is included in requests which previously used that. + * @type bool $use_versioning + * If set, the worker is opting in to worker versioning. Otherwise, this is used only as a + * marker for workflow reset points and the BuildIDs search attribute. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this + * message is included in requests which previously used that. + * + * Generated from protobuf field string build_id = 1; + * @return string + */ + public function getBuildId() + { + return $this->build_id; + } + + /** + * An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this + * message is included in requests which previously used that. + * + * Generated from protobuf field string build_id = 1; + * @param string $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkString($var, True); + $this->build_id = $var; + + return $this; + } + + /** + * If set, the worker is opting in to worker versioning. Otherwise, this is used only as a + * marker for workflow reset points and the BuildIDs search attribute. + * + * Generated from protobuf field bool use_versioning = 3; + * @return bool + */ + public function getUseVersioning() + { + return $this->use_versioning; + } + + /** + * If set, the worker is opting in to worker versioning. Otherwise, this is used only as a + * marker for workflow reset points and the BuildIDs search attribute. + * + * Generated from protobuf field bool use_versioning = 3; + * @param bool $var + * @return $this + */ + public function setUseVersioning($var) + { + GPBUtil::checkBool($var); + $this->use_versioning = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkflowExecution.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkflowExecution.php new file mode 100644 index 0000000..0498af5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkflowExecution.php @@ -0,0 +1,90 @@ +temporal.api.common.v1.WorkflowExecution + */ +class WorkflowExecution extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string workflow_id = 1; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field string run_id = 2; + */ + protected $run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $workflow_id + * @type string $run_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string run_id = 2; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Generated from protobuf field string run_id = 2; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkflowType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkflowType.php new file mode 100644 index 0000000..926f52c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Common/V1/WorkflowType.php @@ -0,0 +1,62 @@ +temporal.api.common.v1.WorkflowType + */ +class WorkflowType extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Common\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ArchivalState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ArchivalState.php new file mode 100644 index 0000000..740e983 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ArchivalState.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.ArchivalState + */ +class ArchivalState +{ + /** + * Generated from protobuf enum ARCHIVAL_STATE_UNSPECIFIED = 0; + */ + const ARCHIVAL_STATE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ARCHIVAL_STATE_DISABLED = 1; + */ + const ARCHIVAL_STATE_DISABLED = 1; + /** + * Generated from protobuf enum ARCHIVAL_STATE_ENABLED = 2; + */ + const ARCHIVAL_STATE_ENABLED = 2; + + private static $valueToName = [ + self::ARCHIVAL_STATE_UNSPECIFIED => 'ARCHIVAL_STATE_UNSPECIFIED', + self::ARCHIVAL_STATE_DISABLED => 'ARCHIVAL_STATE_DISABLED', + self::ARCHIVAL_STATE_ENABLED => 'ARCHIVAL_STATE_ENABLED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BatchOperationState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BatchOperationState.php new file mode 100644 index 0000000..c04df42 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BatchOperationState.php @@ -0,0 +1,59 @@ +temporal.api.enums.v1.BatchOperationState + */ +class BatchOperationState +{ + /** + * Generated from protobuf enum BATCH_OPERATION_STATE_UNSPECIFIED = 0; + */ + const BATCH_OPERATION_STATE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum BATCH_OPERATION_STATE_RUNNING = 1; + */ + const BATCH_OPERATION_STATE_RUNNING = 1; + /** + * Generated from protobuf enum BATCH_OPERATION_STATE_COMPLETED = 2; + */ + const BATCH_OPERATION_STATE_COMPLETED = 2; + /** + * Generated from protobuf enum BATCH_OPERATION_STATE_FAILED = 3; + */ + const BATCH_OPERATION_STATE_FAILED = 3; + + private static $valueToName = [ + self::BATCH_OPERATION_STATE_UNSPECIFIED => 'BATCH_OPERATION_STATE_UNSPECIFIED', + self::BATCH_OPERATION_STATE_RUNNING => 'BATCH_OPERATION_STATE_RUNNING', + self::BATCH_OPERATION_STATE_COMPLETED => 'BATCH_OPERATION_STATE_COMPLETED', + self::BATCH_OPERATION_STATE_FAILED => 'BATCH_OPERATION_STATE_FAILED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BatchOperationType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BatchOperationType.php new file mode 100644 index 0000000..909a6ca --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BatchOperationType.php @@ -0,0 +1,69 @@ +temporal.api.enums.v1.BatchOperationType + */ +class BatchOperationType +{ + /** + * Generated from protobuf enum BATCH_OPERATION_TYPE_UNSPECIFIED = 0; + */ + const BATCH_OPERATION_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum BATCH_OPERATION_TYPE_TERMINATE = 1; + */ + const BATCH_OPERATION_TYPE_TERMINATE = 1; + /** + * Generated from protobuf enum BATCH_OPERATION_TYPE_CANCEL = 2; + */ + const BATCH_OPERATION_TYPE_CANCEL = 2; + /** + * Generated from protobuf enum BATCH_OPERATION_TYPE_SIGNAL = 3; + */ + const BATCH_OPERATION_TYPE_SIGNAL = 3; + /** + * Generated from protobuf enum BATCH_OPERATION_TYPE_DELETE = 4; + */ + const BATCH_OPERATION_TYPE_DELETE = 4; + /** + * Generated from protobuf enum BATCH_OPERATION_TYPE_RESET = 5; + */ + const BATCH_OPERATION_TYPE_RESET = 5; + + private static $valueToName = [ + self::BATCH_OPERATION_TYPE_UNSPECIFIED => 'BATCH_OPERATION_TYPE_UNSPECIFIED', + self::BATCH_OPERATION_TYPE_TERMINATE => 'BATCH_OPERATION_TYPE_TERMINATE', + self::BATCH_OPERATION_TYPE_CANCEL => 'BATCH_OPERATION_TYPE_CANCEL', + self::BATCH_OPERATION_TYPE_SIGNAL => 'BATCH_OPERATION_TYPE_SIGNAL', + self::BATCH_OPERATION_TYPE_DELETE => 'BATCH_OPERATION_TYPE_DELETE', + self::BATCH_OPERATION_TYPE_RESET => 'BATCH_OPERATION_TYPE_RESET', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BuildIdTaskReachability.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BuildIdTaskReachability.php new file mode 100644 index 0000000..f748324 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/BuildIdTaskReachability.php @@ -0,0 +1,81 @@ +temporal.api.enums.v1.BuildIdTaskReachability + */ +class BuildIdTaskReachability +{ + /** + * Task reachability is not reported + * + * Generated from protobuf enum BUILD_ID_TASK_REACHABILITY_UNSPECIFIED = 0; + */ + const BUILD_ID_TASK_REACHABILITY_UNSPECIFIED = 0; + /** + * Build ID may be used by new workflows or activities (base on versioning rules), or there MAY + * be open workflows or backlogged activities assigned to it. + * + * Generated from protobuf enum BUILD_ID_TASK_REACHABILITY_REACHABLE = 1; + */ + const BUILD_ID_TASK_REACHABILITY_REACHABLE = 1; + /** + * Build ID does not have open workflows and is not reachable by new workflows, + * but MAY have closed workflows within the namespace retention period. + * Not applicable to activity-only task queues. + * + * Generated from protobuf enum BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY = 2; + */ + const BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY = 2; + /** + * Build ID is not used for new executions, nor it has been used by any existing execution + * within the retention period. + * + * Generated from protobuf enum BUILD_ID_TASK_REACHABILITY_UNREACHABLE = 3; + */ + const BUILD_ID_TASK_REACHABILITY_UNREACHABLE = 3; + + private static $valueToName = [ + self::BUILD_ID_TASK_REACHABILITY_UNSPECIFIED => 'BUILD_ID_TASK_REACHABILITY_UNSPECIFIED', + self::BUILD_ID_TASK_REACHABILITY_REACHABLE => 'BUILD_ID_TASK_REACHABILITY_REACHABLE', + self::BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY => 'BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY', + self::BUILD_ID_TASK_REACHABILITY_UNREACHABLE => 'BUILD_ID_TASK_REACHABILITY_UNREACHABLE', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CallbackState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CallbackState.php new file mode 100644 index 0000000..94888cc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CallbackState.php @@ -0,0 +1,83 @@ +temporal.api.enums.v1.CallbackState + */ +class CallbackState +{ + /** + * Default value, unspecified state. + * + * Generated from protobuf enum CALLBACK_STATE_UNSPECIFIED = 0; + */ + const CALLBACK_STATE_UNSPECIFIED = 0; + /** + * Callback is standing by, waiting to be triggered. + * + * Generated from protobuf enum CALLBACK_STATE_STANDBY = 1; + */ + const CALLBACK_STATE_STANDBY = 1; + /** + * Callback is in the queue waiting to be executed or is currently executing. + * + * Generated from protobuf enum CALLBACK_STATE_SCHEDULED = 2; + */ + const CALLBACK_STATE_SCHEDULED = 2; + /** + * Callback has failed with a retryable error and is backing off before the next attempt. + * + * Generated from protobuf enum CALLBACK_STATE_BACKING_OFF = 3; + */ + const CALLBACK_STATE_BACKING_OFF = 3; + /** + * Callback has failed. + * + * Generated from protobuf enum CALLBACK_STATE_FAILED = 4; + */ + const CALLBACK_STATE_FAILED = 4; + /** + * Callback has succeeded. + * + * Generated from protobuf enum CALLBACK_STATE_SUCCEEDED = 5; + */ + const CALLBACK_STATE_SUCCEEDED = 5; + + private static $valueToName = [ + self::CALLBACK_STATE_UNSPECIFIED => 'CALLBACK_STATE_UNSPECIFIED', + self::CALLBACK_STATE_STANDBY => 'CALLBACK_STATE_STANDBY', + self::CALLBACK_STATE_SCHEDULED => 'CALLBACK_STATE_SCHEDULED', + self::CALLBACK_STATE_BACKING_OFF => 'CALLBACK_STATE_BACKING_OFF', + self::CALLBACK_STATE_FAILED => 'CALLBACK_STATE_FAILED', + self::CALLBACK_STATE_SUCCEEDED => 'CALLBACK_STATE_SUCCEEDED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CancelExternalWorkflowExecutionFailedCause.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CancelExternalWorkflowExecutionFailedCause.php new file mode 100644 index 0000000..bc78c81 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CancelExternalWorkflowExecutionFailedCause.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause + */ +class CancelExternalWorkflowExecutionFailedCause +{ + /** + * Generated from protobuf enum CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0; + */ + const CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND = 1; + */ + const CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND = 1; + /** + * Generated from protobuf enum CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2; + */ + const CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2; + + private static $valueToName = [ + self::CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED => 'CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED', + self::CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND => 'CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND', + self::CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND => 'CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CommandType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CommandType.php new file mode 100644 index 0000000..258f7de --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/CommandType.php @@ -0,0 +1,131 @@ +temporal.api.enums.v1.CommandType + */ +class CommandType +{ + /** + * Generated from protobuf enum COMMAND_TYPE_UNSPECIFIED = 0; + */ + const COMMAND_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK = 1; + */ + const COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK = 1; + /** + * Generated from protobuf enum COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK = 2; + */ + const COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK = 2; + /** + * Generated from protobuf enum COMMAND_TYPE_START_TIMER = 3; + */ + const COMMAND_TYPE_START_TIMER = 3; + /** + * Generated from protobuf enum COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION = 4; + */ + const COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION = 4; + /** + * Generated from protobuf enum COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION = 5; + */ + const COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION = 5; + /** + * Generated from protobuf enum COMMAND_TYPE_CANCEL_TIMER = 6; + */ + const COMMAND_TYPE_CANCEL_TIMER = 6; + /** + * Generated from protobuf enum COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION = 7; + */ + const COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION = 7; + /** + * Generated from protobuf enum COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION = 8; + */ + const COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION = 8; + /** + * Generated from protobuf enum COMMAND_TYPE_RECORD_MARKER = 9; + */ + const COMMAND_TYPE_RECORD_MARKER = 9; + /** + * Generated from protobuf enum COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION = 10; + */ + const COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION = 10; + /** + * Generated from protobuf enum COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION = 11; + */ + const COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION = 11; + /** + * Generated from protobuf enum COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION = 12; + */ + const COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION = 12; + /** + * Generated from protobuf enum COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 13; + */ + const COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 13; + /** + * Generated from protobuf enum COMMAND_TYPE_PROTOCOL_MESSAGE = 14; + */ + const COMMAND_TYPE_PROTOCOL_MESSAGE = 14; + /** + * Generated from protobuf enum COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES = 16; + */ + const COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES = 16; + /** + * Generated from protobuf enum COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION = 17; + */ + const COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION = 17; + /** + * Generated from protobuf enum COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION = 18; + */ + const COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION = 18; + + private static $valueToName = [ + self::COMMAND_TYPE_UNSPECIFIED => 'COMMAND_TYPE_UNSPECIFIED', + self::COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK => 'COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK', + self::COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK => 'COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK', + self::COMMAND_TYPE_START_TIMER => 'COMMAND_TYPE_START_TIMER', + self::COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION => 'COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION', + self::COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION => 'COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION', + self::COMMAND_TYPE_CANCEL_TIMER => 'COMMAND_TYPE_CANCEL_TIMER', + self::COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION => 'COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION', + self::COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION => 'COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION', + self::COMMAND_TYPE_RECORD_MARKER => 'COMMAND_TYPE_RECORD_MARKER', + self::COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION => 'COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION', + self::COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION => 'COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION', + self::COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION => 'COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION', + self::COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES => 'COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES', + self::COMMAND_TYPE_PROTOCOL_MESSAGE => 'COMMAND_TYPE_PROTOCOL_MESSAGE', + self::COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES => 'COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES', + self::COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION => 'COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION', + self::COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION => 'COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ContinueAsNewInitiator.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ContinueAsNewInitiator.php new file mode 100644 index 0000000..0414b97 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ContinueAsNewInitiator.php @@ -0,0 +1,65 @@ +temporal.api.enums.v1.ContinueAsNewInitiator + */ +class ContinueAsNewInitiator +{ + /** + * Generated from protobuf enum CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED = 0; + */ + const CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED = 0; + /** + * The workflow itself requested to continue as new + * + * Generated from protobuf enum CONTINUE_AS_NEW_INITIATOR_WORKFLOW = 1; + */ + const CONTINUE_AS_NEW_INITIATOR_WORKFLOW = 1; + /** + * The workflow continued as new because it is retrying + * + * Generated from protobuf enum CONTINUE_AS_NEW_INITIATOR_RETRY = 2; + */ + const CONTINUE_AS_NEW_INITIATOR_RETRY = 2; + /** + * The workflow continued as new because cron has triggered a new execution + * + * Generated from protobuf enum CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE = 3; + */ + const CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE = 3; + + private static $valueToName = [ + self::CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED => 'CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED', + self::CONTINUE_AS_NEW_INITIATOR_WORKFLOW => 'CONTINUE_AS_NEW_INITIATOR_WORKFLOW', + self::CONTINUE_AS_NEW_INITIATOR_RETRY => 'CONTINUE_AS_NEW_INITIATOR_RETRY', + self::CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE => 'CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/DescribeTaskQueueMode.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/DescribeTaskQueueMode.php new file mode 100644 index 0000000..4a227b5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/DescribeTaskQueueMode.php @@ -0,0 +1,53 @@ +temporal.api.enums.v1.DescribeTaskQueueMode + */ +class DescribeTaskQueueMode +{ + /** + * Unspecified means legacy behavior. + * + * Generated from protobuf enum DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED = 0; + */ + const DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED = 0; + /** + * Enhanced mode reports aggregated results for all partitions, supports Build IDs, and reports richer info. + * + * Generated from protobuf enum DESCRIBE_TASK_QUEUE_MODE_ENHANCED = 1; + */ + const DESCRIBE_TASK_QUEUE_MODE_ENHANCED = 1; + + private static $valueToName = [ + self::DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED => 'DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED', + self::DESCRIBE_TASK_QUEUE_MODE_ENHANCED => 'DESCRIBE_TASK_QUEUE_MODE_ENHANCED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/EncodingType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/EncodingType.php new file mode 100644 index 0000000..4d16725 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/EncodingType.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.EncodingType + */ +class EncodingType +{ + /** + * Generated from protobuf enum ENCODING_TYPE_UNSPECIFIED = 0; + */ + const ENCODING_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ENCODING_TYPE_PROTO3 = 1; + */ + const ENCODING_TYPE_PROTO3 = 1; + /** + * Generated from protobuf enum ENCODING_TYPE_JSON = 2; + */ + const ENCODING_TYPE_JSON = 2; + + private static $valueToName = [ + self::ENCODING_TYPE_UNSPECIFIED => 'ENCODING_TYPE_UNSPECIFIED', + self::ENCODING_TYPE_PROTO3 => 'ENCODING_TYPE_PROTO3', + self::ENCODING_TYPE_JSON => 'ENCODING_TYPE_JSON', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/EventType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/EventType.php new file mode 100644 index 0000000..8eed262 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/EventType.php @@ -0,0 +1,468 @@ +temporal.api.enums.v1.EventType + */ +class EventType +{ + /** + * Place holder and should never appear in a Workflow execution history + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * Workflow execution has been triggered/started + * It contains Workflow execution inputs, as well as Workflow timeout configurations + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_STARTED = 1; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_STARTED = 1; + /** + * Workflow execution has successfully completed and contains Workflow execution results + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED = 2; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED = 2; + /** + * Workflow execution has unsuccessfully completed and contains the Workflow execution error + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_FAILED = 3; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_FAILED = 3; + /** + * Workflow execution has timed out by the Temporal Server + * Usually due to the Workflow having not been completed within timeout settings + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT = 4; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT = 4; + /** + * Workflow Task has been scheduled and the SDK client should now be able to process any new history events + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_TASK_SCHEDULED = 5; + */ + const EVENT_TYPE_WORKFLOW_TASK_SCHEDULED = 5; + /** + * Workflow Task has started and the SDK client has picked up the Workflow Task and is processing new history events + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_TASK_STARTED = 6; + */ + const EVENT_TYPE_WORKFLOW_TASK_STARTED = 6; + /** + * Workflow Task has completed + * The SDK client picked up the Workflow Task and processed new history events + * SDK client may or may not ask the Temporal Server to do additional work, such as: + * EVENT_TYPE_ACTIVITY_TASK_SCHEDULED + * EVENT_TYPE_TIMER_STARTED + * EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES + * EVENT_TYPE_MARKER_RECORDED + * EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED + * EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED + * EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED + * EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED + * EVENT_TYPE_WORKFLOW_EXECUTION_FAILED + * EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED + * EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_TASK_COMPLETED = 7; + */ + const EVENT_TYPE_WORKFLOW_TASK_COMPLETED = 7; + /** + * Workflow Task encountered a timeout + * Either an SDK client with a local cache was not available at the time, or it took too long for the SDK client to process the task + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT = 8; + */ + const EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT = 8; + /** + * Workflow Task encountered a failure + * Usually this means that the Workflow was non-deterministic + * However, the Workflow reset functionality also uses this event + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_TASK_FAILED = 9; + */ + const EVENT_TYPE_WORKFLOW_TASK_FAILED = 9; + /** + * Activity Task was scheduled + * The SDK client should pick up this activity task and execute + * This event type contains activity inputs, as well as activity timeout configurations + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_TASK_SCHEDULED = 10; + */ + const EVENT_TYPE_ACTIVITY_TASK_SCHEDULED = 10; + /** + * Activity Task has started executing + * The SDK client has picked up the Activity Task and is processing the Activity invocation + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_TASK_STARTED = 11; + */ + const EVENT_TYPE_ACTIVITY_TASK_STARTED = 11; + /** + * Activity Task has finished successfully + * The SDK client has picked up and successfully completed the Activity Task + * This event type contains Activity execution results + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_TASK_COMPLETED = 12; + */ + const EVENT_TYPE_ACTIVITY_TASK_COMPLETED = 12; + /** + * Activity Task has finished unsuccessfully + * The SDK picked up the Activity Task but unsuccessfully completed it + * This event type contains Activity execution errors + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_TASK_FAILED = 13; + */ + const EVENT_TYPE_ACTIVITY_TASK_FAILED = 13; + /** + * Activity has timed out according to the Temporal Server + * Activity did not complete within the timeout settings + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT = 14; + */ + const EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT = 14; + /** + * A request to cancel the Activity has occurred + * The SDK client will be able to confirm cancellation of an Activity during an Activity heartbeat + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED = 15; + */ + const EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED = 15; + /** + * Activity has been cancelled + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_TASK_CANCELED = 16; + */ + const EVENT_TYPE_ACTIVITY_TASK_CANCELED = 16; + /** + * A timer has started + * + * Generated from protobuf enum EVENT_TYPE_TIMER_STARTED = 17; + */ + const EVENT_TYPE_TIMER_STARTED = 17; + /** + * A timer has fired + * + * Generated from protobuf enum EVENT_TYPE_TIMER_FIRED = 18; + */ + const EVENT_TYPE_TIMER_FIRED = 18; + /** + * A time has been cancelled + * + * Generated from protobuf enum EVENT_TYPE_TIMER_CANCELED = 19; + */ + const EVENT_TYPE_TIMER_CANCELED = 19; + /** + * A request has been made to cancel the Workflow execution + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED = 20; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED = 20; + /** + * SDK client has confirmed the cancellation request and the Workflow execution has been cancelled + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED = 21; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED = 21; + /** + * Workflow has requested that the Temporal Server try to cancel another Workflow + * + * Generated from protobuf enum EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED = 22; + */ + const EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED = 22; + /** + * Temporal Server could not cancel the targeted Workflow + * This is usually because the target Workflow could not be found + * + * Generated from protobuf enum EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED = 23; + */ + const EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED = 23; + /** + * Temporal Server has successfully requested the cancellation of the target Workflow + * + * Generated from protobuf enum EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED = 24; + */ + const EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED = 24; + /** + * A marker has been recorded. + * This event type is transparent to the Temporal Server + * The Server will only store it and will not try to understand it. + * + * Generated from protobuf enum EVENT_TYPE_MARKER_RECORDED = 25; + */ + const EVENT_TYPE_MARKER_RECORDED = 25; + /** + * Workflow has received a Signal event + * The event type contains the Signal name, as well as a Signal payload + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED = 26; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED = 26; + /** + * Workflow execution has been forcefully terminated + * This is usually because the terminate Workflow API was called + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED = 27; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED = 27; + /** + * Workflow has successfully completed and a new Workflow has been started within the same transaction + * Contains last Workflow execution results as well as new Workflow execution inputs + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW = 28; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW = 28; + /** + * Temporal Server will try to start a child Workflow + * + * Generated from protobuf enum EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED = 29; + */ + const EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED = 29; + /** + * Child Workflow execution cannot be started/triggered + * Usually due to a child Workflow ID collision + * + * Generated from protobuf enum EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED = 30; + */ + const EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED = 30; + /** + * Child Workflow execution has successfully started/triggered + * + * Generated from protobuf enum EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED = 31; + */ + const EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED = 31; + /** + * Child Workflow execution has successfully completed + * + * Generated from protobuf enum EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED = 32; + */ + const EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED = 32; + /** + * Child Workflow execution has unsuccessfully completed + * + * Generated from protobuf enum EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED = 33; + */ + const EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED = 33; + /** + * Child Workflow execution has been cancelled + * + * Generated from protobuf enum EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED = 34; + */ + const EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED = 34; + /** + * Child Workflow execution has timed out by the Temporal Server + * + * Generated from protobuf enum EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT = 35; + */ + const EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT = 35; + /** + * Child Workflow execution has been terminated + * + * Generated from protobuf enum EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED = 36; + */ + const EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED = 36; + /** + * Temporal Server will try to Signal the targeted Workflow + * Contains the Signal name, as well as a Signal payload + * + * Generated from protobuf enum EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED = 37; + */ + const EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED = 37; + /** + * Temporal Server cannot Signal the targeted Workflow + * Usually because the Workflow could not be found + * + * Generated from protobuf enum EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED = 38; + */ + const EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED = 38; + /** + * Temporal Server has successfully Signaled the targeted Workflow + * + * Generated from protobuf enum EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED = 39; + */ + const EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED = 39; + /** + * Workflow search attributes should be updated and synchronized with the visibility store + * + * Generated from protobuf enum EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 40; + */ + const EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 40; + /** + * An update was accepted (i.e. validated) + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED = 41; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED = 41; + /** + * An update was rejected (i.e. failed validation) + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED = 42; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED = 42; + /** + * An update completed + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED = 43; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED = 43; + /** + * Some property or properties of the workflow as a whole have changed by non-workflow code. + * The distinction of external vs. command-based modification is important so the SDK can + * maintain determinism when using the command-based approach. + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY = 44; + */ + const EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY = 44; + /** + * Some property or properties of an already-scheduled activity have changed by non-workflow code. + * The distinction of external vs. command-based modification is important so the SDK can + * maintain determinism when using the command-based approach. + * + * Generated from protobuf enum EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY = 45; + */ + const EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY = 45; + /** + * Workflow properties modified by user workflow code + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED = 46; + */ + const EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED = 46; + /** + * An update was admitted. Note that not all admitted updates result in this + * event. See UpdateAdmittedEventOrigin for situations in which this event + * is created. + * + * Generated from protobuf enum EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED = 47; + */ + const EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED = 47; + /** + * A Nexus operation was scheduled using a ScheduleNexusOperation command. + * + * Generated from protobuf enum EVENT_TYPE_NEXUS_OPERATION_SCHEDULED = 48; + */ + const EVENT_TYPE_NEXUS_OPERATION_SCHEDULED = 48; + /** + * An asynchronous Nexus operation was started by a Nexus handler. + * + * Generated from protobuf enum EVENT_TYPE_NEXUS_OPERATION_STARTED = 49; + */ + const EVENT_TYPE_NEXUS_OPERATION_STARTED = 49; + /** + * A Nexus operation completed successfully. + * + * Generated from protobuf enum EVENT_TYPE_NEXUS_OPERATION_COMPLETED = 50; + */ + const EVENT_TYPE_NEXUS_OPERATION_COMPLETED = 50; + /** + * A Nexus operation failed. + * + * Generated from protobuf enum EVENT_TYPE_NEXUS_OPERATION_FAILED = 51; + */ + const EVENT_TYPE_NEXUS_OPERATION_FAILED = 51; + /** + * A Nexus operation completed as canceled. + * + * Generated from protobuf enum EVENT_TYPE_NEXUS_OPERATION_CANCELED = 52; + */ + const EVENT_TYPE_NEXUS_OPERATION_CANCELED = 52; + /** + * A Nexus operation timed out. + * + * Generated from protobuf enum EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT = 53; + */ + const EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT = 53; + /** + * A Nexus operation was requested to be canceled using a RequestCancelNexusOperation command. + * + * Generated from protobuf enum EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED = 54; + */ + const EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED = 54; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_STARTED => 'EVENT_TYPE_WORKFLOW_EXECUTION_STARTED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED => 'EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_FAILED => 'EVENT_TYPE_WORKFLOW_EXECUTION_FAILED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT => 'EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT', + self::EVENT_TYPE_WORKFLOW_TASK_SCHEDULED => 'EVENT_TYPE_WORKFLOW_TASK_SCHEDULED', + self::EVENT_TYPE_WORKFLOW_TASK_STARTED => 'EVENT_TYPE_WORKFLOW_TASK_STARTED', + self::EVENT_TYPE_WORKFLOW_TASK_COMPLETED => 'EVENT_TYPE_WORKFLOW_TASK_COMPLETED', + self::EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT => 'EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT', + self::EVENT_TYPE_WORKFLOW_TASK_FAILED => 'EVENT_TYPE_WORKFLOW_TASK_FAILED', + self::EVENT_TYPE_ACTIVITY_TASK_SCHEDULED => 'EVENT_TYPE_ACTIVITY_TASK_SCHEDULED', + self::EVENT_TYPE_ACTIVITY_TASK_STARTED => 'EVENT_TYPE_ACTIVITY_TASK_STARTED', + self::EVENT_TYPE_ACTIVITY_TASK_COMPLETED => 'EVENT_TYPE_ACTIVITY_TASK_COMPLETED', + self::EVENT_TYPE_ACTIVITY_TASK_FAILED => 'EVENT_TYPE_ACTIVITY_TASK_FAILED', + self::EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT => 'EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT', + self::EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED => 'EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED', + self::EVENT_TYPE_ACTIVITY_TASK_CANCELED => 'EVENT_TYPE_ACTIVITY_TASK_CANCELED', + self::EVENT_TYPE_TIMER_STARTED => 'EVENT_TYPE_TIMER_STARTED', + self::EVENT_TYPE_TIMER_FIRED => 'EVENT_TYPE_TIMER_FIRED', + self::EVENT_TYPE_TIMER_CANCELED => 'EVENT_TYPE_TIMER_CANCELED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED => 'EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED => 'EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED', + self::EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED => 'EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED', + self::EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED => 'EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED', + self::EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED => 'EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED', + self::EVENT_TYPE_MARKER_RECORDED => 'EVENT_TYPE_MARKER_RECORDED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED => 'EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED => 'EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW => 'EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW', + self::EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED => 'EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED', + self::EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED => 'EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED', + self::EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED => 'EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED', + self::EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED => 'EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED', + self::EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED => 'EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED', + self::EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED => 'EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED', + self::EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT => 'EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT', + self::EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED => 'EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED', + self::EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED => 'EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED', + self::EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED => 'EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED', + self::EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED => 'EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED', + self::EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES => 'EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES', + self::EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED => 'EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED => 'EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED => 'EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED', + self::EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY => 'EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY', + self::EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY => 'EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY', + self::EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED => 'EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED', + self::EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED => 'EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED', + self::EVENT_TYPE_NEXUS_OPERATION_SCHEDULED => 'EVENT_TYPE_NEXUS_OPERATION_SCHEDULED', + self::EVENT_TYPE_NEXUS_OPERATION_STARTED => 'EVENT_TYPE_NEXUS_OPERATION_STARTED', + self::EVENT_TYPE_NEXUS_OPERATION_COMPLETED => 'EVENT_TYPE_NEXUS_OPERATION_COMPLETED', + self::EVENT_TYPE_NEXUS_OPERATION_FAILED => 'EVENT_TYPE_NEXUS_OPERATION_FAILED', + self::EVENT_TYPE_NEXUS_OPERATION_CANCELED => 'EVENT_TYPE_NEXUS_OPERATION_CANCELED', + self::EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT => 'EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT', + self::EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED => 'EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/HistoryEventFilterType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/HistoryEventFilterType.php new file mode 100644 index 0000000..e85f3fd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/HistoryEventFilterType.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.HistoryEventFilterType + */ +class HistoryEventFilterType +{ + /** + * Generated from protobuf enum HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED = 0; + */ + const HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum HISTORY_EVENT_FILTER_TYPE_ALL_EVENT = 1; + */ + const HISTORY_EVENT_FILTER_TYPE_ALL_EVENT = 1; + /** + * Generated from protobuf enum HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT = 2; + */ + const HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT = 2; + + private static $valueToName = [ + self::HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED => 'HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED', + self::HISTORY_EVENT_FILTER_TYPE_ALL_EVENT => 'HISTORY_EVENT_FILTER_TYPE_ALL_EVENT', + self::HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT => 'HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/IndexedValueType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/IndexedValueType.php new file mode 100644 index 0000000..e902ccf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/IndexedValueType.php @@ -0,0 +1,79 @@ +temporal.api.enums.v1.IndexedValueType + */ +class IndexedValueType +{ + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_UNSPECIFIED = 0; + */ + const INDEXED_VALUE_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_TEXT = 1; + */ + const INDEXED_VALUE_TYPE_TEXT = 1; + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_KEYWORD = 2; + */ + const INDEXED_VALUE_TYPE_KEYWORD = 2; + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_INT = 3; + */ + const INDEXED_VALUE_TYPE_INT = 3; + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_DOUBLE = 4; + */ + const INDEXED_VALUE_TYPE_DOUBLE = 4; + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_BOOL = 5; + */ + const INDEXED_VALUE_TYPE_BOOL = 5; + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_DATETIME = 6; + */ + const INDEXED_VALUE_TYPE_DATETIME = 6; + /** + * Generated from protobuf enum INDEXED_VALUE_TYPE_KEYWORD_LIST = 7; + */ + const INDEXED_VALUE_TYPE_KEYWORD_LIST = 7; + + private static $valueToName = [ + self::INDEXED_VALUE_TYPE_UNSPECIFIED => 'INDEXED_VALUE_TYPE_UNSPECIFIED', + self::INDEXED_VALUE_TYPE_TEXT => 'INDEXED_VALUE_TYPE_TEXT', + self::INDEXED_VALUE_TYPE_KEYWORD => 'INDEXED_VALUE_TYPE_KEYWORD', + self::INDEXED_VALUE_TYPE_INT => 'INDEXED_VALUE_TYPE_INT', + self::INDEXED_VALUE_TYPE_DOUBLE => 'INDEXED_VALUE_TYPE_DOUBLE', + self::INDEXED_VALUE_TYPE_BOOL => 'INDEXED_VALUE_TYPE_BOOL', + self::INDEXED_VALUE_TYPE_DATETIME => 'INDEXED_VALUE_TYPE_DATETIME', + self::INDEXED_VALUE_TYPE_KEYWORD_LIST => 'INDEXED_VALUE_TYPE_KEYWORD_LIST', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/NamespaceState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/NamespaceState.php new file mode 100644 index 0000000..13be33d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/NamespaceState.php @@ -0,0 +1,59 @@ +temporal.api.enums.v1.NamespaceState + */ +class NamespaceState +{ + /** + * Generated from protobuf enum NAMESPACE_STATE_UNSPECIFIED = 0; + */ + const NAMESPACE_STATE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum NAMESPACE_STATE_REGISTERED = 1; + */ + const NAMESPACE_STATE_REGISTERED = 1; + /** + * Generated from protobuf enum NAMESPACE_STATE_DEPRECATED = 2; + */ + const NAMESPACE_STATE_DEPRECATED = 2; + /** + * Generated from protobuf enum NAMESPACE_STATE_DELETED = 3; + */ + const NAMESPACE_STATE_DELETED = 3; + + private static $valueToName = [ + self::NAMESPACE_STATE_UNSPECIFIED => 'NAMESPACE_STATE_UNSPECIFIED', + self::NAMESPACE_STATE_REGISTERED => 'NAMESPACE_STATE_REGISTERED', + self::NAMESPACE_STATE_DEPRECATED => 'NAMESPACE_STATE_DEPRECATED', + self::NAMESPACE_STATE_DELETED => 'NAMESPACE_STATE_DELETED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/NexusOperationCancellationState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/NexusOperationCancellationState.php new file mode 100644 index 0000000..959f6e3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/NexusOperationCancellationState.php @@ -0,0 +1,83 @@ +temporal.api.enums.v1.NexusOperationCancellationState + */ +class NexusOperationCancellationState +{ + /** + * Default value, unspecified state. + * + * Generated from protobuf enum NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED = 0; + */ + const NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED = 0; + /** + * Cancellation request is in the queue waiting to be executed or is currently executing. + * + * Generated from protobuf enum NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED = 1; + */ + const NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED = 1; + /** + * Cancellation request has failed with a retryable error and is backing off before the next attempt. + * + * Generated from protobuf enum NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF = 2; + */ + const NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF = 2; + /** + * Cancellation request succeeded. + * + * Generated from protobuf enum NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED = 3; + */ + const NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED = 3; + /** + * Cancellation request failed with a non-retryable error. + * + * Generated from protobuf enum NEXUS_OPERATION_CANCELLATION_STATE_FAILED = 4; + */ + const NEXUS_OPERATION_CANCELLATION_STATE_FAILED = 4; + /** + * The associated operation timed out - exceeded the user supplied schedule-to-close timeout. + * + * Generated from protobuf enum NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT = 5; + */ + const NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT = 5; + + private static $valueToName = [ + self::NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED => 'NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED', + self::NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED => 'NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED', + self::NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF => 'NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF', + self::NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED => 'NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED', + self::NEXUS_OPERATION_CANCELLATION_STATE_FAILED => 'NEXUS_OPERATION_CANCELLATION_STATE_FAILED', + self::NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT => 'NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ParentClosePolicy.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ParentClosePolicy.php new file mode 100644 index 0000000..4c81dc9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ParentClosePolicy.php @@ -0,0 +1,67 @@ +temporal.api.enums.v1.ParentClosePolicy + */ +class ParentClosePolicy +{ + /** + * Generated from protobuf enum PARENT_CLOSE_POLICY_UNSPECIFIED = 0; + */ + const PARENT_CLOSE_POLICY_UNSPECIFIED = 0; + /** + * The child workflow will also terminate + * + * Generated from protobuf enum PARENT_CLOSE_POLICY_TERMINATE = 1; + */ + const PARENT_CLOSE_POLICY_TERMINATE = 1; + /** + * The child workflow will do nothing + * + * Generated from protobuf enum PARENT_CLOSE_POLICY_ABANDON = 2; + */ + const PARENT_CLOSE_POLICY_ABANDON = 2; + /** + * Cancellation will be requested of the child workflow + * + * Generated from protobuf enum PARENT_CLOSE_POLICY_REQUEST_CANCEL = 3; + */ + const PARENT_CLOSE_POLICY_REQUEST_CANCEL = 3; + + private static $valueToName = [ + self::PARENT_CLOSE_POLICY_UNSPECIFIED => 'PARENT_CLOSE_POLICY_UNSPECIFIED', + self::PARENT_CLOSE_POLICY_TERMINATE => 'PARENT_CLOSE_POLICY_TERMINATE', + self::PARENT_CLOSE_POLICY_ABANDON => 'PARENT_CLOSE_POLICY_ABANDON', + self::PARENT_CLOSE_POLICY_REQUEST_CANCEL => 'PARENT_CLOSE_POLICY_REQUEST_CANCEL', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingActivityState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingActivityState.php new file mode 100644 index 0000000..3be2926 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingActivityState.php @@ -0,0 +1,59 @@ +temporal.api.enums.v1.PendingActivityState + */ +class PendingActivityState +{ + /** + * Generated from protobuf enum PENDING_ACTIVITY_STATE_UNSPECIFIED = 0; + */ + const PENDING_ACTIVITY_STATE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum PENDING_ACTIVITY_STATE_SCHEDULED = 1; + */ + const PENDING_ACTIVITY_STATE_SCHEDULED = 1; + /** + * Generated from protobuf enum PENDING_ACTIVITY_STATE_STARTED = 2; + */ + const PENDING_ACTIVITY_STATE_STARTED = 2; + /** + * Generated from protobuf enum PENDING_ACTIVITY_STATE_CANCEL_REQUESTED = 3; + */ + const PENDING_ACTIVITY_STATE_CANCEL_REQUESTED = 3; + + private static $valueToName = [ + self::PENDING_ACTIVITY_STATE_UNSPECIFIED => 'PENDING_ACTIVITY_STATE_UNSPECIFIED', + self::PENDING_ACTIVITY_STATE_SCHEDULED => 'PENDING_ACTIVITY_STATE_SCHEDULED', + self::PENDING_ACTIVITY_STATE_STARTED => 'PENDING_ACTIVITY_STATE_STARTED', + self::PENDING_ACTIVITY_STATE_CANCEL_REQUESTED => 'PENDING_ACTIVITY_STATE_CANCEL_REQUESTED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingNexusOperationState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingNexusOperationState.php new file mode 100644 index 0000000..e3503de --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingNexusOperationState.php @@ -0,0 +1,69 @@ +temporal.api.enums.v1.PendingNexusOperationState + */ +class PendingNexusOperationState +{ + /** + * Default value, unspecified state. + * + * Generated from protobuf enum PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED = 0; + */ + const PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED = 0; + /** + * Operation is in the queue waiting to be executed or is currently executing. + * + * Generated from protobuf enum PENDING_NEXUS_OPERATION_STATE_SCHEDULED = 1; + */ + const PENDING_NEXUS_OPERATION_STATE_SCHEDULED = 1; + /** + * Operation has failed with a retryable error and is backing off before the next attempt. + * + * Generated from protobuf enum PENDING_NEXUS_OPERATION_STATE_BACKING_OFF = 2; + */ + const PENDING_NEXUS_OPERATION_STATE_BACKING_OFF = 2; + /** + * Operation was started and will complete asynchronously. + * + * Generated from protobuf enum PENDING_NEXUS_OPERATION_STATE_STARTED = 3; + */ + const PENDING_NEXUS_OPERATION_STATE_STARTED = 3; + + private static $valueToName = [ + self::PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED => 'PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED', + self::PENDING_NEXUS_OPERATION_STATE_SCHEDULED => 'PENDING_NEXUS_OPERATION_STATE_SCHEDULED', + self::PENDING_NEXUS_OPERATION_STATE_BACKING_OFF => 'PENDING_NEXUS_OPERATION_STATE_BACKING_OFF', + self::PENDING_NEXUS_OPERATION_STATE_STARTED => 'PENDING_NEXUS_OPERATION_STATE_STARTED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingWorkflowTaskState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingWorkflowTaskState.php new file mode 100644 index 0000000..97b3f90 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/PendingWorkflowTaskState.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.PendingWorkflowTaskState + */ +class PendingWorkflowTaskState +{ + /** + * Generated from protobuf enum PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED = 0; + */ + const PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum PENDING_WORKFLOW_TASK_STATE_SCHEDULED = 1; + */ + const PENDING_WORKFLOW_TASK_STATE_SCHEDULED = 1; + /** + * Generated from protobuf enum PENDING_WORKFLOW_TASK_STATE_STARTED = 2; + */ + const PENDING_WORKFLOW_TASK_STATE_STARTED = 2; + + private static $valueToName = [ + self::PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED => 'PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED', + self::PENDING_WORKFLOW_TASK_STATE_SCHEDULED => 'PENDING_WORKFLOW_TASK_STATE_SCHEDULED', + self::PENDING_WORKFLOW_TASK_STATE_STARTED => 'PENDING_WORKFLOW_TASK_STATE_STARTED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/QueryRejectCondition.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/QueryRejectCondition.php new file mode 100644 index 0000000..1fc79a9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/QueryRejectCondition.php @@ -0,0 +1,65 @@ +temporal.api.enums.v1.QueryRejectCondition + */ +class QueryRejectCondition +{ + /** + * Generated from protobuf enum QUERY_REJECT_CONDITION_UNSPECIFIED = 0; + */ + const QUERY_REJECT_CONDITION_UNSPECIFIED = 0; + /** + * None indicates that query should not be rejected. + * + * Generated from protobuf enum QUERY_REJECT_CONDITION_NONE = 1; + */ + const QUERY_REJECT_CONDITION_NONE = 1; + /** + * NotOpen indicates that query should be rejected if workflow is not open. + * + * Generated from protobuf enum QUERY_REJECT_CONDITION_NOT_OPEN = 2; + */ + const QUERY_REJECT_CONDITION_NOT_OPEN = 2; + /** + * NotCompletedCleanly indicates that query should be rejected if workflow did not complete cleanly. + * + * Generated from protobuf enum QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY = 3; + */ + const QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY = 3; + + private static $valueToName = [ + self::QUERY_REJECT_CONDITION_UNSPECIFIED => 'QUERY_REJECT_CONDITION_UNSPECIFIED', + self::QUERY_REJECT_CONDITION_NONE => 'QUERY_REJECT_CONDITION_NONE', + self::QUERY_REJECT_CONDITION_NOT_OPEN => 'QUERY_REJECT_CONDITION_NOT_OPEN', + self::QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY => 'QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/QueryResultType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/QueryResultType.php new file mode 100644 index 0000000..28357c8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/QueryResultType.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.QueryResultType + */ +class QueryResultType +{ + /** + * Generated from protobuf enum QUERY_RESULT_TYPE_UNSPECIFIED = 0; + */ + const QUERY_RESULT_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum QUERY_RESULT_TYPE_ANSWERED = 1; + */ + const QUERY_RESULT_TYPE_ANSWERED = 1; + /** + * Generated from protobuf enum QUERY_RESULT_TYPE_FAILED = 2; + */ + const QUERY_RESULT_TYPE_FAILED = 2; + + private static $valueToName = [ + self::QUERY_RESULT_TYPE_UNSPECIFIED => 'QUERY_RESULT_TYPE_UNSPECIFIED', + self::QUERY_RESULT_TYPE_ANSWERED => 'QUERY_RESULT_TYPE_ANSWERED', + self::QUERY_RESULT_TYPE_FAILED => 'QUERY_RESULT_TYPE_FAILED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ReplicationState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ReplicationState.php new file mode 100644 index 0000000..acc304d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ReplicationState.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.ReplicationState + */ +class ReplicationState +{ + /** + * Generated from protobuf enum REPLICATION_STATE_UNSPECIFIED = 0; + */ + const REPLICATION_STATE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum REPLICATION_STATE_NORMAL = 1; + */ + const REPLICATION_STATE_NORMAL = 1; + /** + * Generated from protobuf enum REPLICATION_STATE_HANDOVER = 2; + */ + const REPLICATION_STATE_HANDOVER = 2; + + private static $valueToName = [ + self::REPLICATION_STATE_UNSPECIFIED => 'REPLICATION_STATE_UNSPECIFIED', + self::REPLICATION_STATE_NORMAL => 'REPLICATION_STATE_NORMAL', + self::REPLICATION_STATE_HANDOVER => 'REPLICATION_STATE_HANDOVER', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetReapplyExcludeType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetReapplyExcludeType.php new file mode 100644 index 0000000..beb4994 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetReapplyExcludeType.php @@ -0,0 +1,60 @@ +temporal.api.enums.v1.ResetReapplyExcludeType + */ +class ResetReapplyExcludeType +{ + /** + * Generated from protobuf enum RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED = 0; + */ + const RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED = 0; + /** + * Exclude signals when reapplying events. + * + * Generated from protobuf enum RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL = 1; + */ + const RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL = 1; + /** + * Exclude updates when reapplying events. + * + * Generated from protobuf enum RESET_REAPPLY_EXCLUDE_TYPE_UPDATE = 2; + */ + const RESET_REAPPLY_EXCLUDE_TYPE_UPDATE = 2; + + private static $valueToName = [ + self::RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED => 'RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED', + self::RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL => 'RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL', + self::RESET_REAPPLY_EXCLUDE_TYPE_UPDATE => 'RESET_REAPPLY_EXCLUDE_TYPE_UPDATE', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetReapplyType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetReapplyType.php new file mode 100644 index 0000000..9fda0f3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetReapplyType.php @@ -0,0 +1,69 @@ +temporal.api.enums.v1.ResetReapplyType + */ +class ResetReapplyType +{ + /** + * Generated from protobuf enum RESET_REAPPLY_TYPE_UNSPECIFIED = 0; + */ + const RESET_REAPPLY_TYPE_UNSPECIFIED = 0; + /** + * Signals are reapplied when workflow is reset. + * + * Generated from protobuf enum RESET_REAPPLY_TYPE_SIGNAL = 1; + */ + const RESET_REAPPLY_TYPE_SIGNAL = 1; + /** + * No events are reapplied when workflow is reset. + * + * Generated from protobuf enum RESET_REAPPLY_TYPE_NONE = 2; + */ + const RESET_REAPPLY_TYPE_NONE = 2; + /** + * All eligible events are reapplied when workflow is reset. + * + * Generated from protobuf enum RESET_REAPPLY_TYPE_ALL_ELIGIBLE = 3; + */ + const RESET_REAPPLY_TYPE_ALL_ELIGIBLE = 3; + + private static $valueToName = [ + self::RESET_REAPPLY_TYPE_UNSPECIFIED => 'RESET_REAPPLY_TYPE_UNSPECIFIED', + self::RESET_REAPPLY_TYPE_SIGNAL => 'RESET_REAPPLY_TYPE_SIGNAL', + self::RESET_REAPPLY_TYPE_NONE => 'RESET_REAPPLY_TYPE_NONE', + self::RESET_REAPPLY_TYPE_ALL_ELIGIBLE => 'RESET_REAPPLY_TYPE_ALL_ELIGIBLE', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetType.php new file mode 100644 index 0000000..2bf5a20 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResetType.php @@ -0,0 +1,60 @@ +temporal.api.enums.v1.ResetType + */ +class ResetType +{ + /** + * Generated from protobuf enum RESET_TYPE_UNSPECIFIED = 0; + */ + const RESET_TYPE_UNSPECIFIED = 0; + /** + * Resets to event of the first workflow task completed, or if it does not exist, the event after task scheduled. + * + * Generated from protobuf enum RESET_TYPE_FIRST_WORKFLOW_TASK = 1; + */ + const RESET_TYPE_FIRST_WORKFLOW_TASK = 1; + /** + * Resets to event of the last workflow task completed, or if it does not exist, the event after task scheduled. + * + * Generated from protobuf enum RESET_TYPE_LAST_WORKFLOW_TASK = 2; + */ + const RESET_TYPE_LAST_WORKFLOW_TASK = 2; + + private static $valueToName = [ + self::RESET_TYPE_UNSPECIFIED => 'RESET_TYPE_UNSPECIFIED', + self::RESET_TYPE_FIRST_WORKFLOW_TASK => 'RESET_TYPE_FIRST_WORKFLOW_TASK', + self::RESET_TYPE_LAST_WORKFLOW_TASK => 'RESET_TYPE_LAST_WORKFLOW_TASK', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResourceExhaustedCause.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResourceExhaustedCause.php new file mode 100644 index 0000000..9b2c3fd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResourceExhaustedCause.php @@ -0,0 +1,93 @@ +temporal.api.enums.v1.ResourceExhaustedCause + */ +class ResourceExhaustedCause +{ + /** + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_UNSPECIFIED = 0; + */ + const RESOURCE_EXHAUSTED_CAUSE_UNSPECIFIED = 0; + /** + * Caller exceeds request per second limit. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_RPS_LIMIT = 1; + */ + const RESOURCE_EXHAUSTED_CAUSE_RPS_LIMIT = 1; + /** + * Caller exceeds max concurrent request limit. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_CONCURRENT_LIMIT = 2; + */ + const RESOURCE_EXHAUSTED_CAUSE_CONCURRENT_LIMIT = 2; + /** + * System overloaded. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_SYSTEM_OVERLOADED = 3; + */ + const RESOURCE_EXHAUSTED_CAUSE_SYSTEM_OVERLOADED = 3; + /** + * Namespace exceeds persistence rate limit. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT = 4; + */ + const RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT = 4; + /** + * Workflow is busy + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_BUSY_WORKFLOW = 5; + */ + const RESOURCE_EXHAUSTED_CAUSE_BUSY_WORKFLOW = 5; + /** + * Caller exceeds action per second limit. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_APS_LIMIT = 6; + */ + const RESOURCE_EXHAUSTED_CAUSE_APS_LIMIT = 6; + /** + * Persistence storage limit exceeded. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_STORAGE_LIMIT = 7; + */ + const RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_STORAGE_LIMIT = 7; + + private static $valueToName = [ + self::RESOURCE_EXHAUSTED_CAUSE_UNSPECIFIED => 'RESOURCE_EXHAUSTED_CAUSE_UNSPECIFIED', + self::RESOURCE_EXHAUSTED_CAUSE_RPS_LIMIT => 'RESOURCE_EXHAUSTED_CAUSE_RPS_LIMIT', + self::RESOURCE_EXHAUSTED_CAUSE_CONCURRENT_LIMIT => 'RESOURCE_EXHAUSTED_CAUSE_CONCURRENT_LIMIT', + self::RESOURCE_EXHAUSTED_CAUSE_SYSTEM_OVERLOADED => 'RESOURCE_EXHAUSTED_CAUSE_SYSTEM_OVERLOADED', + self::RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT => 'RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT', + self::RESOURCE_EXHAUSTED_CAUSE_BUSY_WORKFLOW => 'RESOURCE_EXHAUSTED_CAUSE_BUSY_WORKFLOW', + self::RESOURCE_EXHAUSTED_CAUSE_APS_LIMIT => 'RESOURCE_EXHAUSTED_CAUSE_APS_LIMIT', + self::RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_STORAGE_LIMIT => 'RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_STORAGE_LIMIT', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResourceExhaustedScope.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResourceExhaustedScope.php new file mode 100644 index 0000000..124aa91 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ResourceExhaustedScope.php @@ -0,0 +1,58 @@ +temporal.api.enums.v1.ResourceExhaustedScope + */ +class ResourceExhaustedScope +{ + /** + * Generated from protobuf enum RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED = 0; + */ + const RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED = 0; + /** + * Exhausted resource is a system-level resource. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_SCOPE_NAMESPACE = 1; + */ + const RESOURCE_EXHAUSTED_SCOPE_NAMESPACE = 1; + /** + * Exhausted resource is a namespace-level resource. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED_SCOPE_SYSTEM = 2; + */ + const RESOURCE_EXHAUSTED_SCOPE_SYSTEM = 2; + + private static $valueToName = [ + self::RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED => 'RESOURCE_EXHAUSTED_SCOPE_UNSPECIFIED', + self::RESOURCE_EXHAUSTED_SCOPE_NAMESPACE => 'RESOURCE_EXHAUSTED_SCOPE_NAMESPACE', + self::RESOURCE_EXHAUSTED_SCOPE_SYSTEM => 'RESOURCE_EXHAUSTED_SCOPE_SYSTEM', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/RetryState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/RetryState.php new file mode 100644 index 0000000..f586654 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/RetryState.php @@ -0,0 +1,79 @@ +temporal.api.enums.v1.RetryState + */ +class RetryState +{ + /** + * Generated from protobuf enum RETRY_STATE_UNSPECIFIED = 0; + */ + const RETRY_STATE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum RETRY_STATE_IN_PROGRESS = 1; + */ + const RETRY_STATE_IN_PROGRESS = 1; + /** + * Generated from protobuf enum RETRY_STATE_NON_RETRYABLE_FAILURE = 2; + */ + const RETRY_STATE_NON_RETRYABLE_FAILURE = 2; + /** + * Generated from protobuf enum RETRY_STATE_TIMEOUT = 3; + */ + const RETRY_STATE_TIMEOUT = 3; + /** + * Generated from protobuf enum RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED = 4; + */ + const RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED = 4; + /** + * Generated from protobuf enum RETRY_STATE_RETRY_POLICY_NOT_SET = 5; + */ + const RETRY_STATE_RETRY_POLICY_NOT_SET = 5; + /** + * Generated from protobuf enum RETRY_STATE_INTERNAL_SERVER_ERROR = 6; + */ + const RETRY_STATE_INTERNAL_SERVER_ERROR = 6; + /** + * Generated from protobuf enum RETRY_STATE_CANCEL_REQUESTED = 7; + */ + const RETRY_STATE_CANCEL_REQUESTED = 7; + + private static $valueToName = [ + self::RETRY_STATE_UNSPECIFIED => 'RETRY_STATE_UNSPECIFIED', + self::RETRY_STATE_IN_PROGRESS => 'RETRY_STATE_IN_PROGRESS', + self::RETRY_STATE_NON_RETRYABLE_FAILURE => 'RETRY_STATE_NON_RETRYABLE_FAILURE', + self::RETRY_STATE_TIMEOUT => 'RETRY_STATE_TIMEOUT', + self::RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED => 'RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED', + self::RETRY_STATE_RETRY_POLICY_NOT_SET => 'RETRY_STATE_RETRY_POLICY_NOT_SET', + self::RETRY_STATE_INTERNAL_SERVER_ERROR => 'RETRY_STATE_INTERNAL_SERVER_ERROR', + self::RETRY_STATE_CANCEL_REQUESTED => 'RETRY_STATE_CANCEL_REQUESTED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ScheduleOverlapPolicy.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ScheduleOverlapPolicy.php new file mode 100644 index 0000000..6e866d6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/ScheduleOverlapPolicy.php @@ -0,0 +1,98 @@ +temporal.api.enums.v1.ScheduleOverlapPolicy + */ +class ScheduleOverlapPolicy +{ + /** + * Generated from protobuf enum SCHEDULE_OVERLAP_POLICY_UNSPECIFIED = 0; + */ + const SCHEDULE_OVERLAP_POLICY_UNSPECIFIED = 0; + /** + * SCHEDULE_OVERLAP_POLICY_SKIP (default) means don't start anything. When the + * workflow completes, the next scheduled event after that time will be considered. + * + * Generated from protobuf enum SCHEDULE_OVERLAP_POLICY_SKIP = 1; + */ + const SCHEDULE_OVERLAP_POLICY_SKIP = 1; + /** + * SCHEDULE_OVERLAP_POLICY_BUFFER_ONE means start the workflow again soon as the + * current one completes, but only buffer one start in this way. If another start is + * supposed to happen when the workflow is running, and one is already buffered, then + * only the first one will be started after the running workflow finishes. + * + * Generated from protobuf enum SCHEDULE_OVERLAP_POLICY_BUFFER_ONE = 2; + */ + const SCHEDULE_OVERLAP_POLICY_BUFFER_ONE = 2; + /** + * SCHEDULE_OVERLAP_POLICY_BUFFER_ALL means buffer up any number of starts to all + * happen sequentially, immediately after the running workflow completes. + * + * Generated from protobuf enum SCHEDULE_OVERLAP_POLICY_BUFFER_ALL = 3; + */ + const SCHEDULE_OVERLAP_POLICY_BUFFER_ALL = 3; + /** + * SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER means that if there is another workflow + * running, cancel it, and start the new one after the old one completes cancellation. + * + * Generated from protobuf enum SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER = 4; + */ + const SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER = 4; + /** + * SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER means that if there is another workflow + * running, terminate it and start the new one immediately. + * + * Generated from protobuf enum SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER = 5; + */ + const SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER = 5; + /** + * SCHEDULE_OVERLAP_POLICY_ALLOW_ALL means start any number of concurrent workflows. + * Note that with this policy, last completion result and last failure will not be + * available since workflows are not sequential. + * + * Generated from protobuf enum SCHEDULE_OVERLAP_POLICY_ALLOW_ALL = 6; + */ + const SCHEDULE_OVERLAP_POLICY_ALLOW_ALL = 6; + + private static $valueToName = [ + self::SCHEDULE_OVERLAP_POLICY_UNSPECIFIED => 'SCHEDULE_OVERLAP_POLICY_UNSPECIFIED', + self::SCHEDULE_OVERLAP_POLICY_SKIP => 'SCHEDULE_OVERLAP_POLICY_SKIP', + self::SCHEDULE_OVERLAP_POLICY_BUFFER_ONE => 'SCHEDULE_OVERLAP_POLICY_BUFFER_ONE', + self::SCHEDULE_OVERLAP_POLICY_BUFFER_ALL => 'SCHEDULE_OVERLAP_POLICY_BUFFER_ALL', + self::SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER => 'SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER', + self::SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER => 'SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER', + self::SCHEDULE_OVERLAP_POLICY_ALLOW_ALL => 'SCHEDULE_OVERLAP_POLICY_ALLOW_ALL', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/Severity.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/Severity.php new file mode 100644 index 0000000..d3cbe55 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/Severity.php @@ -0,0 +1,59 @@ +temporal.api.enums.v1.Severity + */ +class Severity +{ + /** + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum SEVERITY_HIGH = 1; + */ + const SEVERITY_HIGH = 1; + /** + * Generated from protobuf enum SEVERITY_MEDIUM = 2; + */ + const SEVERITY_MEDIUM = 2; + /** + * Generated from protobuf enum SEVERITY_LOW = 3; + */ + const SEVERITY_LOW = 3; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::SEVERITY_HIGH => 'SEVERITY_HIGH', + self::SEVERITY_MEDIUM => 'SEVERITY_MEDIUM', + self::SEVERITY_LOW => 'SEVERITY_LOW', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/SignalExternalWorkflowExecutionFailedCause.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/SignalExternalWorkflowExecutionFailedCause.php new file mode 100644 index 0000000..a231545 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/SignalExternalWorkflowExecutionFailedCause.php @@ -0,0 +1,61 @@ +temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause + */ +class SignalExternalWorkflowExecutionFailedCause +{ + /** + * Generated from protobuf enum SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0; + */ + const SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND = 1; + */ + const SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND = 1; + /** + * Generated from protobuf enum SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2; + */ + const SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2; + /** + * Signal count limit is per workflow and controlled by server dynamic config "history.maximumSignalsPerExecution" + * + * Generated from protobuf enum SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED = 3; + */ + const SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED = 3; + + private static $valueToName = [ + self::SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED => 'SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED', + self::SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND => 'SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND', + self::SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND => 'SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND', + self::SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED => 'SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/StartChildWorkflowExecutionFailedCause.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/StartChildWorkflowExecutionFailedCause.php new file mode 100644 index 0000000..3fb66ca --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/StartChildWorkflowExecutionFailedCause.php @@ -0,0 +1,54 @@ +temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause + */ +class StartChildWorkflowExecutionFailedCause +{ + /** + * Generated from protobuf enum START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0; + */ + const START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS = 1; + */ + const START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS = 1; + /** + * Generated from protobuf enum START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2; + */ + const START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND = 2; + + private static $valueToName = [ + self::START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED => 'START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED', + self::START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS => 'START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS', + self::START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND => 'START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskQueueKind.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskQueueKind.php new file mode 100644 index 0000000..69dff62 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskQueueKind.php @@ -0,0 +1,66 @@ +temporal.api.enums.v1.TaskQueueKind + */ +class TaskQueueKind +{ + /** + * Generated from protobuf enum TASK_QUEUE_KIND_UNSPECIFIED = 0; + */ + const TASK_QUEUE_KIND_UNSPECIFIED = 0; + /** + * Tasks from a normal workflow task queue always include complete workflow history + * The task queue specified by the user is always a normal task queue. There can be as many + * workers as desired for a single normal task queue. All those workers may pick up tasks from + * that queue. + * + * Generated from protobuf enum TASK_QUEUE_KIND_NORMAL = 1; + */ + const TASK_QUEUE_KIND_NORMAL = 1; + /** + * A sticky queue only includes new history since the last workflow task, and they are + * per-worker. + * Sticky queues are created dynamically by each worker during their start up. They only exist + * for the lifetime of the worker process. Tasks in a sticky task queue are only available to + * the worker that created the sticky queue. + * Sticky queues are only for workflow tasks. There are no sticky task queues for activities. + * + * Generated from protobuf enum TASK_QUEUE_KIND_STICKY = 2; + */ + const TASK_QUEUE_KIND_STICKY = 2; + + private static $valueToName = [ + self::TASK_QUEUE_KIND_UNSPECIFIED => 'TASK_QUEUE_KIND_UNSPECIFIED', + self::TASK_QUEUE_KIND_NORMAL => 'TASK_QUEUE_KIND_NORMAL', + self::TASK_QUEUE_KIND_STICKY => 'TASK_QUEUE_KIND_STICKY', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskQueueType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskQueueType.php new file mode 100644 index 0000000..acf75b7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskQueueType.php @@ -0,0 +1,65 @@ +temporal.api.enums.v1.TaskQueueType + */ +class TaskQueueType +{ + /** + * Generated from protobuf enum TASK_QUEUE_TYPE_UNSPECIFIED = 0; + */ + const TASK_QUEUE_TYPE_UNSPECIFIED = 0; + /** + * Workflow type of task queue. + * + * Generated from protobuf enum TASK_QUEUE_TYPE_WORKFLOW = 1; + */ + const TASK_QUEUE_TYPE_WORKFLOW = 1; + /** + * Activity type of task queue. + * + * Generated from protobuf enum TASK_QUEUE_TYPE_ACTIVITY = 2; + */ + const TASK_QUEUE_TYPE_ACTIVITY = 2; + /** + * Task queue type for dispatching Nexus requests. + * + * Generated from protobuf enum TASK_QUEUE_TYPE_NEXUS = 3; + */ + const TASK_QUEUE_TYPE_NEXUS = 3; + + private static $valueToName = [ + self::TASK_QUEUE_TYPE_UNSPECIFIED => 'TASK_QUEUE_TYPE_UNSPECIFIED', + self::TASK_QUEUE_TYPE_WORKFLOW => 'TASK_QUEUE_TYPE_WORKFLOW', + self::TASK_QUEUE_TYPE_ACTIVITY => 'TASK_QUEUE_TYPE_ACTIVITY', + self::TASK_QUEUE_TYPE_NEXUS => 'TASK_QUEUE_TYPE_NEXUS', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskReachability.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskReachability.php new file mode 100644 index 0000000..638115c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TaskReachability.php @@ -0,0 +1,80 @@ +temporal.api.enums.v1.TaskReachability + */ +class TaskReachability +{ + /** + * Generated from protobuf enum TASK_REACHABILITY_UNSPECIFIED = 0; + */ + const TASK_REACHABILITY_UNSPECIFIED = 0; + /** + * There's a possiblity for a worker to receive new workflow tasks. Workers should *not* be retired. + * + * Generated from protobuf enum TASK_REACHABILITY_NEW_WORKFLOWS = 1; + */ + const TASK_REACHABILITY_NEW_WORKFLOWS = 1; + /** + * There's a possiblity for a worker to receive existing workflow and activity tasks from existing workflows. Workers + * should *not* be retired. + * This enum value does not distinguish between open and closed workflows. + * + * Generated from protobuf enum TASK_REACHABILITY_EXISTING_WORKFLOWS = 2; + */ + const TASK_REACHABILITY_EXISTING_WORKFLOWS = 2; + /** + * There's a possiblity for a worker to receive existing workflow and activity tasks from open workflows. Workers + * should *not* be retired. + * + * Generated from protobuf enum TASK_REACHABILITY_OPEN_WORKFLOWS = 3; + */ + const TASK_REACHABILITY_OPEN_WORKFLOWS = 3; + /** + * There's a possiblity for a worker to receive existing workflow tasks from closed workflows. Workers may be + * retired dependending on application requirements. For example, if there's no need to query closed workflows. + * + * Generated from protobuf enum TASK_REACHABILITY_CLOSED_WORKFLOWS = 4; + */ + const TASK_REACHABILITY_CLOSED_WORKFLOWS = 4; + + private static $valueToName = [ + self::TASK_REACHABILITY_UNSPECIFIED => 'TASK_REACHABILITY_UNSPECIFIED', + self::TASK_REACHABILITY_NEW_WORKFLOWS => 'TASK_REACHABILITY_NEW_WORKFLOWS', + self::TASK_REACHABILITY_EXISTING_WORKFLOWS => 'TASK_REACHABILITY_EXISTING_WORKFLOWS', + self::TASK_REACHABILITY_OPEN_WORKFLOWS => 'TASK_REACHABILITY_OPEN_WORKFLOWS', + self::TASK_REACHABILITY_CLOSED_WORKFLOWS => 'TASK_REACHABILITY_CLOSED_WORKFLOWS', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TimeoutType.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TimeoutType.php new file mode 100644 index 0000000..9fce10e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/TimeoutType.php @@ -0,0 +1,64 @@ +temporal.api.enums.v1.TimeoutType + */ +class TimeoutType +{ + /** + * Generated from protobuf enum TIMEOUT_TYPE_UNSPECIFIED = 0; + */ + const TIMEOUT_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum TIMEOUT_TYPE_START_TO_CLOSE = 1; + */ + const TIMEOUT_TYPE_START_TO_CLOSE = 1; + /** + * Generated from protobuf enum TIMEOUT_TYPE_SCHEDULE_TO_START = 2; + */ + const TIMEOUT_TYPE_SCHEDULE_TO_START = 2; + /** + * Generated from protobuf enum TIMEOUT_TYPE_SCHEDULE_TO_CLOSE = 3; + */ + const TIMEOUT_TYPE_SCHEDULE_TO_CLOSE = 3; + /** + * Generated from protobuf enum TIMEOUT_TYPE_HEARTBEAT = 4; + */ + const TIMEOUT_TYPE_HEARTBEAT = 4; + + private static $valueToName = [ + self::TIMEOUT_TYPE_UNSPECIFIED => 'TIMEOUT_TYPE_UNSPECIFIED', + self::TIMEOUT_TYPE_START_TO_CLOSE => 'TIMEOUT_TYPE_START_TO_CLOSE', + self::TIMEOUT_TYPE_SCHEDULE_TO_START => 'TIMEOUT_TYPE_SCHEDULE_TO_START', + self::TIMEOUT_TYPE_SCHEDULE_TO_CLOSE => 'TIMEOUT_TYPE_SCHEDULE_TO_CLOSE', + self::TIMEOUT_TYPE_HEARTBEAT => 'TIMEOUT_TYPE_HEARTBEAT', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateAdmittedEventOrigin.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateAdmittedEventOrigin.php new file mode 100644 index 0000000..ad07d5f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateAdmittedEventOrigin.php @@ -0,0 +1,56 @@ +temporal.api.enums.v1.UpdateAdmittedEventOrigin + */ +class UpdateAdmittedEventOrigin +{ + /** + * Generated from protobuf enum UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED = 0; + */ + const UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED = 0; + /** + * The UpdateAdmitted event was created when reapplying events during reset + * or replication. I.e. an accepted update on one branch of workflow history + * was converted into an admitted update on a different branch. + * + * Generated from protobuf enum UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY = 1; + */ + const UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY = 1; + + private static $valueToName = [ + self::UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED => 'UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED', + self::UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY => 'UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateRequestedEventOrigin.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateRequestedEventOrigin.php new file mode 100644 index 0000000..6e749d4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateRequestedEventOrigin.php @@ -0,0 +1,55 @@ +temporal.api.enums.v1.UpdateRequestedEventOrigin + */ +class UpdateRequestedEventOrigin +{ + /** + * Generated from protobuf enum UPDATE_REQUESTED_EVENT_ORIGIN_UNSPECIFIED = 0; + */ + const UPDATE_REQUESTED_EVENT_ORIGIN_UNSPECIFIED = 0; + /** + * The UpdateRequested event was created when reapplying events during reset + * or replication. I.e. an accepted update on one branch of workflow history + * was converted into a requested update on a different branch. + * + * Generated from protobuf enum UPDATE_REQUESTED_EVENT_ORIGIN_REAPPLY = 1; + */ + const UPDATE_REQUESTED_EVENT_ORIGIN_REAPPLY = 1; + + private static $valueToName = [ + self::UPDATE_REQUESTED_EVENT_ORIGIN_UNSPECIFIED => 'UPDATE_REQUESTED_EVENT_ORIGIN_UNSPECIFIED', + self::UPDATE_REQUESTED_EVENT_ORIGIN_REAPPLY => 'UPDATE_REQUESTED_EVENT_ORIGIN_REAPPLY', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateWorkflowExecutionLifecycleStage.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateWorkflowExecutionLifecycleStage.php new file mode 100644 index 0000000..fd0eb46 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/UpdateWorkflowExecutionLifecycleStage.php @@ -0,0 +1,81 @@ +temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage + */ +class UpdateWorkflowExecutionLifecycleStage +{ + /** + * An unspecified vale for this enum. + * + * Generated from protobuf enum UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED = 0; + */ + const UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED = 0; + /** + * The gRPC call will not return until the update request has been admitted + * by the server - it may be the case that due to a considerations like load + * or resource limits that an update is made to wait before the server will + * indicate that it has been received and will be processed. This value + * does not wait for any sort of acknowledgement from a worker. + * + * Generated from protobuf enum UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED = 1; + */ + const UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED = 1; + /** + * The gRPC call will not return until the update has passed validation on + * a worker. + * + * Generated from protobuf enum UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED = 2; + */ + const UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED = 2; + /** + * The gRPC call will not return until the update has executed to completion + * on a worker and has either been rejected or returned a value or an error. + * + * Generated from protobuf enum UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED = 3; + */ + const UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED = 3; + + private static $valueToName = [ + self::UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED => 'UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED', + self::UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED => 'UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED', + self::UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED => 'UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED', + self::UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED => 'UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowExecutionStatus.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowExecutionStatus.php new file mode 100644 index 0000000..c77218a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowExecutionStatus.php @@ -0,0 +1,84 @@ +temporal.api.enums.v1.WorkflowExecutionStatus + */ +class WorkflowExecutionStatus +{ + /** + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_UNSPECIFIED = 0; + */ + const WORKFLOW_EXECUTION_STATUS_UNSPECIFIED = 0; + /** + * Value 1 is hardcoded in SQL persistence. + * + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_RUNNING = 1; + */ + const WORKFLOW_EXECUTION_STATUS_RUNNING = 1; + /** + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_COMPLETED = 2; + */ + const WORKFLOW_EXECUTION_STATUS_COMPLETED = 2; + /** + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_FAILED = 3; + */ + const WORKFLOW_EXECUTION_STATUS_FAILED = 3; + /** + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_CANCELED = 4; + */ + const WORKFLOW_EXECUTION_STATUS_CANCELED = 4; + /** + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_TERMINATED = 5; + */ + const WORKFLOW_EXECUTION_STATUS_TERMINATED = 5; + /** + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW = 6; + */ + const WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW = 6; + /** + * Generated from protobuf enum WORKFLOW_EXECUTION_STATUS_TIMED_OUT = 7; + */ + const WORKFLOW_EXECUTION_STATUS_TIMED_OUT = 7; + + private static $valueToName = [ + self::WORKFLOW_EXECUTION_STATUS_UNSPECIFIED => 'WORKFLOW_EXECUTION_STATUS_UNSPECIFIED', + self::WORKFLOW_EXECUTION_STATUS_RUNNING => 'WORKFLOW_EXECUTION_STATUS_RUNNING', + self::WORKFLOW_EXECUTION_STATUS_COMPLETED => 'WORKFLOW_EXECUTION_STATUS_COMPLETED', + self::WORKFLOW_EXECUTION_STATUS_FAILED => 'WORKFLOW_EXECUTION_STATUS_FAILED', + self::WORKFLOW_EXECUTION_STATUS_CANCELED => 'WORKFLOW_EXECUTION_STATUS_CANCELED', + self::WORKFLOW_EXECUTION_STATUS_TERMINATED => 'WORKFLOW_EXECUTION_STATUS_TERMINATED', + self::WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW => 'WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW', + self::WORKFLOW_EXECUTION_STATUS_TIMED_OUT => 'WORKFLOW_EXECUTION_STATUS_TIMED_OUT', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowIdConflictPolicy.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowIdConflictPolicy.php new file mode 100644 index 0000000..f6966cc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowIdConflictPolicy.php @@ -0,0 +1,69 @@ +temporal.api.enums.v1.WorkflowIdConflictPolicy + */ +class WorkflowIdConflictPolicy +{ + /** + * Generated from protobuf enum WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED = 0; + */ + const WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED = 0; + /** + * Don't start a new workflow; instead return `WorkflowExecutionAlreadyStartedFailure`. + * + * Generated from protobuf enum WORKFLOW_ID_CONFLICT_POLICY_FAIL = 1; + */ + const WORKFLOW_ID_CONFLICT_POLICY_FAIL = 1; + /** + * Don't start a new workflow; instead return a workflow handle for the running workflow. + * + * Generated from protobuf enum WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING = 2; + */ + const WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING = 2; + /** + * Terminate the running workflow before starting a new one. + * + * Generated from protobuf enum WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING = 3; + */ + const WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING = 3; + + private static $valueToName = [ + self::WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED => 'WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED', + self::WORKFLOW_ID_CONFLICT_POLICY_FAIL => 'WORKFLOW_ID_CONFLICT_POLICY_FAIL', + self::WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING => 'WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING', + self::WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING => 'WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowIdReusePolicy.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowIdReusePolicy.php new file mode 100644 index 0000000..63bed49 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowIdReusePolicy.php @@ -0,0 +1,81 @@ +temporal.api.enums.v1.WorkflowIdReusePolicy + */ +class WorkflowIdReusePolicy +{ + /** + * Generated from protobuf enum WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED = 0; + */ + const WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED = 0; + /** + * Allow starting a workflow execution using the same workflow id. + * + * Generated from protobuf enum WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE = 1; + */ + const WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE = 1; + /** + * Allow starting a workflow execution using the same workflow id, only when the last + * execution's final state is one of [terminated, cancelled, timed out, failed]. + * + * Generated from protobuf enum WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY = 2; + */ + const WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY = 2; + /** + * Do not permit re-use of the workflow id for this workflow. Future start workflow requests + * could potentially change the policy, allowing re-use of the workflow id. + * + * Generated from protobuf enum WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE = 3; + */ + const WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE = 3; + /** + * This option belongs in WorkflowIdConflictPolicy but is here for backwards compatibility. + * If specified, it acts like ALLOW_DUPLICATE, but also the WorkflowId*Conflict*Policy on + * the request is treated as WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING. + * If no running workflow, then the behavior is the same as ALLOW_DUPLICATE. + * + * Generated from protobuf enum WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING = 4; + */ + const WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING = 4; + + private static $valueToName = [ + self::WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED => 'WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED', + self::WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE => 'WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE', + self::WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY => 'WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY', + self::WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE => 'WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE', + self::WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING => 'WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowTaskFailedCause.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowTaskFailedCause.php new file mode 100644 index 0000000..0323450 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Enums/V1/WorkflowTaskFailedCause.php @@ -0,0 +1,263 @@ +temporal.api.enums.v1.WorkflowTaskFailedCause + */ +class WorkflowTaskFailedCause +{ + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED = 0; + */ + const WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED = 0; + /** + * Between starting and completing the workflow task (with a workflow completion command), some + * new command (like a signal) was processed into workflow history. The outstanding task will be + * failed with this reason, and a worker must pick up a new task. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND = 1; + */ + const WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND = 1; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES = 2; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES = 2; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES = 3; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES = 3; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES = 4; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES = 4; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES = 5; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES = 5; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES = 6; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES = 6; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES = 7; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES = 7; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES = 8; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES = 8; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES = 9; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES = 9; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 10; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 10; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES = 11; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES = 11; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID = 12; + */ + const WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID = 12; + /** + * The worker wishes to fail the task and have the next one be generated on a normal, not sticky + * queue. Generally workers should prefer to use the explicit `ResetStickyTaskQueue` RPC call. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE = 13; + */ + const WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE = 13; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE = 14; + */ + const WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE = 14; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 15; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 15; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES = 16; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES = 16; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND = 17; + */ + const WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND = 17; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND = 18; + */ + const WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND = 18; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE = 19; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE = 19; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW = 20; + */ + const WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW = 20; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY = 21; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY = 21; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID = 22; + */ + const WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID = 22; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES = 23; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES = 23; + /** + * The worker encountered a mismatch while replaying history between what was expected, and + * what the workflow code actually did. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR = 24; + */ + const WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR = 24; + /** + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES = 25; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES = 25; + /** + * We send the below error codes to users when their requests would violate a size constraint + * of their workflow. We do this to ensure that the state of their workflow does not become too + * large because that can cause severe performance degradation. You can modify the thresholds for + * each of these errors within your dynamic config. + * Spawning a new child workflow would cause this workflow to exceed its limit of pending child + * workflows. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED = 26; + */ + const WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED = 26; + /** + * Starting a new activity would cause this workflow to exceed its limit of pending activities + * that we track. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED = 27; + */ + const WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED = 27; + /** + * A workflow has a buffer of signals that have not yet reached their destination. We return this + * error when sending a new signal would exceed the capacity of this buffer. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED = 28; + */ + const WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED = 28; + /** + * Similarly, we have a buffer of pending requests to cancel other workflows. We return this error + * when our capacity for pending cancel requests is already reached. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED = 29; + */ + const WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED = 29; + /** + * Workflow execution update message (update.Acceptance, update.Rejection, or update.Response) + * has wrong format, or missing required fields. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE = 30; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE = 30; + /** + * Similar to WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND, but for updates. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE = 31; + */ + const WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE = 31; + /** + * A workflow task completed with an invalid ScheduleNexusOperation command. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES = 32; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES = 32; + /** + * A workflow task completed requesting to schedule a Nexus Operation exceeding the server configured limit. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED = 33; + */ + const WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED = 33; + /** + * A workflow task completed with an invalid RequestCancelNexusOperation command. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES = 34; + */ + const WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES = 34; + /** + * A workflow task completed requesting a feature that's disabled on the server (either system wide or - typically - + * for the workflow's namespace). + * Check the workflow task failure message for more information. + * + * Generated from protobuf enum WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED = 35; + */ + const WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED = 35; + + private static $valueToName = [ + self::WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED => 'WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED', + self::WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND => 'WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID => 'WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID', + self::WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE => 'WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE', + self::WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE => 'WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND => 'WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND', + self::WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND => 'WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE', + self::WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW => 'WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY', + self::WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID => 'WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR => 'WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED => 'WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED', + self::WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED => 'WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED', + self::WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED => 'WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED', + self::WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED => 'WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE', + self::WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE => 'WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED => 'WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED', + self::WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES => 'WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES', + self::WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED => 'WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED', + ]; + + 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/CancellationAlreadyRequestedFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/CancellationAlreadyRequestedFailure.php new file mode 100644 index 0000000..a8bde15 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/CancellationAlreadyRequestedFailure.php @@ -0,0 +1,32 @@ +temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure + */ +class CancellationAlreadyRequestedFailure extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ClientVersionNotSupportedFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ClientVersionNotSupportedFailure.php new file mode 100644 index 0000000..0a63f1c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ClientVersionNotSupportedFailure.php @@ -0,0 +1,113 @@ +temporal.api.errordetails.v1.ClientVersionNotSupportedFailure + */ +class ClientVersionNotSupportedFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string client_version = 1; + */ + protected $client_version = ''; + /** + * Generated from protobuf field string client_name = 2; + */ + protected $client_name = ''; + /** + * Generated from protobuf field string supported_versions = 3; + */ + protected $supported_versions = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client_version + * @type string $client_name + * @type string $supported_versions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string client_version = 1; + * @return string + */ + public function getClientVersion() + { + return $this->client_version; + } + + /** + * Generated from protobuf field string client_version = 1; + * @param string $var + * @return $this + */ + public function setClientVersion($var) + { + GPBUtil::checkString($var, True); + $this->client_version = $var; + + return $this; + } + + /** + * Generated from protobuf field string client_name = 2; + * @return string + */ + public function getClientName() + { + return $this->client_name; + } + + /** + * Generated from protobuf field string client_name = 2; + * @param string $var + * @return $this + */ + public function setClientName($var) + { + GPBUtil::checkString($var, True); + $this->client_name = $var; + + return $this; + } + + /** + * Generated from protobuf field string supported_versions = 3; + * @return string + */ + public function getSupportedVersions() + { + return $this->supported_versions; + } + + /** + * Generated from protobuf field string supported_versions = 3; + * @param string $var + * @return $this + */ + public function setSupportedVersions($var) + { + GPBUtil::checkString($var, True); + $this->supported_versions = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/MultiOperationExecutionFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/MultiOperationExecutionFailure.php new file mode 100644 index 0000000..f26275f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/MultiOperationExecutionFailure.php @@ -0,0 +1,74 @@ +temporal.api.errordetails.v1.MultiOperationExecutionFailure + */ +class MultiOperationExecutionFailure extends \Google\Protobuf\Internal\Message +{ + /** + * One status for each requested operation from the failed MultiOperation. The failed + * operation(s) have the same error details as if it was executed separately. All other operations have the + * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. + * + * Generated from protobuf field repeated .temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus statuses = 1; + */ + private $statuses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Errordetails\V1\MultiOperationExecutionFailure\OperationStatus>|\Google\Protobuf\Internal\RepeatedField $statuses + * One status for each requested operation from the failed MultiOperation. The failed + * operation(s) have the same error details as if it was executed separately. All other operations have the + * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * One status for each requested operation from the failed MultiOperation. The failed + * operation(s) have the same error details as if it was executed separately. All other operations have the + * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. + * + * Generated from protobuf field repeated .temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus statuses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatuses() + { + return $this->statuses; + } + + /** + * One status for each requested operation from the failed MultiOperation. The failed + * operation(s) have the same error details as if it was executed separately. All other operations have the + * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. + * + * Generated from protobuf field repeated .temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus statuses = 1; + * @param array<\Temporal\Api\Errordetails\V1\MultiOperationExecutionFailure\OperationStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Errordetails\V1\MultiOperationExecutionFailure\OperationStatus::class); + $this->statuses = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/MultiOperationExecutionFailure/OperationStatus.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/MultiOperationExecutionFailure/OperationStatus.php new file mode 100644 index 0000000..328cc33 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/MultiOperationExecutionFailure/OperationStatus.php @@ -0,0 +1,118 @@ +temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus + */ +class OperationStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * 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 + * @type string $message + * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 code = 1; + * @return int + */ + public function getCode() + { + return $this->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; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * 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; + } + + /** + * Generated from protobuf field repeated .google.protobuf.Any details = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceAlreadyExistsFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceAlreadyExistsFailure.php new file mode 100644 index 0000000..4b4a0a4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceAlreadyExistsFailure.php @@ -0,0 +1,32 @@ +temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure + */ +class NamespaceAlreadyExistsFailure extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceInvalidStateFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceInvalidStateFailure.php new file mode 100644 index 0000000..7d8ca62 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceInvalidStateFailure.php @@ -0,0 +1,131 @@ +temporal.api.errordetails.v1.NamespaceInvalidStateFailure + */ +class NamespaceInvalidStateFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Current state of the requested namespace. + * + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 2; + */ + protected $state = 0; + /** + * Allowed namespace states for requested operation. + * For example NAMESPACE_STATE_DELETED is forbidden for most operations but allowed for DescribeNamespace. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.NamespaceState allowed_states = 3; + */ + private $allowed_states; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type int $state + * Current state of the requested namespace. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_states + * Allowed namespace states for requested operation. + * For example NAMESPACE_STATE_DELETED is forbidden for most operations but allowed for DescribeNamespace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Current state of the requested namespace. + * + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Current state of the requested namespace. + * + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\NamespaceState::class); + $this->state = $var; + + return $this; + } + + /** + * Allowed namespace states for requested operation. + * For example NAMESPACE_STATE_DELETED is forbidden for most operations but allowed for DescribeNamespace. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.NamespaceState allowed_states = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedStates() + { + return $this->allowed_states; + } + + /** + * Allowed namespace states for requested operation. + * For example NAMESPACE_STATE_DELETED is forbidden for most operations but allowed for DescribeNamespace. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.NamespaceState allowed_states = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedStates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\NamespaceState::class); + $this->allowed_states = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceNotActiveFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceNotActiveFailure.php new file mode 100644 index 0000000..0acba41 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceNotActiveFailure.php @@ -0,0 +1,113 @@ +temporal.api.errordetails.v1.NamespaceNotActiveFailure + */ +class NamespaceNotActiveFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string current_cluster = 2; + */ + protected $current_cluster = ''; + /** + * Generated from protobuf field string active_cluster = 3; + */ + protected $active_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $current_cluster + * @type string $active_cluster + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string current_cluster = 2; + * @return string + */ + public function getCurrentCluster() + { + return $this->current_cluster; + } + + /** + * Generated from protobuf field string current_cluster = 2; + * @param string $var + * @return $this + */ + public function setCurrentCluster($var) + { + GPBUtil::checkString($var, True); + $this->current_cluster = $var; + + return $this; + } + + /** + * Generated from protobuf field string active_cluster = 3; + * @return string + */ + public function getActiveCluster() + { + return $this->active_cluster; + } + + /** + * Generated from protobuf field string active_cluster = 3; + * @param string $var + * @return $this + */ + public function setActiveCluster($var) + { + GPBUtil::checkString($var, True); + $this->active_cluster = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceNotFoundFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceNotFoundFailure.php new file mode 100644 index 0000000..71fcbce --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NamespaceNotFoundFailure.php @@ -0,0 +1,59 @@ +temporal.api.errordetails.v1.NamespaceNotFoundFailure + */ +class NamespaceNotFoundFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NewerBuildExistsFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NewerBuildExistsFailure.php new file mode 100644 index 0000000..26346a2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NewerBuildExistsFailure.php @@ -0,0 +1,66 @@ +temporal.api.errordetails.v1.NewerBuildExistsFailure + */ +class NewerBuildExistsFailure extends \Google\Protobuf\Internal\Message +{ + /** + * The current default compatible build ID which will receive tasks + * + * Generated from protobuf field string default_build_id = 1; + */ + protected $default_build_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $default_build_id + * The current default compatible build ID which will receive tasks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The current default compatible build ID which will receive tasks + * + * Generated from protobuf field string default_build_id = 1; + * @return string + */ + public function getDefaultBuildId() + { + return $this->default_build_id; + } + + /** + * The current default compatible build ID which will receive tasks + * + * Generated from protobuf field string default_build_id = 1; + * @param string $var + * @return $this + */ + public function setDefaultBuildId($var) + { + GPBUtil::checkString($var, True); + $this->default_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NotFoundFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NotFoundFailure.php new file mode 100644 index 0000000..b1ed457 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/NotFoundFailure.php @@ -0,0 +1,86 @@ +temporal.api.errordetails.v1.NotFoundFailure + */ +class NotFoundFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string current_cluster = 1; + */ + protected $current_cluster = ''; + /** + * Generated from protobuf field string active_cluster = 2; + */ + protected $active_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $current_cluster + * @type string $active_cluster + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string current_cluster = 1; + * @return string + */ + public function getCurrentCluster() + { + return $this->current_cluster; + } + + /** + * Generated from protobuf field string current_cluster = 1; + * @param string $var + * @return $this + */ + public function setCurrentCluster($var) + { + GPBUtil::checkString($var, True); + $this->current_cluster = $var; + + return $this; + } + + /** + * Generated from protobuf field string active_cluster = 2; + * @return string + */ + public function getActiveCluster() + { + return $this->active_cluster; + } + + /** + * Generated from protobuf field string active_cluster = 2; + * @param string $var + * @return $this + */ + public function setActiveCluster($var) + { + GPBUtil::checkString($var, True); + $this->active_cluster = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/PermissionDeniedFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/PermissionDeniedFailure.php new file mode 100644 index 0000000..aea8f4b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/PermissionDeniedFailure.php @@ -0,0 +1,59 @@ +temporal.api.errordetails.v1.PermissionDeniedFailure + */ +class PermissionDeniedFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string reason = 1; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reason + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string reason = 1; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/QueryFailedFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/QueryFailedFailure.php new file mode 100644 index 0000000..04b2772 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/QueryFailedFailure.php @@ -0,0 +1,32 @@ +temporal.api.errordetails.v1.QueryFailedFailure + */ +class QueryFailedFailure extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ResourceExhaustedFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ResourceExhaustedFailure.php new file mode 100644 index 0000000..21e62f7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ResourceExhaustedFailure.php @@ -0,0 +1,86 @@ +temporal.api.errordetails.v1.ResourceExhaustedFailure + */ +class ResourceExhaustedFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.ResourceExhaustedCause cause = 1; + */ + protected $cause = 0; + /** + * Generated from protobuf field .temporal.api.enums.v1.ResourceExhaustedScope scope = 2; + */ + protected $scope = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cause + * @type int $scope + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ResourceExhaustedCause cause = 1; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ResourceExhaustedCause cause = 1; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ResourceExhaustedCause::class); + $this->cause = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ResourceExhaustedScope scope = 2; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ResourceExhaustedScope scope = 2; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ResourceExhaustedScope::class); + $this->scope = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ServerVersionNotSupportedFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ServerVersionNotSupportedFailure.php new file mode 100644 index 0000000..a2ce08b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/ServerVersionNotSupportedFailure.php @@ -0,0 +1,86 @@ +temporal.api.errordetails.v1.ServerVersionNotSupportedFailure + */ +class ServerVersionNotSupportedFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string server_version = 1; + */ + protected $server_version = ''; + /** + * Generated from protobuf field string client_supported_server_versions = 2; + */ + protected $client_supported_server_versions = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $server_version + * @type string $client_supported_server_versions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string server_version = 1; + * @return string + */ + public function getServerVersion() + { + return $this->server_version; + } + + /** + * Generated from protobuf field string server_version = 1; + * @param string $var + * @return $this + */ + public function setServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->server_version = $var; + + return $this; + } + + /** + * Generated from protobuf field string client_supported_server_versions = 2; + * @return string + */ + public function getClientSupportedServerVersions() + { + return $this->client_supported_server_versions; + } + + /** + * Generated from protobuf field string client_supported_server_versions = 2; + * @param string $var + * @return $this + */ + public function setClientSupportedServerVersions($var) + { + GPBUtil::checkString($var, True); + $this->client_supported_server_versions = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/SystemWorkflowFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/SystemWorkflowFailure.php new file mode 100644 index 0000000..6cc0a5e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/SystemWorkflowFailure.php @@ -0,0 +1,114 @@ +temporal.api.errordetails.v1.SystemWorkflowFailure + */ +class SystemWorkflowFailure extends \Google\Protobuf\Internal\Message +{ + /** + * WorkflowId and RunId of the Temporal system workflow performing the underlying operation. + * Looking up the info of the system workflow run may help identify the issue causing the failure. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + */ + protected $workflow_execution = null; + /** + * Serialized error returned by the system workflow performing the underlying operation. + * + * Generated from protobuf field string workflow_error = 2; + */ + protected $workflow_error = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * WorkflowId and RunId of the Temporal system workflow performing the underlying operation. + * Looking up the info of the system workflow run may help identify the issue causing the failure. + * @type string $workflow_error + * Serialized error returned by the system workflow performing the underlying operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * WorkflowId and RunId of the Temporal system workflow performing the underlying operation. + * Looking up the info of the system workflow run may help identify the issue causing the failure. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * WorkflowId and RunId of the Temporal system workflow performing the underlying operation. + * Looking up the info of the system workflow run may help identify the issue causing the failure. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Serialized error returned by the system workflow performing the underlying operation. + * + * Generated from protobuf field string workflow_error = 2; + * @return string + */ + public function getWorkflowError() + { + return $this->workflow_error; + } + + /** + * Serialized error returned by the system workflow performing the underlying operation. + * + * Generated from protobuf field string workflow_error = 2; + * @param string $var + * @return $this + */ + public function setWorkflowError($var) + { + GPBUtil::checkString($var, True); + $this->workflow_error = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/WorkflowExecutionAlreadyStartedFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/WorkflowExecutionAlreadyStartedFailure.php new file mode 100644 index 0000000..160b8d3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/WorkflowExecutionAlreadyStartedFailure.php @@ -0,0 +1,86 @@ +temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure + */ +class WorkflowExecutionAlreadyStartedFailure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string start_request_id = 1; + */ + protected $start_request_id = ''; + /** + * Generated from protobuf field string run_id = 2; + */ + protected $run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_request_id + * @type string $run_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string start_request_id = 1; + * @return string + */ + public function getStartRequestId() + { + return $this->start_request_id; + } + + /** + * Generated from protobuf field string start_request_id = 1; + * @param string $var + * @return $this + */ + public function setStartRequestId($var) + { + GPBUtil::checkString($var, True); + $this->start_request_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string run_id = 2; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Generated from protobuf field string run_id = 2; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/WorkflowNotReadyFailure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/WorkflowNotReadyFailure.php new file mode 100644 index 0000000..65b5071 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Errordetails/V1/WorkflowNotReadyFailure.php @@ -0,0 +1,32 @@ +temporal.api.errordetails.v1.WorkflowNotReadyFailure + */ +class WorkflowNotReadyFailure extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Export/V1/WorkflowExecution.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Export/V1/WorkflowExecution.php new file mode 100644 index 0000000..aec67d8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Export/V1/WorkflowExecution.php @@ -0,0 +1,69 @@ +temporal.api.export.v1.WorkflowExecution + */ +class WorkflowExecution extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + */ + protected $history = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\History\V1\History $history + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Export\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @return \Temporal\Api\History\V1\History|null + */ + public function getHistory() + { + return $this->history; + } + + public function hasHistory() + { + return isset($this->history); + } + + public function clearHistory() + { + unset($this->history); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @param \Temporal\Api\History\V1\History $var + * @return $this + */ + public function setHistory($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\History::class); + $this->history = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Export/V1/WorkflowExecutions.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Export/V1/WorkflowExecutions.php new file mode 100644 index 0000000..587eb7a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Export/V1/WorkflowExecutions.php @@ -0,0 +1,62 @@ +temporal.api.export.v1.WorkflowExecutions + */ +class WorkflowExecutions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.export.v1.WorkflowExecution items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Export\V1\WorkflowExecution>|\Google\Protobuf\Internal\RepeatedField $items + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Export\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.export.v1.WorkflowExecution items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * Generated from protobuf field repeated .temporal.api.export.v1.WorkflowExecution items = 1; + * @param array<\Temporal\Api\Export\V1\WorkflowExecution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Export\V1\WorkflowExecution::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ActivityFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ActivityFailureInfo.php new file mode 100644 index 0000000..383332c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ActivityFailureInfo.php @@ -0,0 +1,204 @@ +temporal.api.failure.v1.ActivityFailureInfo + */ +class ActivityFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * Generated from protobuf field int64 started_event_id = 2; + */ + protected $started_event_id = 0; + /** + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 4; + */ + protected $activity_type = null; + /** + * Generated from protobuf field string activity_id = 5; + */ + protected $activity_id = ''; + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + */ + protected $retry_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * @type int|string $started_event_id + * @type string $identity + * @type \Temporal\Api\Common\V1\ActivityType $activity_type + * @type string $activity_id + * @type int $retry_state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 started_event_id = 2; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * Generated from protobuf field int64 started_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 4; + * @return \Temporal\Api\Common\V1\ActivityType|null + */ + public function getActivityType() + { + return $this->activity_type; + } + + public function hasActivityType() + { + return isset($this->activity_type); + } + + public function clearActivityType() + { + unset($this->activity_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 4; + * @param \Temporal\Api\Common\V1\ActivityType $var + * @return $this + */ + public function setActivityType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\ActivityType::class); + $this->activity_type = $var; + + return $this; + } + + /** + * Generated from protobuf field string activity_id = 5; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * Generated from protobuf field string activity_id = 5; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ApplicationFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ApplicationFailureInfo.php new file mode 100644 index 0000000..36b1a0a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ApplicationFailureInfo.php @@ -0,0 +1,187 @@ +temporal.api.failure.v1.ApplicationFailureInfo + */ +class ApplicationFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Generated from protobuf field bool non_retryable = 2; + */ + protected $non_retryable = false; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 3; + */ + protected $details = null; + /** + * next_retry_delay can be used by the client to override the activity + * retry interval calculated by the retry policy. Retry attempts will + * still be subject to the maximum retries limit and total time limit + * defined by the policy. + * ATTENTION: this value will be ignored if set for failures produced by + * the workflow. + * + * Generated from protobuf field .google.protobuf.Duration next_retry_delay = 4; + */ + protected $next_retry_delay = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * @type bool $non_retryable + * @type \Temporal\Api\Common\V1\Payloads $details + * @type \Google\Protobuf\Duration $next_retry_delay + * next_retry_delay can be used by the client to override the activity + * retry interval calculated by the retry policy. Retry attempts will + * still be subject to the maximum retries limit and total time limit + * defined by the policy. + * ATTENTION: this value will be ignored if set for failures produced by + * the workflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->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; + } + + /** + * Generated from protobuf field bool non_retryable = 2; + * @return bool + */ + public function getNonRetryable() + { + return $this->non_retryable; + } + + /** + * Generated from protobuf field bool non_retryable = 2; + * @param bool $var + * @return $this + */ + public function setNonRetryable($var) + { + GPBUtil::checkBool($var); + $this->non_retryable = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 3; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 3; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * next_retry_delay can be used by the client to override the activity + * retry interval calculated by the retry policy. Retry attempts will + * still be subject to the maximum retries limit and total time limit + * defined by the policy. + * ATTENTION: this value will be ignored if set for failures produced by + * the workflow. + * + * Generated from protobuf field .google.protobuf.Duration next_retry_delay = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getNextRetryDelay() + { + return $this->next_retry_delay; + } + + public function hasNextRetryDelay() + { + return isset($this->next_retry_delay); + } + + public function clearNextRetryDelay() + { + unset($this->next_retry_delay); + } + + /** + * next_retry_delay can be used by the client to override the activity + * retry interval calculated by the retry policy. Retry attempts will + * still be subject to the maximum retries limit and total time limit + * defined by the policy. + * ATTENTION: this value will be ignored if set for failures produced by + * the workflow. + * + * Generated from protobuf field .google.protobuf.Duration next_retry_delay = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNextRetryDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->next_retry_delay = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/CanceledFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/CanceledFailureInfo.php new file mode 100644 index 0000000..d9e4811 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/CanceledFailureInfo.php @@ -0,0 +1,69 @@ +temporal.api.failure.v1.CanceledFailureInfo + */ +class CanceledFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + */ + protected $details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ChildWorkflowExecutionFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ChildWorkflowExecutionFailureInfo.php new file mode 100644 index 0000000..55d7cb1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ChildWorkflowExecutionFailureInfo.php @@ -0,0 +1,214 @@ +temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo + */ +class ChildWorkflowExecutionFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field int64 initiated_event_id = 4; + */ + protected $initiated_event_id = 0; + /** + * Generated from protobuf field int64 started_event_id = 5; + */ + protected $started_event_id = 0; + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + */ + protected $retry_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int|string $initiated_event_id + * @type int|string $started_event_id + * @type int $retry_state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 initiated_event_id = 4; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Generated from protobuf field int64 initiated_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 started_event_id = 5; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * Generated from protobuf field int64 started_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/Failure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/Failure.php new file mode 100644 index 0000000..931c150 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/Failure.php @@ -0,0 +1,514 @@ +temporal.api.failure.v1.Failure + */ +class Failure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK + * In some SDKs this is used to rehydrate the stack trace into an exception object. + * + * Generated from protobuf field string source = 2; + */ + protected $source = ''; + /** + * Generated from protobuf field string stack_trace = 3; + */ + protected $stack_trace = ''; + /** + * Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of + * errors originating in user code which might contain sensitive information. + * The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto + * message. + * SDK authors: + * - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that: + * - Uses a JSON object to represent `{ message, stack_trace }`. + * - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted. + * - Overwrites the original stack_trace with an empty string. + * - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed + * by the user-provided PayloadCodec + * - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. + * (-- api-linter: core::0203::optional=disabled --) + * + * Generated from protobuf field .temporal.api.common.v1.Payload encoded_attributes = 20; + */ + protected $encoded_attributes = null; + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure cause = 4; + */ + protected $cause = null; + protected $failure_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * @type string $source + * The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK + * In some SDKs this is used to rehydrate the stack trace into an exception object. + * @type string $stack_trace + * @type \Temporal\Api\Common\V1\Payload $encoded_attributes + * Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of + * errors originating in user code which might contain sensitive information. + * The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto + * message. + * SDK authors: + * - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that: + * - Uses a JSON object to represent `{ message, stack_trace }`. + * - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted. + * - Overwrites the original stack_trace with an empty string. + * - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed + * by the user-provided PayloadCodec + * - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. + * (-- api-linter: core::0203::optional=disabled --) + * @type \Temporal\Api\Failure\V1\Failure $cause + * @type \Temporal\Api\Failure\V1\ApplicationFailureInfo $application_failure_info + * @type \Temporal\Api\Failure\V1\TimeoutFailureInfo $timeout_failure_info + * @type \Temporal\Api\Failure\V1\CanceledFailureInfo $canceled_failure_info + * @type \Temporal\Api\Failure\V1\TerminatedFailureInfo $terminated_failure_info + * @type \Temporal\Api\Failure\V1\ServerFailureInfo $server_failure_info + * @type \Temporal\Api\Failure\V1\ResetWorkflowFailureInfo $reset_workflow_failure_info + * @type \Temporal\Api\Failure\V1\ActivityFailureInfo $activity_failure_info + * @type \Temporal\Api\Failure\V1\ChildWorkflowExecutionFailureInfo $child_workflow_execution_failure_info + * @type \Temporal\Api\Failure\V1\NexusOperationFailureInfo $nexus_operation_execution_failure_info + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK + * In some SDKs this is used to rehydrate the stack trace into an exception object. + * + * Generated from protobuf field string source = 2; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK + * In some SDKs this is used to rehydrate the stack trace into an exception object. + * + * Generated from protobuf field string source = 2; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Generated from protobuf field string stack_trace = 3; + * @return string + */ + public function getStackTrace() + { + return $this->stack_trace; + } + + /** + * Generated from protobuf field string stack_trace = 3; + * @param string $var + * @return $this + */ + public function setStackTrace($var) + { + GPBUtil::checkString($var, True); + $this->stack_trace = $var; + + return $this; + } + + /** + * Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of + * errors originating in user code which might contain sensitive information. + * The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto + * message. + * SDK authors: + * - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that: + * - Uses a JSON object to represent `{ message, stack_trace }`. + * - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted. + * - Overwrites the original stack_trace with an empty string. + * - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed + * by the user-provided PayloadCodec + * - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. + * (-- api-linter: core::0203::optional=disabled --) + * + * Generated from protobuf field .temporal.api.common.v1.Payload encoded_attributes = 20; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getEncodedAttributes() + { + return $this->encoded_attributes; + } + + public function hasEncodedAttributes() + { + return isset($this->encoded_attributes); + } + + public function clearEncodedAttributes() + { + unset($this->encoded_attributes); + } + + /** + * Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of + * errors originating in user code which might contain sensitive information. + * The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto + * message. + * SDK authors: + * - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that: + * - Uses a JSON object to represent `{ message, stack_trace }`. + * - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted. + * - Overwrites the original stack_trace with an empty string. + * - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed + * by the user-provided PayloadCodec + * - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. + * (-- api-linter: core::0203::optional=disabled --) + * + * Generated from protobuf field .temporal.api.common.v1.Payload encoded_attributes = 20; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setEncodedAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->encoded_attributes = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure cause = 4; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getCause() + { + return $this->cause; + } + + public function hasCause() + { + return isset($this->cause); + } + + public function clearCause() + { + unset($this->cause); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure cause = 4; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->cause = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ApplicationFailureInfo application_failure_info = 5; + * @return \Temporal\Api\Failure\V1\ApplicationFailureInfo|null + */ + public function getApplicationFailureInfo() + { + return $this->readOneof(5); + } + + public function hasApplicationFailureInfo() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ApplicationFailureInfo application_failure_info = 5; + * @param \Temporal\Api\Failure\V1\ApplicationFailureInfo $var + * @return $this + */ + public function setApplicationFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\ApplicationFailureInfo::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.TimeoutFailureInfo timeout_failure_info = 6; + * @return \Temporal\Api\Failure\V1\TimeoutFailureInfo|null + */ + public function getTimeoutFailureInfo() + { + return $this->readOneof(6); + } + + public function hasTimeoutFailureInfo() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.TimeoutFailureInfo timeout_failure_info = 6; + * @param \Temporal\Api\Failure\V1\TimeoutFailureInfo $var + * @return $this + */ + public function setTimeoutFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\TimeoutFailureInfo::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.CanceledFailureInfo canceled_failure_info = 7; + * @return \Temporal\Api\Failure\V1\CanceledFailureInfo|null + */ + public function getCanceledFailureInfo() + { + return $this->readOneof(7); + } + + public function hasCanceledFailureInfo() + { + return $this->hasOneof(7); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.CanceledFailureInfo canceled_failure_info = 7; + * @param \Temporal\Api\Failure\V1\CanceledFailureInfo $var + * @return $this + */ + public function setCanceledFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\CanceledFailureInfo::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.TerminatedFailureInfo terminated_failure_info = 8; + * @return \Temporal\Api\Failure\V1\TerminatedFailureInfo|null + */ + public function getTerminatedFailureInfo() + { + return $this->readOneof(8); + } + + public function hasTerminatedFailureInfo() + { + return $this->hasOneof(8); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.TerminatedFailureInfo terminated_failure_info = 8; + * @param \Temporal\Api\Failure\V1\TerminatedFailureInfo $var + * @return $this + */ + public function setTerminatedFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\TerminatedFailureInfo::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ServerFailureInfo server_failure_info = 9; + * @return \Temporal\Api\Failure\V1\ServerFailureInfo|null + */ + public function getServerFailureInfo() + { + return $this->readOneof(9); + } + + public function hasServerFailureInfo() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ServerFailureInfo server_failure_info = 9; + * @param \Temporal\Api\Failure\V1\ServerFailureInfo $var + * @return $this + */ + public function setServerFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\ServerFailureInfo::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ResetWorkflowFailureInfo reset_workflow_failure_info = 10; + * @return \Temporal\Api\Failure\V1\ResetWorkflowFailureInfo|null + */ + public function getResetWorkflowFailureInfo() + { + return $this->readOneof(10); + } + + public function hasResetWorkflowFailureInfo() + { + return $this->hasOneof(10); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ResetWorkflowFailureInfo reset_workflow_failure_info = 10; + * @param \Temporal\Api\Failure\V1\ResetWorkflowFailureInfo $var + * @return $this + */ + public function setResetWorkflowFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\ResetWorkflowFailureInfo::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ActivityFailureInfo activity_failure_info = 11; + * @return \Temporal\Api\Failure\V1\ActivityFailureInfo|null + */ + public function getActivityFailureInfo() + { + return $this->readOneof(11); + } + + public function hasActivityFailureInfo() + { + return $this->hasOneof(11); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ActivityFailureInfo activity_failure_info = 11; + * @param \Temporal\Api\Failure\V1\ActivityFailureInfo $var + * @return $this + */ + public function setActivityFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\ActivityFailureInfo::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo child_workflow_execution_failure_info = 12; + * @return \Temporal\Api\Failure\V1\ChildWorkflowExecutionFailureInfo|null + */ + public function getChildWorkflowExecutionFailureInfo() + { + return $this->readOneof(12); + } + + public function hasChildWorkflowExecutionFailureInfo() + { + return $this->hasOneof(12); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo child_workflow_execution_failure_info = 12; + * @param \Temporal\Api\Failure\V1\ChildWorkflowExecutionFailureInfo $var + * @return $this + */ + public function setChildWorkflowExecutionFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\ChildWorkflowExecutionFailureInfo::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.NexusOperationFailureInfo nexus_operation_execution_failure_info = 13; + * @return \Temporal\Api\Failure\V1\NexusOperationFailureInfo|null + */ + public function getNexusOperationExecutionFailureInfo() + { + return $this->readOneof(13); + } + + public function hasNexusOperationExecutionFailureInfo() + { + return $this->hasOneof(13); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.NexusOperationFailureInfo nexus_operation_execution_failure_info = 13; + * @param \Temporal\Api\Failure\V1\NexusOperationFailureInfo $var + * @return $this + */ + public function setNexusOperationExecutionFailureInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\NexusOperationFailureInfo::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * @return string + */ + public function getFailureInfo() + { + return $this->whichOneof("failure_info"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/MultiOperationExecutionAborted.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/MultiOperationExecutionAborted.php new file mode 100644 index 0000000..7d3ddcd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/MultiOperationExecutionAborted.php @@ -0,0 +1,32 @@ +temporal.api.failure.v1.MultiOperationExecutionAborted + */ +class MultiOperationExecutionAborted extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/NexusOperationFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/NexusOperationFailureInfo.php new file mode 100644 index 0000000..1199d59 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/NexusOperationFailureInfo.php @@ -0,0 +1,202 @@ +temporal.api.failure.v1.NexusOperationFailureInfo + */ +class NexusOperationFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The NexusOperationScheduled event ID. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * Endpoint name. + * + * Generated from protobuf field string endpoint = 2; + */ + protected $endpoint = ''; + /** + * Service name. + * + * Generated from protobuf field string service = 3; + */ + protected $service = ''; + /** + * Operation name. + * + * Generated from protobuf field string operation = 4; + */ + protected $operation = ''; + /** + * Operation ID - may be empty if the operation completed synchronously. + * + * Generated from protobuf field string operation_id = 5; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The NexusOperationScheduled event ID. + * @type string $endpoint + * Endpoint name. + * @type string $service + * Service name. + * @type string $operation + * Operation name. + * @type string $operation_id + * Operation ID - may be empty if the operation completed synchronously. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The NexusOperationScheduled event ID. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The NexusOperationScheduled event ID. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * Endpoint name. + * + * Generated from protobuf field string endpoint = 2; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Endpoint name. + * + * Generated from protobuf field string endpoint = 2; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Service name. + * + * Generated from protobuf field string service = 3; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Service name. + * + * Generated from protobuf field string service = 3; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 4; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 4; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Operation ID - may be empty if the operation completed synchronously. + * + * Generated from protobuf field string operation_id = 5; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * Operation ID - may be empty if the operation completed synchronously. + * + * Generated from protobuf field string operation_id = 5; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ResetWorkflowFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ResetWorkflowFailureInfo.php new file mode 100644 index 0000000..dfada39 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ResetWorkflowFailureInfo.php @@ -0,0 +1,69 @@ +temporal.api.failure.v1.ResetWorkflowFailureInfo + */ +class ResetWorkflowFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 1; + */ + protected $last_heartbeat_details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $last_heartbeat_details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastHeartbeatDetails() + { + return $this->last_heartbeat_details; + } + + public function hasLastHeartbeatDetails() + { + return isset($this->last_heartbeat_details); + } + + public function clearLastHeartbeatDetails() + { + unset($this->last_heartbeat_details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastHeartbeatDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_heartbeat_details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ServerFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ServerFailureInfo.php new file mode 100644 index 0000000..b6a0f51 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/ServerFailureInfo.php @@ -0,0 +1,59 @@ +temporal.api.failure.v1.ServerFailureInfo + */ +class ServerFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool non_retryable = 1; + */ + protected $non_retryable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $non_retryable + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool non_retryable = 1; + * @return bool + */ + public function getNonRetryable() + { + return $this->non_retryable; + } + + /** + * Generated from protobuf field bool non_retryable = 1; + * @param bool $var + * @return $this + */ + public function setNonRetryable($var) + { + GPBUtil::checkBool($var); + $this->non_retryable = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/TerminatedFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/TerminatedFailureInfo.php new file mode 100644 index 0000000..9949200 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/TerminatedFailureInfo.php @@ -0,0 +1,32 @@ +temporal.api.failure.v1.TerminatedFailureInfo + */ +class TerminatedFailureInfo extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/TimeoutFailureInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/TimeoutFailureInfo.php new file mode 100644 index 0000000..ac4c2af --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Failure/V1/TimeoutFailureInfo.php @@ -0,0 +1,96 @@ +temporal.api.failure.v1.TimeoutFailureInfo + */ +class TimeoutFailureInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.TimeoutType timeout_type = 1; + */ + protected $timeout_type = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 2; + */ + protected $last_heartbeat_details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $timeout_type + * @type \Temporal\Api\Common\V1\Payloads $last_heartbeat_details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.TimeoutType timeout_type = 1; + * @return int + */ + public function getTimeoutType() + { + return $this->timeout_type; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.TimeoutType timeout_type = 1; + * @param int $var + * @return $this + */ + public function setTimeoutType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\TimeoutType::class); + $this->timeout_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastHeartbeatDetails() + { + return $this->last_heartbeat_details; + } + + public function hasLastHeartbeatDetails() + { + return isset($this->last_heartbeat_details); + } + + public function clearLastHeartbeatDetails() + { + unset($this->last_heartbeat_details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastHeartbeatDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_heartbeat_details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/StartTimeFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/StartTimeFilter.php new file mode 100644 index 0000000..cb9e8c8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/StartTimeFilter.php @@ -0,0 +1,106 @@ +temporal.api.filter.v1.StartTimeFilter + */ +class StartTimeFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.protobuf.Timestamp earliest_time = 1; + */ + protected $earliest_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp latest_time = 2; + */ + protected $latest_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $earliest_time + * @type \Google\Protobuf\Timestamp $latest_time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Filter\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp earliest_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestTime() + { + return $this->earliest_time; + } + + public function hasEarliestTime() + { + return isset($this->earliest_time); + } + + public function clearEarliestTime() + { + unset($this->earliest_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp earliest_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp latest_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestTime() + { + return $this->latest_time; + } + + public function hasLatestTime() + { + return isset($this->latest_time); + } + + public function clearLatestTime() + { + unset($this->latest_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp latest_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/StatusFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/StatusFilter.php new file mode 100644 index 0000000..e027010 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/StatusFilter.php @@ -0,0 +1,59 @@ +temporal.api.filter.v1.StatusFilter + */ +class StatusFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 1; + */ + protected $status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Filter\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 1; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 1; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowExecutionStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/WorkflowExecutionFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/WorkflowExecutionFilter.php new file mode 100644 index 0000000..82cdd2e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/WorkflowExecutionFilter.php @@ -0,0 +1,86 @@ +temporal.api.filter.v1.WorkflowExecutionFilter + */ +class WorkflowExecutionFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string workflow_id = 1; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field string run_id = 2; + */ + protected $run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $workflow_id + * @type string $run_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Filter\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string run_id = 2; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Generated from protobuf field string run_id = 2; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/WorkflowTypeFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/WorkflowTypeFilter.php new file mode 100644 index 0000000..911113f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Filter/V1/WorkflowTypeFilter.php @@ -0,0 +1,59 @@ +temporal.api.filter.v1.WorkflowTypeFilter + */ +class WorkflowTypeFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Filter\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityPropertiesModifiedExternallyEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityPropertiesModifiedExternallyEventAttributes.php new file mode 100644 index 0000000..ac48f6f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityPropertiesModifiedExternallyEventAttributes.php @@ -0,0 +1,114 @@ +temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes + */ +class ActivityPropertiesModifiedExternallyEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * If set, update the retry policy of the activity, replacing it with the specified one. + * The number of attempts at the activity is preserved. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy new_retry_policy = 2; + */ + protected $new_retry_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to. + * @type \Temporal\Api\Common\V1\RetryPolicy $new_retry_policy + * If set, update the retry policy of the activity, replacing it with the specified one. + * The number of attempts at the activity is preserved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * If set, update the retry policy of the activity, replacing it with the specified one. + * The number of attempts at the activity is preserved. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy new_retry_policy = 2; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getNewRetryPolicy() + { + return $this->new_retry_policy; + } + + public function hasNewRetryPolicy() + { + return isset($this->new_retry_policy); + } + + public function clearNewRetryPolicy() + { + unset($this->new_retry_policy); + } + + /** + * If set, update the retry policy of the activity, replacing it with the specified one. + * The number of attempts at the activity is preserved. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy new_retry_policy = 2; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setNewRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->new_retry_policy = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCancelRequestedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCancelRequestedEventAttributes.php new file mode 100644 index 0000000..408743a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCancelRequestedEventAttributes.php @@ -0,0 +1,100 @@ +temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes + */ +class ActivityTaskCancelRequestedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + */ + protected $workflow_task_completed_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCanceledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCanceledEventAttributes.php new file mode 100644 index 0000000..a5a0397 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCanceledEventAttributes.php @@ -0,0 +1,264 @@ +temporal.api.history.v1.ActivityTaskCanceledEventAttributes + */ +class ActivityTaskCanceledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information that the activity reported upon confirming cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + */ + protected $details = null; + /** + * id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same + * activity + * + * Generated from protobuf field int64 latest_cancel_requested_event_id = 2; + */ + protected $latest_cancel_requested_event_id = 0; + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 3; + */ + protected $scheduled_event_id = 0; + /** + * The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to + * + * Generated from protobuf field int64 started_event_id = 4; + */ + protected $started_event_id = 0; + /** + * id of the worker who canceled this activity + * + * Generated from protobuf field string identity = 5; + */ + protected $identity = ''; + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $details + * Additional information that the activity reported upon confirming cancellation + * @type int|string $latest_cancel_requested_event_id + * id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same + * activity + * @type int|string $scheduled_event_id + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to + * @type int|string $started_event_id + * The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to + * @type string $identity + * id of the worker who canceled this activity + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Additional information that the activity reported upon confirming cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Additional information that the activity reported upon confirming cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same + * activity + * + * Generated from protobuf field int64 latest_cancel_requested_event_id = 2; + * @return int|string + */ + public function getLatestCancelRequestedEventId() + { + return $this->latest_cancel_requested_event_id; + } + + /** + * id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same + * activity + * + * Generated from protobuf field int64 latest_cancel_requested_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setLatestCancelRequestedEventId($var) + { + GPBUtil::checkInt64($var); + $this->latest_cancel_requested_event_id = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 3; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to + * + * Generated from protobuf field int64 started_event_id = 4; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to + * + * Generated from protobuf field int64 started_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * id of the worker who canceled this activity + * + * Generated from protobuf field string identity = 5; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * id of the worker who canceled this activity + * + * Generated from protobuf field string identity = 5; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCompletedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCompletedEventAttributes.php new file mode 100644 index 0000000..4a98854 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskCompletedEventAttributes.php @@ -0,0 +1,226 @@ +temporal.api.history.v1.ActivityTaskCompletedEventAttributes + */ +class ActivityTaskCompletedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Serialized results of the activity. IE: The return value of the activity function + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + */ + protected $result = null; + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + */ + protected $scheduled_event_id = 0; + /** + * The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + */ + protected $started_event_id = 0; + /** + * id of the worker that completed this task + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $result + * Serialized results of the activity. IE: The return value of the activity function + * @type int|string $scheduled_event_id + * The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to + * @type int|string $started_event_id + * The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to + * @type string $identity + * id of the worker that completed this task + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Serialized results of the activity. IE: The return value of the activity function + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Serialized results of the activity. IE: The return value of the activity function + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->result = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * id of the worker that completed this task + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * id of the worker that completed this task + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskFailedEventAttributes.php new file mode 100644 index 0000000..e102147 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskFailedEventAttributes.php @@ -0,0 +1,253 @@ +temporal.api.history.v1.ActivityTaskFailedEventAttributes + */ +class ActivityTaskFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + */ + protected $failure = null; + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + */ + protected $scheduled_event_id = 0; + /** + * The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + */ + protected $started_event_id = 0; + /** + * id of the worker that failed this task + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 5; + */ + protected $retry_state = 0; + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Failure\V1\Failure $failure + * Failure details + * @type int|string $scheduled_event_id + * The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to + * @type int|string $started_event_id + * The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to + * @type string $identity + * id of the worker that failed this task + * @type int $retry_state + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * id of the worker that failed this task + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * id of the worker that failed this task + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 5; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 5; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this workflow task. + * Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskScheduledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskScheduledEventAttributes.php new file mode 100644 index 0000000..e09171b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskScheduledEventAttributes.php @@ -0,0 +1,562 @@ +temporal.api.history.v1.ActivityTaskScheduledEventAttributes + */ +class ActivityTaskScheduledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The worker/user assigned identifier for the activity + * + * Generated from protobuf field string activity_id = 1; + */ + protected $activity_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + */ + protected $activity_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + */ + protected $task_queue = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + */ + protected $header = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + */ + protected $input = null; + /** + * Indicates how long the caller is willing to wait for an activity completion. Limits how long + * retries will be attempted. Either this or `start_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 7; + */ + protected $schedule_to_close_timeout = null; + /** + * Limits time an activity task can stay in a task queue before a worker picks it up. This + * timeout is always non retryable, as all a retry would achieve is to put it back into the same + * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 8; + */ + protected $schedule_to_start_timeout = null; + /** + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 9; + */ + protected $start_to_close_timeout = null; + /** + * Maximum permitted time between successful worker heartbeats. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 10; + */ + protected $heartbeat_timeout = null; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 11; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Activities are assigned a default retry policy controlled by the service's dynamic + * configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set + * retry_policy.maximum_attempts to 1. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + */ + protected $retry_policy = null; + /** + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * + * Generated from protobuf field bool use_workflow_build_id = 13; + */ + protected $use_workflow_build_id = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $activity_id + * The worker/user assigned identifier for the activity + * @type \Temporal\Api\Common\V1\ActivityType $activity_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Common\V1\Payloads $input + * @type \Google\Protobuf\Duration $schedule_to_close_timeout + * Indicates how long the caller is willing to wait for an activity completion. Limits how long + * retries will be attempted. Either this or `start_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $schedule_to_start_timeout + * Limits time an activity task can stay in a task queue before a worker picks it up. This + * timeout is always non retryable, as all a retry would achieve is to put it back into the same + * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $start_to_close_timeout + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $heartbeat_timeout + * Maximum permitted time between successful worker heartbeats. + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * Activities are assigned a default retry policy controlled by the service's dynamic + * configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set + * retry_policy.maximum_attempts to 1. + * @type bool $use_workflow_build_id + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The worker/user assigned identifier for the activity + * + * Generated from protobuf field string activity_id = 1; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * The worker/user assigned identifier for the activity + * + * Generated from protobuf field string activity_id = 1; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + * @return \Temporal\Api\Common\V1\ActivityType|null + */ + public function getActivityType() + { + return $this->activity_type; + } + + public function hasActivityType() + { + return isset($this->activity_type); + } + + public function clearActivityType() + { + unset($this->activity_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + * @param \Temporal\Api\Common\V1\ActivityType $var + * @return $this + */ + public function setActivityType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\ActivityType::class); + $this->activity_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Indicates how long the caller is willing to wait for an activity completion. Limits how long + * retries will be attempted. Either this or `start_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToCloseTimeout() + { + return $this->schedule_to_close_timeout; + } + + public function hasScheduleToCloseTimeout() + { + return isset($this->schedule_to_close_timeout); + } + + public function clearScheduleToCloseTimeout() + { + unset($this->schedule_to_close_timeout); + } + + /** + * Indicates how long the caller is willing to wait for an activity completion. Limits how long + * retries will be attempted. Either this or `start_to_close_timeout` must be specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_close_timeout = $var; + + return $this; + } + + /** + * Limits time an activity task can stay in a task queue before a worker picks it up. This + * timeout is always non retryable, as all a retry would achieve is to put it back into the same + * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToStartTimeout() + { + return $this->schedule_to_start_timeout; + } + + public function hasScheduleToStartTimeout() + { + return isset($this->schedule_to_start_timeout); + } + + public function clearScheduleToStartTimeout() + { + unset($this->schedule_to_start_timeout); + } + + /** + * Limits time an activity task can stay in a task queue before a worker picks it up. This + * timeout is always non retryable, as all a retry would achieve is to put it back into the same + * queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToStartTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_start_timeout = $var; + + return $this; + } + + /** + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getStartToCloseTimeout() + { + return $this->start_to_close_timeout; + } + + public function hasStartToCloseTimeout() + { + return isset($this->start_to_close_timeout); + } + + public function clearStartToCloseTimeout() + { + unset($this->start_to_close_timeout); + } + + /** + * Maximum time an activity is allowed to execute after being picked up by a worker. This + * timeout is always retryable. Either this or `schedule_to_close_timeout` must be + * specified. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_to_close_timeout = $var; + + return $this; + } + + /** + * Maximum permitted time between successful worker heartbeats. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getHeartbeatTimeout() + { + return $this->heartbeat_timeout; + } + + public function hasHeartbeatTimeout() + { + return isset($this->heartbeat_timeout); + } + + public function clearHeartbeatTimeout() + { + unset($this->heartbeat_timeout); + } + + /** + * Maximum permitted time between successful worker heartbeats. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setHeartbeatTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->heartbeat_timeout = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 11; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 11; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Activities are assigned a default retry policy controlled by the service's dynamic + * configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set + * retry_policy.maximum_attempts to 1. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Activities are assigned a default retry policy controlled by the service's dynamic + * configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set + * retry_policy.maximum_attempts to 1. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * + * Generated from protobuf field bool use_workflow_build_id = 13; + * @return bool + */ + public function getUseWorkflowBuildId() + { + return $this->use_workflow_build_id; + } + + /** + * If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + * Assignment rules of the activity's Task Queue will be used to determine the Build ID. + * + * Generated from protobuf field bool use_workflow_build_id = 13; + * @param bool $var + * @return $this + */ + public function setUseWorkflowBuildId($var) + { + GPBUtil::checkBool($var); + $this->use_workflow_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskStartedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskStartedEventAttributes.php new file mode 100644 index 0000000..1c8509a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskStartedEventAttributes.php @@ -0,0 +1,298 @@ +temporal.api.history.v1.ActivityTaskStartedEventAttributes + */ +class ActivityTaskStartedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * id of the worker that picked up this task + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + /** + * TODO ?? + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + /** + * Starting at 1, the number of times this task has been attempted + * + * Generated from protobuf field int32 attempt = 4; + */ + protected $attempt = 0; + /** + * Will be set to the most recent failure details, if this task has previously failed and then + * been retried. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_failure = 5; + */ + protected $last_failure = null; + /** + * Version info of the worker to whom this task was dispatched. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + */ + protected $worker_version = null; + /** + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * + * Generated from protobuf field int64 build_id_redirect_counter = 7; + */ + protected $build_id_redirect_counter = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to + * @type string $identity + * id of the worker that picked up this task + * @type string $request_id + * TODO ?? + * @type int $attempt + * Starting at 1, the number of times this task has been attempted + * @type \Temporal\Api\Failure\V1\Failure $last_failure + * Will be set to the most recent failure details, if this task has previously failed and then + * been retried. + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker to whom this task was dispatched. + * @type int|string $build_id_redirect_counter + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * id of the worker that picked up this task + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * id of the worker that picked up this task + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * TODO ?? + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * TODO ?? + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Starting at 1, the number of times this task has been attempted + * + * Generated from protobuf field int32 attempt = 4; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * Starting at 1, the number of times this task has been attempted + * + * Generated from protobuf field int32 attempt = 4; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * Will be set to the most recent failure details, if this task has previously failed and then + * been retried. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_failure = 5; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getLastFailure() + { + return $this->last_failure; + } + + public function hasLastFailure() + { + return isset($this->last_failure); + } + + public function clearLastFailure() + { + unset($this->last_failure); + } + + /** + * Will be set to the most recent failure details, if this task has previously failed and then + * been retried. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_failure = 5; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setLastFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->last_failure = $var; + + return $this; + } + + /** + * Version info of the worker to whom this task was dispatched. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker to whom this task was dispatched. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + + /** + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * + * Generated from protobuf field int64 build_id_redirect_counter = 7; + * @return int|string + */ + public function getBuildIdRedirectCounter() + { + return $this->build_id_redirect_counter; + } + + /** + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * + * Generated from protobuf field int64 build_id_redirect_counter = 7; + * @param int|string $var + * @return $this + */ + public function setBuildIdRedirectCounter($var) + { + GPBUtil::checkInt64($var); + $this->build_id_redirect_counter = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskTimedOutEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskTimedOutEventAttributes.php new file mode 100644 index 0000000..6d0b6a8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ActivityTaskTimedOutEventAttributes.php @@ -0,0 +1,175 @@ +temporal.api.history.v1.ActivityTaskTimedOutEventAttributes + */ +class ActivityTaskTimedOutEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * If this activity had failed, was retried, and then timed out, that failure is stored as the + * `cause` in here. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + */ + protected $failure = null; + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + */ + protected $scheduled_event_id = 0; + /** + * The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + */ + protected $started_event_id = 0; + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 4; + */ + protected $retry_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Failure\V1\Failure $failure + * If this activity had failed, was retried, and then timed out, that failure is stored as the + * `cause` in here. + * @type int|string $scheduled_event_id + * The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to + * @type int|string $started_event_id + * The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to + * @type int $retry_state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * If this activity had failed, was retried, and then timed out, that failure is stored as the + * `cause` in here. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * If this activity had failed, was retried, and then timed out, that failure is stored as the + * `cause` in here. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to + * + * Generated from protobuf field int64 started_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 4; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 4; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionCanceledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionCanceledEventAttributes.php new file mode 100644 index 0000000..93650c9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionCanceledEventAttributes.php @@ -0,0 +1,276 @@ +temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes + */ +class ChildWorkflowExecutionCanceledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + */ + protected $details = null; + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 7; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + */ + protected $workflow_type = null; + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + */ + protected $initiated_event_id = 0; + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + */ + protected $started_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $details + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int|string $initiated_event_id + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * @type int|string $started_event_id + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionCompletedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionCompletedEventAttributes.php new file mode 100644 index 0000000..9483916 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionCompletedEventAttributes.php @@ -0,0 +1,276 @@ +temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes + */ +class ChildWorkflowExecutionCompletedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + */ + protected $result = null; + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 7; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + */ + protected $workflow_type = null; + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + */ + protected $initiated_event_id = 0; + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + */ + protected $started_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $result + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int|string $initiated_event_id + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * @type int|string $started_event_id + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->result = $var; + + return $this; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionFailedEventAttributes.php new file mode 100644 index 0000000..dbce0e7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionFailedEventAttributes.php @@ -0,0 +1,303 @@ +temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes + */ +class ChildWorkflowExecutionFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + */ + protected $failure = null; + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 8; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + */ + protected $workflow_type = null; + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + */ + protected $initiated_event_id = 0; + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + */ + protected $started_event_id = 0; + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 7; + */ + protected $retry_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Failure\V1\Failure $failure + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int|string $initiated_event_id + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * @type int|string $started_event_id + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * @type int $retry_state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 8; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 8; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 6; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 7; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 7; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionStartedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionStartedEventAttributes.php new file mode 100644 index 0000000..cd7971b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionStartedEventAttributes.php @@ -0,0 +1,242 @@ +temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes + */ +class ChildWorkflowExecutionStartedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 6; + */ + protected $namespace_id = ''; + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 2; + */ + protected $initiated_event_id = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + */ + protected $header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type int|string $initiated_event_id + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Common\V1\Header $header + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 6; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 6; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 2; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 4; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 5; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionTerminatedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionTerminatedEventAttributes.php new file mode 100644 index 0000000..3f350bb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionTerminatedEventAttributes.php @@ -0,0 +1,239 @@ +temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes + */ +class ChildWorkflowExecutionTerminatedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 6; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 4; + */ + protected $initiated_event_id = 0; + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 5; + */ + protected $started_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int|string $initiated_event_id + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * @type int|string $started_event_id + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 6; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 6; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 4; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 5; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionTimedOutEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionTimedOutEventAttributes.php new file mode 100644 index 0000000..b8ca541 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ChildWorkflowExecutionTimedOutEventAttributes.php @@ -0,0 +1,266 @@ +temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes + */ +class ChildWorkflowExecutionTimedOutEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 7; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 4; + */ + protected $initiated_event_id = 0; + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 5; + */ + protected $started_event_id = 0; + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + */ + protected $retry_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int|string $initiated_event_id + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * @type int|string $started_event_id + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * @type int $retry_state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 4; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 5; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to + * + * Generated from protobuf field int64 started_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 6; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ExternalWorkflowExecutionCancelRequestedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ExternalWorkflowExecutionCancelRequestedEventAttributes.php new file mode 100644 index 0000000..113636d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ExternalWorkflowExecutionCancelRequestedEventAttributes.php @@ -0,0 +1,172 @@ +temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes + */ +class ExternalWorkflowExecutionCancelRequestedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds + * to + * + * Generated from protobuf field int64 initiated_event_id = 1; + */ + protected $initiated_event_id = 0; + /** + * Namespace of the to-be-cancelled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 4; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $initiated_event_id + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds + * to + * @type string $namespace + * Namespace of the to-be-cancelled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds + * to + * + * Generated from protobuf field int64 initiated_event_id = 1; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds + * to + * + * Generated from protobuf field int64 initiated_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Namespace of the to-be-cancelled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the to-be-cancelled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 4; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 4; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ExternalWorkflowExecutionSignaledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ExternalWorkflowExecutionSignaledEventAttributes.php new file mode 100644 index 0000000..f35234e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/ExternalWorkflowExecutionSignaledEventAttributes.php @@ -0,0 +1,202 @@ +temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes + */ +class ExternalWorkflowExecutionSignaledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 1; + */ + protected $initiated_event_id = 0; + /** + * Namespace of the workflow which was signaled. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 5; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + /** + * Deprecated + * + * Generated from protobuf field string control = 4; + */ + protected $control = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $initiated_event_id + * id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to + * @type string $namespace + * Namespace of the workflow which was signaled. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $control + * Deprecated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 1; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Namespace of the workflow which was signaled. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the workflow which was signaled. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 5; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 5; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 4; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 4; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/History.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/History.php new file mode 100644 index 0000000..ea6e90f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/History.php @@ -0,0 +1,59 @@ +temporal.api.history.v1.History + */ +class History extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.history.v1.HistoryEvent events = 1; + */ + private $events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\History\V1\HistoryEvent>|\Google\Protobuf\Internal\RepeatedField $events + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.history.v1.HistoryEvent events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * Generated from protobuf field repeated .temporal.api.history.v1.HistoryEvent events = 1; + * @param array<\Temporal\Api\History\V1\HistoryEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\History\V1\HistoryEvent::class); + $this->events = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/HistoryEvent.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/HistoryEvent.php new file mode 100644 index 0000000..94b3875 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/HistoryEvent.php @@ -0,0 +1,1836 @@ +temporal.api.history.v1.HistoryEvent + */ +class HistoryEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Monotonically increasing event number, starts at 1. + * + * Generated from protobuf field int64 event_id = 1; + */ + protected $event_id = 0; + /** + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + */ + protected $event_time = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.EventType event_type = 3; + */ + protected $event_type = 0; + /** + * TODO: What is this? Appears unused by SDKs + * + * Generated from protobuf field int64 version = 4; + */ + protected $version = 0; + /** + * TODO: What is this? Appears unused by SDKs + * + * Generated from protobuf field int64 task_id = 5; + */ + protected $task_id = 0; + /** + * Set to true when the SDK may ignore the event as it does not impact workflow state or + * information in any way that the SDK need be concerned with. If an SDK encounters an event + * type which it does not understand, it must error unless this is true. If it is true, it's + * acceptable for the event type and/or attributes to be uninterpretable. + * + * Generated from protobuf field bool worker_may_ignore = 300; + */ + protected $worker_may_ignore = false; + /** + * Metadata on the event. This is often carried over from commands and client calls. Most events + * won't have this information, and how this information is used is dependent upon the interface + * that reads it. + * Current well-known uses: + * * workflow_execution_started_event_attributes - summary and details from start workflow. + * * timer_started_event_attributes - summary represents an identifier for the timer for use by + * user interfaces. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 301; + */ + protected $user_metadata = null; + protected $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $event_id + * Monotonically increasing event number, starts at 1. + * @type \Google\Protobuf\Timestamp $event_time + * @type int $event_type + * @type int|string $version + * TODO: What is this? Appears unused by SDKs + * @type int|string $task_id + * TODO: What is this? Appears unused by SDKs + * @type bool $worker_may_ignore + * Set to true when the SDK may ignore the event as it does not impact workflow state or + * information in any way that the SDK need be concerned with. If an SDK encounters an event + * type which it does not understand, it must error unless this is true. If it is true, it's + * acceptable for the event type and/or attributes to be uninterpretable. + * @type \Temporal\Api\Sdk\V1\UserMetadata $user_metadata + * Metadata on the event. This is often carried over from commands and client calls. Most events + * won't have this information, and how this information is used is dependent upon the interface + * that reads it. + * Current well-known uses: + * * workflow_execution_started_event_attributes - summary and details from start workflow. + * * timer_started_event_attributes - summary represents an identifier for the timer for use by + * user interfaces. + * @type \Temporal\Api\History\V1\WorkflowExecutionStartedEventAttributes $workflow_execution_started_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionCompletedEventAttributes $workflow_execution_completed_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionFailedEventAttributes $workflow_execution_failed_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionTimedOutEventAttributes $workflow_execution_timed_out_event_attributes + * @type \Temporal\Api\History\V1\WorkflowTaskScheduledEventAttributes $workflow_task_scheduled_event_attributes + * @type \Temporal\Api\History\V1\WorkflowTaskStartedEventAttributes $workflow_task_started_event_attributes + * @type \Temporal\Api\History\V1\WorkflowTaskCompletedEventAttributes $workflow_task_completed_event_attributes + * @type \Temporal\Api\History\V1\WorkflowTaskTimedOutEventAttributes $workflow_task_timed_out_event_attributes + * @type \Temporal\Api\History\V1\WorkflowTaskFailedEventAttributes $workflow_task_failed_event_attributes + * @type \Temporal\Api\History\V1\ActivityTaskScheduledEventAttributes $activity_task_scheduled_event_attributes + * @type \Temporal\Api\History\V1\ActivityTaskStartedEventAttributes $activity_task_started_event_attributes + * @type \Temporal\Api\History\V1\ActivityTaskCompletedEventAttributes $activity_task_completed_event_attributes + * @type \Temporal\Api\History\V1\ActivityTaskFailedEventAttributes $activity_task_failed_event_attributes + * @type \Temporal\Api\History\V1\ActivityTaskTimedOutEventAttributes $activity_task_timed_out_event_attributes + * @type \Temporal\Api\History\V1\TimerStartedEventAttributes $timer_started_event_attributes + * @type \Temporal\Api\History\V1\TimerFiredEventAttributes $timer_fired_event_attributes + * @type \Temporal\Api\History\V1\ActivityTaskCancelRequestedEventAttributes $activity_task_cancel_requested_event_attributes + * @type \Temporal\Api\History\V1\ActivityTaskCanceledEventAttributes $activity_task_canceled_event_attributes + * @type \Temporal\Api\History\V1\TimerCanceledEventAttributes $timer_canceled_event_attributes + * @type \Temporal\Api\History\V1\MarkerRecordedEventAttributes $marker_recorded_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionSignaledEventAttributes $workflow_execution_signaled_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionTerminatedEventAttributes $workflow_execution_terminated_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionCancelRequestedEventAttributes $workflow_execution_cancel_requested_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionCanceledEventAttributes $workflow_execution_canceled_event_attributes + * @type \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionInitiatedEventAttributes $request_cancel_external_workflow_execution_initiated_event_attributes + * @type \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionFailedEventAttributes $request_cancel_external_workflow_execution_failed_event_attributes + * @type \Temporal\Api\History\V1\ExternalWorkflowExecutionCancelRequestedEventAttributes $external_workflow_execution_cancel_requested_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionContinuedAsNewEventAttributes $workflow_execution_continued_as_new_event_attributes + * @type \Temporal\Api\History\V1\StartChildWorkflowExecutionInitiatedEventAttributes $start_child_workflow_execution_initiated_event_attributes + * @type \Temporal\Api\History\V1\StartChildWorkflowExecutionFailedEventAttributes $start_child_workflow_execution_failed_event_attributes + * @type \Temporal\Api\History\V1\ChildWorkflowExecutionStartedEventAttributes $child_workflow_execution_started_event_attributes + * @type \Temporal\Api\History\V1\ChildWorkflowExecutionCompletedEventAttributes $child_workflow_execution_completed_event_attributes + * @type \Temporal\Api\History\V1\ChildWorkflowExecutionFailedEventAttributes $child_workflow_execution_failed_event_attributes + * @type \Temporal\Api\History\V1\ChildWorkflowExecutionCanceledEventAttributes $child_workflow_execution_canceled_event_attributes + * @type \Temporal\Api\History\V1\ChildWorkflowExecutionTimedOutEventAttributes $child_workflow_execution_timed_out_event_attributes + * @type \Temporal\Api\History\V1\ChildWorkflowExecutionTerminatedEventAttributes $child_workflow_execution_terminated_event_attributes + * @type \Temporal\Api\History\V1\SignalExternalWorkflowExecutionInitiatedEventAttributes $signal_external_workflow_execution_initiated_event_attributes + * @type \Temporal\Api\History\V1\SignalExternalWorkflowExecutionFailedEventAttributes $signal_external_workflow_execution_failed_event_attributes + * @type \Temporal\Api\History\V1\ExternalWorkflowExecutionSignaledEventAttributes $external_workflow_execution_signaled_event_attributes + * @type \Temporal\Api\History\V1\UpsertWorkflowSearchAttributesEventAttributes $upsert_workflow_search_attributes_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionUpdateAcceptedEventAttributes $workflow_execution_update_accepted_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionUpdateRejectedEventAttributes $workflow_execution_update_rejected_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionUpdateCompletedEventAttributes $workflow_execution_update_completed_event_attributes + * @type \Temporal\Api\History\V1\WorkflowPropertiesModifiedExternallyEventAttributes $workflow_properties_modified_externally_event_attributes + * @type \Temporal\Api\History\V1\ActivityPropertiesModifiedExternallyEventAttributes $activity_properties_modified_externally_event_attributes + * @type \Temporal\Api\History\V1\WorkflowPropertiesModifiedEventAttributes $workflow_properties_modified_event_attributes + * @type \Temporal\Api\History\V1\WorkflowExecutionUpdateAdmittedEventAttributes $workflow_execution_update_admitted_event_attributes + * @type \Temporal\Api\History\V1\NexusOperationScheduledEventAttributes $nexus_operation_scheduled_event_attributes + * @type \Temporal\Api\History\V1\NexusOperationStartedEventAttributes $nexus_operation_started_event_attributes + * @type \Temporal\Api\History\V1\NexusOperationCompletedEventAttributes $nexus_operation_completed_event_attributes + * @type \Temporal\Api\History\V1\NexusOperationFailedEventAttributes $nexus_operation_failed_event_attributes + * @type \Temporal\Api\History\V1\NexusOperationCanceledEventAttributes $nexus_operation_canceled_event_attributes + * @type \Temporal\Api\History\V1\NexusOperationTimedOutEventAttributes $nexus_operation_timed_out_event_attributes + * @type \Temporal\Api\History\V1\NexusOperationCancelRequestedEventAttributes $nexus_operation_cancel_requested_event_attributes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Monotonically increasing event number, starts at 1. + * + * Generated from protobuf field int64 event_id = 1; + * @return int|string + */ + public function getEventId() + { + return $this->event_id; + } + + /** + * Monotonically increasing event number, starts at 1. + * + * Generated from protobuf field int64 event_id = 1; + * @param int|string $var + * @return $this + */ + public function setEventId($var) + { + GPBUtil::checkInt64($var); + $this->event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp event_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.EventType event_type = 3; + * @return int + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.EventType event_type = 3; + * @param int $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\EventType::class); + $this->event_type = $var; + + return $this; + } + + /** + * TODO: What is this? Appears unused by SDKs + * + * Generated from protobuf field int64 version = 4; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * TODO: What is this? Appears unused by SDKs + * + * Generated from protobuf field int64 version = 4; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * TODO: What is this? Appears unused by SDKs + * + * Generated from protobuf field int64 task_id = 5; + * @return int|string + */ + public function getTaskId() + { + return $this->task_id; + } + + /** + * TODO: What is this? Appears unused by SDKs + * + * Generated from protobuf field int64 task_id = 5; + * @param int|string $var + * @return $this + */ + public function setTaskId($var) + { + GPBUtil::checkInt64($var); + $this->task_id = $var; + + return $this; + } + + /** + * Set to true when the SDK may ignore the event as it does not impact workflow state or + * information in any way that the SDK need be concerned with. If an SDK encounters an event + * type which it does not understand, it must error unless this is true. If it is true, it's + * acceptable for the event type and/or attributes to be uninterpretable. + * + * Generated from protobuf field bool worker_may_ignore = 300; + * @return bool + */ + public function getWorkerMayIgnore() + { + return $this->worker_may_ignore; + } + + /** + * Set to true when the SDK may ignore the event as it does not impact workflow state or + * information in any way that the SDK need be concerned with. If an SDK encounters an event + * type which it does not understand, it must error unless this is true. If it is true, it's + * acceptable for the event type and/or attributes to be uninterpretable. + * + * Generated from protobuf field bool worker_may_ignore = 300; + * @param bool $var + * @return $this + */ + public function setWorkerMayIgnore($var) + { + GPBUtil::checkBool($var); + $this->worker_may_ignore = $var; + + return $this; + } + + /** + * Metadata on the event. This is often carried over from commands and client calls. Most events + * won't have this information, and how this information is used is dependent upon the interface + * that reads it. + * Current well-known uses: + * * workflow_execution_started_event_attributes - summary and details from start workflow. + * * timer_started_event_attributes - summary represents an identifier for the timer for use by + * user interfaces. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 301; + * @return \Temporal\Api\Sdk\V1\UserMetadata|null + */ + public function getUserMetadata() + { + return $this->user_metadata; + } + + public function hasUserMetadata() + { + return isset($this->user_metadata); + } + + public function clearUserMetadata() + { + unset($this->user_metadata); + } + + /** + * Metadata on the event. This is often carried over from commands and client calls. Most events + * won't have this information, and how this information is used is dependent upon the interface + * that reads it. + * Current well-known uses: + * * workflow_execution_started_event_attributes - summary and details from start workflow. + * * timer_started_event_attributes - summary represents an identifier for the timer for use by + * user interfaces. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 301; + * @param \Temporal\Api\Sdk\V1\UserMetadata $var + * @return $this + */ + public function setUserMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\UserMetadata::class); + $this->user_metadata = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionStartedEventAttributes workflow_execution_started_event_attributes = 6; + * @return \Temporal\Api\History\V1\WorkflowExecutionStartedEventAttributes|null + */ + public function getWorkflowExecutionStartedEventAttributes() + { + return $this->readOneof(6); + } + + public function hasWorkflowExecutionStartedEventAttributes() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionStartedEventAttributes workflow_execution_started_event_attributes = 6; + * @param \Temporal\Api\History\V1\WorkflowExecutionStartedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionStartedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionStartedEventAttributes::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes workflow_execution_completed_event_attributes = 7; + * @return \Temporal\Api\History\V1\WorkflowExecutionCompletedEventAttributes|null + */ + public function getWorkflowExecutionCompletedEventAttributes() + { + return $this->readOneof(7); + } + + public function hasWorkflowExecutionCompletedEventAttributes() + { + return $this->hasOneof(7); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes workflow_execution_completed_event_attributes = 7; + * @param \Temporal\Api\History\V1\WorkflowExecutionCompletedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionCompletedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionCompletedEventAttributes::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionFailedEventAttributes workflow_execution_failed_event_attributes = 8; + * @return \Temporal\Api\History\V1\WorkflowExecutionFailedEventAttributes|null + */ + public function getWorkflowExecutionFailedEventAttributes() + { + return $this->readOneof(8); + } + + public function hasWorkflowExecutionFailedEventAttributes() + { + return $this->hasOneof(8); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionFailedEventAttributes workflow_execution_failed_event_attributes = 8; + * @param \Temporal\Api\History\V1\WorkflowExecutionFailedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionFailedEventAttributes::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes workflow_execution_timed_out_event_attributes = 9; + * @return \Temporal\Api\History\V1\WorkflowExecutionTimedOutEventAttributes|null + */ + public function getWorkflowExecutionTimedOutEventAttributes() + { + return $this->readOneof(9); + } + + public function hasWorkflowExecutionTimedOutEventAttributes() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes workflow_execution_timed_out_event_attributes = 9; + * @param \Temporal\Api\History\V1\WorkflowExecutionTimedOutEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionTimedOutEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionTimedOutEventAttributes::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskScheduledEventAttributes workflow_task_scheduled_event_attributes = 10; + * @return \Temporal\Api\History\V1\WorkflowTaskScheduledEventAttributes|null + */ + public function getWorkflowTaskScheduledEventAttributes() + { + return $this->readOneof(10); + } + + public function hasWorkflowTaskScheduledEventAttributes() + { + return $this->hasOneof(10); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskScheduledEventAttributes workflow_task_scheduled_event_attributes = 10; + * @param \Temporal\Api\History\V1\WorkflowTaskScheduledEventAttributes $var + * @return $this + */ + public function setWorkflowTaskScheduledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowTaskScheduledEventAttributes::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskStartedEventAttributes workflow_task_started_event_attributes = 11; + * @return \Temporal\Api\History\V1\WorkflowTaskStartedEventAttributes|null + */ + public function getWorkflowTaskStartedEventAttributes() + { + return $this->readOneof(11); + } + + public function hasWorkflowTaskStartedEventAttributes() + { + return $this->hasOneof(11); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskStartedEventAttributes workflow_task_started_event_attributes = 11; + * @param \Temporal\Api\History\V1\WorkflowTaskStartedEventAttributes $var + * @return $this + */ + public function setWorkflowTaskStartedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowTaskStartedEventAttributes::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskCompletedEventAttributes workflow_task_completed_event_attributes = 12; + * @return \Temporal\Api\History\V1\WorkflowTaskCompletedEventAttributes|null + */ + public function getWorkflowTaskCompletedEventAttributes() + { + return $this->readOneof(12); + } + + public function hasWorkflowTaskCompletedEventAttributes() + { + return $this->hasOneof(12); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskCompletedEventAttributes workflow_task_completed_event_attributes = 12; + * @param \Temporal\Api\History\V1\WorkflowTaskCompletedEventAttributes $var + * @return $this + */ + public function setWorkflowTaskCompletedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowTaskCompletedEventAttributes::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes workflow_task_timed_out_event_attributes = 13; + * @return \Temporal\Api\History\V1\WorkflowTaskTimedOutEventAttributes|null + */ + public function getWorkflowTaskTimedOutEventAttributes() + { + return $this->readOneof(13); + } + + public function hasWorkflowTaskTimedOutEventAttributes() + { + return $this->hasOneof(13); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes workflow_task_timed_out_event_attributes = 13; + * @param \Temporal\Api\History\V1\WorkflowTaskTimedOutEventAttributes $var + * @return $this + */ + public function setWorkflowTaskTimedOutEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowTaskTimedOutEventAttributes::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskFailedEventAttributes workflow_task_failed_event_attributes = 14; + * @return \Temporal\Api\History\V1\WorkflowTaskFailedEventAttributes|null + */ + public function getWorkflowTaskFailedEventAttributes() + { + return $this->readOneof(14); + } + + public function hasWorkflowTaskFailedEventAttributes() + { + return $this->hasOneof(14); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowTaskFailedEventAttributes workflow_task_failed_event_attributes = 14; + * @param \Temporal\Api\History\V1\WorkflowTaskFailedEventAttributes $var + * @return $this + */ + public function setWorkflowTaskFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowTaskFailedEventAttributes::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskScheduledEventAttributes activity_task_scheduled_event_attributes = 15; + * @return \Temporal\Api\History\V1\ActivityTaskScheduledEventAttributes|null + */ + public function getActivityTaskScheduledEventAttributes() + { + return $this->readOneof(15); + } + + public function hasActivityTaskScheduledEventAttributes() + { + return $this->hasOneof(15); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskScheduledEventAttributes activity_task_scheduled_event_attributes = 15; + * @param \Temporal\Api\History\V1\ActivityTaskScheduledEventAttributes $var + * @return $this + */ + public function setActivityTaskScheduledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityTaskScheduledEventAttributes::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskStartedEventAttributes activity_task_started_event_attributes = 16; + * @return \Temporal\Api\History\V1\ActivityTaskStartedEventAttributes|null + */ + public function getActivityTaskStartedEventAttributes() + { + return $this->readOneof(16); + } + + public function hasActivityTaskStartedEventAttributes() + { + return $this->hasOneof(16); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskStartedEventAttributes activity_task_started_event_attributes = 16; + * @param \Temporal\Api\History\V1\ActivityTaskStartedEventAttributes $var + * @return $this + */ + public function setActivityTaskStartedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityTaskStartedEventAttributes::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskCompletedEventAttributes activity_task_completed_event_attributes = 17; + * @return \Temporal\Api\History\V1\ActivityTaskCompletedEventAttributes|null + */ + public function getActivityTaskCompletedEventAttributes() + { + return $this->readOneof(17); + } + + public function hasActivityTaskCompletedEventAttributes() + { + return $this->hasOneof(17); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskCompletedEventAttributes activity_task_completed_event_attributes = 17; + * @param \Temporal\Api\History\V1\ActivityTaskCompletedEventAttributes $var + * @return $this + */ + public function setActivityTaskCompletedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityTaskCompletedEventAttributes::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskFailedEventAttributes activity_task_failed_event_attributes = 18; + * @return \Temporal\Api\History\V1\ActivityTaskFailedEventAttributes|null + */ + public function getActivityTaskFailedEventAttributes() + { + return $this->readOneof(18); + } + + public function hasActivityTaskFailedEventAttributes() + { + return $this->hasOneof(18); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskFailedEventAttributes activity_task_failed_event_attributes = 18; + * @param \Temporal\Api\History\V1\ActivityTaskFailedEventAttributes $var + * @return $this + */ + public function setActivityTaskFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityTaskFailedEventAttributes::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskTimedOutEventAttributes activity_task_timed_out_event_attributes = 19; + * @return \Temporal\Api\History\V1\ActivityTaskTimedOutEventAttributes|null + */ + public function getActivityTaskTimedOutEventAttributes() + { + return $this->readOneof(19); + } + + public function hasActivityTaskTimedOutEventAttributes() + { + return $this->hasOneof(19); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskTimedOutEventAttributes activity_task_timed_out_event_attributes = 19; + * @param \Temporal\Api\History\V1\ActivityTaskTimedOutEventAttributes $var + * @return $this + */ + public function setActivityTaskTimedOutEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityTaskTimedOutEventAttributes::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.TimerStartedEventAttributes timer_started_event_attributes = 20; + * @return \Temporal\Api\History\V1\TimerStartedEventAttributes|null + */ + public function getTimerStartedEventAttributes() + { + return $this->readOneof(20); + } + + public function hasTimerStartedEventAttributes() + { + return $this->hasOneof(20); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.TimerStartedEventAttributes timer_started_event_attributes = 20; + * @param \Temporal\Api\History\V1\TimerStartedEventAttributes $var + * @return $this + */ + public function setTimerStartedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\TimerStartedEventAttributes::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.TimerFiredEventAttributes timer_fired_event_attributes = 21; + * @return \Temporal\Api\History\V1\TimerFiredEventAttributes|null + */ + public function getTimerFiredEventAttributes() + { + return $this->readOneof(21); + } + + public function hasTimerFiredEventAttributes() + { + return $this->hasOneof(21); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.TimerFiredEventAttributes timer_fired_event_attributes = 21; + * @param \Temporal\Api\History\V1\TimerFiredEventAttributes $var + * @return $this + */ + public function setTimerFiredEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\TimerFiredEventAttributes::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes activity_task_cancel_requested_event_attributes = 22; + * @return \Temporal\Api\History\V1\ActivityTaskCancelRequestedEventAttributes|null + */ + public function getActivityTaskCancelRequestedEventAttributes() + { + return $this->readOneof(22); + } + + public function hasActivityTaskCancelRequestedEventAttributes() + { + return $this->hasOneof(22); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes activity_task_cancel_requested_event_attributes = 22; + * @param \Temporal\Api\History\V1\ActivityTaskCancelRequestedEventAttributes $var + * @return $this + */ + public function setActivityTaskCancelRequestedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityTaskCancelRequestedEventAttributes::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskCanceledEventAttributes activity_task_canceled_event_attributes = 23; + * @return \Temporal\Api\History\V1\ActivityTaskCanceledEventAttributes|null + */ + public function getActivityTaskCanceledEventAttributes() + { + return $this->readOneof(23); + } + + public function hasActivityTaskCanceledEventAttributes() + { + return $this->hasOneof(23); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityTaskCanceledEventAttributes activity_task_canceled_event_attributes = 23; + * @param \Temporal\Api\History\V1\ActivityTaskCanceledEventAttributes $var + * @return $this + */ + public function setActivityTaskCanceledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityTaskCanceledEventAttributes::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.TimerCanceledEventAttributes timer_canceled_event_attributes = 24; + * @return \Temporal\Api\History\V1\TimerCanceledEventAttributes|null + */ + public function getTimerCanceledEventAttributes() + { + return $this->readOneof(24); + } + + public function hasTimerCanceledEventAttributes() + { + return $this->hasOneof(24); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.TimerCanceledEventAttributes timer_canceled_event_attributes = 24; + * @param \Temporal\Api\History\V1\TimerCanceledEventAttributes $var + * @return $this + */ + public function setTimerCanceledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\TimerCanceledEventAttributes::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.MarkerRecordedEventAttributes marker_recorded_event_attributes = 25; + * @return \Temporal\Api\History\V1\MarkerRecordedEventAttributes|null + */ + public function getMarkerRecordedEventAttributes() + { + return $this->readOneof(25); + } + + public function hasMarkerRecordedEventAttributes() + { + return $this->hasOneof(25); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.MarkerRecordedEventAttributes marker_recorded_event_attributes = 25; + * @param \Temporal\Api\History\V1\MarkerRecordedEventAttributes $var + * @return $this + */ + public function setMarkerRecordedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\MarkerRecordedEventAttributes::class); + $this->writeOneof(25, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes workflow_execution_signaled_event_attributes = 26; + * @return \Temporal\Api\History\V1\WorkflowExecutionSignaledEventAttributes|null + */ + public function getWorkflowExecutionSignaledEventAttributes() + { + return $this->readOneof(26); + } + + public function hasWorkflowExecutionSignaledEventAttributes() + { + return $this->hasOneof(26); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes workflow_execution_signaled_event_attributes = 26; + * @param \Temporal\Api\History\V1\WorkflowExecutionSignaledEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionSignaledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionSignaledEventAttributes::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes workflow_execution_terminated_event_attributes = 27; + * @return \Temporal\Api\History\V1\WorkflowExecutionTerminatedEventAttributes|null + */ + public function getWorkflowExecutionTerminatedEventAttributes() + { + return $this->readOneof(27); + } + + public function hasWorkflowExecutionTerminatedEventAttributes() + { + return $this->hasOneof(27); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes workflow_execution_terminated_event_attributes = 27; + * @param \Temporal\Api\History\V1\WorkflowExecutionTerminatedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionTerminatedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionTerminatedEventAttributes::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes workflow_execution_cancel_requested_event_attributes = 28; + * @return \Temporal\Api\History\V1\WorkflowExecutionCancelRequestedEventAttributes|null + */ + public function getWorkflowExecutionCancelRequestedEventAttributes() + { + return $this->readOneof(28); + } + + public function hasWorkflowExecutionCancelRequestedEventAttributes() + { + return $this->hasOneof(28); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes workflow_execution_cancel_requested_event_attributes = 28; + * @param \Temporal\Api\History\V1\WorkflowExecutionCancelRequestedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionCancelRequestedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionCancelRequestedEventAttributes::class); + $this->writeOneof(28, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes workflow_execution_canceled_event_attributes = 29; + * @return \Temporal\Api\History\V1\WorkflowExecutionCanceledEventAttributes|null + */ + public function getWorkflowExecutionCanceledEventAttributes() + { + return $this->readOneof(29); + } + + public function hasWorkflowExecutionCanceledEventAttributes() + { + return $this->hasOneof(29); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes workflow_execution_canceled_event_attributes = 29; + * @param \Temporal\Api\History\V1\WorkflowExecutionCanceledEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionCanceledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionCanceledEventAttributes::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes request_cancel_external_workflow_execution_initiated_event_attributes = 30; + * @return \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionInitiatedEventAttributes|null + */ + public function getRequestCancelExternalWorkflowExecutionInitiatedEventAttributes() + { + return $this->readOneof(30); + } + + public function hasRequestCancelExternalWorkflowExecutionInitiatedEventAttributes() + { + return $this->hasOneof(30); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes request_cancel_external_workflow_execution_initiated_event_attributes = 30; + * @param \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionInitiatedEventAttributes $var + * @return $this + */ + public function setRequestCancelExternalWorkflowExecutionInitiatedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionInitiatedEventAttributes::class); + $this->writeOneof(30, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes request_cancel_external_workflow_execution_failed_event_attributes = 31; + * @return \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionFailedEventAttributes|null + */ + public function getRequestCancelExternalWorkflowExecutionFailedEventAttributes() + { + return $this->readOneof(31); + } + + public function hasRequestCancelExternalWorkflowExecutionFailedEventAttributes() + { + return $this->hasOneof(31); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes request_cancel_external_workflow_execution_failed_event_attributes = 31; + * @param \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionFailedEventAttributes $var + * @return $this + */ + public function setRequestCancelExternalWorkflowExecutionFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\RequestCancelExternalWorkflowExecutionFailedEventAttributes::class); + $this->writeOneof(31, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes external_workflow_execution_cancel_requested_event_attributes = 32; + * @return \Temporal\Api\History\V1\ExternalWorkflowExecutionCancelRequestedEventAttributes|null + */ + public function getExternalWorkflowExecutionCancelRequestedEventAttributes() + { + return $this->readOneof(32); + } + + public function hasExternalWorkflowExecutionCancelRequestedEventAttributes() + { + return $this->hasOneof(32); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes external_workflow_execution_cancel_requested_event_attributes = 32; + * @param \Temporal\Api\History\V1\ExternalWorkflowExecutionCancelRequestedEventAttributes $var + * @return $this + */ + public function setExternalWorkflowExecutionCancelRequestedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ExternalWorkflowExecutionCancelRequestedEventAttributes::class); + $this->writeOneof(32, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes workflow_execution_continued_as_new_event_attributes = 33; + * @return \Temporal\Api\History\V1\WorkflowExecutionContinuedAsNewEventAttributes|null + */ + public function getWorkflowExecutionContinuedAsNewEventAttributes() + { + return $this->readOneof(33); + } + + public function hasWorkflowExecutionContinuedAsNewEventAttributes() + { + return $this->hasOneof(33); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes workflow_execution_continued_as_new_event_attributes = 33; + * @param \Temporal\Api\History\V1\WorkflowExecutionContinuedAsNewEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionContinuedAsNewEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionContinuedAsNewEventAttributes::class); + $this->writeOneof(33, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes start_child_workflow_execution_initiated_event_attributes = 34; + * @return \Temporal\Api\History\V1\StartChildWorkflowExecutionInitiatedEventAttributes|null + */ + public function getStartChildWorkflowExecutionInitiatedEventAttributes() + { + return $this->readOneof(34); + } + + public function hasStartChildWorkflowExecutionInitiatedEventAttributes() + { + return $this->hasOneof(34); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes start_child_workflow_execution_initiated_event_attributes = 34; + * @param \Temporal\Api\History\V1\StartChildWorkflowExecutionInitiatedEventAttributes $var + * @return $this + */ + public function setStartChildWorkflowExecutionInitiatedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\StartChildWorkflowExecutionInitiatedEventAttributes::class); + $this->writeOneof(34, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes start_child_workflow_execution_failed_event_attributes = 35; + * @return \Temporal\Api\History\V1\StartChildWorkflowExecutionFailedEventAttributes|null + */ + public function getStartChildWorkflowExecutionFailedEventAttributes() + { + return $this->readOneof(35); + } + + public function hasStartChildWorkflowExecutionFailedEventAttributes() + { + return $this->hasOneof(35); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes start_child_workflow_execution_failed_event_attributes = 35; + * @param \Temporal\Api\History\V1\StartChildWorkflowExecutionFailedEventAttributes $var + * @return $this + */ + public function setStartChildWorkflowExecutionFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\StartChildWorkflowExecutionFailedEventAttributes::class); + $this->writeOneof(35, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes child_workflow_execution_started_event_attributes = 36; + * @return \Temporal\Api\History\V1\ChildWorkflowExecutionStartedEventAttributes|null + */ + public function getChildWorkflowExecutionStartedEventAttributes() + { + return $this->readOneof(36); + } + + public function hasChildWorkflowExecutionStartedEventAttributes() + { + return $this->hasOneof(36); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes child_workflow_execution_started_event_attributes = 36; + * @param \Temporal\Api\History\V1\ChildWorkflowExecutionStartedEventAttributes $var + * @return $this + */ + public function setChildWorkflowExecutionStartedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ChildWorkflowExecutionStartedEventAttributes::class); + $this->writeOneof(36, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes child_workflow_execution_completed_event_attributes = 37; + * @return \Temporal\Api\History\V1\ChildWorkflowExecutionCompletedEventAttributes|null + */ + public function getChildWorkflowExecutionCompletedEventAttributes() + { + return $this->readOneof(37); + } + + public function hasChildWorkflowExecutionCompletedEventAttributes() + { + return $this->hasOneof(37); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes child_workflow_execution_completed_event_attributes = 37; + * @param \Temporal\Api\History\V1\ChildWorkflowExecutionCompletedEventAttributes $var + * @return $this + */ + public function setChildWorkflowExecutionCompletedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ChildWorkflowExecutionCompletedEventAttributes::class); + $this->writeOneof(37, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes child_workflow_execution_failed_event_attributes = 38; + * @return \Temporal\Api\History\V1\ChildWorkflowExecutionFailedEventAttributes|null + */ + public function getChildWorkflowExecutionFailedEventAttributes() + { + return $this->readOneof(38); + } + + public function hasChildWorkflowExecutionFailedEventAttributes() + { + return $this->hasOneof(38); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes child_workflow_execution_failed_event_attributes = 38; + * @param \Temporal\Api\History\V1\ChildWorkflowExecutionFailedEventAttributes $var + * @return $this + */ + public function setChildWorkflowExecutionFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ChildWorkflowExecutionFailedEventAttributes::class); + $this->writeOneof(38, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes child_workflow_execution_canceled_event_attributes = 39; + * @return \Temporal\Api\History\V1\ChildWorkflowExecutionCanceledEventAttributes|null + */ + public function getChildWorkflowExecutionCanceledEventAttributes() + { + return $this->readOneof(39); + } + + public function hasChildWorkflowExecutionCanceledEventAttributes() + { + return $this->hasOneof(39); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes child_workflow_execution_canceled_event_attributes = 39; + * @param \Temporal\Api\History\V1\ChildWorkflowExecutionCanceledEventAttributes $var + * @return $this + */ + public function setChildWorkflowExecutionCanceledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ChildWorkflowExecutionCanceledEventAttributes::class); + $this->writeOneof(39, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes child_workflow_execution_timed_out_event_attributes = 40; + * @return \Temporal\Api\History\V1\ChildWorkflowExecutionTimedOutEventAttributes|null + */ + public function getChildWorkflowExecutionTimedOutEventAttributes() + { + return $this->readOneof(40); + } + + public function hasChildWorkflowExecutionTimedOutEventAttributes() + { + return $this->hasOneof(40); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes child_workflow_execution_timed_out_event_attributes = 40; + * @param \Temporal\Api\History\V1\ChildWorkflowExecutionTimedOutEventAttributes $var + * @return $this + */ + public function setChildWorkflowExecutionTimedOutEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ChildWorkflowExecutionTimedOutEventAttributes::class); + $this->writeOneof(40, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes child_workflow_execution_terminated_event_attributes = 41; + * @return \Temporal\Api\History\V1\ChildWorkflowExecutionTerminatedEventAttributes|null + */ + public function getChildWorkflowExecutionTerminatedEventAttributes() + { + return $this->readOneof(41); + } + + public function hasChildWorkflowExecutionTerminatedEventAttributes() + { + return $this->hasOneof(41); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes child_workflow_execution_terminated_event_attributes = 41; + * @param \Temporal\Api\History\V1\ChildWorkflowExecutionTerminatedEventAttributes $var + * @return $this + */ + public function setChildWorkflowExecutionTerminatedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ChildWorkflowExecutionTerminatedEventAttributes::class); + $this->writeOneof(41, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes signal_external_workflow_execution_initiated_event_attributes = 42; + * @return \Temporal\Api\History\V1\SignalExternalWorkflowExecutionInitiatedEventAttributes|null + */ + public function getSignalExternalWorkflowExecutionInitiatedEventAttributes() + { + return $this->readOneof(42); + } + + public function hasSignalExternalWorkflowExecutionInitiatedEventAttributes() + { + return $this->hasOneof(42); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes signal_external_workflow_execution_initiated_event_attributes = 42; + * @param \Temporal\Api\History\V1\SignalExternalWorkflowExecutionInitiatedEventAttributes $var + * @return $this + */ + public function setSignalExternalWorkflowExecutionInitiatedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\SignalExternalWorkflowExecutionInitiatedEventAttributes::class); + $this->writeOneof(42, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes signal_external_workflow_execution_failed_event_attributes = 43; + * @return \Temporal\Api\History\V1\SignalExternalWorkflowExecutionFailedEventAttributes|null + */ + public function getSignalExternalWorkflowExecutionFailedEventAttributes() + { + return $this->readOneof(43); + } + + public function hasSignalExternalWorkflowExecutionFailedEventAttributes() + { + return $this->hasOneof(43); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes signal_external_workflow_execution_failed_event_attributes = 43; + * @param \Temporal\Api\History\V1\SignalExternalWorkflowExecutionFailedEventAttributes $var + * @return $this + */ + public function setSignalExternalWorkflowExecutionFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\SignalExternalWorkflowExecutionFailedEventAttributes::class); + $this->writeOneof(43, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes external_workflow_execution_signaled_event_attributes = 44; + * @return \Temporal\Api\History\V1\ExternalWorkflowExecutionSignaledEventAttributes|null + */ + public function getExternalWorkflowExecutionSignaledEventAttributes() + { + return $this->readOneof(44); + } + + public function hasExternalWorkflowExecutionSignaledEventAttributes() + { + return $this->hasOneof(44); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes external_workflow_execution_signaled_event_attributes = 44; + * @param \Temporal\Api\History\V1\ExternalWorkflowExecutionSignaledEventAttributes $var + * @return $this + */ + public function setExternalWorkflowExecutionSignaledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ExternalWorkflowExecutionSignaledEventAttributes::class); + $this->writeOneof(44, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes upsert_workflow_search_attributes_event_attributes = 45; + * @return \Temporal\Api\History\V1\UpsertWorkflowSearchAttributesEventAttributes|null + */ + public function getUpsertWorkflowSearchAttributesEventAttributes() + { + return $this->readOneof(45); + } + + public function hasUpsertWorkflowSearchAttributesEventAttributes() + { + return $this->hasOneof(45); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes upsert_workflow_search_attributes_event_attributes = 45; + * @param \Temporal\Api\History\V1\UpsertWorkflowSearchAttributesEventAttributes $var + * @return $this + */ + public function setUpsertWorkflowSearchAttributesEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\UpsertWorkflowSearchAttributesEventAttributes::class); + $this->writeOneof(45, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes workflow_execution_update_accepted_event_attributes = 46; + * @return \Temporal\Api\History\V1\WorkflowExecutionUpdateAcceptedEventAttributes|null + */ + public function getWorkflowExecutionUpdateAcceptedEventAttributes() + { + return $this->readOneof(46); + } + + public function hasWorkflowExecutionUpdateAcceptedEventAttributes() + { + return $this->hasOneof(46); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes workflow_execution_update_accepted_event_attributes = 46; + * @param \Temporal\Api\History\V1\WorkflowExecutionUpdateAcceptedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionUpdateAcceptedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionUpdateAcceptedEventAttributes::class); + $this->writeOneof(46, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes workflow_execution_update_rejected_event_attributes = 47; + * @return \Temporal\Api\History\V1\WorkflowExecutionUpdateRejectedEventAttributes|null + */ + public function getWorkflowExecutionUpdateRejectedEventAttributes() + { + return $this->readOneof(47); + } + + public function hasWorkflowExecutionUpdateRejectedEventAttributes() + { + return $this->hasOneof(47); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes workflow_execution_update_rejected_event_attributes = 47; + * @param \Temporal\Api\History\V1\WorkflowExecutionUpdateRejectedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionUpdateRejectedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionUpdateRejectedEventAttributes::class); + $this->writeOneof(47, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes workflow_execution_update_completed_event_attributes = 48; + * @return \Temporal\Api\History\V1\WorkflowExecutionUpdateCompletedEventAttributes|null + */ + public function getWorkflowExecutionUpdateCompletedEventAttributes() + { + return $this->readOneof(48); + } + + public function hasWorkflowExecutionUpdateCompletedEventAttributes() + { + return $this->hasOneof(48); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes workflow_execution_update_completed_event_attributes = 48; + * @param \Temporal\Api\History\V1\WorkflowExecutionUpdateCompletedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionUpdateCompletedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionUpdateCompletedEventAttributes::class); + $this->writeOneof(48, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes workflow_properties_modified_externally_event_attributes = 49; + * @return \Temporal\Api\History\V1\WorkflowPropertiesModifiedExternallyEventAttributes|null + */ + public function getWorkflowPropertiesModifiedExternallyEventAttributes() + { + return $this->readOneof(49); + } + + public function hasWorkflowPropertiesModifiedExternallyEventAttributes() + { + return $this->hasOneof(49); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes workflow_properties_modified_externally_event_attributes = 49; + * @param \Temporal\Api\History\V1\WorkflowPropertiesModifiedExternallyEventAttributes $var + * @return $this + */ + public function setWorkflowPropertiesModifiedExternallyEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowPropertiesModifiedExternallyEventAttributes::class); + $this->writeOneof(49, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes activity_properties_modified_externally_event_attributes = 50; + * @return \Temporal\Api\History\V1\ActivityPropertiesModifiedExternallyEventAttributes|null + */ + public function getActivityPropertiesModifiedExternallyEventAttributes() + { + return $this->readOneof(50); + } + + public function hasActivityPropertiesModifiedExternallyEventAttributes() + { + return $this->hasOneof(50); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes activity_properties_modified_externally_event_attributes = 50; + * @param \Temporal\Api\History\V1\ActivityPropertiesModifiedExternallyEventAttributes $var + * @return $this + */ + public function setActivityPropertiesModifiedExternallyEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\ActivityPropertiesModifiedExternallyEventAttributes::class); + $this->writeOneof(50, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes workflow_properties_modified_event_attributes = 51; + * @return \Temporal\Api\History\V1\WorkflowPropertiesModifiedEventAttributes|null + */ + public function getWorkflowPropertiesModifiedEventAttributes() + { + return $this->readOneof(51); + } + + public function hasWorkflowPropertiesModifiedEventAttributes() + { + return $this->hasOneof(51); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes workflow_properties_modified_event_attributes = 51; + * @param \Temporal\Api\History\V1\WorkflowPropertiesModifiedEventAttributes $var + * @return $this + */ + public function setWorkflowPropertiesModifiedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowPropertiesModifiedEventAttributes::class); + $this->writeOneof(51, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes workflow_execution_update_admitted_event_attributes = 52; + * @return \Temporal\Api\History\V1\WorkflowExecutionUpdateAdmittedEventAttributes|null + */ + public function getWorkflowExecutionUpdateAdmittedEventAttributes() + { + return $this->readOneof(52); + } + + public function hasWorkflowExecutionUpdateAdmittedEventAttributes() + { + return $this->hasOneof(52); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes workflow_execution_update_admitted_event_attributes = 52; + * @param \Temporal\Api\History\V1\WorkflowExecutionUpdateAdmittedEventAttributes $var + * @return $this + */ + public function setWorkflowExecutionUpdateAdmittedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\WorkflowExecutionUpdateAdmittedEventAttributes::class); + $this->writeOneof(52, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationScheduledEventAttributes nexus_operation_scheduled_event_attributes = 53; + * @return \Temporal\Api\History\V1\NexusOperationScheduledEventAttributes|null + */ + public function getNexusOperationScheduledEventAttributes() + { + return $this->readOneof(53); + } + + public function hasNexusOperationScheduledEventAttributes() + { + return $this->hasOneof(53); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationScheduledEventAttributes nexus_operation_scheduled_event_attributes = 53; + * @param \Temporal\Api\History\V1\NexusOperationScheduledEventAttributes $var + * @return $this + */ + public function setNexusOperationScheduledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\NexusOperationScheduledEventAttributes::class); + $this->writeOneof(53, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationStartedEventAttributes nexus_operation_started_event_attributes = 54; + * @return \Temporal\Api\History\V1\NexusOperationStartedEventAttributes|null + */ + public function getNexusOperationStartedEventAttributes() + { + return $this->readOneof(54); + } + + public function hasNexusOperationStartedEventAttributes() + { + return $this->hasOneof(54); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationStartedEventAttributes nexus_operation_started_event_attributes = 54; + * @param \Temporal\Api\History\V1\NexusOperationStartedEventAttributes $var + * @return $this + */ + public function setNexusOperationStartedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\NexusOperationStartedEventAttributes::class); + $this->writeOneof(54, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationCompletedEventAttributes nexus_operation_completed_event_attributes = 55; + * @return \Temporal\Api\History\V1\NexusOperationCompletedEventAttributes|null + */ + public function getNexusOperationCompletedEventAttributes() + { + return $this->readOneof(55); + } + + public function hasNexusOperationCompletedEventAttributes() + { + return $this->hasOneof(55); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationCompletedEventAttributes nexus_operation_completed_event_attributes = 55; + * @param \Temporal\Api\History\V1\NexusOperationCompletedEventAttributes $var + * @return $this + */ + public function setNexusOperationCompletedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\NexusOperationCompletedEventAttributes::class); + $this->writeOneof(55, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationFailedEventAttributes nexus_operation_failed_event_attributes = 56; + * @return \Temporal\Api\History\V1\NexusOperationFailedEventAttributes|null + */ + public function getNexusOperationFailedEventAttributes() + { + return $this->readOneof(56); + } + + public function hasNexusOperationFailedEventAttributes() + { + return $this->hasOneof(56); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationFailedEventAttributes nexus_operation_failed_event_attributes = 56; + * @param \Temporal\Api\History\V1\NexusOperationFailedEventAttributes $var + * @return $this + */ + public function setNexusOperationFailedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\NexusOperationFailedEventAttributes::class); + $this->writeOneof(56, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationCanceledEventAttributes nexus_operation_canceled_event_attributes = 57; + * @return \Temporal\Api\History\V1\NexusOperationCanceledEventAttributes|null + */ + public function getNexusOperationCanceledEventAttributes() + { + return $this->readOneof(57); + } + + public function hasNexusOperationCanceledEventAttributes() + { + return $this->hasOneof(57); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationCanceledEventAttributes nexus_operation_canceled_event_attributes = 57; + * @param \Temporal\Api\History\V1\NexusOperationCanceledEventAttributes $var + * @return $this + */ + public function setNexusOperationCanceledEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\NexusOperationCanceledEventAttributes::class); + $this->writeOneof(57, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationTimedOutEventAttributes nexus_operation_timed_out_event_attributes = 58; + * @return \Temporal\Api\History\V1\NexusOperationTimedOutEventAttributes|null + */ + public function getNexusOperationTimedOutEventAttributes() + { + return $this->readOneof(58); + } + + public function hasNexusOperationTimedOutEventAttributes() + { + return $this->hasOneof(58); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationTimedOutEventAttributes nexus_operation_timed_out_event_attributes = 58; + * @param \Temporal\Api\History\V1\NexusOperationTimedOutEventAttributes $var + * @return $this + */ + public function setNexusOperationTimedOutEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\NexusOperationTimedOutEventAttributes::class); + $this->writeOneof(58, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes nexus_operation_cancel_requested_event_attributes = 59; + * @return \Temporal\Api\History\V1\NexusOperationCancelRequestedEventAttributes|null + */ + public function getNexusOperationCancelRequestedEventAttributes() + { + return $this->readOneof(59); + } + + public function hasNexusOperationCancelRequestedEventAttributes() + { + return $this->hasOneof(59); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes nexus_operation_cancel_requested_event_attributes = 59; + * @param \Temporal\Api\History\V1\NexusOperationCancelRequestedEventAttributes $var + * @return $this + */ + public function setNexusOperationCancelRequestedEventAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\NexusOperationCancelRequestedEventAttributes::class); + $this->writeOneof(59, $var); + + return $this; + } + + /** + * @return string + */ + public function getAttributes() + { + return $this->whichOneof("attributes"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/MarkerRecordedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/MarkerRecordedEventAttributes.php new file mode 100644 index 0000000..60f4e1c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/MarkerRecordedEventAttributes.php @@ -0,0 +1,215 @@ +temporal.api.history.v1.MarkerRecordedEventAttributes + */ +class MarkerRecordedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Workers use this to identify the "types" of various markers. Ex: Local activity, side effect. + * + * Generated from protobuf field string marker_name = 1; + */ + protected $marker_name = ''; + /** + * Serialized information recorded in the marker + * + * Generated from protobuf field map details = 2; + */ + private $details; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 4; + */ + protected $header = null; + /** + * Some uses of markers, like a local activity, could "fail". If they did that is recorded here. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $marker_name + * Workers use this to identify the "types" of various markers. Ex: Local activity, side effect. + * @type array|\Google\Protobuf\Internal\MapField $details + * Serialized information recorded in the marker + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Failure\V1\Failure $failure + * Some uses of markers, like a local activity, could "fail". If they did that is recorded here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Workers use this to identify the "types" of various markers. Ex: Local activity, side effect. + * + * Generated from protobuf field string marker_name = 1; + * @return string + */ + public function getMarkerName() + { + return $this->marker_name; + } + + /** + * Workers use this to identify the "types" of various markers. Ex: Local activity, side effect. + * + * Generated from protobuf field string marker_name = 1; + * @param string $var + * @return $this + */ + public function setMarkerName($var) + { + GPBUtil::checkString($var, True); + $this->marker_name = $var; + + return $this; + } + + /** + * Serialized information recorded in the marker + * + * Generated from protobuf field map details = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Serialized information recorded in the marker + * + * Generated from protobuf field map details = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $arr; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 4; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 4; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Some uses of markers, like a local activity, could "fail". If they did that is recorded here. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Some uses of markers, like a local activity, could "fail". If they did that is recorded here. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCancelRequestedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCancelRequestedEventAttributes.php new file mode 100644 index 0000000..ec03655 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCancelRequestedEventAttributes.php @@ -0,0 +1,104 @@ +temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes + */ +class NexusOperationCancelRequestedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported + * with. + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + */ + protected $workflow_task_completed_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported + * with. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported + * with. + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported + * with. + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCanceledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCanceledEventAttributes.php new file mode 100644 index 0000000..8b2e6af --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCanceledEventAttributes.php @@ -0,0 +1,112 @@ +temporal.api.history.v1.NexusOperationCanceledEventAttributes + */ +class NexusOperationCanceledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * Cancellation details. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * @type \Temporal\Api\Failure\V1\Failure $failure + * Cancellation details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * Cancellation details. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Cancellation details. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCompletedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCompletedEventAttributes.php new file mode 100644 index 0000000..124d7a2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationCompletedEventAttributes.php @@ -0,0 +1,116 @@ +temporal.api.history.v1.NexusOperationCompletedEventAttributes + */ +class NexusOperationCompletedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * Serialized result of the Nexus operation. The response of the Nexus handler. + * Delivered either via a completion callback or as a response to a synchronous operation. + * + * Generated from protobuf field .temporal.api.common.v1.Payload result = 2; + */ + protected $result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * @type \Temporal\Api\Common\V1\Payload $result + * Serialized result of the Nexus operation. The response of the Nexus handler. + * Delivered either via a completion callback or as a response to a synchronous operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * Serialized result of the Nexus operation. The response of the Nexus handler. + * Delivered either via a completion callback or as a response to a synchronous operation. + * + * Generated from protobuf field .temporal.api.common.v1.Payload result = 2; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Serialized result of the Nexus operation. The response of the Nexus handler. + * Delivered either via a completion callback or as a response to a synchronous operation. + * + * Generated from protobuf field .temporal.api.common.v1.Payload result = 2; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationFailedEventAttributes.php new file mode 100644 index 0000000..5862f13 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationFailedEventAttributes.php @@ -0,0 +1,112 @@ +temporal.api.history.v1.NexusOperationFailedEventAttributes + */ +class NexusOperationFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * @type \Temporal\Api\Failure\V1\Failure $failure + * Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationScheduledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationScheduledEventAttributes.php new file mode 100644 index 0000000..13c9781 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationScheduledEventAttributes.php @@ -0,0 +1,404 @@ +temporal.api.history.v1.NexusOperationScheduledEventAttributes + */ +class NexusOperationScheduledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Endpoint name, must exist in the endpoint registry. + * + * Generated from protobuf field string endpoint = 1; + */ + protected $endpoint = ''; + /** + * Service name. + * + * Generated from protobuf field string service = 2; + */ + protected $service = ''; + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + */ + protected $operation = ''; + /** + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload stored in this event. + * + * Generated from protobuf field .temporal.api.common.v1.Payload input = 4; + */ + protected $input = null; + /** + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + */ + protected $schedule_to_close_timeout = null; + /** + * Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal + * activities and child workflows, these are transmitted to Nexus operations that may be external and are not + * traditional payloads. + * + * Generated from protobuf field map nexus_header = 6; + */ + private $nexus_header; + /** + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with. + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + */ + protected $workflow_task_completed_event_id = 0; + /** + * A unique ID generated by the history service upon creation of this event. + * The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. + * + * Generated from protobuf field string request_id = 8; + */ + protected $request_id = ''; + /** + * Endpoint ID as resolved in the endpoint registry at the time this event was generated. + * This is stored on the event and used internally by the server in case the endpoint is renamed from the time the + * event was originally scheduled. + * + * Generated from protobuf field string endpoint_id = 9; + */ + protected $endpoint_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $endpoint + * Endpoint name, must exist in the endpoint registry. + * @type string $service + * Service name. + * @type string $operation + * Operation name. + * @type \Temporal\Api\Common\V1\Payload $input + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload stored in this event. + * @type \Google\Protobuf\Duration $schedule_to_close_timeout + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type array|\Google\Protobuf\Internal\MapField $nexus_header + * Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal + * activities and child workflows, these are transmitted to Nexus operations that may be external and are not + * traditional payloads. + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with. + * @type string $request_id + * A unique ID generated by the history service upon creation of this event. + * The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. + * @type string $endpoint_id + * Endpoint ID as resolved in the endpoint registry at the time this event was generated. + * This is stored on the event and used internally by the server in case the endpoint is renamed from the time the + * event was originally scheduled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Endpoint name, must exist in the endpoint registry. + * + * Generated from protobuf field string endpoint = 1; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Endpoint name, must exist in the endpoint registry. + * + * Generated from protobuf field string endpoint = 1; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Service name. + * + * Generated from protobuf field string service = 2; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Service name. + * + * 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; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload stored in this event. + * + * Generated from protobuf field .temporal.api.common.v1.Payload input = 4; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Input for the operation. The server converts this into Nexus request content and the appropriate content headers + * internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the + * content is transformed back to the original Payload stored in this event. + * + * Generated from protobuf field .temporal.api.common.v1.Payload input = 4; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->input = $var; + + return $this; + } + + /** + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToCloseTimeout() + { + return $this->schedule_to_close_timeout; + } + + public function hasScheduleToCloseTimeout() + { + return isset($this->schedule_to_close_timeout); + } + + public function clearScheduleToCloseTimeout() + { + unset($this->schedule_to_close_timeout); + } + + /** + * Schedule-to-close timeout for this operation. + * Indicates how long the caller is willing to wait for operation completion. + * Calls are retried internally by the server. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_close_timeout = $var; + + return $this; + } + + /** + * Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal + * activities and child workflows, these are transmitted to Nexus operations that may be external and are not + * traditional payloads. + * + * Generated from protobuf field map nexus_header = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNexusHeader() + { + return $this->nexus_header; + } + + /** + * Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal + * activities and child workflows, these are transmitted to Nexus operations that may be external and are not + * traditional payloads. + * + * Generated from protobuf field map nexus_header = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNexusHeader($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->nexus_header = $arr; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with. + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with. + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * A unique ID generated by the history service upon creation of this event. + * The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. + * + * Generated from protobuf field string request_id = 8; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A unique ID generated by the history service upon creation of this event. + * The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. + * + * Generated from protobuf field string request_id = 8; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Endpoint ID as resolved in the endpoint registry at the time this event was generated. + * This is stored on the event and used internally by the server in case the endpoint is renamed from the time the + * event was originally scheduled. + * + * Generated from protobuf field string endpoint_id = 9; + * @return string + */ + public function getEndpointId() + { + return $this->endpoint_id; + } + + /** + * Endpoint ID as resolved in the endpoint registry at the time this event was generated. + * This is stored on the event and used internally by the server in case the endpoint is renamed from the time the + * event was originally scheduled. + * + * Generated from protobuf field string endpoint_id = 9; + * @param string $var + * @return $this + */ + public function setEndpointId($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationStartedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationStartedEventAttributes.php new file mode 100644 index 0000000..4c61408 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationStartedEventAttributes.php @@ -0,0 +1,109 @@ +temporal.api.history.v1.NexusOperationStartedEventAttributes + */ +class NexusOperationStartedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * The operation ID returned by the Nexus handler in the response to the StartOperation request. + * This ID is used when canceling the operation. + * + * Generated from protobuf field string operation_id = 3; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to. + * @type string $operation_id + * The operation ID returned by the Nexus handler in the response to the StartOperation request. + * This ID is used when canceling the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The operation ID returned by the Nexus handler in the response to the StartOperation request. + * This ID is used when canceling the operation. + * + * Generated from protobuf field string operation_id = 3; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The operation ID returned by the Nexus handler in the response to the StartOperation request. + * This ID is used when canceling the operation. + * + * Generated from protobuf field string operation_id = 3; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationTimedOutEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationTimedOutEventAttributes.php new file mode 100644 index 0000000..4a4e5ec --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/NexusOperationTimedOutEventAttributes.php @@ -0,0 +1,112 @@ +temporal.api.history.v1.NexusOperationTimedOutEventAttributes + */ +class NexusOperationTimedOutEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * @type \Temporal\Api\Failure\V1\Failure $failure + * Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/RequestCancelExternalWorkflowExecutionFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/RequestCancelExternalWorkflowExecutionFailedEventAttributes.php new file mode 100644 index 0000000..23e75e1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/RequestCancelExternalWorkflowExecutionFailedEventAttributes.php @@ -0,0 +1,267 @@ +temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes + */ +class RequestCancelExternalWorkflowExecutionFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause cause = 1; + */ + protected $cause = 0; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Namespace of the workflow which failed to cancel. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 3; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 7; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + */ + protected $workflow_execution = null; + /** + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure + * corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + */ + protected $initiated_event_id = 0; + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + */ + protected $control = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cause + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type string $namespace + * Namespace of the workflow which failed to cancel. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type int|string $initiated_event_id + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure + * corresponds to + * @type string $control + * Deprecated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause cause = 1; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause cause = 1; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\CancelExternalWorkflowExecutionFailedCause::class); + $this->cause = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Namespace of the workflow which failed to cancel. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 3; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the workflow which failed to cancel. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 3; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure + * corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure + * corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.php new file mode 100644 index 0000000..d816058 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.php @@ -0,0 +1,274 @@ +temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + */ +class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + */ + protected $workflow_task_completed_event_id = 0; + /** + * The namespace the workflow to be cancelled lives in. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 7; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + /** + * Deprecated + * + * Generated from protobuf field string control = 4; + */ + protected $control = ''; + /** + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * + * Generated from protobuf field bool child_workflow_only = 5; + */ + protected $child_workflow_only = false; + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type string $namespace + * The namespace the workflow to be cancelled lives in. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $control + * Deprecated + * @type bool $child_workflow_only + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * @type string $reason + * Reason for requesting the cancellation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * The namespace the workflow to be cancelled lives in. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace the workflow to be cancelled lives in. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 4; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 4; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * + * Generated from protobuf field bool child_workflow_only = 5; + * @return bool + */ + public function getChildWorkflowOnly() + { + return $this->child_workflow_only; + } + + /** + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * + * Generated from protobuf field bool child_workflow_only = 5; + * @param bool $var + * @return $this + */ + public function setChildWorkflowOnly($var) + { + GPBUtil::checkBool($var); + $this->child_workflow_only = $var; + + return $this; + } + + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/SignalExternalWorkflowExecutionFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/SignalExternalWorkflowExecutionFailedEventAttributes.php new file mode 100644 index 0000000..83f9264 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/SignalExternalWorkflowExecutionFailedEventAttributes.php @@ -0,0 +1,256 @@ +temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes + */ +class SignalExternalWorkflowExecutionFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause cause = 1; + */ + protected $cause = 0; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Namespace of the workflow which failed the signal. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 3; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 7; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field int64 initiated_event_id = 5; + */ + protected $initiated_event_id = 0; + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + */ + protected $control = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cause + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type string $namespace + * Namespace of the workflow which failed the signal. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type int|string $initiated_event_id + * @type string $control + * Deprecated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause cause = 1; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause cause = 1; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\SignalExternalWorkflowExecutionFailedCause::class); + $this->cause = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Namespace of the workflow which failed the signal. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 3; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the workflow which failed the signal. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 3; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 7; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 initiated_event_id = 5; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Generated from protobuf field int64 initiated_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/SignalExternalWorkflowExecutionInitiatedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/SignalExternalWorkflowExecutionInitiatedEventAttributes.php new file mode 100644 index 0000000..18831ca --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/SignalExternalWorkflowExecutionInitiatedEventAttributes.php @@ -0,0 +1,355 @@ +temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes + */ +class SignalExternalWorkflowExecutionInitiatedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Namespace of the to-be-signalled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 9; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + */ + protected $workflow_execution = null; + /** + * name/type of the signal to fire in the external workflow + * + * Generated from protobuf field string signal_name = 4; + */ + protected $signal_name = ''; + /** + * Serialized arguments to provide to the signal handler + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + */ + protected $input = null; + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + */ + protected $control = ''; + /** + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * + * Generated from protobuf field bool child_workflow_only = 7; + */ + protected $child_workflow_only = false; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 8; + */ + protected $header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type string $namespace + * Namespace of the to-be-signalled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $signal_name + * name/type of the signal to fire in the external workflow + * @type \Temporal\Api\Common\V1\Payloads $input + * Serialized arguments to provide to the signal handler + * @type string $control + * Deprecated + * @type bool $child_workflow_only + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * @type \Temporal\Api\Common\V1\Header $header + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Namespace of the to-be-signalled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the to-be-signalled workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 9; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 9; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * name/type of the signal to fire in the external workflow + * + * Generated from protobuf field string signal_name = 4; + * @return string + */ + public function getSignalName() + { + return $this->signal_name; + } + + /** + * name/type of the signal to fire in the external workflow + * + * Generated from protobuf field string signal_name = 4; + * @param string $var + * @return $this + */ + public function setSignalName($var) + { + GPBUtil::checkString($var, True); + $this->signal_name = $var; + + return $this; + } + + /** + * Serialized arguments to provide to the signal handler + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Serialized arguments to provide to the signal handler + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 6; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * + * Generated from protobuf field bool child_workflow_only = 7; + * @return bool + */ + public function getChildWorkflowOnly() + { + return $this->child_workflow_only; + } + + /** + * Workers are expected to set this to true if the workflow they are requesting to cancel is + * a child of the workflow which issued the request + * + * Generated from protobuf field bool child_workflow_only = 7; + * @param bool $var + * @return $this + */ + public function setChildWorkflowOnly($var) + { + GPBUtil::checkBool($var); + $this->child_workflow_only = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 8; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 8; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/StartChildWorkflowExecutionFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/StartChildWorkflowExecutionFailedEventAttributes.php new file mode 100644 index 0000000..67fe6b7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/StartChildWorkflowExecutionFailedEventAttributes.php @@ -0,0 +1,290 @@ +temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes + */ +class StartChildWorkflowExecutionFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 8; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause cause = 4; + */ + protected $cause = 0; + /** + * Deprecated + * + * Generated from protobuf field string control = 5; + */ + protected $control = ''; + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 6; + */ + protected $initiated_event_id = 0; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + */ + protected $workflow_task_completed_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type string $workflow_id + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int $cause + * @type string $control + * Deprecated + * @type int|string $initiated_event_id + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 8; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 8; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause cause = 4; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause cause = 4; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\StartChildWorkflowExecutionFailedCause::class); + $this->cause = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 5; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 5; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 6; + * @return int|string + */ + public function getInitiatedEventId() + { + return $this->initiated_event_id; + } + + /** + * Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to + * + * Generated from protobuf field int64 initiated_event_id = 6; + * @param int|string $var + * @return $this + */ + public function setInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_event_id = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/StartChildWorkflowExecutionInitiatedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/StartChildWorkflowExecutionInitiatedEventAttributes.php new file mode 100644 index 0000000..d837e5b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/StartChildWorkflowExecutionInitiatedEventAttributes.php @@ -0,0 +1,723 @@ +temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes + */ +class StartChildWorkflowExecutionInitiatedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 18; + */ + protected $namespace_id = ''; + /** + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + */ + protected $task_queue = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + */ + protected $input = null; + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + */ + protected $workflow_execution_timeout = null; + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + */ + protected $workflow_task_timeout = null; + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9; + */ + protected $parent_close_policy = 0; + /** + * Deprecated + * + * Generated from protobuf field string control = 10; + */ + protected $control = ''; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 11; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 12; + */ + protected $workflow_id_reuse_policy = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 13; + */ + protected $retry_policy = null; + /** + * If this child runs on a cron schedule, it will appear here + * + * Generated from protobuf field string cron_schedule = 14; + */ + protected $cron_schedule = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 15; + */ + protected $header = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 16; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 17; + */ + protected $search_attributes = null; + /** + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * + * Generated from protobuf field bool inherit_build_id = 19; + */ + protected $inherit_build_id = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * @type string $namespace_id + * @type string $workflow_id + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Payloads $input + * @type \Google\Protobuf\Duration $workflow_execution_timeout + * Total workflow execution timeout including retries and continue as new. + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run. + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task. + * @type int $parent_close_policy + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * @type string $control + * Deprecated + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type int $workflow_id_reuse_policy + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * @type string $cron_schedule + * If this child runs on a cron schedule, it will appear here + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type bool $inherit_build_id + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the child workflow. + * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 18; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 18; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionTimeout() + { + return $this->workflow_execution_timeout; + } + + public function hasWorkflowExecutionTimeout() + { + return isset($this->workflow_execution_timeout); + } + + public function clearWorkflowExecutionTimeout() + { + unset($this->workflow_execution_timeout); + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9; + * @return int + */ + public function getParentClosePolicy() + { + return $this->parent_close_policy; + } + + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 9; + * @param int $var + * @return $this + */ + public function setParentClosePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ParentClosePolicy::class); + $this->parent_close_policy = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 10; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 10; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 11; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 11; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 12; + * @return int + */ + public function getWorkflowIdReusePolicy() + { + return $this->workflow_id_reuse_policy; + } + + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 12; + * @param int $var + * @return $this + */ + public function setWorkflowIdReusePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdReusePolicy::class); + $this->workflow_id_reuse_policy = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 13; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 13; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * If this child runs on a cron schedule, it will appear here + * + * Generated from protobuf field string cron_schedule = 14; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * If this child runs on a cron schedule, it will appear here + * + * Generated from protobuf field string cron_schedule = 14; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 15; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 15; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 16; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 16; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 17; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 17; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * + * Generated from protobuf field bool inherit_build_id = 19; + * @return bool + */ + public function getInheritBuildId() + { + return $this->inherit_build_id; + } + + /** + * If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + * rules of the child's Task Queue will be used to independently assign a Build ID to it. + * + * Generated from protobuf field bool inherit_build_id = 19; + * @param bool $var + * @return $this + */ + public function setInheritBuildId($var) + { + GPBUtil::checkBool($var); + $this->inherit_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerCanceledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerCanceledEventAttributes.php new file mode 100644 index 0000000..fd7a115 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerCanceledEventAttributes.php @@ -0,0 +1,168 @@ +temporal.api.history.v1.TimerCanceledEventAttributes + */ +class TimerCanceledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * + * Generated from protobuf field string timer_id = 1; + */ + protected $timer_id = ''; + /** + * The id of the `TIMER_STARTED` event itself + * + * Generated from protobuf field int64 started_event_id = 2; + */ + protected $started_event_id = 0; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + */ + protected $workflow_task_completed_event_id = 0; + /** + * The id of the worker who requested this cancel + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $timer_id + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * @type int|string $started_event_id + * The id of the `TIMER_STARTED` event itself + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type string $identity + * The id of the worker who requested this cancel + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * + * Generated from protobuf field string timer_id = 1; + * @return string + */ + public function getTimerId() + { + return $this->timer_id; + } + + /** + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * + * Generated from protobuf field string timer_id = 1; + * @param string $var + * @return $this + */ + public function setTimerId($var) + { + GPBUtil::checkString($var, True); + $this->timer_id = $var; + + return $this; + } + + /** + * The id of the `TIMER_STARTED` event itself + * + * Generated from protobuf field int64 started_event_id = 2; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `TIMER_STARTED` event itself + * + * Generated from protobuf field int64 started_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * The id of the worker who requested this cancel + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The id of the worker who requested this cancel + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerFiredEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerFiredEventAttributes.php new file mode 100644 index 0000000..9fbcc10 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerFiredEventAttributes.php @@ -0,0 +1,100 @@ +temporal.api.history.v1.TimerFiredEventAttributes + */ +class TimerFiredEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * + * Generated from protobuf field string timer_id = 1; + */ + protected $timer_id = ''; + /** + * The id of the `TIMER_STARTED` event itself + * + * Generated from protobuf field int64 started_event_id = 2; + */ + protected $started_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $timer_id + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * @type int|string $started_event_id + * The id of the `TIMER_STARTED` event itself + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * + * Generated from protobuf field string timer_id = 1; + * @return string + */ + public function getTimerId() + { + return $this->timer_id; + } + + /** + * Will match the `timer_id` from `TIMER_STARTED` event for this timer + * + * Generated from protobuf field string timer_id = 1; + * @param string $var + * @return $this + */ + public function setTimerId($var) + { + GPBUtil::checkString($var, True); + $this->timer_id = $var; + + return $this; + } + + /** + * The id of the `TIMER_STARTED` event itself + * + * Generated from protobuf field int64 started_event_id = 2; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `TIMER_STARTED` event itself + * + * Generated from protobuf field int64 started_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerStartedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerStartedEventAttributes.php new file mode 100644 index 0000000..d9a9811 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/TimerStartedEventAttributes.php @@ -0,0 +1,152 @@ +temporal.api.history.v1.TimerStartedEventAttributes + */ +class TimerStartedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The worker/user assigned id for this timer + * + * Generated from protobuf field string timer_id = 1; + */ + protected $timer_id = ''; + /** + * How long until this timer fires + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_fire_timeout = 2; + */ + protected $start_to_fire_timeout = null; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + */ + protected $workflow_task_completed_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $timer_id + * The worker/user assigned id for this timer + * @type \Google\Protobuf\Duration $start_to_fire_timeout + * How long until this timer fires + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The worker/user assigned id for this timer + * + * Generated from protobuf field string timer_id = 1; + * @return string + */ + public function getTimerId() + { + return $this->timer_id; + } + + /** + * The worker/user assigned id for this timer + * + * Generated from protobuf field string timer_id = 1; + * @param string $var + * @return $this + */ + public function setTimerId($var) + { + GPBUtil::checkString($var, True); + $this->timer_id = $var; + + return $this; + } + + /** + * How long until this timer fires + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_fire_timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getStartToFireTimeout() + { + return $this->start_to_fire_timeout; + } + + public function hasStartToFireTimeout() + { + return isset($this->start_to_fire_timeout); + } + + public function clearStartToFireTimeout() + { + unset($this->start_to_fire_timeout); + } + + /** + * How long until this timer fires + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_fire_timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartToFireTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_to_fire_timeout = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/UpsertWorkflowSearchAttributesEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/UpsertWorkflowSearchAttributesEventAttributes.php new file mode 100644 index 0000000..35286b6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/UpsertWorkflowSearchAttributesEventAttributes.php @@ -0,0 +1,103 @@ +temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes + */ +class UpsertWorkflowSearchAttributesEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 2; + */ + protected $search_attributes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 2; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 2; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCancelRequestedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCancelRequestedEventAttributes.php new file mode 100644 index 0000000..409d2bd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCancelRequestedEventAttributes.php @@ -0,0 +1,175 @@ +temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes + */ +class WorkflowExecutionCancelRequestedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * User provided reason for requesting cancellation + * TODO: shall we create a new field with name "reason" and deprecate this one? + * + * Generated from protobuf field string cause = 1; + */ + protected $cause = ''; + /** + * TODO: Is this the ID of the event in the workflow which initiated this cancel, if there was one? + * + * Generated from protobuf field int64 external_initiated_event_id = 2; + */ + protected $external_initiated_event_id = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution external_workflow_execution = 3; + */ + protected $external_workflow_execution = null; + /** + * id of the worker or client who requested this cancel + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cause + * User provided reason for requesting cancellation + * TODO: shall we create a new field with name "reason" and deprecate this one? + * @type int|string $external_initiated_event_id + * TODO: Is this the ID of the event in the workflow which initiated this cancel, if there was one? + * @type \Temporal\Api\Common\V1\WorkflowExecution $external_workflow_execution + * @type string $identity + * id of the worker or client who requested this cancel + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * User provided reason for requesting cancellation + * TODO: shall we create a new field with name "reason" and deprecate this one? + * + * Generated from protobuf field string cause = 1; + * @return string + */ + public function getCause() + { + return $this->cause; + } + + /** + * User provided reason for requesting cancellation + * TODO: shall we create a new field with name "reason" and deprecate this one? + * + * Generated from protobuf field string cause = 1; + * @param string $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkString($var, True); + $this->cause = $var; + + return $this; + } + + /** + * TODO: Is this the ID of the event in the workflow which initiated this cancel, if there was one? + * + * Generated from protobuf field int64 external_initiated_event_id = 2; + * @return int|string + */ + public function getExternalInitiatedEventId() + { + return $this->external_initiated_event_id; + } + + /** + * TODO: Is this the ID of the event in the workflow which initiated this cancel, if there was one? + * + * Generated from protobuf field int64 external_initiated_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setExternalInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->external_initiated_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution external_workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExternalWorkflowExecution() + { + return $this->external_workflow_execution; + } + + public function hasExternalWorkflowExecution() + { + return isset($this->external_workflow_execution); + } + + public function clearExternalWorkflowExecution() + { + unset($this->external_workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution external_workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExternalWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->external_workflow_execution = $var; + + return $this; + } + + /** + * id of the worker or client who requested this cancel + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * id of the worker or client who requested this cancel + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCanceledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCanceledEventAttributes.php new file mode 100644 index 0000000..c727132 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCanceledEventAttributes.php @@ -0,0 +1,103 @@ +temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes + */ +class WorkflowExecutionCanceledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + */ + protected $workflow_task_completed_event_id = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + */ + protected $details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type \Temporal\Api\Common\V1\Payloads $details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCompletedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCompletedEventAttributes.php new file mode 100644 index 0000000..192174c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionCompletedEventAttributes.php @@ -0,0 +1,144 @@ +temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes + */ +class WorkflowExecutionCompletedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Serialized result of workflow completion (ie: The return value of the workflow function) + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + */ + protected $result = null; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + */ + protected $workflow_task_completed_event_id = 0; + /** + * If another run is started by cron, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 3; + */ + protected $new_execution_run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $result + * Serialized result of workflow completion (ie: The return value of the workflow function) + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type string $new_execution_run_id + * If another run is started by cron, this contains the new run id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Serialized result of workflow completion (ie: The return value of the workflow function) + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Serialized result of workflow completion (ie: The return value of the workflow function) + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->result = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * If another run is started by cron, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 3; + * @return string + */ + public function getNewExecutionRunId() + { + return $this->new_execution_run_id; + } + + /** + * If another run is started by cron, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 3; + * @param string $var + * @return $this + */ + public function setNewExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->new_execution_run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionContinuedAsNewEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionContinuedAsNewEventAttributes.php new file mode 100644 index 0000000..479309f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionContinuedAsNewEventAttributes.php @@ -0,0 +1,619 @@ +temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes + */ +class WorkflowExecutionContinuedAsNewEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The run ID of the new workflow started by this continue-as-new + * + * Generated from protobuf field string new_execution_run_id = 1; + */ + protected $new_execution_run_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + */ + protected $task_queue = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + */ + protected $input = null; + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 5; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 6; + */ + protected $workflow_task_timeout = null; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + */ + protected $workflow_task_completed_event_id = 0; + /** + * TODO: How and is this used? + * + * Generated from protobuf field .google.protobuf.Duration backoff_start_interval = 8; + */ + protected $backoff_start_interval = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 9; + */ + protected $initiator = 0; + /** + * TODO: David are these right? + * Deprecated. If a workflow's retry policy would cause a new run to start when the current one + * has failed, this field would be populated with that failure. Now (when supported by server + * and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 10; + */ + protected $failure = null; + /** + * TODO: Is this the result of *this* workflow as it continued-as-new? + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 11; + */ + protected $last_completion_result = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 12; + */ + protected $header = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 13; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 14; + */ + protected $search_attributes = null; + /** + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * + * Generated from protobuf field bool inherit_build_id = 15; + */ + protected $inherit_build_id = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $new_execution_run_id + * The run ID of the new workflow started by this continue-as-new + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Payloads $input + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run. + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task. + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type \Google\Protobuf\Duration $backoff_start_interval + * TODO: How and is this used? + * @type int $initiator + * @type \Temporal\Api\Failure\V1\Failure $failure + * TODO: David are these right? + * Deprecated. If a workflow's retry policy would cause a new run to start when the current one + * has failed, this field would be populated with that failure. Now (when supported by server + * and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. + * @type \Temporal\Api\Common\V1\Payloads $last_completion_result + * TODO: Is this the result of *this* workflow as it continued-as-new? + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type bool $inherit_build_id + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The run ID of the new workflow started by this continue-as-new + * + * Generated from protobuf field string new_execution_run_id = 1; + * @return string + */ + public function getNewExecutionRunId() + { + return $this->new_execution_run_id; + } + + /** + * The run ID of the new workflow started by this continue-as-new + * + * Generated from protobuf field string new_execution_run_id = 1; + * @param string $var + * @return $this + */ + public function setNewExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->new_execution_run_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 7; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * TODO: How and is this used? + * + * Generated from protobuf field .google.protobuf.Duration backoff_start_interval = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getBackoffStartInterval() + { + return $this->backoff_start_interval; + } + + public function hasBackoffStartInterval() + { + return isset($this->backoff_start_interval); + } + + public function clearBackoffStartInterval() + { + unset($this->backoff_start_interval); + } + + /** + * TODO: How and is this used? + * + * Generated from protobuf field .google.protobuf.Duration backoff_start_interval = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBackoffStartInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->backoff_start_interval = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 9; + * @return int + */ + public function getInitiator() + { + return $this->initiator; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 9; + * @param int $var + * @return $this + */ + public function setInitiator($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ContinueAsNewInitiator::class); + $this->initiator = $var; + + return $this; + } + + /** + * TODO: David are these right? + * Deprecated. If a workflow's retry policy would cause a new run to start when the current one + * has failed, this field would be populated with that failure. Now (when supported by server + * and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 10; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * TODO: David are these right? + * Deprecated. If a workflow's retry policy would cause a new run to start when the current one + * has failed, this field would be populated with that failure. Now (when supported by server + * and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 10; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * TODO: Is this the result of *this* workflow as it continued-as-new? + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 11; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastCompletionResult() + { + return $this->last_completion_result; + } + + public function hasLastCompletionResult() + { + return isset($this->last_completion_result); + } + + public function clearLastCompletionResult() + { + unset($this->last_completion_result); + } + + /** + * TODO: Is this the result of *this* workflow as it continued-as-new? + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 11; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastCompletionResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_completion_result = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 12; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 12; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 13; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 13; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 14; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 14; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * + * Generated from protobuf field bool inherit_build_id = 15; + * @return bool + */ + public function getInheritBuildId() + { + return $this->inherit_build_id; + } + + /** + * If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + * the assignment rules will be used to independently assign a Build ID to the new execution. + * + * Generated from protobuf field bool inherit_build_id = 15; + * @param bool $var + * @return $this + */ + public function setInheritBuildId($var) + { + GPBUtil::checkBool($var); + $this->inherit_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionFailedEventAttributes.php new file mode 100644 index 0000000..961025f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionFailedEventAttributes.php @@ -0,0 +1,171 @@ +temporal.api.history.v1.WorkflowExecutionFailedEventAttributes + */ +class WorkflowExecutionFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Serialized result of workflow failure (ex: An exception thrown, or error returned) + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + */ + protected $failure = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 2; + */ + protected $retry_state = 0; + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + */ + protected $workflow_task_completed_event_id = 0; + /** + * If another run is started by cron or retry, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 4; + */ + protected $new_execution_run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Failure\V1\Failure $failure + * Serialized result of workflow failure (ex: An exception thrown, or error returned) + * @type int $retry_state + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type string $new_execution_run_id + * If another run is started by cron or retry, this contains the new run id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Serialized result of workflow failure (ex: An exception thrown, or error returned) + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Serialized result of workflow failure (ex: An exception thrown, or error returned) + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 1; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 2; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 2; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * If another run is started by cron or retry, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 4; + * @return string + */ + public function getNewExecutionRunId() + { + return $this->new_execution_run_id; + } + + /** + * If another run is started by cron or retry, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 4; + * @param string $var + * @return $this + */ + public function setNewExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->new_execution_run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionSignaledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionSignaledEventAttributes.php new file mode 100644 index 0000000..51782dd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionSignaledEventAttributes.php @@ -0,0 +1,270 @@ +temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes + */ +class WorkflowExecutionSignaledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The name/type of the signal to fire + * + * Generated from protobuf field string signal_name = 1; + */ + protected $signal_name = ''; + /** + * Will be deserialized and provided as argument(s) to the signal handler + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 2; + */ + protected $input = null; + /** + * id of the worker/client who sent this signal + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Headers that were passed by the sender of the signal and copied by temporal + * server into the workflow task. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 4; + */ + protected $header = null; + /** + * Indicates the signal did not generate a new workflow task when received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 5; + */ + protected $skip_generate_workflow_task = false; + /** + * When signal origin is a workflow execution, this field is set. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution external_workflow_execution = 6; + */ + protected $external_workflow_execution = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signal_name + * The name/type of the signal to fire + * @type \Temporal\Api\Common\V1\Payloads $input + * Will be deserialized and provided as argument(s) to the signal handler + * @type string $identity + * id of the worker/client who sent this signal + * @type \Temporal\Api\Common\V1\Header $header + * Headers that were passed by the sender of the signal and copied by temporal + * server into the workflow task. + * @type bool $skip_generate_workflow_task + * Indicates the signal did not generate a new workflow task when received. + * @type \Temporal\Api\Common\V1\WorkflowExecution $external_workflow_execution + * When signal origin is a workflow execution, this field is set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The name/type of the signal to fire + * + * Generated from protobuf field string signal_name = 1; + * @return string + */ + public function getSignalName() + { + return $this->signal_name; + } + + /** + * The name/type of the signal to fire + * + * Generated from protobuf field string signal_name = 1; + * @param string $var + * @return $this + */ + public function setSignalName($var) + { + GPBUtil::checkString($var, True); + $this->signal_name = $var; + + return $this; + } + + /** + * Will be deserialized and provided as argument(s) to the signal handler + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Will be deserialized and provided as argument(s) to the signal handler + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * id of the worker/client who sent this signal + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * id of the worker/client who sent this signal + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Headers that were passed by the sender of the signal and copied by temporal + * server into the workflow task. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 4; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Headers that were passed by the sender of the signal and copied by temporal + * server into the workflow task. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 4; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Indicates the signal did not generate a new workflow task when received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 5; + * @return bool + */ + public function getSkipGenerateWorkflowTask() + { + return $this->skip_generate_workflow_task; + } + + /** + * Indicates the signal did not generate a new workflow task when received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 5; + * @param bool $var + * @return $this + */ + public function setSkipGenerateWorkflowTask($var) + { + GPBUtil::checkBool($var); + $this->skip_generate_workflow_task = $var; + + return $this; + } + + /** + * When signal origin is a workflow execution, this field is set. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution external_workflow_execution = 6; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExternalWorkflowExecution() + { + return $this->external_workflow_execution; + } + + public function hasExternalWorkflowExecution() + { + return isset($this->external_workflow_execution); + } + + public function clearExternalWorkflowExecution() + { + unset($this->external_workflow_execution); + } + + /** + * When signal origin is a workflow execution, this field is set. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution external_workflow_execution = 6; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExternalWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->external_workflow_execution = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionStartedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionStartedEventAttributes.php new file mode 100644 index 0000000..448ac24 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionStartedEventAttributes.php @@ -0,0 +1,1329 @@ +temporal.api.history.v1.WorkflowExecutionStartedEventAttributes + */ +class WorkflowExecutionStartedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 1; + */ + protected $workflow_type = null; + /** + * If this workflow is a child, the namespace our parent lives in. + * SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. + * + * Generated from protobuf field string parent_workflow_namespace = 2; + */ + protected $parent_workflow_namespace = ''; + /** + * Generated from protobuf field string parent_workflow_namespace_id = 27; + */ + protected $parent_workflow_namespace_id = ''; + /** + * Contains information about parent workflow execution that initiated the child workflow these attributes belong to. + * If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution parent_workflow_execution = 3; + */ + protected $parent_workflow_execution = null; + /** + * EventID of the child execution initiated event in parent workflow + * + * Generated from protobuf field int64 parent_initiated_event_id = 4; + */ + protected $parent_initiated_event_id = 0; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 5; + */ + protected $task_queue = null; + /** + * SDK will deserialize this and provide it as arguments to the workflow function + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + */ + protected $input = null; + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 7; + */ + protected $workflow_execution_timeout = null; + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 8; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 9; + */ + protected $workflow_task_timeout = null; + /** + * Run id of the previous workflow which continued-as-new or retired or cron executed into this + * workflow. + * + * Generated from protobuf field string continued_execution_run_id = 10; + */ + protected $continued_execution_run_id = ''; + /** + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 11; + */ + protected $initiator = 0; + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure continued_failure = 12; + */ + protected $continued_failure = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 13; + */ + protected $last_completion_result = null; + /** + * This is the run id when the WorkflowExecutionStarted event was written. + * A workflow reset changes the execution run_id, but preserves this field. + * + * Generated from protobuf field string original_execution_run_id = 14; + */ + protected $original_execution_run_id = ''; + /** + * Identity of the client who requested this execution + * + * Generated from protobuf field string identity = 15; + */ + protected $identity = ''; + /** + * This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. + * Used to identify a chain. + * + * Generated from protobuf field string first_execution_run_id = 16; + */ + protected $first_execution_run_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 17; + */ + protected $retry_policy = null; + /** + * Starting at 1, the number of times we have tried to execute this workflow + * + * Generated from protobuf field int32 attempt = 18; + */ + protected $attempt = 0; + /** + * The absolute time at which the workflow will be timed out. + * This is passed without change to the next run/retry of a workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp workflow_execution_expiration_time = 19; + */ + protected $workflow_execution_expiration_time = null; + /** + * If this workflow runs on a cron schedule, it will appear here + * + * Generated from protobuf field string cron_schedule = 20; + */ + protected $cron_schedule = ''; + /** + * For a cron workflow, this contains the amount of time between when this iteration of + * the cron workflow was scheduled and when it should run next per its cron_schedule. + * + * Generated from protobuf field .google.protobuf.Duration first_workflow_task_backoff = 21; + */ + protected $first_workflow_task_backoff = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 22; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 23; + */ + protected $search_attributes = null; + /** + * Generated from protobuf field .temporal.api.workflow.v1.ResetPoints prev_auto_reset_points = 24; + */ + protected $prev_auto_reset_points = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 25; + */ + protected $header = null; + /** + * Version of the child execution initiated event in parent workflow + * It should be used together with parent_initiated_event_id to identify + * a child initiated event for global namespace + * + * Generated from protobuf field int64 parent_initiated_event_version = 26; + */ + protected $parent_initiated_event_version = 0; + /** + * This field is new in 1.21. + * + * Generated from protobuf field string workflow_id = 28; + */ + protected $workflow_id = ''; + /** + * If this workflow intends to use anything other than the current overall default version for + * the queue, then we include it here. + * Deprecated. use `inherited_build_id` instead + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp source_version_stamp = 29; + */ + protected $source_version_stamp = null; + /** + * Completion callbacks attached when this workflow was started. + * + * Generated from protobuf field repeated .temporal.api.common.v1.Callback completion_callbacks = 30; + */ + private $completion_callbacks; + /** + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution root_workflow_execution = 31; + */ + protected $root_workflow_execution = null; + /** + * When present, this execution is assigned to the build ID of its parent or previous execution. + * + * Generated from protobuf field string inherited_build_id = 32; + */ + protected $inherited_build_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type string $parent_workflow_namespace + * If this workflow is a child, the namespace our parent lives in. + * SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. + * @type string $parent_workflow_namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $parent_workflow_execution + * Contains information about parent workflow execution that initiated the child workflow these attributes belong to. + * If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. + * @type int|string $parent_initiated_event_id + * EventID of the child execution initiated event in parent workflow + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Payloads $input + * SDK will deserialize this and provide it as arguments to the workflow function + * @type \Google\Protobuf\Duration $workflow_execution_timeout + * Total workflow execution timeout including retries and continue as new. + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run. + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task. + * @type string $continued_execution_run_id + * Run id of the previous workflow which continued-as-new or retired or cron executed into this + * workflow. + * @type int $initiator + * @type \Temporal\Api\Failure\V1\Failure $continued_failure + * @type \Temporal\Api\Common\V1\Payloads $last_completion_result + * @type string $original_execution_run_id + * This is the run id when the WorkflowExecutionStarted event was written. + * A workflow reset changes the execution run_id, but preserves this field. + * @type string $identity + * Identity of the client who requested this execution + * @type string $first_execution_run_id + * This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. + * Used to identify a chain. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * @type int $attempt + * Starting at 1, the number of times we have tried to execute this workflow + * @type \Google\Protobuf\Timestamp $workflow_execution_expiration_time + * The absolute time at which the workflow will be timed out. + * This is passed without change to the next run/retry of a workflow. + * @type string $cron_schedule + * If this workflow runs on a cron schedule, it will appear here + * @type \Google\Protobuf\Duration $first_workflow_task_backoff + * For a cron workflow, this contains the amount of time between when this iteration of + * the cron workflow was scheduled and when it should run next per its cron_schedule. + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type \Temporal\Api\Workflow\V1\ResetPoints $prev_auto_reset_points + * @type \Temporal\Api\Common\V1\Header $header + * @type int|string $parent_initiated_event_version + * Version of the child execution initiated event in parent workflow + * It should be used together with parent_initiated_event_id to identify + * a child initiated event for global namespace + * @type string $workflow_id + * This field is new in 1.21. + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $source_version_stamp + * If this workflow intends to use anything other than the current overall default version for + * the queue, then we include it here. + * Deprecated. use `inherited_build_id` instead + * @type array<\Temporal\Api\Common\V1\Callback>|\Google\Protobuf\Internal\RepeatedField $completion_callbacks + * Completion callbacks attached when this workflow was started. + * @type \Temporal\Api\Common\V1\WorkflowExecution $root_workflow_execution + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * @type string $inherited_build_id + * When present, this execution is assigned to the build ID of its parent or previous execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 1; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 1; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * If this workflow is a child, the namespace our parent lives in. + * SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. + * + * Generated from protobuf field string parent_workflow_namespace = 2; + * @return string + */ + public function getParentWorkflowNamespace() + { + return $this->parent_workflow_namespace; + } + + /** + * If this workflow is a child, the namespace our parent lives in. + * SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. + * + * Generated from protobuf field string parent_workflow_namespace = 2; + * @param string $var + * @return $this + */ + public function setParentWorkflowNamespace($var) + { + GPBUtil::checkString($var, True); + $this->parent_workflow_namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string parent_workflow_namespace_id = 27; + * @return string + */ + public function getParentWorkflowNamespaceId() + { + return $this->parent_workflow_namespace_id; + } + + /** + * Generated from protobuf field string parent_workflow_namespace_id = 27; + * @param string $var + * @return $this + */ + public function setParentWorkflowNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->parent_workflow_namespace_id = $var; + + return $this; + } + + /** + * Contains information about parent workflow execution that initiated the child workflow these attributes belong to. + * If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution parent_workflow_execution = 3; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getParentWorkflowExecution() + { + return $this->parent_workflow_execution; + } + + public function hasParentWorkflowExecution() + { + return isset($this->parent_workflow_execution); + } + + public function clearParentWorkflowExecution() + { + unset($this->parent_workflow_execution); + } + + /** + * Contains information about parent workflow execution that initiated the child workflow these attributes belong to. + * If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution parent_workflow_execution = 3; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setParentWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->parent_workflow_execution = $var; + + return $this; + } + + /** + * EventID of the child execution initiated event in parent workflow + * + * Generated from protobuf field int64 parent_initiated_event_id = 4; + * @return int|string + */ + public function getParentInitiatedEventId() + { + return $this->parent_initiated_event_id; + } + + /** + * EventID of the child execution initiated event in parent workflow + * + * Generated from protobuf field int64 parent_initiated_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setParentInitiatedEventId($var) + { + GPBUtil::checkInt64($var); + $this->parent_initiated_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 5; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 5; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * SDK will deserialize this and provide it as arguments to the workflow function + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * SDK will deserialize this and provide it as arguments to the workflow function + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 6; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionTimeout() + { + return $this->workflow_execution_timeout; + } + + public function hasWorkflowExecutionTimeout() + { + return isset($this->workflow_execution_timeout); + } + + public function clearWorkflowExecutionTimeout() + { + unset($this->workflow_execution_timeout); + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * Run id of the previous workflow which continued-as-new or retired or cron executed into this + * workflow. + * + * Generated from protobuf field string continued_execution_run_id = 10; + * @return string + */ + public function getContinuedExecutionRunId() + { + return $this->continued_execution_run_id; + } + + /** + * Run id of the previous workflow which continued-as-new or retired or cron executed into this + * workflow. + * + * Generated from protobuf field string continued_execution_run_id = 10; + * @param string $var + * @return $this + */ + public function setContinuedExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->continued_execution_run_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 11; + * @return int + */ + public function getInitiator() + { + return $this->initiator; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ContinueAsNewInitiator initiator = 11; + * @param int $var + * @return $this + */ + public function setInitiator($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ContinueAsNewInitiator::class); + $this->initiator = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure continued_failure = 12; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getContinuedFailure() + { + return $this->continued_failure; + } + + public function hasContinuedFailure() + { + return isset($this->continued_failure); + } + + public function clearContinuedFailure() + { + unset($this->continued_failure); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure continued_failure = 12; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setContinuedFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->continued_failure = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 13; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastCompletionResult() + { + return $this->last_completion_result; + } + + public function hasLastCompletionResult() + { + return isset($this->last_completion_result); + } + + public function clearLastCompletionResult() + { + unset($this->last_completion_result); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 13; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastCompletionResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_completion_result = $var; + + return $this; + } + + /** + * This is the run id when the WorkflowExecutionStarted event was written. + * A workflow reset changes the execution run_id, but preserves this field. + * + * Generated from protobuf field string original_execution_run_id = 14; + * @return string + */ + public function getOriginalExecutionRunId() + { + return $this->original_execution_run_id; + } + + /** + * This is the run id when the WorkflowExecutionStarted event was written. + * A workflow reset changes the execution run_id, but preserves this field. + * + * Generated from protobuf field string original_execution_run_id = 14; + * @param string $var + * @return $this + */ + public function setOriginalExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->original_execution_run_id = $var; + + return $this; + } + + /** + * Identity of the client who requested this execution + * + * Generated from protobuf field string identity = 15; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Identity of the client who requested this execution + * + * Generated from protobuf field string identity = 15; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. + * Used to identify a chain. + * + * Generated from protobuf field string first_execution_run_id = 16; + * @return string + */ + public function getFirstExecutionRunId() + { + return $this->first_execution_run_id; + } + + /** + * This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. + * Used to identify a chain. + * + * Generated from protobuf field string first_execution_run_id = 16; + * @param string $var + * @return $this + */ + public function setFirstExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->first_execution_run_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 17; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 17; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * Starting at 1, the number of times we have tried to execute this workflow + * + * Generated from protobuf field int32 attempt = 18; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * Starting at 1, the number of times we have tried to execute this workflow + * + * Generated from protobuf field int32 attempt = 18; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * The absolute time at which the workflow will be timed out. + * This is passed without change to the next run/retry of a workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp workflow_execution_expiration_time = 19; + * @return \Google\Protobuf\Timestamp|null + */ + public function getWorkflowExecutionExpirationTime() + { + return $this->workflow_execution_expiration_time; + } + + public function hasWorkflowExecutionExpirationTime() + { + return isset($this->workflow_execution_expiration_time); + } + + public function clearWorkflowExecutionExpirationTime() + { + unset($this->workflow_execution_expiration_time); + } + + /** + * The absolute time at which the workflow will be timed out. + * This is passed without change to the next run/retry of a workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp workflow_execution_expiration_time = 19; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setWorkflowExecutionExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->workflow_execution_expiration_time = $var; + + return $this; + } + + /** + * If this workflow runs on a cron schedule, it will appear here + * + * Generated from protobuf field string cron_schedule = 20; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * If this workflow runs on a cron schedule, it will appear here + * + * Generated from protobuf field string cron_schedule = 20; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * For a cron workflow, this contains the amount of time between when this iteration of + * the cron workflow was scheduled and when it should run next per its cron_schedule. + * + * Generated from protobuf field .google.protobuf.Duration first_workflow_task_backoff = 21; + * @return \Google\Protobuf\Duration|null + */ + public function getFirstWorkflowTaskBackoff() + { + return $this->first_workflow_task_backoff; + } + + public function hasFirstWorkflowTaskBackoff() + { + return isset($this->first_workflow_task_backoff); + } + + public function clearFirstWorkflowTaskBackoff() + { + unset($this->first_workflow_task_backoff); + } + + /** + * For a cron workflow, this contains the amount of time between when this iteration of + * the cron workflow was scheduled and when it should run next per its cron_schedule. + * + * Generated from protobuf field .google.protobuf.Duration first_workflow_task_backoff = 21; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFirstWorkflowTaskBackoff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->first_workflow_task_backoff = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 22; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 22; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 23; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 23; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.ResetPoints prev_auto_reset_points = 24; + * @return \Temporal\Api\Workflow\V1\ResetPoints|null + */ + public function getPrevAutoResetPoints() + { + return $this->prev_auto_reset_points; + } + + public function hasPrevAutoResetPoints() + { + return isset($this->prev_auto_reset_points); + } + + public function clearPrevAutoResetPoints() + { + unset($this->prev_auto_reset_points); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.ResetPoints prev_auto_reset_points = 24; + * @param \Temporal\Api\Workflow\V1\ResetPoints $var + * @return $this + */ + public function setPrevAutoResetPoints($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\ResetPoints::class); + $this->prev_auto_reset_points = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 25; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 25; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Version of the child execution initiated event in parent workflow + * It should be used together with parent_initiated_event_id to identify + * a child initiated event for global namespace + * + * Generated from protobuf field int64 parent_initiated_event_version = 26; + * @return int|string + */ + public function getParentInitiatedEventVersion() + { + return $this->parent_initiated_event_version; + } + + /** + * Version of the child execution initiated event in parent workflow + * It should be used together with parent_initiated_event_id to identify + * a child initiated event for global namespace + * + * Generated from protobuf field int64 parent_initiated_event_version = 26; + * @param int|string $var + * @return $this + */ + public function setParentInitiatedEventVersion($var) + { + GPBUtil::checkInt64($var); + $this->parent_initiated_event_version = $var; + + return $this; + } + + /** + * This field is new in 1.21. + * + * Generated from protobuf field string workflow_id = 28; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * This field is new in 1.21. + * + * Generated from protobuf field string workflow_id = 28; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * If this workflow intends to use anything other than the current overall default version for + * the queue, then we include it here. + * Deprecated. use `inherited_build_id` instead + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp source_version_stamp = 29; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getSourceVersionStamp() + { + return $this->source_version_stamp; + } + + public function hasSourceVersionStamp() + { + return isset($this->source_version_stamp); + } + + public function clearSourceVersionStamp() + { + unset($this->source_version_stamp); + } + + /** + * If this workflow intends to use anything other than the current overall default version for + * the queue, then we include it here. + * Deprecated. use `inherited_build_id` instead + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp source_version_stamp = 29; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setSourceVersionStamp($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->source_version_stamp = $var; + + return $this; + } + + /** + * Completion callbacks attached when this workflow was started. + * + * Generated from protobuf field repeated .temporal.api.common.v1.Callback completion_callbacks = 30; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompletionCallbacks() + { + return $this->completion_callbacks; + } + + /** + * Completion callbacks attached when this workflow was started. + * + * Generated from protobuf field repeated .temporal.api.common.v1.Callback completion_callbacks = 30; + * @param array<\Temporal\Api\Common\V1\Callback>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompletionCallbacks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Callback::class); + $this->completion_callbacks = $arr; + + return $this; + } + + /** + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution root_workflow_execution = 31; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getRootWorkflowExecution() + { + return $this->root_workflow_execution; + } + + public function hasRootWorkflowExecution() + { + return isset($this->root_workflow_execution); + } + + public function clearRootWorkflowExecution() + { + unset($this->root_workflow_execution); + } + + /** + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution root_workflow_execution = 31; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setRootWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->root_workflow_execution = $var; + + return $this; + } + + /** + * When present, this execution is assigned to the build ID of its parent or previous execution. + * + * Generated from protobuf field string inherited_build_id = 32; + * @return string + */ + public function getInheritedBuildId() + { + return $this->inherited_build_id; + } + + /** + * When present, this execution is assigned to the build ID of its parent or previous execution. + * + * Generated from protobuf field string inherited_build_id = 32; + * @param string $var + * @return $this + */ + public function setInheritedBuildId($var) + { + GPBUtil::checkString($var, True); + $this->inherited_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionTerminatedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionTerminatedEventAttributes.php new file mode 100644 index 0000000..ad1d354 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionTerminatedEventAttributes.php @@ -0,0 +1,137 @@ +temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes + */ +class WorkflowExecutionTerminatedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * User/client provided reason for termination + * + * Generated from protobuf field string reason = 1; + */ + protected $reason = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + */ + protected $details = null; + /** + * id of the client who requested termination + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reason + * User/client provided reason for termination + * @type \Temporal\Api\Common\V1\Payloads $details + * @type string $identity + * id of the client who requested termination + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * User/client provided reason for termination + * + * Generated from protobuf field string reason = 1; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * User/client provided reason for termination + * + * 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; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * id of the client who requested termination + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * id of the client who requested termination + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionTimedOutEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionTimedOutEventAttributes.php new file mode 100644 index 0000000..33cd3dc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionTimedOutEventAttributes.php @@ -0,0 +1,93 @@ +temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes + */ +class WorkflowExecutionTimedOutEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 1; + */ + protected $retry_state = 0; + /** + * If another run is started by cron or retry, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 2; + */ + protected $new_execution_run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $retry_state + * @type string $new_execution_run_id + * If another run is started by cron or retry, this contains the new run id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 1; + * @return int + */ + public function getRetryState() + { + return $this->retry_state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.RetryState retry_state = 1; + * @param int $var + * @return $this + */ + public function setRetryState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\RetryState::class); + $this->retry_state = $var; + + return $this; + } + + /** + * If another run is started by cron or retry, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 2; + * @return string + */ + public function getNewExecutionRunId() + { + return $this->new_execution_run_id; + } + + /** + * If another run is started by cron or retry, this contains the new run id. + * + * Generated from protobuf field string new_execution_run_id = 2; + * @param string $var + * @return $this + */ + public function setNewExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->new_execution_run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateAcceptedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateAcceptedEventAttributes.php new file mode 100644 index 0000000..afa09e8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateAcceptedEventAttributes.php @@ -0,0 +1,190 @@ +temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes + */ +class WorkflowExecutionUpdateAcceptedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The instance ID of the update protocol that generated this event. + * + * Generated from protobuf field string protocol_instance_id = 1; + */ + protected $protocol_instance_id = ''; + /** + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * + * Generated from protobuf field string accepted_request_message_id = 2; + */ + protected $accepted_request_message_id = ''; + /** + * The event ID used to sequence the original request message. + * + * Generated from protobuf field int64 accepted_request_sequencing_event_id = 3; + */ + protected $accepted_request_sequencing_event_id = 0; + /** + * The message payload of the original request message that initiated this + * update. + * + * Generated from protobuf field .temporal.api.update.v1.Request accepted_request = 4; + */ + protected $accepted_request = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $protocol_instance_id + * The instance ID of the update protocol that generated this event. + * @type string $accepted_request_message_id + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * @type int|string $accepted_request_sequencing_event_id + * The event ID used to sequence the original request message. + * @type \Temporal\Api\Update\V1\Request $accepted_request + * The message payload of the original request message that initiated this + * update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The instance ID of the update protocol that generated this event. + * + * Generated from protobuf field string protocol_instance_id = 1; + * @return string + */ + public function getProtocolInstanceId() + { + return $this->protocol_instance_id; + } + + /** + * The instance ID of the update protocol that generated this event. + * + * Generated from protobuf field string protocol_instance_id = 1; + * @param string $var + * @return $this + */ + public function setProtocolInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->protocol_instance_id = $var; + + return $this; + } + + /** + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * + * Generated from protobuf field string accepted_request_message_id = 2; + * @return string + */ + public function getAcceptedRequestMessageId() + { + return $this->accepted_request_message_id; + } + + /** + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * + * Generated from protobuf field string accepted_request_message_id = 2; + * @param string $var + * @return $this + */ + public function setAcceptedRequestMessageId($var) + { + GPBUtil::checkString($var, True); + $this->accepted_request_message_id = $var; + + return $this; + } + + /** + * The event ID used to sequence the original request message. + * + * Generated from protobuf field int64 accepted_request_sequencing_event_id = 3; + * @return int|string + */ + public function getAcceptedRequestSequencingEventId() + { + return $this->accepted_request_sequencing_event_id; + } + + /** + * The event ID used to sequence the original request message. + * + * Generated from protobuf field int64 accepted_request_sequencing_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setAcceptedRequestSequencingEventId($var) + { + GPBUtil::checkInt64($var); + $this->accepted_request_sequencing_event_id = $var; + + return $this; + } + + /** + * The message payload of the original request message that initiated this + * update. + * + * Generated from protobuf field .temporal.api.update.v1.Request accepted_request = 4; + * @return \Temporal\Api\Update\V1\Request|null + */ + public function getAcceptedRequest() + { + return $this->accepted_request; + } + + public function hasAcceptedRequest() + { + return isset($this->accepted_request); + } + + public function clearAcceptedRequest() + { + unset($this->accepted_request); + } + + /** + * The message payload of the original request message that initiated this + * update. + * + * Generated from protobuf field .temporal.api.update.v1.Request accepted_request = 4; + * @param \Temporal\Api\Update\V1\Request $var + * @return $this + */ + public function setAcceptedRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class); + $this->accepted_request = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateAdmittedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateAdmittedEventAttributes.php new file mode 100644 index 0000000..27f550b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateAdmittedEventAttributes.php @@ -0,0 +1,110 @@ +temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes + */ +class WorkflowExecutionUpdateAdmittedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The update request associated with this event. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 1; + */ + protected $request = null; + /** + * An explanation of why this event was written to history. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateAdmittedEventOrigin origin = 2; + */ + protected $origin = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Update\V1\Request $request + * The update request associated with this event. + * @type int $origin + * An explanation of why this event was written to history. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The update request associated with this event. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 1; + * @return \Temporal\Api\Update\V1\Request|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The update request associated with this event. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 1; + * @param \Temporal\Api\Update\V1\Request $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class); + $this->request = $var; + + return $this; + } + + /** + * An explanation of why this event was written to history. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateAdmittedEventOrigin origin = 2; + * @return int + */ + public function getOrigin() + { + return $this->origin; + } + + /** + * An explanation of why this event was written to history. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateAdmittedEventOrigin origin = 2; + * @param int $var + * @return $this + */ + public function setOrigin($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\UpdateAdmittedEventOrigin::class); + $this->origin = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateCompletedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateCompletedEventAttributes.php new file mode 100644 index 0000000..b5e0ec3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateCompletedEventAttributes.php @@ -0,0 +1,154 @@ +temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes + */ +class WorkflowExecutionUpdateCompletedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The metadata about this update. + * + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + */ + protected $meta = null; + /** + * The event ID indicating the acceptance of this update. + * + * Generated from protobuf field int64 accepted_event_id = 3; + */ + protected $accepted_event_id = 0; + /** + * The outcome of executing the workflow update function. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + */ + protected $outcome = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Update\V1\Meta $meta + * The metadata about this update. + * @type int|string $accepted_event_id + * The event ID indicating the acceptance of this update. + * @type \Temporal\Api\Update\V1\Outcome $outcome + * The outcome of executing the workflow update function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The metadata about this update. + * + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + * @return \Temporal\Api\Update\V1\Meta|null + */ + public function getMeta() + { + return $this->meta; + } + + public function hasMeta() + { + return isset($this->meta); + } + + public function clearMeta() + { + unset($this->meta); + } + + /** + * The metadata about this update. + * + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + * @param \Temporal\Api\Update\V1\Meta $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Meta::class); + $this->meta = $var; + + return $this; + } + + /** + * The event ID indicating the acceptance of this update. + * + * Generated from protobuf field int64 accepted_event_id = 3; + * @return int|string + */ + public function getAcceptedEventId() + { + return $this->accepted_event_id; + } + + /** + * The event ID indicating the acceptance of this update. + * + * Generated from protobuf field int64 accepted_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setAcceptedEventId($var) + { + GPBUtil::checkInt64($var); + $this->accepted_event_id = $var; + + return $this; + } + + /** + * The outcome of executing the workflow update function. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + * @return \Temporal\Api\Update\V1\Outcome|null + */ + public function getOutcome() + { + return $this->outcome; + } + + public function hasOutcome() + { + return isset($this->outcome); + } + + public function clearOutcome() + { + unset($this->outcome); + } + + /** + * The outcome of executing the workflow update function. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + * @param \Temporal\Api\Update\V1\Outcome $var + * @return $this + */ + public function setOutcome($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Outcome::class); + $this->outcome = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateRejectedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateRejectedEventAttributes.php new file mode 100644 index 0000000..c3f5c6e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateRejectedEventAttributes.php @@ -0,0 +1,234 @@ +temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes + */ +class WorkflowExecutionUpdateRejectedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The instance ID of the update protocol that generated this event. + * + * Generated from protobuf field string protocol_instance_id = 1; + */ + protected $protocol_instance_id = ''; + /** + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * + * Generated from protobuf field string rejected_request_message_id = 2; + */ + protected $rejected_request_message_id = ''; + /** + * The event ID used to sequence the original request message. + * + * Generated from protobuf field int64 rejected_request_sequencing_event_id = 3; + */ + protected $rejected_request_sequencing_event_id = 0; + /** + * The message payload of the original request message that initiated this + * update. + * + * Generated from protobuf field .temporal.api.update.v1.Request rejected_request = 4; + */ + protected $rejected_request = null; + /** + * The cause of rejection. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $protocol_instance_id + * The instance ID of the update protocol that generated this event. + * @type string $rejected_request_message_id + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * @type int|string $rejected_request_sequencing_event_id + * The event ID used to sequence the original request message. + * @type \Temporal\Api\Update\V1\Request $rejected_request + * The message payload of the original request message that initiated this + * update. + * @type \Temporal\Api\Failure\V1\Failure $failure + * The cause of rejection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The instance ID of the update protocol that generated this event. + * + * Generated from protobuf field string protocol_instance_id = 1; + * @return string + */ + public function getProtocolInstanceId() + { + return $this->protocol_instance_id; + } + + /** + * The instance ID of the update protocol that generated this event. + * + * Generated from protobuf field string protocol_instance_id = 1; + * @param string $var + * @return $this + */ + public function setProtocolInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->protocol_instance_id = $var; + + return $this; + } + + /** + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * + * Generated from protobuf field string rejected_request_message_id = 2; + * @return string + */ + public function getRejectedRequestMessageId() + { + return $this->rejected_request_message_id; + } + + /** + * The message ID of the original request message that initiated this + * update. Needed so that the worker can recreate and deliver that same + * message as part of replay. + * + * Generated from protobuf field string rejected_request_message_id = 2; + * @param string $var + * @return $this + */ + public function setRejectedRequestMessageId($var) + { + GPBUtil::checkString($var, True); + $this->rejected_request_message_id = $var; + + return $this; + } + + /** + * The event ID used to sequence the original request message. + * + * Generated from protobuf field int64 rejected_request_sequencing_event_id = 3; + * @return int|string + */ + public function getRejectedRequestSequencingEventId() + { + return $this->rejected_request_sequencing_event_id; + } + + /** + * The event ID used to sequence the original request message. + * + * Generated from protobuf field int64 rejected_request_sequencing_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setRejectedRequestSequencingEventId($var) + { + GPBUtil::checkInt64($var); + $this->rejected_request_sequencing_event_id = $var; + + return $this; + } + + /** + * The message payload of the original request message that initiated this + * update. + * + * Generated from protobuf field .temporal.api.update.v1.Request rejected_request = 4; + * @return \Temporal\Api\Update\V1\Request|null + */ + public function getRejectedRequest() + { + return $this->rejected_request; + } + + public function hasRejectedRequest() + { + return isset($this->rejected_request); + } + + public function clearRejectedRequest() + { + unset($this->rejected_request); + } + + /** + * The message payload of the original request message that initiated this + * update. + * + * Generated from protobuf field .temporal.api.update.v1.Request rejected_request = 4; + * @param \Temporal\Api\Update\V1\Request $var + * @return $this + */ + public function setRejectedRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class); + $this->rejected_request = $var; + + return $this; + } + + /** + * The cause of rejection. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * The cause of rejection. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateRequestedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateRequestedEventAttributes.php new file mode 100644 index 0000000..4a56781 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowExecutionUpdateRequestedEventAttributes.php @@ -0,0 +1,109 @@ +temporal.api.history.v1.WorkflowExecutionUpdateRequestedEventAttributes + */ +class WorkflowExecutionUpdateRequestedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The update request associated with this event. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 1; + */ + protected $request = null; + /** + * An explanation of why this event was written to history. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateRequestedEventOrigin origin = 2; + */ + protected $origin = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Update\V1\Request $request + * The update request associated with this event. + * @type int $origin + * An explanation of why this event was written to history. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The update request associated with this event. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 1; + * @return \Temporal\Api\Update\V1\Request|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The update request associated with this event. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 1; + * @param \Temporal\Api\Update\V1\Request $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class); + $this->request = $var; + + return $this; + } + + /** + * An explanation of why this event was written to history. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateRequestedEventOrigin origin = 2; + * @return int + */ + public function getOrigin() + { + return $this->origin; + } + + /** + * An explanation of why this event was written to history. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateRequestedEventOrigin origin = 2; + * @param int $var + * @return $this + */ + public function setOrigin($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\UpdateRequestedEventOrigin::class); + $this->origin = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowPropertiesModifiedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowPropertiesModifiedEventAttributes.php new file mode 100644 index 0000000..ba0ca93 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowPropertiesModifiedEventAttributes.php @@ -0,0 +1,118 @@ +temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes + */ +class WorkflowPropertiesModifiedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + */ + protected $workflow_task_completed_event_id = 0; + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 2; + */ + protected $upserted_memo = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $workflow_task_completed_event_id + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * @type \Temporal\Api\Common\V1\Memo $upserted_memo + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @return int|string + */ + public function getWorkflowTaskCompletedEventId() + { + return $this->workflow_task_completed_event_id; + } + + /** + * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with + * + * Generated from protobuf field int64 workflow_task_completed_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskCompletedEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_completed_event_id = $var; + + return $this; + } + + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 2; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getUpsertedMemo() + { + return $this->upserted_memo; + } + + public function hasUpsertedMemo() + { + return isset($this->upserted_memo); + } + + public function clearUpsertedMemo() + { + unset($this->upserted_memo); + } + + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 2; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setUpsertedMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->upserted_memo = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowPropertiesModifiedExternallyEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowPropertiesModifiedExternallyEventAttributes.php new file mode 100644 index 0000000..c1640ee --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowPropertiesModifiedExternallyEventAttributes.php @@ -0,0 +1,254 @@ +temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes + */ +class WorkflowPropertiesModifiedExternallyEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * If set to a nonempty string, future workflow tasks for this workflow shall be dispatched on + * the provided queue. + * + * Generated from protobuf field string new_task_queue = 1; + */ + protected $new_task_queue = ''; + /** + * If set, update the workflow task timeout to this value. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_task_timeout = 2; + */ + protected $new_workflow_task_timeout = null; + /** + * If set, update the workflow run timeout to this value. May be set to 0 for no timeout. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_run_timeout = 3; + */ + protected $new_workflow_run_timeout = null; + /** + * If set, update the workflow execution timeout to this value. May be set to 0 for no timeout. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_execution_timeout = 4; + */ + protected $new_workflow_execution_timeout = null; + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 5; + */ + protected $upserted_memo = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $new_task_queue + * If set to a nonempty string, future workflow tasks for this workflow shall be dispatched on + * the provided queue. + * @type \Google\Protobuf\Duration $new_workflow_task_timeout + * If set, update the workflow task timeout to this value. + * @type \Google\Protobuf\Duration $new_workflow_run_timeout + * If set, update the workflow run timeout to this value. May be set to 0 for no timeout. + * @type \Google\Protobuf\Duration $new_workflow_execution_timeout + * If set, update the workflow execution timeout to this value. May be set to 0 for no timeout. + * @type \Temporal\Api\Common\V1\Memo $upserted_memo + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * If set to a nonempty string, future workflow tasks for this workflow shall be dispatched on + * the provided queue. + * + * Generated from protobuf field string new_task_queue = 1; + * @return string + */ + public function getNewTaskQueue() + { + return $this->new_task_queue; + } + + /** + * If set to a nonempty string, future workflow tasks for this workflow shall be dispatched on + * the provided queue. + * + * Generated from protobuf field string new_task_queue = 1; + * @param string $var + * @return $this + */ + public function setNewTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->new_task_queue = $var; + + return $this; + } + + /** + * If set, update the workflow task timeout to this value. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_task_timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getNewWorkflowTaskTimeout() + { + return $this->new_workflow_task_timeout; + } + + public function hasNewWorkflowTaskTimeout() + { + return isset($this->new_workflow_task_timeout); + } + + public function clearNewWorkflowTaskTimeout() + { + unset($this->new_workflow_task_timeout); + } + + /** + * If set, update the workflow task timeout to this value. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_task_timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNewWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->new_workflow_task_timeout = $var; + + return $this; + } + + /** + * If set, update the workflow run timeout to this value. May be set to 0 for no timeout. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_run_timeout = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getNewWorkflowRunTimeout() + { + return $this->new_workflow_run_timeout; + } + + public function hasNewWorkflowRunTimeout() + { + return isset($this->new_workflow_run_timeout); + } + + public function clearNewWorkflowRunTimeout() + { + unset($this->new_workflow_run_timeout); + } + + /** + * If set, update the workflow run timeout to this value. May be set to 0 for no timeout. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_run_timeout = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNewWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->new_workflow_run_timeout = $var; + + return $this; + } + + /** + * If set, update the workflow execution timeout to this value. May be set to 0 for no timeout. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_execution_timeout = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getNewWorkflowExecutionTimeout() + { + return $this->new_workflow_execution_timeout; + } + + public function hasNewWorkflowExecutionTimeout() + { + return isset($this->new_workflow_execution_timeout); + } + + public function clearNewWorkflowExecutionTimeout() + { + unset($this->new_workflow_execution_timeout); + } + + /** + * If set, update the workflow execution timeout to this value. May be set to 0 for no timeout. + * + * Generated from protobuf field .google.protobuf.Duration new_workflow_execution_timeout = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNewWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->new_workflow_execution_timeout = $var; + + return $this; + } + + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 5; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getUpsertedMemo() + { + return $this->upserted_memo; + } + + public function hasUpsertedMemo() + { + return isset($this->upserted_memo); + } + + public function clearUpsertedMemo() + { + unset($this->upserted_memo); + } + + /** + * If set, update the workflow memo with the provided values. The values will be merged with + * the existing memo. If the user wants to delete values, a default/empty Payload should be + * used as the value for the key being deleted. + * + * Generated from protobuf field .temporal.api.common.v1.Memo upserted_memo = 5; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setUpsertedMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->upserted_memo = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskCompletedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskCompletedEventAttributes.php new file mode 100644 index 0000000..047dfdd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskCompletedEventAttributes.php @@ -0,0 +1,316 @@ +temporal.api.history.v1.WorkflowTaskCompletedEventAttributes + */ +class WorkflowTaskCompletedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + */ + protected $started_event_id = 0; + /** + * Identity of the worker who completed this task + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Binary ID of the worker who completed this task + * + * Generated from protobuf field string binary_checksum = 4; + */ + protected $binary_checksum = ''; + /** + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + */ + protected $worker_version = null; + /** + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 6; + */ + protected $sdk_metadata = null; + /** + * Local usage data sent during workflow task completion and recorded here for posterity + * + * Generated from protobuf field .temporal.api.common.v1.MeteringMetadata metering_metadata = 13; + */ + protected $metering_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * @type int|string $started_event_id + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * @type string $identity + * Identity of the worker who completed this task + * @type string $binary_checksum + * Binary ID of the worker who completed this task + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * @type \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata $sdk_metadata + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * @type \Temporal\Api\Common\V1\MeteringMetadata $metering_metadata + * Local usage data sent during workflow task completion and recorded here for posterity + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Identity of the worker who completed this task + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Identity of the worker who completed this task + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Binary ID of the worker who completed this task + * + * Generated from protobuf field string binary_checksum = 4; + * @return string + */ + public function getBinaryChecksum() + { + return $this->binary_checksum; + } + + /** + * Binary ID of the worker who completed this task + * + * Generated from protobuf field string binary_checksum = 4; + * @param string $var + * @return $this + */ + public function setBinaryChecksum($var) + { + GPBUtil::checkString($var, True); + $this->binary_checksum = $var; + + return $this; + } + + /** + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + + /** + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 6; + * @return \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata|null + */ + public function getSdkMetadata() + { + return $this->sdk_metadata; + } + + public function hasSdkMetadata() + { + return isset($this->sdk_metadata); + } + + public function clearSdkMetadata() + { + unset($this->sdk_metadata); + } + + /** + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 6; + * @param \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata $var + * @return $this + */ + public function setSdkMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata::class); + $this->sdk_metadata = $var; + + return $this; + } + + /** + * Local usage data sent during workflow task completion and recorded here for posterity + * + * Generated from protobuf field .temporal.api.common.v1.MeteringMetadata metering_metadata = 13; + * @return \Temporal\Api\Common\V1\MeteringMetadata|null + */ + public function getMeteringMetadata() + { + return $this->metering_metadata; + } + + public function hasMeteringMetadata() + { + return isset($this->metering_metadata); + } + + public function clearMeteringMetadata() + { + unset($this->metering_metadata); + } + + /** + * Local usage data sent during workflow task completion and recorded here for posterity + * + * Generated from protobuf field .temporal.api.common.v1.MeteringMetadata metering_metadata = 13; + * @param \Temporal\Api\Common\V1\MeteringMetadata $var + * @return $this + */ + public function setMeteringMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\MeteringMetadata::class); + $this->metering_metadata = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskFailedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskFailedEventAttributes.php new file mode 100644 index 0000000..1e8b92d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskFailedEventAttributes.php @@ -0,0 +1,401 @@ +temporal.api.history.v1.WorkflowTaskFailedEventAttributes + */ +class WorkflowTaskFailedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + */ + protected $started_event_id = 0; + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowTaskFailedCause cause = 3; + */ + protected $cause = 0; + /** + * The failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + */ + protected $failure = null; + /** + * If a worker explicitly failed this task, it's identity. TODO: What is this set to if server fails the task? + * + * Generated from protobuf field string identity = 5; + */ + protected $identity = ''; + /** + * The original run id of the workflow. For reset workflow. + * + * Generated from protobuf field string base_run_id = 6; + */ + protected $base_run_id = ''; + /** + * If the workflow is being reset, the new run id. + * + * Generated from protobuf field string new_run_id = 7; + */ + protected $new_run_id = ''; + /** + * TODO: ? + * + * Generated from protobuf field int64 fork_event_version = 8; + */ + protected $fork_event_version = 0; + /** + * DEPRECATED since 1.21 - use `worker_version` instead. + * If a worker explicitly failed this task, its binary id + * + * Generated from protobuf field string binary_checksum = 9; + */ + protected $binary_checksum = ''; + /** + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 10; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * @type int|string $started_event_id + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * @type int $cause + * @type \Temporal\Api\Failure\V1\Failure $failure + * The failure details + * @type string $identity + * If a worker explicitly failed this task, it's identity. TODO: What is this set to if server fails the task? + * @type string $base_run_id + * The original run id of the workflow. For reset workflow. + * @type string $new_run_id + * If the workflow is being reset, the new run id. + * @type int|string $fork_event_version + * TODO: ? + * @type string $binary_checksum + * DEPRECATED since 1.21 - use `worker_version` instead. + * If a worker explicitly failed this task, its binary id + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowTaskFailedCause cause = 3; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowTaskFailedCause cause = 3; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowTaskFailedCause::class); + $this->cause = $var; + + return $this; + } + + /** + * The failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * The failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * If a worker explicitly failed this task, it's identity. TODO: What is this set to if server fails the task? + * + * Generated from protobuf field string identity = 5; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * If a worker explicitly failed this task, it's identity. TODO: What is this set to if server fails the task? + * + * Generated from protobuf field string identity = 5; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * The original run id of the workflow. For reset workflow. + * + * Generated from protobuf field string base_run_id = 6; + * @return string + */ + public function getBaseRunId() + { + return $this->base_run_id; + } + + /** + * The original run id of the workflow. For reset workflow. + * + * Generated from protobuf field string base_run_id = 6; + * @param string $var + * @return $this + */ + public function setBaseRunId($var) + { + GPBUtil::checkString($var, True); + $this->base_run_id = $var; + + return $this; + } + + /** + * If the workflow is being reset, the new run id. + * + * Generated from protobuf field string new_run_id = 7; + * @return string + */ + public function getNewRunId() + { + return $this->new_run_id; + } + + /** + * If the workflow is being reset, the new run id. + * + * Generated from protobuf field string new_run_id = 7; + * @param string $var + * @return $this + */ + public function setNewRunId($var) + { + GPBUtil::checkString($var, True); + $this->new_run_id = $var; + + return $this; + } + + /** + * TODO: ? + * + * Generated from protobuf field int64 fork_event_version = 8; + * @return int|string + */ + public function getForkEventVersion() + { + return $this->fork_event_version; + } + + /** + * TODO: ? + * + * Generated from protobuf field int64 fork_event_version = 8; + * @param int|string $var + * @return $this + */ + public function setForkEventVersion($var) + { + GPBUtil::checkInt64($var); + $this->fork_event_version = $var; + + return $this; + } + + /** + * DEPRECATED since 1.21 - use `worker_version` instead. + * If a worker explicitly failed this task, its binary id + * + * Generated from protobuf field string binary_checksum = 9; + * @return string + */ + public function getBinaryChecksum() + { + return $this->binary_checksum; + } + + /** + * DEPRECATED since 1.21 - use `worker_version` instead. + * If a worker explicitly failed this task, its binary id + * + * Generated from protobuf field string binary_checksum = 9; + * @param string $var + * @return $this + */ + public function setBinaryChecksum($var) + { + GPBUtil::checkString($var, True); + $this->binary_checksum = $var; + + return $this; + } + + /** + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 10; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this workflow task. If present, the `build_id` field + * within is also used as `binary_checksum`, which may be omitted in that case (it may also be + * populated to preserve compatibility). + * Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 10; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskScheduledEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskScheduledEventAttributes.php new file mode 100644 index 0000000..777af2f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskScheduledEventAttributes.php @@ -0,0 +1,162 @@ +temporal.api.history.v1.WorkflowTaskScheduledEventAttributes + */ +class WorkflowTaskScheduledEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The task queue this workflow task was enqueued in, which could be a normal or sticky queue + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 1; + */ + protected $task_queue = null; + /** + * How long the worker has to process this task once receiving it before it times out + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 2; + */ + protected $start_to_close_timeout = null; + /** + * Starting at 1, how many attempts there have been to complete this task + * + * Generated from protobuf field int32 attempt = 3; + */ + protected $attempt = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * The task queue this workflow task was enqueued in, which could be a normal or sticky queue + * @type \Google\Protobuf\Duration $start_to_close_timeout + * How long the worker has to process this task once receiving it before it times out + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type int $attempt + * Starting at 1, how many attempts there have been to complete this task + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The task queue this workflow task was enqueued in, which could be a normal or sticky queue + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 1; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * The task queue this workflow task was enqueued in, which could be a normal or sticky queue + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 1; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * How long the worker has to process this task once receiving it before it times out + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getStartToCloseTimeout() + { + return $this->start_to_close_timeout; + } + + public function hasStartToCloseTimeout() + { + return isset($this->start_to_close_timeout); + } + + public function clearStartToCloseTimeout() + { + unset($this->start_to_close_timeout); + } + + /** + * How long the worker has to process this task once receiving it before it times out + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_to_close_timeout = $var; + + return $this; + } + + /** + * Starting at 1, how many attempts there have been to complete this task + * + * Generated from protobuf field int32 attempt = 3; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * Starting at 1, how many attempts there have been to complete this task + * + * Generated from protobuf field int32 attempt = 3; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskStartedEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskStartedEventAttributes.php new file mode 100644 index 0000000..e8f1ab6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskStartedEventAttributes.php @@ -0,0 +1,296 @@ +temporal.api.history.v1.WorkflowTaskStartedEventAttributes + */ +class WorkflowTaskStartedEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * Identity of the worker who picked up this task + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + /** + * TODO: ? Appears unused? + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + /** + * True if this workflow should continue-as-new soon because its history size (in + * either event count or bytes) is getting large. + * + * Generated from protobuf field bool suggest_continue_as_new = 4; + */ + protected $suggest_continue_as_new = false; + /** + * Total history size in bytes, which the workflow might use to decide when to + * continue-as-new regardless of the suggestion. Note that history event count is + * just the event id of this event, so we don't include it explicitly here. + * + * Generated from protobuf field int64 history_size_bytes = 5; + */ + protected $history_size_bytes = 0; + /** + * Version info of the worker to whom this task was dispatched. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + */ + protected $worker_version = null; + /** + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * + * Generated from protobuf field int64 build_id_redirect_counter = 7; + */ + protected $build_id_redirect_counter = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * @type string $identity + * Identity of the worker who picked up this task + * @type string $request_id + * TODO: ? Appears unused? + * @type bool $suggest_continue_as_new + * True if this workflow should continue-as-new soon because its history size (in + * either event count or bytes) is getting large. + * @type int|string $history_size_bytes + * Total history size in bytes, which the workflow might use to decide when to + * continue-as-new regardless of the suggestion. Note that history event count is + * just the event id of this event, so we don't include it explicitly here. + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker to whom this task was dispatched. + * @type int|string $build_id_redirect_counter + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * Identity of the worker who picked up this task + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Identity of the worker who picked up this task + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * TODO: ? Appears unused? + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * TODO: ? Appears unused? + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * True if this workflow should continue-as-new soon because its history size (in + * either event count or bytes) is getting large. + * + * Generated from protobuf field bool suggest_continue_as_new = 4; + * @return bool + */ + public function getSuggestContinueAsNew() + { + return $this->suggest_continue_as_new; + } + + /** + * True if this workflow should continue-as-new soon because its history size (in + * either event count or bytes) is getting large. + * + * Generated from protobuf field bool suggest_continue_as_new = 4; + * @param bool $var + * @return $this + */ + public function setSuggestContinueAsNew($var) + { + GPBUtil::checkBool($var); + $this->suggest_continue_as_new = $var; + + return $this; + } + + /** + * Total history size in bytes, which the workflow might use to decide when to + * continue-as-new regardless of the suggestion. Note that history event count is + * just the event id of this event, so we don't include it explicitly here. + * + * Generated from protobuf field int64 history_size_bytes = 5; + * @return int|string + */ + public function getHistorySizeBytes() + { + return $this->history_size_bytes; + } + + /** + * Total history size in bytes, which the workflow might use to decide when to + * continue-as-new regardless of the suggestion. Note that history event count is + * just the event id of this event, so we don't include it explicitly here. + * + * Generated from protobuf field int64 history_size_bytes = 5; + * @param int|string $var + * @return $this + */ + public function setHistorySizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->history_size_bytes = $var; + + return $this; + } + + /** + * Version info of the worker to whom this task was dispatched. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker to whom this task was dispatched. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + + /** + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * + * Generated from protobuf field int64 build_id_redirect_counter = 7; + * @return int|string + */ + public function getBuildIdRedirectCounter() + { + return $this->build_id_redirect_counter; + } + + /** + * Used by server internally to properly reapply build ID redirects to an execution + * when rebuilding it from events. + * + * Generated from protobuf field int64 build_id_redirect_counter = 7; + * @param int|string $var + * @return $this + */ + public function setBuildIdRedirectCounter($var) + { + GPBUtil::checkInt64($var); + $this->build_id_redirect_counter = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskTimedOutEventAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskTimedOutEventAttributes.php new file mode 100644 index 0000000..2234ca7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/History/V1/WorkflowTaskTimedOutEventAttributes.php @@ -0,0 +1,127 @@ +temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes + */ +class WorkflowTaskTimedOutEventAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + */ + protected $scheduled_event_id = 0; + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + */ + protected $started_event_id = 0; + /** + * Generated from protobuf field .temporal.api.enums.v1.TimeoutType timeout_type = 3; + */ + protected $timeout_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scheduled_event_id + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * @type int|string $started_event_id + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * @type int $timeout_type + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\History\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @return int|string + */ + public function getScheduledEventId() + { + return $this->scheduled_event_id; + } + + /** + * The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to + * + * Generated from protobuf field int64 scheduled_event_id = 1; + * @param int|string $var + * @return $this + */ + public function setScheduledEventId($var) + { + GPBUtil::checkInt64($var); + $this->scheduled_event_id = $var; + + return $this; + } + + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to + * + * Generated from protobuf field int64 started_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.TimeoutType timeout_type = 3; + * @return int + */ + public function getTimeoutType() + { + return $this->timeout_type; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.TimeoutType timeout_type = 3; + * @param int $var + * @return $this + */ + public function setTimeoutType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\TimeoutType::class); + $this->timeout_type = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/CancelOperationRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/CancelOperationRequest.php new file mode 100644 index 0000000..ac16724 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/CancelOperationRequest.php @@ -0,0 +1,136 @@ +temporal.api.nexus.v1.CancelOperationRequest + */ +class CancelOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Service name. + * + * Generated from protobuf field string service = 1; + */ + protected $service = ''; + /** + * Type of operation to cancel. + * + * Generated from protobuf field string operation = 2; + */ + protected $operation = ''; + /** + * Operation ID as originally generated by a Handler. + * + * Generated from protobuf field string operation_id = 3; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Service name. + * @type string $operation + * Type of operation to cancel. + * @type string $operation_id + * Operation ID as originally generated by a Handler. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Service name. + * + * Generated from protobuf field string service = 1; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Service name. + * + * 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; + } + + /** + * Type of operation to cancel. + * + * Generated from protobuf field string operation = 2; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Type of operation to cancel. + * + * 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; + } + + /** + * Operation ID as originally generated by a Handler. + * + * Generated from protobuf field string operation_id = 3; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * Operation ID as originally generated by a Handler. + * + * Generated from protobuf field string operation_id = 3; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/CancelOperationResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/CancelOperationResponse.php new file mode 100644 index 0000000..cf5d9ca --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/CancelOperationResponse.php @@ -0,0 +1,34 @@ +temporal.api.nexus.v1.CancelOperationResponse + */ +class CancelOperationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Endpoint.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Endpoint.php new file mode 100644 index 0000000..d96470d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Endpoint.php @@ -0,0 +1,296 @@ +temporal.api.nexus.v1.Endpoint + */ +class Endpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API. + * + * Generated from protobuf field int64 version = 1; + */ + protected $version = 0; + /** + * Unique server-generated endpoint ID. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * Spec for the endpoint. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 3; + */ + protected $spec = null; + /** + * The date and time when the endpoint was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + */ + protected $created_time = null; + /** + * The date and time when the endpoint was last modified. + * Will not be set if the endpoint has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + */ + protected $last_modified_time = null; + /** + * Server exposed URL prefix for invocation of operations on this endpoint. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of endpoint renames. + * + * Generated from protobuf field string url_prefix = 6; + */ + protected $url_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $version + * Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API. + * @type string $id + * Unique server-generated endpoint ID. + * @type \Temporal\Api\Nexus\V1\EndpointSpec $spec + * Spec for the endpoint. + * @type \Google\Protobuf\Timestamp $created_time + * The date and time when the endpoint was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * @type \Google\Protobuf\Timestamp $last_modified_time + * The date and time when the endpoint was last modified. + * Will not be set if the endpoint has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * @type string $url_prefix + * Server exposed URL prefix for invocation of operations on this endpoint. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of endpoint renames. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API. + * + * Generated from protobuf field int64 version = 1; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API. + * + * Generated from protobuf field int64 version = 1; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * Unique server-generated endpoint ID. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Unique server-generated endpoint ID. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Spec for the endpoint. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 3; + * @return \Temporal\Api\Nexus\V1\EndpointSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Spec for the endpoint. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 3; + * @param \Temporal\Api\Nexus\V1\EndpointSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\EndpointSpec::class); + $this->spec = $var; + + return $this; + } + + /** + * The date and time when the endpoint was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreatedTime() + { + return $this->created_time; + } + + public function hasCreatedTime() + { + return isset($this->created_time); + } + + public function clearCreatedTime() + { + unset($this->created_time); + } + + /** + * The date and time when the endpoint was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreatedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->created_time = $var; + + return $this; + } + + /** + * The date and time when the endpoint was last modified. + * Will not be set if the endpoint has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastModifiedTime() + { + return $this->last_modified_time; + } + + public function hasLastModifiedTime() + { + return isset($this->last_modified_time); + } + + public function clearLastModifiedTime() + { + unset($this->last_modified_time); + } + + /** + * The date and time when the endpoint was last modified. + * Will not be set if the endpoint has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastModifiedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_modified_time = $var; + + return $this; + } + + /** + * Server exposed URL prefix for invocation of operations on this endpoint. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of endpoint renames. + * + * Generated from protobuf field string url_prefix = 6; + * @return string + */ + public function getUrlPrefix() + { + return $this->url_prefix; + } + + /** + * Server exposed URL prefix for invocation of operations on this endpoint. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of endpoint renames. + * + * Generated from protobuf field string url_prefix = 6; + * @param string $var + * @return $this + */ + public function setUrlPrefix($var) + { + GPBUtil::checkString($var, True); + $this->url_prefix = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointSpec.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointSpec.php new file mode 100644 index 0000000..9e9befa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointSpec.php @@ -0,0 +1,168 @@ +temporal.api.nexus.v1.EndpointSpec + */ +class EndpointSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Markdown description serialized as a single JSON string. + * If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. + * By default, the server enforces a limit of 20,000 bytes for this entire payload. + * + * Generated from protobuf field .temporal.api.common.v1.Payload description = 2; + */ + protected $description = null; + /** + * Target to route requests to. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointTarget target = 3; + */ + protected $target = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail. + * @type \Temporal\Api\Common\V1\Payload $description + * Markdown description serialized as a single JSON string. + * If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. + * By default, the server enforces a limit of 20,000 bytes for this entire payload. + * @type \Temporal\Api\Nexus\V1\EndpointTarget $target + * Target to route requests to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail. + * + * 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; + } + + /** + * Markdown description serialized as a single JSON string. + * If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. + * By default, the server enforces a limit of 20,000 bytes for this entire payload. + * + * Generated from protobuf field .temporal.api.common.v1.Payload description = 2; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getDescription() + { + return $this->description; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Markdown description serialized as a single JSON string. + * If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. + * By default, the server enforces a limit of 20,000 bytes for this entire payload. + * + * Generated from protobuf field .temporal.api.common.v1.Payload description = 2; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->description = $var; + + return $this; + } + + /** + * Target to route requests to. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointTarget target = 3; + * @return \Temporal\Api\Nexus\V1\EndpointTarget|null + */ + public function getTarget() + { + return $this->target; + } + + public function hasTarget() + { + return isset($this->target); + } + + public function clearTarget() + { + unset($this->target); + } + + /** + * Target to route requests to. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointTarget target = 3; + * @param \Temporal\Api\Nexus\V1\EndpointTarget $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\EndpointTarget::class); + $this->target = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget.php new file mode 100644 index 0000000..e102888 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget.php @@ -0,0 +1,99 @@ +temporal.api.nexus.v1.EndpointTarget + */ +class EndpointTarget extends \Google\Protobuf\Internal\Message +{ + protected $variant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\EndpointTarget\Worker $worker + * @type \Temporal\Api\Nexus\V1\EndpointTarget\External $external + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.EndpointTarget.Worker worker = 1; + * @return \Temporal\Api\Nexus\V1\EndpointTarget\Worker|null + */ + public function getWorker() + { + return $this->readOneof(1); + } + + public function hasWorker() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.EndpointTarget.Worker worker = 1; + * @param \Temporal\Api\Nexus\V1\EndpointTarget\Worker $var + * @return $this + */ + public function setWorker($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\EndpointTarget\Worker::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.EndpointTarget.External external = 2; + * @return \Temporal\Api\Nexus\V1\EndpointTarget\External|null + */ + public function getExternal() + { + return $this->readOneof(2); + } + + public function hasExternal() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.EndpointTarget.External external = 2; + * @param \Temporal\Api\Nexus\V1\EndpointTarget\External $var + * @return $this + */ + public function setExternal($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\EndpointTarget\External::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getVariant() + { + return $this->whichOneof("variant"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget/External.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget/External.php new file mode 100644 index 0000000..9dd1bda --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget/External.php @@ -0,0 +1,70 @@ +temporal.api.nexus.v1.EndpointTarget.External + */ +class External extends \Google\Protobuf\Internal\Message +{ + /** + * URL to call. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * URL to call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * URL to call. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * URL to call. + * + * Generated from protobuf field string url = 1; + * @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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget/Worker.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget/Worker.php new file mode 100644 index 0000000..ca359f3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/EndpointTarget/Worker.php @@ -0,0 +1,102 @@ +temporal.api.nexus.v1.EndpointTarget.Worker + */ +class Worker extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace to route requests to. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Nexus task queue to route requests to. + * + * Generated from protobuf field string task_queue = 2; + */ + protected $task_queue = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace to route requests to. + * @type string $task_queue + * Nexus task queue to route requests to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Namespace to route requests to. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace to route requests to. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Nexus task queue to route requests to. + * + * Generated from protobuf field string task_queue = 2; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Nexus task queue to route requests to. + * + * Generated from protobuf field string task_queue = 2; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Failure.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Failure.php new file mode 100644 index 0000000..07932e2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Failure.php @@ -0,0 +1,116 @@ +temporal.api.nexus.v1.Failure + */ +class Failure extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * Generated from protobuf field map metadata = 2; + */ + private $metadata; + /** + * Generated from protobuf field bytes details = 3; + */ + protected $details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * @type array|\Google\Protobuf\Internal\MapField $metadata + * @type string $details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Generated from protobuf field map metadata = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generated from protobuf field map metadata = 2; + * @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; + } + + /** + * Generated from protobuf field bytes details = 3; + * @return string + */ + public function getDetails() + { + return $this->details; + } + + /** + * Generated from protobuf field bytes details = 3; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, False); + $this->details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/HandlerError.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/HandlerError.php new file mode 100644 index 0000000..b019705 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/HandlerError.php @@ -0,0 +1,103 @@ +temporal.api.nexus.v1.HandlerError + */ +class HandlerError extends \Google\Protobuf\Internal\Message +{ + /** + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. + * + * Generated from protobuf field string error_type = 1; + */ + protected $error_type = ''; + /** + * Generated from protobuf field .temporal.api.nexus.v1.Failure failure = 2; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error_type + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. + * @type \Temporal\Api\Nexus\V1\Failure $failure + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. + * + * Generated from protobuf field string error_type = 1; + * @return string + */ + public function getErrorType() + { + return $this->error_type; + } + + /** + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. + * + * Generated from protobuf field string error_type = 1; + * @param string $var + * @return $this + */ + public function setErrorType($var) + { + GPBUtil::checkString($var, True); + $this->error_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.Failure failure = 2; + * @return \Temporal\Api\Nexus\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.Failure failure = 2; + * @param \Temporal\Api\Nexus\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/IncomingService.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/IncomingService.php new file mode 100644 index 0000000..3a74c51 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/IncomingService.php @@ -0,0 +1,296 @@ +temporal.api.nexus.v1.IncomingService + */ +class IncomingService extends \Google\Protobuf\Internal\Message +{ + /** + * Data version for this service, incremented for every update issued via the UpdateNexusIncomingService API. + * + * Generated from protobuf field int64 version = 1; + */ + protected $version = 0; + /** + * Unique server-generated service ID. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * Spec for the service. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 3; + */ + protected $spec = null; + /** + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + */ + protected $created_time = null; + /** + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + */ + protected $last_modified_time = null; + /** + * Server exposed URL prefix for invocation of operations on this service. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of service renames. + * + * Generated from protobuf field string url_prefix = 6; + */ + protected $url_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $version + * Data version for this service, incremented for every update issued via the UpdateNexusIncomingService API. + * @type string $id + * Unique server-generated service ID. + * @type \Temporal\Api\Nexus\V1\IncomingServiceSpec $spec + * Spec for the service. + * @type \Google\Protobuf\Timestamp $created_time + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * @type \Google\Protobuf\Timestamp $last_modified_time + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * @type string $url_prefix + * Server exposed URL prefix for invocation of operations on this service. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of service renames. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Data version for this service, incremented for every update issued via the UpdateNexusIncomingService API. + * + * Generated from protobuf field int64 version = 1; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Data version for this service, incremented for every update issued via the UpdateNexusIncomingService API. + * + * Generated from protobuf field int64 version = 1; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * Unique server-generated service ID. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Unique server-generated service ID. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Spec for the service. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 3; + * @return \Temporal\Api\Nexus\V1\IncomingServiceSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Spec for the service. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 3; + * @param \Temporal\Api\Nexus\V1\IncomingServiceSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingServiceSpec::class); + $this->spec = $var; + + return $this; + } + + /** + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreatedTime() + { + return $this->created_time; + } + + public function hasCreatedTime() + { + return isset($this->created_time); + } + + public function clearCreatedTime() + { + unset($this->created_time); + } + + /** + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreatedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->created_time = $var; + + return $this; + } + + /** + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastModifiedTime() + { + return $this->last_modified_time; + } + + public function hasLastModifiedTime() + { + return isset($this->last_modified_time); + } + + public function clearLastModifiedTime() + { + unset($this->last_modified_time); + } + + /** + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastModifiedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_modified_time = $var; + + return $this; + } + + /** + * Server exposed URL prefix for invocation of operations on this service. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of service renames. + * + * Generated from protobuf field string url_prefix = 6; + * @return string + */ + public function getUrlPrefix() + { + return $this->url_prefix; + } + + /** + * Server exposed URL prefix for invocation of operations on this service. + * This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + * publicly. The URL is stable in the face of service renames. + * + * Generated from protobuf field string url_prefix = 6; + * @param string $var + * @return $this + */ + public function setUrlPrefix($var) + { + GPBUtil::checkString($var, True); + $this->url_prefix = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/IncomingServiceSpec.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/IncomingServiceSpec.php new file mode 100644 index 0000000..559c798 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/IncomingServiceSpec.php @@ -0,0 +1,169 @@ +temporal.api.nexus.v1.IncomingServiceSpec + */ +class IncomingServiceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Service name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Namespace to route requests to. + * + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + /** + * Task queue to route requests to. + * + * Generated from protobuf field string task_queue = 3; + */ + protected $task_queue = ''; + /** + * Generic service metadata that is available to the server's authorizer. + * + * Generated from protobuf field map metadata = 4; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Service name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * @type string $namespace + * Namespace to route requests to. + * @type string $task_queue + * Task queue to route requests to. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Generic service metadata that is available to the server's authorizer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Service name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Service name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * + * 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; + } + + /** + * Namespace to route requests to. + * + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace to route requests to. + * + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Task queue to route requests to. + * + * Generated from protobuf field string task_queue = 3; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Task queue to route requests to. + * + * Generated from protobuf field string task_queue = 3; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + + /** + * Generic service metadata that is available to the server's authorizer. + * + * Generated from protobuf field map metadata = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Generic service metadata that is available to the server's authorizer. + * + * Generated from protobuf field map metadata = 4; + * @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::MESSAGE, \Google\Protobuf\Any::class); + $this->metadata = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/OutgoingService.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/OutgoingService.php new file mode 100644 index 0000000..d43575e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/OutgoingService.php @@ -0,0 +1,254 @@ +temporal.api.nexus.v1.OutgoingService + */ +class OutgoingService extends \Google\Protobuf\Internal\Message +{ + /** + * Data version for this service, incremented for every mutation. + * + * Generated from protobuf field int64 version = 1; + */ + protected $version = 0; + /** + * Name of the service + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Spec for the service. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 3; + */ + protected $spec = null; + /** + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + */ + protected $created_time = null; + /** + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + */ + protected $last_modified_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $version + * Data version for this service, incremented for every mutation. + * @type string $name + * Name of the service + * @type \Temporal\Api\Nexus\V1\OutgoingServiceSpec $spec + * Spec for the service. + * @type \Google\Protobuf\Timestamp $created_time + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * @type \Google\Protobuf\Timestamp $last_modified_time + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Data version for this service, incremented for every mutation. + * + * Generated from protobuf field int64 version = 1; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Data version for this service, incremented for every mutation. + * + * Generated from protobuf field int64 version = 1; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * Name of the service + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the service + * + * 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; + } + + /** + * Spec for the service. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 3; + * @return \Temporal\Api\Nexus\V1\OutgoingServiceSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Spec for the service. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 3; + * @param \Temporal\Api\Nexus\V1\OutgoingServiceSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\OutgoingServiceSpec::class); + $this->spec = $var; + + return $this; + } + + /** + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreatedTime() + { + return $this->created_time; + } + + public function hasCreatedTime() + { + return isset($this->created_time); + } + + public function clearCreatedTime() + { + unset($this->created_time); + } + + /** + * The date and time when the service was created. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp created_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreatedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->created_time = $var; + + return $this; + } + + /** + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastModifiedTime() + { + return $this->last_modified_time; + } + + public function hasLastModifiedTime() + { + return isset($this->last_modified_time); + } + + public function clearLastModifiedTime() + { + unset($this->last_modified_time); + } + + /** + * The date and time when the service was last modified. + * Will not be set if the service has never been modified. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastModifiedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_modified_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/OutgoingServiceSpec.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/OutgoingServiceSpec.php new file mode 100644 index 0000000..a777000 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/OutgoingServiceSpec.php @@ -0,0 +1,67 @@ +temporal.api.nexus.v1.OutgoingServiceSpec + */ +class OutgoingServiceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * URL to invoke requests. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * URL to invoke requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * URL to invoke requests. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * URL to invoke requests. + * + * Generated from protobuf field string url = 1; + * @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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Request.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Request.php new file mode 100644 index 0000000..1de9679 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Request.php @@ -0,0 +1,189 @@ +temporal.api.nexus.v1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * Headers extracted from the original request in the Temporal frontend. + * When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values. + * + * Generated from protobuf field map header = 1; + */ + private $header; + /** + * The timestamp when the request was scheduled in the frontend. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 2; + */ + protected $scheduled_time = null; + protected $variant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $header + * Headers extracted from the original request in the Temporal frontend. + * When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values. + * @type \Google\Protobuf\Timestamp $scheduled_time + * The timestamp when the request was scheduled in the frontend. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * @type \Temporal\Api\Nexus\V1\StartOperationRequest $start_operation + * @type \Temporal\Api\Nexus\V1\CancelOperationRequest $cancel_operation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Headers extracted from the original request in the Temporal frontend. + * When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values. + * + * Generated from protobuf field map header = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeader() + { + return $this->header; + } + + /** + * Headers extracted from the original request in the Temporal frontend. + * When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values. + * + * Generated from protobuf field map header = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeader($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->header = $arr; + + return $this; + } + + /** + * The timestamp when the request was scheduled in the frontend. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledTime() + { + return $this->scheduled_time; + } + + public function hasScheduledTime() + { + return isset($this->scheduled_time); + } + + public function clearScheduledTime() + { + unset($this->scheduled_time); + } + + /** + * The timestamp when the request was scheduled in the frontend. + * (-- api-linter: core::0142::time-field-names=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationRequest start_operation = 3; + * @return \Temporal\Api\Nexus\V1\StartOperationRequest|null + */ + public function getStartOperation() + { + return $this->readOneof(3); + } + + public function hasStartOperation() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationRequest start_operation = 3; + * @param \Temporal\Api\Nexus\V1\StartOperationRequest $var + * @return $this + */ + public function setStartOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\StartOperationRequest::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4; + * @return \Temporal\Api\Nexus\V1\CancelOperationRequest|null + */ + public function getCancelOperation() + { + return $this->readOneof(4); + } + + public function hasCancelOperation() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.CancelOperationRequest cancel_operation = 4; + * @param \Temporal\Api\Nexus\V1\CancelOperationRequest $var + * @return $this + */ + public function setCancelOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\CancelOperationRequest::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getVariant() + { + return $this->whichOneof("variant"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Response.php new file mode 100644 index 0000000..95a98e7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/Response.php @@ -0,0 +1,99 @@ +temporal.api.nexus.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + protected $variant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\StartOperationResponse $start_operation + * @type \Temporal\Api\Nexus\V1\CancelOperationResponse $cancel_operation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationResponse start_operation = 1; + * @return \Temporal\Api\Nexus\V1\StartOperationResponse|null + */ + public function getStartOperation() + { + return $this->readOneof(1); + } + + public function hasStartOperation() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationResponse start_operation = 1; + * @param \Temporal\Api\Nexus\V1\StartOperationResponse $var + * @return $this + */ + public function setStartOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\StartOperationResponse::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.CancelOperationResponse cancel_operation = 2; + * @return \Temporal\Api\Nexus\V1\CancelOperationResponse|null + */ + public function getCancelOperation() + { + return $this->readOneof(2); + } + + public function hasCancelOperation() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.CancelOperationResponse cancel_operation = 2; + * @param \Temporal\Api\Nexus\V1\CancelOperationResponse $var + * @return $this + */ + public function setCancelOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\CancelOperationResponse::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getVariant() + { + return $this->whichOneof("variant"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationRequest.php new file mode 100644 index 0000000..017964e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationRequest.php @@ -0,0 +1,248 @@ +temporal.api.nexus.v1.StartOperationRequest + */ +class StartOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of service to start the operation in. + * + * Generated from protobuf field string service = 1; + */ + protected $service = ''; + /** + * Type of operation to start. + * + * Generated from protobuf field string operation = 2; + */ + protected $operation = ''; + /** + * A request ID that can be used as an idempotentency key. + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + /** + * Callback URL to call upon completion if the started operation is async. + * + * Generated from protobuf field string callback = 4; + */ + protected $callback = ''; + /** + * Full request body from the incoming HTTP request. + * + * Generated from protobuf field .temporal.api.common.v1.Payload payload = 5; + */ + protected $payload = null; + /** + * Header that is expected to be attached to the callback request when the operation completes. + * + * Generated from protobuf field map callback_header = 6; + */ + private $callback_header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Name of service to start the operation in. + * @type string $operation + * Type of operation to start. + * @type string $request_id + * A request ID that can be used as an idempotentency key. + * @type string $callback + * Callback URL to call upon completion if the started operation is async. + * @type \Temporal\Api\Common\V1\Payload $payload + * Full request body from the incoming HTTP request. + * @type array|\Google\Protobuf\Internal\MapField $callback_header + * Header that is expected to be attached to the callback request when the operation completes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Name of service to start the operation in. + * + * Generated from protobuf field string service = 1; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Name of service to start the operation in. + * + * 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; + } + + /** + * Type of operation to start. + * + * Generated from protobuf field string operation = 2; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Type of operation to start. + * + * 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; + } + + /** + * A request ID that can be used as an idempotentency key. + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID that can be used as an idempotentency key. + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Callback URL to call upon completion if the started operation is async. + * + * Generated from protobuf field string callback = 4; + * @return string + */ + public function getCallback() + { + return $this->callback; + } + + /** + * Callback URL to call upon completion if the started operation is async. + * + * Generated from protobuf field string callback = 4; + * @param string $var + * @return $this + */ + public function setCallback($var) + { + GPBUtil::checkString($var, True); + $this->callback = $var; + + return $this; + } + + /** + * Full request body from the incoming HTTP request. + * + * Generated from protobuf field .temporal.api.common.v1.Payload payload = 5; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getPayload() + { + return $this->payload; + } + + public function hasPayload() + { + return isset($this->payload); + } + + public function clearPayload() + { + unset($this->payload); + } + + /** + * Full request body from the incoming HTTP request. + * + * Generated from protobuf field .temporal.api.common.v1.Payload payload = 5; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->payload = $var; + + return $this; + } + + /** + * Header that is expected to be attached to the callback request when the operation completes. + * + * Generated from protobuf field map callback_header = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCallbackHeader() + { + return $this->callback_header; + } + + /** + * Header that is expected to be attached to the callback request when the operation completes. + * + * Generated from protobuf field map callback_header = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCallbackHeader($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->callback_header = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse.php new file mode 100644 index 0000000..0a6e070 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse.php @@ -0,0 +1,132 @@ +temporal.api.nexus.v1.StartOperationResponse + */ +class StartOperationResponse extends \Google\Protobuf\Internal\Message +{ + protected $variant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\StartOperationResponse\Sync $sync_success + * @type \Temporal\Api\Nexus\V1\StartOperationResponse\Async $async_success + * @type \Temporal\Api\Nexus\V1\UnsuccessfulOperationError $operation_error + * The operation completed unsuccessfully (failed or canceled). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationResponse.Sync sync_success = 1; + * @return \Temporal\Api\Nexus\V1\StartOperationResponse\Sync|null + */ + public function getSyncSuccess() + { + return $this->readOneof(1); + } + + public function hasSyncSuccess() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationResponse.Sync sync_success = 1; + * @param \Temporal\Api\Nexus\V1\StartOperationResponse\Sync $var + * @return $this + */ + public function setSyncSuccess($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\StartOperationResponse\Sync::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationResponse.Async async_success = 2; + * @return \Temporal\Api\Nexus\V1\StartOperationResponse\Async|null + */ + public function getAsyncSuccess() + { + return $this->readOneof(2); + } + + public function hasAsyncSuccess() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.StartOperationResponse.Async async_success = 2; + * @param \Temporal\Api\Nexus\V1\StartOperationResponse\Async $var + * @return $this + */ + public function setAsyncSuccess($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\StartOperationResponse\Async::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The operation completed unsuccessfully (failed or canceled). + * + * Generated from protobuf field .temporal.api.nexus.v1.UnsuccessfulOperationError operation_error = 3; + * @return \Temporal\Api\Nexus\V1\UnsuccessfulOperationError|null + */ + public function getOperationError() + { + return $this->readOneof(3); + } + + public function hasOperationError() + { + return $this->hasOneof(3); + } + + /** + * The operation completed unsuccessfully (failed or canceled). + * + * Generated from protobuf field .temporal.api.nexus.v1.UnsuccessfulOperationError operation_error = 3; + * @param \Temporal\Api\Nexus\V1\UnsuccessfulOperationError $var + * @return $this + */ + public function setOperationError($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\UnsuccessfulOperationError::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getVariant() + { + return $this->whichOneof("variant"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse/Async.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse/Async.php new file mode 100644 index 0000000..d8b7921 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse/Async.php @@ -0,0 +1,62 @@ +temporal.api.nexus.v1.StartOperationResponse.Async + */ +class Async extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string operation_id = 1; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse/Sync.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse/Sync.php new file mode 100644 index 0000000..04f1837 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/StartOperationResponse/Sync.php @@ -0,0 +1,71 @@ +temporal.api.nexus.v1.StartOperationResponse.Sync + */ +class Sync extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payload payload = 1; + */ + protected $payload = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payload $payload + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payload payload = 1; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getPayload() + { + return $this->payload; + } + + public function hasPayload() + { + return isset($this->payload); + } + + public function clearPayload() + { + unset($this->payload); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payload payload = 1; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->payload = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/UnsuccessfulOperationError.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/UnsuccessfulOperationError.php new file mode 100644 index 0000000..84f5bbe --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Nexus/V1/UnsuccessfulOperationError.php @@ -0,0 +1,103 @@ +temporal.api.nexus.v1.UnsuccessfulOperationError + */ +class UnsuccessfulOperationError extends \Google\Protobuf\Internal\Message +{ + /** + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#operationinfo. + * + * Generated from protobuf field string operation_state = 1; + */ + protected $operation_state = ''; + /** + * Generated from protobuf field .temporal.api.nexus.v1.Failure failure = 2; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_state + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#operationinfo. + * @type \Temporal\Api\Nexus\V1\Failure $failure + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#operationinfo. + * + * Generated from protobuf field string operation_state = 1; + * @return string + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * See https://github.com/nexus-rpc/api/blob/main/SPEC.md#operationinfo. + * + * Generated from protobuf field string operation_state = 1; + * @param string $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkString($var, True); + $this->operation_state = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.Failure failure = 2; + * @return \Temporal\Api\Nexus\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.Failure failure = 2; + * @param \Temporal\Api\Nexus\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddOrUpdateRemoteClusterRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddOrUpdateRemoteClusterRequest.php new file mode 100644 index 0000000..9425e14 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddOrUpdateRemoteClusterRequest.php @@ -0,0 +1,138 @@ +temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest + */ +class AddOrUpdateRemoteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required. + * + * Generated from protobuf field string frontend_address = 1; + */ + protected $frontend_address = ''; + /** + * Flag to enable / disable the cross cluster connection. + * + * Generated from protobuf field bool enable_remote_cluster_connection = 2; + */ + protected $enable_remote_cluster_connection = false; + /** + * Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided + * on update, the existing HTTP address will be removed. + * + * Generated from protobuf field string frontend_http_address = 3; + */ + protected $frontend_http_address = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $frontend_address + * Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required. + * @type bool $enable_remote_cluster_connection + * Flag to enable / disable the cross cluster connection. + * @type string $frontend_http_address + * Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided + * on update, the existing HTTP address will be removed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required. + * + * Generated from protobuf field string frontend_address = 1; + * @return string + */ + public function getFrontendAddress() + { + return $this->frontend_address; + } + + /** + * Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required. + * + * Generated from protobuf field string frontend_address = 1; + * @param string $var + * @return $this + */ + public function setFrontendAddress($var) + { + GPBUtil::checkString($var, True); + $this->frontend_address = $var; + + return $this; + } + + /** + * Flag to enable / disable the cross cluster connection. + * + * Generated from protobuf field bool enable_remote_cluster_connection = 2; + * @return bool + */ + public function getEnableRemoteClusterConnection() + { + return $this->enable_remote_cluster_connection; + } + + /** + * Flag to enable / disable the cross cluster connection. + * + * Generated from protobuf field bool enable_remote_cluster_connection = 2; + * @param bool $var + * @return $this + */ + public function setEnableRemoteClusterConnection($var) + { + GPBUtil::checkBool($var); + $this->enable_remote_cluster_connection = $var; + + return $this; + } + + /** + * Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided + * on update, the existing HTTP address will be removed. + * + * Generated from protobuf field string frontend_http_address = 3; + * @return string + */ + public function getFrontendHttpAddress() + { + return $this->frontend_http_address; + } + + /** + * Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided + * on update, the existing HTTP address will be removed. + * + * Generated from protobuf field string frontend_http_address = 3; + * @param string $var + * @return $this + */ + public function setFrontendHttpAddress($var) + { + GPBUtil::checkString($var, True); + $this->frontend_http_address = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddOrUpdateRemoteClusterResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddOrUpdateRemoteClusterResponse.php new file mode 100644 index 0000000..2bb2d41 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddOrUpdateRemoteClusterResponse.php @@ -0,0 +1,32 @@ +temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse + */ +class AddOrUpdateRemoteClusterResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddSearchAttributesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddSearchAttributesRequest.php new file mode 100644 index 0000000..ed59e73 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddSearchAttributesRequest.php @@ -0,0 +1,93 @@ +temporal.api.operatorservice.v1.AddSearchAttributesRequest + */ +class AddSearchAttributesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Mapping between search attribute name and its IndexedValueType. + * + * Generated from protobuf field map search_attributes = 1; + */ + private $search_attributes; + /** + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $search_attributes + * Mapping between search attribute name and its IndexedValueType. + * @type string $namespace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Mapping between search attribute name and its IndexedValueType. + * + * Generated from protobuf field map search_attributes = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + /** + * Mapping between search attribute name and its IndexedValueType. + * + * Generated from protobuf field map search_attributes = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSearchAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\IndexedValueType::class); + $this->search_attributes = $arr; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddSearchAttributesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddSearchAttributesResponse.php new file mode 100644 index 0000000..472219f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/AddSearchAttributesResponse.php @@ -0,0 +1,32 @@ +temporal.api.operatorservice.v1.AddSearchAttributesResponse + */ +class AddSearchAttributesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ClusterMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ClusterMetadata.php new file mode 100644 index 0000000..c0f15cb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ClusterMetadata.php @@ -0,0 +1,270 @@ +temporal.api.operatorservice.v1.ClusterMetadata + */ +class ClusterMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the cluster name. + * + * Generated from protobuf field string cluster_name = 1; + */ + protected $cluster_name = ''; + /** + * Id of the cluster. + * + * Generated from protobuf field string cluster_id = 2; + */ + protected $cluster_id = ''; + /** + * gRPC address. + * + * Generated from protobuf field string address = 3; + */ + protected $address = ''; + /** + * HTTP address, if one exists. + * + * Generated from protobuf field string http_address = 7; + */ + protected $http_address = ''; + /** + * A unique failover version across all connected clusters. + * + * Generated from protobuf field int64 initial_failover_version = 4; + */ + protected $initial_failover_version = 0; + /** + * History service shard number. + * + * Generated from protobuf field int32 history_shard_count = 5; + */ + protected $history_shard_count = 0; + /** + * A flag to indicate if a connection is active. + * + * Generated from protobuf field bool is_connection_enabled = 6; + */ + protected $is_connection_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_name + * Name of the cluster name. + * @type string $cluster_id + * Id of the cluster. + * @type string $address + * gRPC address. + * @type string $http_address + * HTTP address, if one exists. + * @type int|string $initial_failover_version + * A unique failover version across all connected clusters. + * @type int $history_shard_count + * History service shard number. + * @type bool $is_connection_enabled + * A flag to indicate if a connection is active. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Name of the cluster name. + * + * Generated from protobuf field string cluster_name = 1; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * Name of the cluster name. + * + * Generated from protobuf field string cluster_name = 1; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * Id of the cluster. + * + * Generated from protobuf field string cluster_id = 2; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Id of the cluster. + * + * Generated from protobuf field string cluster_id = 2; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * gRPC address. + * + * Generated from protobuf field string address = 3; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * gRPC address. + * + * Generated from protobuf field string address = 3; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * HTTP address, if one exists. + * + * Generated from protobuf field string http_address = 7; + * @return string + */ + public function getHttpAddress() + { + return $this->http_address; + } + + /** + * HTTP address, if one exists. + * + * Generated from protobuf field string http_address = 7; + * @param string $var + * @return $this + */ + public function setHttpAddress($var) + { + GPBUtil::checkString($var, True); + $this->http_address = $var; + + return $this; + } + + /** + * A unique failover version across all connected clusters. + * + * Generated from protobuf field int64 initial_failover_version = 4; + * @return int|string + */ + public function getInitialFailoverVersion() + { + return $this->initial_failover_version; + } + + /** + * A unique failover version across all connected clusters. + * + * Generated from protobuf field int64 initial_failover_version = 4; + * @param int|string $var + * @return $this + */ + public function setInitialFailoverVersion($var) + { + GPBUtil::checkInt64($var); + $this->initial_failover_version = $var; + + return $this; + } + + /** + * History service shard number. + * + * Generated from protobuf field int32 history_shard_count = 5; + * @return int + */ + public function getHistoryShardCount() + { + return $this->history_shard_count; + } + + /** + * History service shard number. + * + * Generated from protobuf field int32 history_shard_count = 5; + * @param int $var + * @return $this + */ + public function setHistoryShardCount($var) + { + GPBUtil::checkInt32($var); + $this->history_shard_count = $var; + + return $this; + } + + /** + * A flag to indicate if a connection is active. + * + * Generated from protobuf field bool is_connection_enabled = 6; + * @return bool + */ + public function getIsConnectionEnabled() + { + return $this->is_connection_enabled; + } + + /** + * A flag to indicate if a connection is active. + * + * Generated from protobuf field bool is_connection_enabled = 6; + * @param bool $var + * @return $this + */ + public function setIsConnectionEnabled($var) + { + GPBUtil::checkBool($var); + $this->is_connection_enabled = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusEndpointRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusEndpointRequest.php new file mode 100644 index 0000000..84bf576 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusEndpointRequest.php @@ -0,0 +1,76 @@ +temporal.api.operatorservice.v1.CreateNexusEndpointRequest + */ +class CreateNexusEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Endpoint definition to create. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 1; + */ + protected $spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\EndpointSpec $spec + * Endpoint definition to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Endpoint definition to create. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 1; + * @return \Temporal\Api\Nexus\V1\EndpointSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Endpoint definition to create. + * + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 1; + * @param \Temporal\Api\Nexus\V1\EndpointSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\EndpointSpec::class); + $this->spec = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusEndpointResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusEndpointResponse.php new file mode 100644 index 0000000..41e1f10 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusEndpointResponse.php @@ -0,0 +1,76 @@ +temporal.api.operatorservice.v1.CreateNexusEndpointResponse + */ +class CreateNexusEndpointResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + */ + protected $endpoint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\Endpoint $endpoint + * Data post acceptance. Can be used to issue additional updates to this record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + * @return \Temporal\Api\Nexus\V1\Endpoint|null + */ + public function getEndpoint() + { + return $this->endpoint; + } + + public function hasEndpoint() + { + return isset($this->endpoint); + } + + public function clearEndpoint() + { + unset($this->endpoint); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + * @param \Temporal\Api\Nexus\V1\Endpoint $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Endpoint::class); + $this->endpoint = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusIncomingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusIncomingServiceRequest.php new file mode 100644 index 0000000..9b6cf2d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusIncomingServiceRequest.php @@ -0,0 +1,75 @@ +temporal.api.operatorservice.v1.CreateNexusIncomingServiceRequest + */ +class CreateNexusIncomingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Service definition to create. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 1; + */ + protected $spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\IncomingServiceSpec $spec + * Service definition to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Service definition to create. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 1; + * @return \Temporal\Api\Nexus\V1\IncomingServiceSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Service definition to create. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 1; + * @param \Temporal\Api\Nexus\V1\IncomingServiceSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingServiceSpec::class); + $this->spec = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusIncomingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusIncomingServiceResponse.php new file mode 100644 index 0000000..42722d7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusIncomingServiceResponse.php @@ -0,0 +1,75 @@ +temporal.api.operatorservice.v1.CreateNexusIncomingServiceResponse + */ +class CreateNexusIncomingServiceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\IncomingService $service + * Data post acceptance. Can be used to issue additional updates to this record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @return \Temporal\Api\Nexus\V1\IncomingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @param \Temporal\Api\Nexus\V1\IncomingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusOutgoingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusOutgoingServiceRequest.php new file mode 100644 index 0000000..cd1a70a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusOutgoingServiceRequest.php @@ -0,0 +1,143 @@ +temporal.api.operatorservice.v1.CreateNexusOutgoingServiceRequest + */ +class CreateNexusOutgoingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace to create this service definition in. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Name of service to create. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Service definition to create. Does not contain a version because there's nothing to match against. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 3; + */ + protected $spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace to create this service definition in. + * @type string $name + * Name of service to create. + * @type \Temporal\Api\Nexus\V1\OutgoingServiceSpec $spec + * Service definition to create. Does not contain a version because there's nothing to match against. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace to create this service definition in. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace to create this service definition in. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Name of service to create. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of service to create. + * + * 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; + } + + /** + * Service definition to create. Does not contain a version because there's nothing to match against. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 3; + * @return \Temporal\Api\Nexus\V1\OutgoingServiceSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Service definition to create. Does not contain a version because there's nothing to match against. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 3; + * @param \Temporal\Api\Nexus\V1\OutgoingServiceSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\OutgoingServiceSpec::class); + $this->spec = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusOutgoingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusOutgoingServiceResponse.php new file mode 100644 index 0000000..7645c22 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateNexusOutgoingServiceResponse.php @@ -0,0 +1,75 @@ +temporal.api.operatorservice.v1.CreateNexusOutgoingServiceResponse + */ +class CreateNexusOutgoingServiceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\OutgoingService $service + * Data post acceptance. Can be used to issue additional updates to this record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + * @return \Temporal\Api\Nexus\V1\OutgoingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + * @param \Temporal\Api\Nexus\V1\OutgoingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\OutgoingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateOrUpdateNexusIncomingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateOrUpdateNexusIncomingServiceRequest.php new file mode 100644 index 0000000..00c1993 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateOrUpdateNexusIncomingServiceRequest.php @@ -0,0 +1,68 @@ +temporal.api.operatorservice.v1.CreateOrUpdateNexusIncomingServiceRequest + */ +class CreateOrUpdateNexusIncomingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\IncomingService $service + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @return \Temporal\Api\Nexus\V1\IncomingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @param \Temporal\Api\Nexus\V1\IncomingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateOrUpdateNexusIncomingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateOrUpdateNexusIncomingServiceResponse.php new file mode 100644 index 0000000..e0363c2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/CreateOrUpdateNexusIncomingServiceResponse.php @@ -0,0 +1,75 @@ +temporal.api.operatorservice.v1.CreateOrUpdateNexusIncomingServiceResponse + */ +class CreateOrUpdateNexusIncomingServiceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\IncomingService $service + * Data post acceptance. Can be used to issue additional updates to this record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @return \Temporal\Api\Nexus\V1\IncomingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @param \Temporal\Api\Nexus\V1\IncomingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNamespaceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNamespaceRequest.php new file mode 100644 index 0000000..f3a7bd5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNamespaceRequest.php @@ -0,0 +1,141 @@ +temporal.api.operatorservice.v1.DeleteNamespaceRequest + */ +class DeleteNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Only one of namespace or namespace_id must be specified to identify namespace. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string namespace_id = 2; + */ + protected $namespace_id = ''; + /** + * If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). + * If not provided, the default delay configured in the cluster will be used. + * + * Generated from protobuf field .google.protobuf.Duration namespace_delete_delay = 3; + */ + protected $namespace_delete_delay = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Only one of namespace or namespace_id must be specified to identify namespace. + * @type string $namespace_id + * @type \Google\Protobuf\Duration $namespace_delete_delay + * If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). + * If not provided, the default delay configured in the cluster will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Only one of namespace or namespace_id must be specified to identify namespace. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Only one of namespace or namespace_id must be specified to identify namespace. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace_id = 2; + * @return string + */ + public function getNamespaceId() + { + return $this->namespace_id; + } + + /** + * Generated from protobuf field string namespace_id = 2; + * @param string $var + * @return $this + */ + public function setNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->namespace_id = $var; + + return $this; + } + + /** + * If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). + * If not provided, the default delay configured in the cluster will be used. + * + * Generated from protobuf field .google.protobuf.Duration namespace_delete_delay = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getNamespaceDeleteDelay() + { + return $this->namespace_delete_delay; + } + + public function hasNamespaceDeleteDelay() + { + return isset($this->namespace_delete_delay); + } + + public function clearNamespaceDeleteDelay() + { + unset($this->namespace_delete_delay); + } + + /** + * If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). + * If not provided, the default delay configured in the cluster will be used. + * + * Generated from protobuf field .google.protobuf.Duration namespace_delete_delay = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setNamespaceDeleteDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->namespace_delete_delay = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNamespaceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNamespaceResponse.php new file mode 100644 index 0000000..98c1843 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNamespaceResponse.php @@ -0,0 +1,66 @@ +temporal.api.operatorservice.v1.DeleteNamespaceResponse + */ +class DeleteNamespaceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Temporary namespace name that is used during reclaim resources step. + * + * Generated from protobuf field string deleted_namespace = 1; + */ + protected $deleted_namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $deleted_namespace + * Temporary namespace name that is used during reclaim resources step. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Temporary namespace name that is used during reclaim resources step. + * + * Generated from protobuf field string deleted_namespace = 1; + * @return string + */ + public function getDeletedNamespace() + { + return $this->deleted_namespace; + } + + /** + * Temporary namespace name that is used during reclaim resources step. + * + * Generated from protobuf field string deleted_namespace = 1; + * @param string $var + * @return $this + */ + public function setDeletedNamespace($var) + { + GPBUtil::checkString($var, True); + $this->deleted_namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusEndpointRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusEndpointRequest.php new file mode 100644 index 0000000..bb478b1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusEndpointRequest.php @@ -0,0 +1,100 @@ +temporal.api.operatorservice.v1.DeleteNexusEndpointRequest + */ +class DeleteNexusEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Server-generated unique endpoint ID. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Data version for this endpoint. Must match current version. + * + * Generated from protobuf field int64 version = 2; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Server-generated unique endpoint ID. + * @type int|string $version + * Data version for this endpoint. Must match current version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server-generated unique endpoint ID. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Server-generated unique endpoint ID. + * + * 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; + } + + /** + * Data version for this endpoint. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Data version for this endpoint. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusEndpointResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusEndpointResponse.php new file mode 100644 index 0000000..57241e3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusEndpointResponse.php @@ -0,0 +1,32 @@ +temporal.api.operatorservice.v1.DeleteNexusEndpointResponse + */ +class DeleteNexusEndpointResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusIncomingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusIncomingServiceRequest.php new file mode 100644 index 0000000..300c21c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusIncomingServiceRequest.php @@ -0,0 +1,99 @@ +temporal.api.operatorservice.v1.DeleteNexusIncomingServiceRequest + */ +class DeleteNexusIncomingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Server-generated unique service ID. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Data version for this service. Must match current version. + * + * Generated from protobuf field int64 version = 2; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Server-generated unique service ID. + * @type int|string $version + * Data version for this service. Must match current version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server-generated unique service ID. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Server-generated unique service ID. + * + * 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; + } + + /** + * Data version for this service. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Data version for this service. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusIncomingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusIncomingServiceResponse.php new file mode 100644 index 0000000..8ea90b5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusIncomingServiceResponse.php @@ -0,0 +1,31 @@ +temporal.api.operatorservice.v1.DeleteNexusIncomingServiceResponse + */ +class DeleteNexusIncomingServiceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusOutgoingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusOutgoingServiceRequest.php new file mode 100644 index 0000000..ede2a47 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusOutgoingServiceRequest.php @@ -0,0 +1,99 @@ +temporal.api.operatorservice.v1.DeleteNexusOutgoingServiceRequest + */ +class DeleteNexusOutgoingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace that contains this outgoing service definition. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Name of service to delete. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace that contains this outgoing service definition. + * @type string $name + * Name of service to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace that contains this outgoing service definition. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace that contains this outgoing service definition. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Name of service to delete. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of service to delete. + * + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusOutgoingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusOutgoingServiceResponse.php new file mode 100644 index 0000000..f243ee3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/DeleteNexusOutgoingServiceResponse.php @@ -0,0 +1,31 @@ +temporal.api.operatorservice.v1.DeleteNexusOutgoingServiceResponse + */ +class DeleteNexusOutgoingServiceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusEndpointRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusEndpointRequest.php new file mode 100644 index 0000000..e88fe18 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusEndpointRequest.php @@ -0,0 +1,66 @@ +temporal.api.operatorservice.v1.GetNexusEndpointRequest + */ +class GetNexusEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Server-generated unique endpoint ID. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Server-generated unique endpoint ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server-generated unique endpoint ID. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Server-generated unique endpoint ID. + * + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusEndpointResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusEndpointResponse.php new file mode 100644 index 0000000..76b01a3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusEndpointResponse.php @@ -0,0 +1,69 @@ +temporal.api.operatorservice.v1.GetNexusEndpointResponse + */ +class GetNexusEndpointResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + */ + protected $endpoint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\Endpoint $endpoint + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + * @return \Temporal\Api\Nexus\V1\Endpoint|null + */ + public function getEndpoint() + { + return $this->endpoint; + } + + public function hasEndpoint() + { + return isset($this->endpoint); + } + + public function clearEndpoint() + { + unset($this->endpoint); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + * @param \Temporal\Api\Nexus\V1\Endpoint $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Endpoint::class); + $this->endpoint = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusIncomingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusIncomingServiceRequest.php new file mode 100644 index 0000000..fe389f6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusIncomingServiceRequest.php @@ -0,0 +1,65 @@ +temporal.api.operatorservice.v1.GetNexusIncomingServiceRequest + */ +class GetNexusIncomingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Server-generated unique service ID. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Server-generated unique service ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server-generated unique service ID. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Server-generated unique service ID. + * + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusIncomingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusIncomingServiceResponse.php new file mode 100644 index 0000000..b860d9b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusIncomingServiceResponse.php @@ -0,0 +1,68 @@ +temporal.api.operatorservice.v1.GetNexusIncomingServiceResponse + */ +class GetNexusIncomingServiceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\IncomingService $service + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @return \Temporal\Api\Nexus\V1\IncomingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @param \Temporal\Api\Nexus\V1\IncomingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusOutgoingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusOutgoingServiceRequest.php new file mode 100644 index 0000000..a790cf4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusOutgoingServiceRequest.php @@ -0,0 +1,99 @@ +temporal.api.operatorservice.v1.GetNexusOutgoingServiceRequest + */ +class GetNexusOutgoingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace that contains this outgoing service definition. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Name of service to retrieve. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace that contains this outgoing service definition. + * @type string $name + * Name of service to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace that contains this outgoing service definition. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace that contains this outgoing service definition. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Name of service to retrieve. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of service to retrieve. + * + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusOutgoingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusOutgoingServiceResponse.php new file mode 100644 index 0000000..7d0d94b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/GetNexusOutgoingServiceResponse.php @@ -0,0 +1,68 @@ +temporal.api.operatorservice.v1.GetNexusOutgoingServiceResponse + */ +class GetNexusOutgoingServiceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\OutgoingService $service + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + * @return \Temporal\Api\Nexus\V1\OutgoingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + * @param \Temporal\Api\Nexus\V1\OutgoingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\OutgoingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListClustersRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListClustersRequest.php new file mode 100644 index 0000000..fda321b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListClustersRequest.php @@ -0,0 +1,86 @@ +temporal.api.operatorservice.v1.ListClustersRequest + */ +class ListClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 page_size = 1; + */ + protected $page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListClustersResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListClustersResponse.php new file mode 100644 index 0000000..c071053 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListClustersResponse.php @@ -0,0 +1,93 @@ +temporal.api.operatorservice.v1.ListClustersResponse + */ +class ListClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of all cluster information + * + * Generated from protobuf field repeated .temporal.api.operatorservice.v1.ClusterMetadata clusters = 1; + */ + private $clusters; + /** + * Generated from protobuf field bytes next_page_token = 4; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Operatorservice\V1\ClusterMetadata>|\Google\Protobuf\Internal\RepeatedField $clusters + * List of all cluster information + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * List of all cluster information + * + * Generated from protobuf field repeated .temporal.api.operatorservice.v1.ClusterMetadata clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * List of all cluster information + * + * Generated from protobuf field repeated .temporal.api.operatorservice.v1.ClusterMetadata clusters = 1; + * @param array<\Temporal\Api\Operatorservice\V1\ClusterMetadata>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Operatorservice\V1\ClusterMetadata::class); + $this->clusters = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 4; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 4; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusEndpointsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusEndpointsRequest.php new file mode 100644 index 0000000..d59663c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusEndpointsRequest.php @@ -0,0 +1,143 @@ +temporal.api.operatorservice.v1.ListNexusEndpointsRequest + */ +class ListNexusEndpointsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 page_size = 1; + */ + protected $page_size = 0; + /** + * To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size. + * + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * @type string $next_page_token + * To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size. + * @type string $name + * Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size. + * + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size. + * + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field string name = 3; + * @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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusEndpointsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusEndpointsResponse.php new file mode 100644 index 0000000..3380843 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusEndpointsResponse.php @@ -0,0 +1,93 @@ +temporal.api.operatorservice.v1.ListNexusEndpointsResponse + */ +class ListNexusEndpointsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 1; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field repeated .temporal.api.nexus.v1.Endpoint endpoints = 2; + */ + private $endpoints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $next_page_token + * Token for getting the next page. + * @type array<\Temporal\Api\Nexus\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 1; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 1; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.nexus.v1.Endpoint endpoints = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndpoints() + { + return $this->endpoints; + } + + /** + * Generated from protobuf field repeated .temporal.api.nexus.v1.Endpoint endpoints = 2; + * @param array<\Temporal\Api\Nexus\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Nexus\V1\Endpoint::class); + $this->endpoints = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusIncomingServicesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusIncomingServicesRequest.php new file mode 100644 index 0000000..4ebfcaa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusIncomingServicesRequest.php @@ -0,0 +1,142 @@ +temporal.api.operatorservice.v1.ListNexusIncomingServicesRequest + */ +class ListNexusIncomingServicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 page_size = 1; + */ + protected $page_size = 0; + /** + * To get the next page, pass in `ListNexusIncomingServicesResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of services registered is a multiple of the page size. + * + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Name of the incoming service to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * @type string $next_page_token + * To get the next page, pass in `ListNexusIncomingServicesResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of services registered is a multiple of the page size. + * @type string $name + * Name of the incoming service to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * To get the next page, pass in `ListNexusIncomingServicesResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of services registered is a multiple of the page size. + * + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * To get the next page, pass in `ListNexusIncomingServicesResponse.next_page_token` from the previous page's + * response, the token will be empty if there's no other page. + * Note: the last page may be empty if the total number of services registered is a multiple of the page size. + * + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Name of the incoming service to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the incoming service to filter on - optional. Specifying this will result in zero or one results. + * (-- api-linter: core::203::field-behavior-required=disabled + * aip.dev/not-precedent: Not following linter rules. --) + * + * Generated from protobuf field string name = 3; + * @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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusIncomingServicesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusIncomingServicesResponse.php new file mode 100644 index 0000000..79a49c1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusIncomingServicesResponse.php @@ -0,0 +1,92 @@ +temporal.api.operatorservice.v1.ListNexusIncomingServicesResponse + */ +class ListNexusIncomingServicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 1; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field repeated .temporal.api.nexus.v1.IncomingService services = 2; + */ + private $services; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $next_page_token + * Token for getting the next page. + * @type array<\Temporal\Api\Nexus\V1\IncomingService>|\Google\Protobuf\Internal\RepeatedField $services + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 1; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 1; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.nexus.v1.IncomingService services = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServices() + { + return $this->services; + } + + /** + * Generated from protobuf field repeated .temporal.api.nexus.v1.IncomingService services = 2; + * @param array<\Temporal\Api\Nexus\V1\IncomingService>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Nexus\V1\IncomingService::class); + $this->services = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusOutgoingServicesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusOutgoingServicesRequest.php new file mode 100644 index 0000000..52e013a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusOutgoingServicesRequest.php @@ -0,0 +1,133 @@ +temporal.api.operatorservice.v1.ListNexusOutgoingServicesRequest + */ +class ListNexusOutgoingServicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace to scope the list request to. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Maximum number of services to return in a single page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Pass in the next_page_token from the previous response here. + * + * Generated from protobuf field bytes page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace to scope the list request to. + * @type int $page_size + * Maximum number of services to return in a single page. + * @type string $page_token + * Pass in the next_page_token from the previous response here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace to scope the list request to. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace to scope the list request to. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Maximum number of services to return in a single page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of services to return in a single page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Pass in the next_page_token from the previous response here. + * + * Generated from protobuf field bytes page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Pass in the next_page_token from the previous response here. + * + * Generated from protobuf field bytes page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, False); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusOutgoingServicesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusOutgoingServicesResponse.php new file mode 100644 index 0000000..67a3d21 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListNexusOutgoingServicesResponse.php @@ -0,0 +1,99 @@ +temporal.api.operatorservice.v1.ListNexusOutgoingServicesResponse + */ +class ListNexusOutgoingServicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of services in the namespace for the requested page. + * + * Generated from protobuf field repeated .temporal.api.nexus.v1.OutgoingService services = 1; + */ + private $services; + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Nexus\V1\OutgoingService>|\Google\Protobuf\Internal\RepeatedField $services + * List of services in the namespace for the requested page. + * @type string $next_page_token + * Token for getting the next page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * List of services in the namespace for the requested page. + * + * Generated from protobuf field repeated .temporal.api.nexus.v1.OutgoingService services = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServices() + { + return $this->services; + } + + /** + * List of services in the namespace for the requested page. + * + * Generated from protobuf field repeated .temporal.api.nexus.v1.OutgoingService services = 1; + * @param array<\Temporal\Api\Nexus\V1\OutgoingService>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Nexus\V1\OutgoingService::class); + $this->services = $arr; + + return $this; + } + + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token for getting the next page. + * + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListSearchAttributesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListSearchAttributesRequest.php new file mode 100644 index 0000000..12be191 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListSearchAttributesRequest.php @@ -0,0 +1,59 @@ +temporal.api.operatorservice.v1.ListSearchAttributesRequest + */ +class ListSearchAttributesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListSearchAttributesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListSearchAttributesResponse.php new file mode 100644 index 0000000..6e7f9ae --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/ListSearchAttributesResponse.php @@ -0,0 +1,134 @@ +temporal.api.operatorservice.v1.ListSearchAttributesResponse + */ +class ListSearchAttributesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Mapping between custom (user-registered) search attribute name to its IndexedValueType. + * + * Generated from protobuf field map custom_attributes = 1; + */ + private $custom_attributes; + /** + * Mapping between system (predefined) search attribute name to its IndexedValueType. + * + * Generated from protobuf field map system_attributes = 2; + */ + private $system_attributes; + /** + * Mapping from the attribute name to the visibility storage native type. + * + * Generated from protobuf field map storage_schema = 3; + */ + private $storage_schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $custom_attributes + * Mapping between custom (user-registered) search attribute name to its IndexedValueType. + * @type array|\Google\Protobuf\Internal\MapField $system_attributes + * Mapping between system (predefined) search attribute name to its IndexedValueType. + * @type array|\Google\Protobuf\Internal\MapField $storage_schema + * Mapping from the attribute name to the visibility storage native type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Mapping between custom (user-registered) search attribute name to its IndexedValueType. + * + * Generated from protobuf field map custom_attributes = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCustomAttributes() + { + return $this->custom_attributes; + } + + /** + * Mapping between custom (user-registered) search attribute name to its IndexedValueType. + * + * Generated from protobuf field map custom_attributes = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCustomAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\IndexedValueType::class); + $this->custom_attributes = $arr; + + return $this; + } + + /** + * Mapping between system (predefined) search attribute name to its IndexedValueType. + * + * Generated from protobuf field map system_attributes = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSystemAttributes() + { + return $this->system_attributes; + } + + /** + * Mapping between system (predefined) search attribute name to its IndexedValueType. + * + * Generated from protobuf field map system_attributes = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSystemAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\IndexedValueType::class); + $this->system_attributes = $arr; + + return $this; + } + + /** + * Mapping from the attribute name to the visibility storage native type. + * + * Generated from protobuf field map storage_schema = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getStorageSchema() + { + return $this->storage_schema; + } + + /** + * Mapping from the attribute name to the visibility storage native type. + * + * Generated from protobuf field map storage_schema = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setStorageSchema($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->storage_schema = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/OperatorServiceClient.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/OperatorServiceClient.php new file mode 100644 index 0000000..1eaf3ce --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/OperatorServiceClient.php @@ -0,0 +1,240 @@ +_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/AddSearchAttributes', + $argument, + ['\Temporal\Api\Operatorservice\V1\AddSearchAttributesResponse', 'decode'], + $metadata, $options); + } + + /** + * RemoveSearchAttributes removes custom search attributes. + * + * Returns NOT_FOUND status code if a Search Attribute with any of the specified names is not registered + * @param \Temporal\Api\Operatorservice\V1\RemoveSearchAttributesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RemoveSearchAttributes(\Temporal\Api\Operatorservice\V1\RemoveSearchAttributesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/RemoveSearchAttributes', + $argument, + ['\Temporal\Api\Operatorservice\V1\RemoveSearchAttributesResponse', 'decode'], + $metadata, $options); + } + + /** + * ListSearchAttributes returns comprehensive information about search attributes. + * @param \Temporal\Api\Operatorservice\V1\ListSearchAttributesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListSearchAttributes(\Temporal\Api\Operatorservice\V1\ListSearchAttributesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/ListSearchAttributes', + $argument, + ['\Temporal\Api\Operatorservice\V1\ListSearchAttributesResponse', 'decode'], + $metadata, $options); + } + + /** + * DeleteNamespace synchronously deletes a namespace and asynchronously reclaims all namespace resources. + * @param \Temporal\Api\Operatorservice\V1\DeleteNamespaceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteNamespace(\Temporal\Api\Operatorservice\V1\DeleteNamespaceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/DeleteNamespace', + $argument, + ['\Temporal\Api\Operatorservice\V1\DeleteNamespaceResponse', 'decode'], + $metadata, $options); + } + + /** + * AddOrUpdateRemoteCluster adds or updates remote cluster. + * @param \Temporal\Api\Operatorservice\V1\AddOrUpdateRemoteClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AddOrUpdateRemoteCluster(\Temporal\Api\Operatorservice\V1\AddOrUpdateRemoteClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/AddOrUpdateRemoteCluster', + $argument, + ['\Temporal\Api\Operatorservice\V1\AddOrUpdateRemoteClusterResponse', 'decode'], + $metadata, $options); + } + + /** + * RemoveRemoteCluster removes remote cluster. + * @param \Temporal\Api\Operatorservice\V1\RemoveRemoteClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RemoveRemoteCluster(\Temporal\Api\Operatorservice\V1\RemoveRemoteClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/RemoveRemoteCluster', + $argument, + ['\Temporal\Api\Operatorservice\V1\RemoveRemoteClusterResponse', 'decode'], + $metadata, $options); + } + + /** + * ListClusters returns information about Temporal clusters. + * @param \Temporal\Api\Operatorservice\V1\ListClustersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListClusters(\Temporal\Api\Operatorservice\V1\ListClustersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/ListClusters', + $argument, + ['\Temporal\Api\Operatorservice\V1\ListClustersResponse', 'decode'], + $metadata, $options); + } + + /** + * Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates. + * @param \Temporal\Api\Operatorservice\V1\GetNexusEndpointRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetNexusEndpoint(\Temporal\Api\Operatorservice\V1\GetNexusEndpointRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/GetNexusEndpoint', + $argument, + ['\Temporal\Api\Operatorservice\V1\GetNexusEndpointResponse', 'decode'], + $metadata, $options); + } + + /** + * Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of + * ALREADY_EXISTS. + * Returns the created endpoint with its initial version. You may use this version for subsequent updates. + * @param \Temporal\Api\Operatorservice\V1\CreateNexusEndpointRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateNexusEndpoint(\Temporal\Api\Operatorservice\V1\CreateNexusEndpointRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/CreateNexusEndpoint', + $argument, + ['\Temporal\Api\Operatorservice\V1\CreateNexusEndpointResponse', 'decode'], + $metadata, $options); + } + + /** + * Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or + * `ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not + * match. + * Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't + * need to increment the version yourself. The server will increment the version for you after each update. + * @param \Temporal\Api\Operatorservice\V1\UpdateNexusEndpointRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateNexusEndpoint(\Temporal\Api\Operatorservice\V1\UpdateNexusEndpointRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/UpdateNexusEndpoint', + $argument, + ['\Temporal\Api\Operatorservice\V1\UpdateNexusEndpointResponse', 'decode'], + $metadata, $options); + } + + /** + * Delete an incoming Nexus service by ID. + * @param \Temporal\Api\Operatorservice\V1\DeleteNexusEndpointRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteNexusEndpoint(\Temporal\Api\Operatorservice\V1\DeleteNexusEndpointRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/DeleteNexusEndpoint', + $argument, + ['\Temporal\Api\Operatorservice\V1\DeleteNexusEndpointResponse', 'decode'], + $metadata, $options); + } + + /** + * List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the + * next_page_token field of the previous response to get the next page of results. An empty next_page_token + * indicates that there are no more results. During pagination, a newly added service with an ID lexicographically + * earlier than the previous page's last endpoint's ID may be missed. + * @param \Temporal\Api\Operatorservice\V1\ListNexusEndpointsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNexusEndpoints(\Temporal\Api\Operatorservice\V1\ListNexusEndpointsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.operatorservice.v1.OperatorService/ListNexusEndpoints', + $argument, + ['\Temporal\Api\Operatorservice\V1\ListNexusEndpointsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveRemoteClusterRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveRemoteClusterRequest.php new file mode 100644 index 0000000..2ccaee5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveRemoteClusterRequest.php @@ -0,0 +1,66 @@ +temporal.api.operatorservice.v1.RemoveRemoteClusterRequest + */ +class RemoveRemoteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Remote cluster name to be removed. + * + * Generated from protobuf field string cluster_name = 1; + */ + protected $cluster_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_name + * Remote cluster name to be removed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Remote cluster name to be removed. + * + * Generated from protobuf field string cluster_name = 1; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * Remote cluster name to be removed. + * + * Generated from protobuf field string cluster_name = 1; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveRemoteClusterResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveRemoteClusterResponse.php new file mode 100644 index 0000000..6414548 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveRemoteClusterResponse.php @@ -0,0 +1,32 @@ +temporal.api.operatorservice.v1.RemoveRemoteClusterResponse + */ +class RemoveRemoteClusterResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveSearchAttributesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveSearchAttributesRequest.php new file mode 100644 index 0000000..df8c484 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveSearchAttributesRequest.php @@ -0,0 +1,93 @@ +temporal.api.operatorservice.v1.RemoveSearchAttributesRequest + */ +class RemoveSearchAttributesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Search attribute names to delete. + * + * Generated from protobuf field repeated string search_attributes = 1; + */ + private $search_attributes; + /** + * Generated from protobuf field string namespace = 2; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $search_attributes + * Search attribute names to delete. + * @type string $namespace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Search attribute names to delete. + * + * Generated from protobuf field repeated string search_attributes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + /** + * Search attribute names to delete. + * + * Generated from protobuf field repeated string search_attributes = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSearchAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->search_attributes = $arr; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 2; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 2; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveSearchAttributesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveSearchAttributesResponse.php new file mode 100644 index 0000000..5ebe28f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/RemoveSearchAttributesResponse.php @@ -0,0 +1,32 @@ +temporal.api.operatorservice.v1.RemoveSearchAttributesResponse + */ +class RemoveSearchAttributesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusEndpointRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusEndpointRequest.php new file mode 100644 index 0000000..2b44676 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusEndpointRequest.php @@ -0,0 +1,137 @@ +temporal.api.operatorservice.v1.UpdateNexusEndpointRequest + */ +class UpdateNexusEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Server-generated unique endpoint ID. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Data version for this endpoint. Must match current version. + * + * Generated from protobuf field int64 version = 2; + */ + protected $version = 0; + /** + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 3; + */ + protected $spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Server-generated unique endpoint ID. + * @type int|string $version + * Data version for this endpoint. Must match current version. + * @type \Temporal\Api\Nexus\V1\EndpointSpec $spec + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server-generated unique endpoint ID. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Server-generated unique endpoint ID. + * + * 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; + } + + /** + * Data version for this endpoint. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Data version for this endpoint. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 3; + * @return \Temporal\Api\Nexus\V1\EndpointSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.EndpointSpec spec = 3; + * @param \Temporal\Api\Nexus\V1\EndpointSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\EndpointSpec::class); + $this->spec = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusEndpointResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusEndpointResponse.php new file mode 100644 index 0000000..51845ba --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusEndpointResponse.php @@ -0,0 +1,76 @@ +temporal.api.operatorservice.v1.UpdateNexusEndpointResponse + */ +class UpdateNexusEndpointResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + */ + protected $endpoint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\Endpoint $endpoint + * Data post acceptance. Can be used to issue additional updates to this record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + * @return \Temporal\Api\Nexus\V1\Endpoint|null + */ + public function getEndpoint() + { + return $this->endpoint; + } + + public function hasEndpoint() + { + return isset($this->endpoint); + } + + public function clearEndpoint() + { + unset($this->endpoint); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.Endpoint endpoint = 1; + * @param \Temporal\Api\Nexus\V1\Endpoint $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Endpoint::class); + $this->endpoint = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusIncomingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusIncomingServiceRequest.php new file mode 100644 index 0000000..c941e0a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusIncomingServiceRequest.php @@ -0,0 +1,136 @@ +temporal.api.operatorservice.v1.UpdateNexusIncomingServiceRequest + */ +class UpdateNexusIncomingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Server-generated unique service ID. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Data version for this service. Must match current version. + * + * Generated from protobuf field int64 version = 2; + */ + protected $version = 0; + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 3; + */ + protected $spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Server-generated unique service ID. + * @type int|string $version + * Data version for this service. Must match current version. + * @type \Temporal\Api\Nexus\V1\IncomingServiceSpec $spec + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server-generated unique service ID. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Server-generated unique service ID. + * + * 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; + } + + /** + * Data version for this service. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Data version for this service. Must match current version. + * + * Generated from protobuf field int64 version = 2; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 3; + * @return \Temporal\Api\Nexus\V1\IncomingServiceSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Generated from protobuf field .temporal.api.nexus.v1.IncomingServiceSpec spec = 3; + * @param \Temporal\Api\Nexus\V1\IncomingServiceSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingServiceSpec::class); + $this->spec = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusIncomingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusIncomingServiceResponse.php new file mode 100644 index 0000000..fd63bcb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusIncomingServiceResponse.php @@ -0,0 +1,75 @@ +temporal.api.operatorservice.v1.UpdateNexusIncomingServiceResponse + */ +class UpdateNexusIncomingServiceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\IncomingService $service + * Data post acceptance. Can be used to issue additional updates to this record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @return \Temporal\Api\Nexus\V1\IncomingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.IncomingService service = 1; + * @param \Temporal\Api\Nexus\V1\IncomingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\IncomingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusOutgoingServiceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusOutgoingServiceRequest.php new file mode 100644 index 0000000..b33efda --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusOutgoingServiceRequest.php @@ -0,0 +1,177 @@ +temporal.api.operatorservice.v1.UpdateNexusOutgoingServiceRequest + */ +class UpdateNexusOutgoingServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace to find and update this service definition in. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Service name, unique for this namespace. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Version of the service definition to update. Must match the current version. + * + * Generated from protobuf field int64 version = 3; + */ + protected $version = 0; + /** + * What to update the service spec to. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 4; + */ + protected $spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace to find and update this service definition in. + * @type string $name + * Service name, unique for this namespace. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * @type int|string $version + * Version of the service definition to update. Must match the current version. + * @type \Temporal\Api\Nexus\V1\OutgoingServiceSpec $spec + * What to update the service spec to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace to find and update this service definition in. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace to find and update this service definition in. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Service name, unique for this namespace. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Service name, unique for this namespace. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. + * + * 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; + } + + /** + * Version of the service definition to update. Must match the current version. + * + * Generated from protobuf field int64 version = 3; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the service definition to update. Must match the current version. + * + * Generated from protobuf field int64 version = 3; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * What to update the service spec to. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 4; + * @return \Temporal\Api\Nexus\V1\OutgoingServiceSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * What to update the service spec to. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingServiceSpec spec = 4; + * @param \Temporal\Api\Nexus\V1\OutgoingServiceSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\OutgoingServiceSpec::class); + $this->spec = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusOutgoingServiceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusOutgoingServiceResponse.php new file mode 100644 index 0000000..6a53ee3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Operatorservice/V1/UpdateNexusOutgoingServiceResponse.php @@ -0,0 +1,75 @@ +temporal.api.operatorservice.v1.UpdateNexusOutgoingServiceResponse + */ +class UpdateNexusOutgoingServiceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + */ + protected $service = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Nexus\V1\OutgoingService $service + * Data post acceptance. Can be used to issue additional updates to this record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + * @return \Temporal\Api\Nexus\V1\OutgoingService|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Data post acceptance. Can be used to issue additional updates to this record. + * + * Generated from protobuf field .temporal.api.nexus.v1.OutgoingService service = 1; + * @param \Temporal\Api\Nexus\V1\OutgoingService $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\OutgoingService::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/BadBinaries.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/BadBinaries.php new file mode 100644 index 0000000..82d5ebf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/BadBinaries.php @@ -0,0 +1,59 @@ +temporal.api.namespace.v1.BadBinaries + */ +class BadBinaries extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map binaries = 1; + */ + private $binaries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $binaries + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map binaries = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getBinaries() + { + return $this->binaries; + } + + /** + * Generated from protobuf field map binaries = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setBinaries($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\PBNamespace\V1\BadBinaryInfo::class); + $this->binaries = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/BadBinaryInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/BadBinaryInfo.php new file mode 100644 index 0000000..30ba724 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/BadBinaryInfo.php @@ -0,0 +1,123 @@ +temporal.api.namespace.v1.BadBinaryInfo + */ +class BadBinaryInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string reason = 1; + */ + protected $reason = ''; + /** + * Generated from protobuf field string operator = 2; + */ + protected $operator = ''; + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reason + * @type string $operator + * @type \Google\Protobuf\Timestamp $create_time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string reason = 1; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string operator = 2; + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Generated from protobuf field string operator = 2; + * @param string $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkString($var, True); + $this->operator = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @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); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceConfig.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceConfig.php new file mode 100644 index 0000000..6ab69a5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceConfig.php @@ -0,0 +1,262 @@ +temporal.api.namespace.v1.NamespaceConfig + */ +class NamespaceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_retention_ttl = 1; + */ + protected $workflow_execution_retention_ttl = null; + /** + * Generated from protobuf field .temporal.api.namespace.v1.BadBinaries bad_binaries = 2; + */ + protected $bad_binaries = null; + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState history_archival_state = 3; + */ + protected $history_archival_state = 0; + /** + * Generated from protobuf field string history_archival_uri = 4; + */ + protected $history_archival_uri = ''; + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState visibility_archival_state = 5; + */ + protected $visibility_archival_state = 0; + /** + * Generated from protobuf field string visibility_archival_uri = 6; + */ + protected $visibility_archival_uri = ''; + /** + * Map from field name to alias. + * + * Generated from protobuf field map custom_search_attribute_aliases = 7; + */ + private $custom_search_attribute_aliases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $workflow_execution_retention_ttl + * @type \Temporal\Api\PBNamespace\V1\BadBinaries $bad_binaries + * @type int $history_archival_state + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * @type string $history_archival_uri + * @type int $visibility_archival_state + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * @type string $visibility_archival_uri + * @type array|\Google\Protobuf\Internal\MapField $custom_search_attribute_aliases + * Map from field name to alias. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_retention_ttl = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionRetentionTtl() + { + return $this->workflow_execution_retention_ttl; + } + + public function hasWorkflowExecutionRetentionTtl() + { + return isset($this->workflow_execution_retention_ttl); + } + + public function clearWorkflowExecutionRetentionTtl() + { + unset($this->workflow_execution_retention_ttl); + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_retention_ttl = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionRetentionTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_retention_ttl = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.BadBinaries bad_binaries = 2; + * @return \Temporal\Api\PBNamespace\V1\BadBinaries|null + */ + public function getBadBinaries() + { + return $this->bad_binaries; + } + + public function hasBadBinaries() + { + return isset($this->bad_binaries); + } + + public function clearBadBinaries() + { + unset($this->bad_binaries); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.BadBinaries bad_binaries = 2; + * @param \Temporal\Api\PBNamespace\V1\BadBinaries $var + * @return $this + */ + public function setBadBinaries($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\BadBinaries::class); + $this->bad_binaries = $var; + + return $this; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState history_archival_state = 3; + * @return int + */ + public function getHistoryArchivalState() + { + return $this->history_archival_state; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState history_archival_state = 3; + * @param int $var + * @return $this + */ + public function setHistoryArchivalState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ArchivalState::class); + $this->history_archival_state = $var; + + return $this; + } + + /** + * Generated from protobuf field string history_archival_uri = 4; + * @return string + */ + public function getHistoryArchivalUri() + { + return $this->history_archival_uri; + } + + /** + * Generated from protobuf field string history_archival_uri = 4; + * @param string $var + * @return $this + */ + public function setHistoryArchivalUri($var) + { + GPBUtil::checkString($var, True); + $this->history_archival_uri = $var; + + return $this; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState visibility_archival_state = 5; + * @return int + */ + public function getVisibilityArchivalState() + { + return $this->visibility_archival_state; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState visibility_archival_state = 5; + * @param int $var + * @return $this + */ + public function setVisibilityArchivalState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ArchivalState::class); + $this->visibility_archival_state = $var; + + return $this; + } + + /** + * Generated from protobuf field string visibility_archival_uri = 6; + * @return string + */ + public function getVisibilityArchivalUri() + { + return $this->visibility_archival_uri; + } + + /** + * Generated from protobuf field string visibility_archival_uri = 6; + * @param string $var + * @return $this + */ + public function setVisibilityArchivalUri($var) + { + GPBUtil::checkString($var, True); + $this->visibility_archival_uri = $var; + + return $this; + } + + /** + * Map from field name to alias. + * + * Generated from protobuf field map custom_search_attribute_aliases = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCustomSearchAttributeAliases() + { + return $this->custom_search_attribute_aliases; + } + + /** + * Map from field name to alias. + * + * Generated from protobuf field map custom_search_attribute_aliases = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCustomSearchAttributeAliases($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->custom_search_attribute_aliases = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceFilter.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceFilter.php new file mode 100644 index 0000000..7c039ca --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceFilter.php @@ -0,0 +1,74 @@ +temporal.api.namespace.v1.NamespaceFilter + */ +class NamespaceFilter extends \Google\Protobuf\Internal\Message +{ + /** + * By default namespaces in NAMESPACE_STATE_DELETED state are not included. + * Setting include_deleted to true will include deleted namespaces. + * Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet. + * + * Generated from protobuf field bool include_deleted = 1; + */ + protected $include_deleted = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $include_deleted + * By default namespaces in NAMESPACE_STATE_DELETED state are not included. + * Setting include_deleted to true will include deleted namespaces. + * Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * By default namespaces in NAMESPACE_STATE_DELETED state are not included. + * Setting include_deleted to true will include deleted namespaces. + * Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet. + * + * Generated from protobuf field bool include_deleted = 1; + * @return bool + */ + public function getIncludeDeleted() + { + return $this->include_deleted; + } + + /** + * By default namespaces in NAMESPACE_STATE_DELETED state are not included. + * Setting include_deleted to true will include deleted namespaces. + * Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet. + * + * Generated from protobuf field bool include_deleted = 1; + * @param bool $var + * @return $this + */ + public function setIncludeDeleted($var) + { + GPBUtil::checkBool($var); + $this->include_deleted = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceInfo.php new file mode 100644 index 0000000..09b1c47 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceInfo.php @@ -0,0 +1,283 @@ +temporal.api.namespace.v1.NamespaceInfo + */ +class NamespaceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 2; + */ + protected $state = 0; + /** + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Generated from protobuf field string owner_email = 4; + */ + protected $owner_email = ''; + /** + * A key-value map for any customized purpose. + * + * Generated from protobuf field map data = 5; + */ + private $data; + /** + * Generated from protobuf field string id = 6; + */ + protected $id = ''; + /** + * All capabilities the namespace supports. + * + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo.Capabilities capabilities = 7; + */ + protected $capabilities = null; + /** + * Whether scheduled workflows are supported on this namespace. This is only needed + * temporarily while the feature is experimental, so we can give it a high tag. + * + * Generated from protobuf field bool supports_schedules = 100; + */ + protected $supports_schedules = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * @type int $state + * @type string $description + * @type string $owner_email + * @type array|\Google\Protobuf\Internal\MapField $data + * A key-value map for any customized purpose. + * @type string $id + * @type \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities $capabilities + * All capabilities the namespace supports. + * @type bool $supports_schedules + * Whether scheduled workflows are supported on this namespace. This is only needed + * temporarily while the feature is experimental, so we can give it a high tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->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; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\NamespaceState::class); + $this->state = $var; + + return $this; + } + + /** + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string owner_email = 4; + * @return string + */ + public function getOwnerEmail() + { + return $this->owner_email; + } + + /** + * Generated from protobuf field string owner_email = 4; + * @param string $var + * @return $this + */ + public function setOwnerEmail($var) + { + GPBUtil::checkString($var, True); + $this->owner_email = $var; + + return $this; + } + + /** + * A key-value map for any customized purpose. + * + * Generated from protobuf field map data = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getData() + { + return $this->data; + } + + /** + * A key-value map for any customized purpose. + * + * Generated from protobuf field map data = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setData($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->data = $arr; + + return $this; + } + + /** + * Generated from protobuf field string id = 6; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 6; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * All capabilities the namespace supports. + * + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo.Capabilities capabilities = 7; + * @return \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities|null + */ + public function getCapabilities() + { + return $this->capabilities; + } + + public function hasCapabilities() + { + return isset($this->capabilities); + } + + public function clearCapabilities() + { + unset($this->capabilities); + } + + /** + * All capabilities the namespace supports. + * + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo.Capabilities capabilities = 7; + * @param \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities $var + * @return $this + */ + public function setCapabilities($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities::class); + $this->capabilities = $var; + + return $this; + } + + /** + * Whether scheduled workflows are supported on this namespace. This is only needed + * temporarily while the feature is experimental, so we can give it a high tag. + * + * Generated from protobuf field bool supports_schedules = 100; + * @return bool + */ + public function getSupportsSchedules() + { + return $this->supports_schedules; + } + + /** + * Whether scheduled workflows are supported on this namespace. This is only needed + * temporarily while the feature is experimental, so we can give it a high tag. + * + * Generated from protobuf field bool supports_schedules = 100; + * @param bool $var + * @return $this + */ + public function setSupportsSchedules($var) + { + GPBUtil::checkBool($var); + $this->supports_schedules = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceInfo/Capabilities.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceInfo/Capabilities.php new file mode 100644 index 0000000..010b7b1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/NamespaceInfo/Capabilities.php @@ -0,0 +1,136 @@ +temporal.api.namespace.v1.NamespaceInfo.Capabilities + */ +class Capabilities extends \Google\Protobuf\Internal\Message +{ + /** + * True if the namespace supports eager workflow start. + * + * Generated from protobuf field bool eager_workflow_start = 1; + */ + protected $eager_workflow_start = false; + /** + * True if the namespace supports sync update + * + * Generated from protobuf field bool sync_update = 2; + */ + protected $sync_update = false; + /** + * True if the namespace supports async update + * + * Generated from protobuf field bool async_update = 3; + */ + protected $async_update = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $eager_workflow_start + * True if the namespace supports eager workflow start. + * @type bool $sync_update + * True if the namespace supports sync update + * @type bool $async_update + * True if the namespace supports async update + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * True if the namespace supports eager workflow start. + * + * Generated from protobuf field bool eager_workflow_start = 1; + * @return bool + */ + public function getEagerWorkflowStart() + { + return $this->eager_workflow_start; + } + + /** + * True if the namespace supports eager workflow start. + * + * Generated from protobuf field bool eager_workflow_start = 1; + * @param bool $var + * @return $this + */ + public function setEagerWorkflowStart($var) + { + GPBUtil::checkBool($var); + $this->eager_workflow_start = $var; + + return $this; + } + + /** + * True if the namespace supports sync update + * + * Generated from protobuf field bool sync_update = 2; + * @return bool + */ + public function getSyncUpdate() + { + return $this->sync_update; + } + + /** + * True if the namespace supports sync update + * + * Generated from protobuf field bool sync_update = 2; + * @param bool $var + * @return $this + */ + public function setSyncUpdate($var) + { + GPBUtil::checkBool($var); + $this->sync_update = $var; + + return $this; + } + + /** + * True if the namespace supports async update + * + * Generated from protobuf field bool async_update = 3; + * @return bool + */ + public function getAsyncUpdate() + { + return $this->async_update; + } + + /** + * True if the namespace supports async update + * + * Generated from protobuf field bool async_update = 3; + * @param bool $var + * @return $this + */ + public function setAsyncUpdate($var) + { + GPBUtil::checkBool($var); + $this->async_update = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/UpdateNamespaceInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/UpdateNamespaceInfo.php new file mode 100644 index 0000000..ae89a1a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/PBNamespace/V1/UpdateNamespaceInfo.php @@ -0,0 +1,178 @@ +temporal.api.namespace.v1.UpdateNamespaceInfo + */ +class UpdateNamespaceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * Generated from protobuf field string owner_email = 2; + */ + protected $owner_email = ''; + /** + * A key-value map for any customized purpose. + * If data already exists on the namespace, + * this will merge with the existing key values. + * + * Generated from protobuf field map data = 3; + */ + private $data; + /** + * New namespace state, server will reject if transition is not allowed. + * Allowed transitions are: + * Registered -> [ Deleted | Deprecated | Handover ] + * Handover -> [ Registered ] + * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. + * + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 4; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * @type string $owner_email + * @type array|\Google\Protobuf\Internal\MapField $data + * A key-value map for any customized purpose. + * If data already exists on the namespace, + * this will merge with the existing key values. + * @type int $state + * New namespace state, server will reject if transition is not allowed. + * Allowed transitions are: + * Registered -> [ Deleted | Deprecated | Handover ] + * Handover -> [ Registered ] + * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string owner_email = 2; + * @return string + */ + public function getOwnerEmail() + { + return $this->owner_email; + } + + /** + * Generated from protobuf field string owner_email = 2; + * @param string $var + * @return $this + */ + public function setOwnerEmail($var) + { + GPBUtil::checkString($var, True); + $this->owner_email = $var; + + return $this; + } + + /** + * A key-value map for any customized purpose. + * If data already exists on the namespace, + * this will merge with the existing key values. + * + * Generated from protobuf field map data = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getData() + { + return $this->data; + } + + /** + * A key-value map for any customized purpose. + * If data already exists on the namespace, + * this will merge with the existing key values. + * + * Generated from protobuf field map data = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setData($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->data = $arr; + + return $this; + } + + /** + * New namespace state, server will reject if transition is not allowed. + * Allowed transitions are: + * Registered -> [ Deleted | Deprecated | Handover ] + * Handover -> [ Registered ] + * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. + * + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * New namespace state, server will reject if transition is not allowed. + * Allowed transitions are: + * Registered -> [ Deleted | Deprecated | Handover ] + * Handover -> [ Registered ] + * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. + * + * Generated from protobuf field .temporal.api.enums.v1.NamespaceState state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\NamespaceState::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Protocol/V1/Message.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Protocol/V1/Message.php new file mode 100644 index 0000000..e0ed924 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Protocol/V1/Message.php @@ -0,0 +1,220 @@ +temporal.api.protocol.v1.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * An ID for this specific message. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Identifies the specific instance of a protocol to which this message + * belongs. + * + * Generated from protobuf field string protocol_instance_id = 2; + */ + protected $protocol_instance_id = ''; + /** + * The opaque data carried by this message. The protocol type can be + * extracted from the package name of the message carried inside the Any. + * + * Generated from protobuf field .google.protobuf.Any body = 5; + */ + protected $body = null; + protected $sequencing_id; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * An ID for this specific message. + * @type string $protocol_instance_id + * Identifies the specific instance of a protocol to which this message + * belongs. + * @type int|string $event_id + * @type int|string $command_index + * @type \Google\Protobuf\Any $body + * The opaque data carried by this message. The protocol type can be + * extracted from the package name of the message carried inside the Any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Protocol\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * An ID for this specific message. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * An ID for this specific message. + * + * 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 specific instance of a protocol to which this message + * belongs. + * + * Generated from protobuf field string protocol_instance_id = 2; + * @return string + */ + public function getProtocolInstanceId() + { + return $this->protocol_instance_id; + } + + /** + * Identifies the specific instance of a protocol to which this message + * belongs. + * + * Generated from protobuf field string protocol_instance_id = 2; + * @param string $var + * @return $this + */ + public function setProtocolInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->protocol_instance_id = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 event_id = 3; + * @return int|string + */ + public function getEventId() + { + return $this->readOneof(3); + } + + public function hasEventId() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field int64 event_id = 3; + * @param int|string $var + * @return $this + */ + public function setEventId($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field int64 command_index = 4; + * @return int|string + */ + public function getCommandIndex() + { + return $this->readOneof(4); + } + + public function hasCommandIndex() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field int64 command_index = 4; + * @param int|string $var + * @return $this + */ + public function setCommandIndex($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The opaque data carried by this message. The protocol type can be + * extracted from the package name of the message carried inside the Any. + * + * Generated from protobuf field .google.protobuf.Any body = 5; + * @return \Google\Protobuf\Any|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * The opaque data carried by this message. The protocol type can be + * extracted from the package name of the message carried inside the Any. + * + * Generated from protobuf field .google.protobuf.Any body = 5; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->body = $var; + + return $this; + } + + /** + * @return string + */ + public function getSequencingId() + { + return $this->whichOneof("sequencing_id"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/QueryRejected.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/QueryRejected.php new file mode 100644 index 0000000..32c663d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/QueryRejected.php @@ -0,0 +1,59 @@ +temporal.api.query.v1.QueryRejected + */ +class QueryRejected extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 1; + */ + protected $status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Query\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 1; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 1; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowExecutionStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/WorkflowQuery.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/WorkflowQuery.php new file mode 100644 index 0000000..b813250 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/WorkflowQuery.php @@ -0,0 +1,160 @@ +temporal.api.query.v1.WorkflowQuery + */ +class WorkflowQuery extends \Google\Protobuf\Internal\Message +{ + /** + * The workflow-author-defined identifier of the query. Typically a function name. + * + * Generated from protobuf field string query_type = 1; + */ + protected $query_type = ''; + /** + * Serialized arguments that will be provided to the query handler. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads query_args = 2; + */ + protected $query_args = null; + /** + * Headers that were passed by the caller of the query and copied by temporal + * server into the workflow task. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + */ + protected $header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query_type + * The workflow-author-defined identifier of the query. Typically a function name. + * @type \Temporal\Api\Common\V1\Payloads $query_args + * Serialized arguments that will be provided to the query handler. + * @type \Temporal\Api\Common\V1\Header $header + * Headers that were passed by the caller of the query and copied by temporal + * server into the workflow task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Query\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The workflow-author-defined identifier of the query. Typically a function name. + * + * Generated from protobuf field string query_type = 1; + * @return string + */ + public function getQueryType() + { + return $this->query_type; + } + + /** + * The workflow-author-defined identifier of the query. Typically a function name. + * + * Generated from protobuf field string query_type = 1; + * @param string $var + * @return $this + */ + public function setQueryType($var) + { + GPBUtil::checkString($var, True); + $this->query_type = $var; + + return $this; + } + + /** + * Serialized arguments that will be provided to the query handler. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads query_args = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getQueryArgs() + { + return $this->query_args; + } + + public function hasQueryArgs() + { + return isset($this->query_args); + } + + public function clearQueryArgs() + { + unset($this->query_args); + } + + /** + * Serialized arguments that will be provided to the query handler. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads query_args = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setQueryArgs($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->query_args = $var; + + return $this; + } + + /** + * Headers that were passed by the caller of the query and copied by temporal + * server into the workflow task. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Headers that were passed by the caller of the query and copied by temporal + * server into the workflow task. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 3; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/WorkflowQueryResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/WorkflowQueryResult.php new file mode 100644 index 0000000..22a02ef --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Query/V1/WorkflowQueryResult.php @@ -0,0 +1,146 @@ +temporal.api.query.v1.WorkflowQueryResult + */ +class WorkflowQueryResult extends \Google\Protobuf\Internal\Message +{ + /** + * Did the query succeed or fail? + * + * Generated from protobuf field .temporal.api.enums.v1.QueryResultType result_type = 1; + */ + protected $result_type = 0; + /** + * Set when the query succeeds with the results + * + * Generated from protobuf field .temporal.api.common.v1.Payloads answer = 2; + */ + protected $answer = null; + /** + * Mutually exclusive with `answer`. Set when the query fails. + * + * Generated from protobuf field string error_message = 3; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $result_type + * Did the query succeed or fail? + * @type \Temporal\Api\Common\V1\Payloads $answer + * Set when the query succeeds with the results + * @type string $error_message + * Mutually exclusive with `answer`. Set when the query fails. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Query\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Did the query succeed or fail? + * + * Generated from protobuf field .temporal.api.enums.v1.QueryResultType result_type = 1; + * @return int + */ + public function getResultType() + { + return $this->result_type; + } + + /** + * Did the query succeed or fail? + * + * Generated from protobuf field .temporal.api.enums.v1.QueryResultType result_type = 1; + * @param int $var + * @return $this + */ + public function setResultType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\QueryResultType::class); + $this->result_type = $var; + + return $this; + } + + /** + * Set when the query succeeds with the results + * + * Generated from protobuf field .temporal.api.common.v1.Payloads answer = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getAnswer() + { + return $this->answer; + } + + public function hasAnswer() + { + return isset($this->answer); + } + + public function clearAnswer() + { + unset($this->answer); + } + + /** + * Set when the query succeeds with the results + * + * Generated from protobuf field .temporal.api.common.v1.Payloads answer = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setAnswer($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->answer = $var; + + return $this; + } + + /** + * Mutually exclusive with `answer`. Set when the query fails. + * + * Generated from protobuf field string error_message = 3; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Mutually exclusive with `answer`. Set when the query fails. + * + * Generated from protobuf field string error_message = 3; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/ClusterReplicationConfig.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/ClusterReplicationConfig.php new file mode 100644 index 0000000..48467c2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/ClusterReplicationConfig.php @@ -0,0 +1,59 @@ +temporal.api.replication.v1.ClusterReplicationConfig + */ +class ClusterReplicationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string cluster_name = 1; + */ + protected $cluster_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Replication\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string cluster_name = 1; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * Generated from protobuf field string cluster_name = 1; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/FailoverStatus.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/FailoverStatus.php new file mode 100644 index 0000000..303c58d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/FailoverStatus.php @@ -0,0 +1,105 @@ +temporal.api.replication.v1.FailoverStatus + */ +class FailoverStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp when the Cluster switched to the following failover_version + * + * Generated from protobuf field .google.protobuf.Timestamp failover_time = 1; + */ + protected $failover_time = null; + /** + * Generated from protobuf field int64 failover_version = 2; + */ + protected $failover_version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $failover_time + * Timestamp when the Cluster switched to the following failover_version + * @type int|string $failover_version + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Replication\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp when the Cluster switched to the following failover_version + * + * Generated from protobuf field .google.protobuf.Timestamp failover_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFailoverTime() + { + return $this->failover_time; + } + + public function hasFailoverTime() + { + return isset($this->failover_time); + } + + public function clearFailoverTime() + { + unset($this->failover_time); + } + + /** + * Timestamp when the Cluster switched to the following failover_version + * + * Generated from protobuf field .google.protobuf.Timestamp failover_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFailoverTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->failover_time = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 failover_version = 2; + * @return int|string + */ + public function getFailoverVersion() + { + return $this->failover_version; + } + + /** + * Generated from protobuf field int64 failover_version = 2; + * @param int|string $var + * @return $this + */ + public function setFailoverVersion($var) + { + GPBUtil::checkInt64($var); + $this->failover_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/NamespaceReplicationConfig.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/NamespaceReplicationConfig.php new file mode 100644 index 0000000..1ea77f1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Replication/V1/NamespaceReplicationConfig.php @@ -0,0 +1,113 @@ +temporal.api.replication.v1.NamespaceReplicationConfig + */ +class NamespaceReplicationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string active_cluster_name = 1; + */ + protected $active_cluster_name = ''; + /** + * Generated from protobuf field repeated .temporal.api.replication.v1.ClusterReplicationConfig clusters = 2; + */ + private $clusters; + /** + * Generated from protobuf field .temporal.api.enums.v1.ReplicationState state = 3; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $active_cluster_name + * @type array<\Temporal\Api\Replication\V1\ClusterReplicationConfig>|\Google\Protobuf\Internal\RepeatedField $clusters + * @type int $state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Replication\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string active_cluster_name = 1; + * @return string + */ + public function getActiveClusterName() + { + return $this->active_cluster_name; + } + + /** + * Generated from protobuf field string active_cluster_name = 1; + * @param string $var + * @return $this + */ + public function setActiveClusterName($var) + { + GPBUtil::checkString($var, True); + $this->active_cluster_name = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.replication.v1.ClusterReplicationConfig clusters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * Generated from protobuf field repeated .temporal.api.replication.v1.ClusterReplicationConfig clusters = 2; + * @param array<\Temporal\Api\Replication\V1\ClusterReplicationConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Replication\V1\ClusterReplicationConfig::class); + $this->clusters = $arr; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ReplicationState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.ReplicationState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ReplicationState::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/BackfillRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/BackfillRequest.php new file mode 100644 index 0000000..91da2e7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/BackfillRequest.php @@ -0,0 +1,167 @@ +temporal.api.schedule.v1.BackfillRequest + */ +class BackfillRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Time range to evaluate schedule in. Currently, this time range is + * exclusive on start_time and inclusive on end_time. (This is admittedly + * counterintuitive and it may change in the future, so to be safe, use a + * start time strictly before a scheduled time.) Also note that an action + * nominally scheduled in the interval but with jitter that pushes it after + * end_time will not be included. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * If set, override overlap policy for this request. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 3; + */ + protected $overlap_policy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Time range to evaluate schedule in. Currently, this time range is + * exclusive on start_time and inclusive on end_time. (This is admittedly + * counterintuitive and it may change in the future, so to be safe, use a + * start time strictly before a scheduled time.) Also note that an action + * nominally scheduled in the interval but with jitter that pushes it after + * end_time will not be included. + * @type \Google\Protobuf\Timestamp $end_time + * @type int $overlap_policy + * If set, override overlap policy for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Time range to evaluate schedule in. Currently, this time range is + * exclusive on start_time and inclusive on end_time. (This is admittedly + * counterintuitive and it may change in the future, so to be safe, use a + * start time strictly before a scheduled time.) Also note that an action + * nominally scheduled in the interval but with jitter that pushes it after + * end_time will not be included. + * + * 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); + } + + /** + * Time range to evaluate schedule in. Currently, this time range is + * exclusive on start_time and inclusive on end_time. (This is admittedly + * counterintuitive and it may change in the future, so to be safe, use a + * start time strictly before a scheduled time.) Also note that an action + * nominally scheduled in the interval but with jitter that pushes it after + * end_time will not be included. + * + * 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; + } + + /** + * 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); + } + + /** + * 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; + } + + /** + * If set, override overlap policy for this request. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 3; + * @return int + */ + public function getOverlapPolicy() + { + return $this->overlap_policy; + } + + /** + * If set, override overlap policy for this request. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 3; + * @param int $var + * @return $this + */ + public function setOverlapPolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ScheduleOverlapPolicy::class); + $this->overlap_policy = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/CalendarSpec.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/CalendarSpec.php new file mode 100644 index 0000000..ffb1387 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/CalendarSpec.php @@ -0,0 +1,331 @@ +temporal.api.schedule.v1.CalendarSpec + */ +class CalendarSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Expression to match seconds. Default: 0 + * + * Generated from protobuf field string second = 1; + */ + protected $second = ''; + /** + * Expression to match minutes. Default: 0 + * + * Generated from protobuf field string minute = 2; + */ + protected $minute = ''; + /** + * Expression to match hours. Default: 0 + * + * Generated from protobuf field string hour = 3; + */ + protected $hour = ''; + /** + * Expression to match days of the month. Default: * + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * + * Generated from protobuf field string day_of_month = 4; + */ + protected $day_of_month = ''; + /** + * Expression to match months. Default: * + * + * Generated from protobuf field string month = 5; + */ + protected $month = ''; + /** + * Expression to match years. Default: * + * + * Generated from protobuf field string year = 6; + */ + protected $year = ''; + /** + * Expression to match days of the week. Default: * + * + * Generated from protobuf field string day_of_week = 7; + */ + protected $day_of_week = ''; + /** + * Free-form comment describing the intention of this spec. + * + * Generated from protobuf field string comment = 8; + */ + protected $comment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $second + * Expression to match seconds. Default: 0 + * @type string $minute + * Expression to match minutes. Default: 0 + * @type string $hour + * Expression to match hours. Default: 0 + * @type string $day_of_month + * Expression to match days of the month. Default: * + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * @type string $month + * Expression to match months. Default: * + * @type string $year + * Expression to match years. Default: * + * @type string $day_of_week + * Expression to match days of the week. Default: * + * @type string $comment + * Free-form comment describing the intention of this spec. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Expression to match seconds. Default: 0 + * + * Generated from protobuf field string second = 1; + * @return string + */ + public function getSecond() + { + return $this->second; + } + + /** + * Expression to match seconds. Default: 0 + * + * Generated from protobuf field string second = 1; + * @param string $var + * @return $this + */ + public function setSecond($var) + { + GPBUtil::checkString($var, True); + $this->second = $var; + + return $this; + } + + /** + * Expression to match minutes. Default: 0 + * + * Generated from protobuf field string minute = 2; + * @return string + */ + public function getMinute() + { + return $this->minute; + } + + /** + * Expression to match minutes. Default: 0 + * + * Generated from protobuf field string minute = 2; + * @param string $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkString($var, True); + $this->minute = $var; + + return $this; + } + + /** + * Expression to match hours. Default: 0 + * + * Generated from protobuf field string hour = 3; + * @return string + */ + public function getHour() + { + return $this->hour; + } + + /** + * Expression to match hours. Default: 0 + * + * Generated from protobuf field string hour = 3; + * @param string $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkString($var, True); + $this->hour = $var; + + return $this; + } + + /** + * Expression to match days of the month. Default: * + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * + * Generated from protobuf field string day_of_month = 4; + * @return string + */ + public function getDayOfMonth() + { + return $this->day_of_month; + } + + /** + * Expression to match days of the month. Default: * + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * + * Generated from protobuf field string day_of_month = 4; + * @param string $var + * @return $this + */ + public function setDayOfMonth($var) + { + GPBUtil::checkString($var, True); + $this->day_of_month = $var; + + return $this; + } + + /** + * Expression to match months. Default: * + * + * Generated from protobuf field string month = 5; + * @return string + */ + public function getMonth() + { + return $this->month; + } + + /** + * Expression to match months. Default: * + * + * Generated from protobuf field string month = 5; + * @param string $var + * @return $this + */ + public function setMonth($var) + { + GPBUtil::checkString($var, True); + $this->month = $var; + + return $this; + } + + /** + * Expression to match years. Default: * + * + * Generated from protobuf field string year = 6; + * @return string + */ + public function getYear() + { + return $this->year; + } + + /** + * Expression to match years. Default: * + * + * Generated from protobuf field string year = 6; + * @param string $var + * @return $this + */ + public function setYear($var) + { + GPBUtil::checkString($var, True); + $this->year = $var; + + return $this; + } + + /** + * Expression to match days of the week. Default: * + * + * Generated from protobuf field string day_of_week = 7; + * @return string + */ + public function getDayOfWeek() + { + return $this->day_of_week; + } + + /** + * Expression to match days of the week. Default: * + * + * Generated from protobuf field string day_of_week = 7; + * @param string $var + * @return $this + */ + public function setDayOfWeek($var) + { + GPBUtil::checkString($var, True); + $this->day_of_week = $var; + + return $this; + } + + /** + * Free-form comment describing the intention of this spec. + * + * Generated from protobuf field string comment = 8; + * @return string + */ + public function getComment() + { + return $this->comment; + } + + /** + * Free-form comment describing the intention of this spec. + * + * Generated from protobuf field string comment = 8; + * @param string $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkString($var, True); + $this->comment = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/IntervalSpec.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/IntervalSpec.php new file mode 100644 index 0000000..8d22e46 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/IntervalSpec.php @@ -0,0 +1,118 @@ +temporal.api.schedule.v1.IntervalSpec + */ +class IntervalSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.protobuf.Duration interval = 1; + */ + protected $interval = null; + /** + * Generated from protobuf field .google.protobuf.Duration phase = 2; + */ + protected $phase = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $interval + * @type \Google\Protobuf\Duration $phase + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.protobuf.Duration interval = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * Generated from protobuf field .google.protobuf.Duration interval = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->interval = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Duration phase = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getPhase() + { + return $this->phase; + } + + public function hasPhase() + { + return isset($this->phase); + } + + public function clearPhase() + { + unset($this->phase); + } + + /** + * Generated from protobuf field .google.protobuf.Duration phase = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPhase($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->phase = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/Range.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/Range.php new file mode 100644 index 0000000..27a4d6b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/Range.php @@ -0,0 +1,139 @@ +temporal.api.schedule.v1.Range + */ +class Range extends \Google\Protobuf\Internal\Message +{ + /** + * Start of range (inclusive). + * + * Generated from protobuf field int32 start = 1; + */ + protected $start = 0; + /** + * End of range (inclusive). + * + * Generated from protobuf field int32 end = 2; + */ + protected $end = 0; + /** + * Step (optional, default 1). + * + * Generated from protobuf field int32 step = 3; + */ + protected $step = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $start + * Start of range (inclusive). + * @type int $end + * End of range (inclusive). + * @type int $step + * Step (optional, default 1). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Start of range (inclusive). + * + * Generated from protobuf field int32 start = 1; + * @return int + */ + public function getStart() + { + return $this->start; + } + + /** + * Start of range (inclusive). + * + * Generated from protobuf field int32 start = 1; + * @param int $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkInt32($var); + $this->start = $var; + + return $this; + } + + /** + * End of range (inclusive). + * + * Generated from protobuf field int32 end = 2; + * @return int + */ + public function getEnd() + { + return $this->end; + } + + /** + * End of range (inclusive). + * + * Generated from protobuf field int32 end = 2; + * @param int $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkInt32($var); + $this->end = $var; + + return $this; + } + + /** + * Step (optional, default 1). + * + * Generated from protobuf field int32 step = 3; + * @return int + */ + public function getStep() + { + return $this->step; + } + + /** + * Step (optional, default 1). + * + * Generated from protobuf field int32 step = 3; + * @param int $var + * @return $this + */ + public function setStep($var) + { + GPBUtil::checkInt32($var); + $this->step = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/Schedule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/Schedule.php new file mode 100644 index 0000000..29a102d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/Schedule.php @@ -0,0 +1,180 @@ +temporal.api.schedule.v1.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleSpec spec = 1; + */ + protected $spec = null; + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleAction action = 2; + */ + protected $action = null; + /** + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePolicies policies = 3; + */ + protected $policies = null; + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleState state = 4; + */ + protected $state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Schedule\V1\ScheduleSpec $spec + * @type \Temporal\Api\Schedule\V1\ScheduleAction $action + * @type \Temporal\Api\Schedule\V1\SchedulePolicies $policies + * @type \Temporal\Api\Schedule\V1\ScheduleState $state + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleSpec spec = 1; + * @return \Temporal\Api\Schedule\V1\ScheduleSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleSpec spec = 1; + * @param \Temporal\Api\Schedule\V1\ScheduleSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\ScheduleSpec::class); + $this->spec = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleAction action = 2; + * @return \Temporal\Api\Schedule\V1\ScheduleAction|null + */ + public function getAction() + { + return $this->action; + } + + public function hasAction() + { + return isset($this->action); + } + + public function clearAction() + { + unset($this->action); + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleAction action = 2; + * @param \Temporal\Api\Schedule\V1\ScheduleAction $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\ScheduleAction::class); + $this->action = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePolicies policies = 3; + * @return \Temporal\Api\Schedule\V1\SchedulePolicies|null + */ + public function getPolicies() + { + return $this->policies; + } + + public function hasPolicies() + { + return isset($this->policies); + } + + public function clearPolicies() + { + unset($this->policies); + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePolicies policies = 3; + * @param \Temporal\Api\Schedule\V1\SchedulePolicies $var + * @return $this + */ + public function setPolicies($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\SchedulePolicies::class); + $this->policies = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleState state = 4; + * @return \Temporal\Api\Schedule\V1\ScheduleState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleState state = 4; + * @param \Temporal\Api\Schedule\V1\ScheduleState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\ScheduleState::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleAction.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleAction.php new file mode 100644 index 0000000..d0ba324 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleAction.php @@ -0,0 +1,86 @@ +temporal.api.schedule.v1.ScheduleAction + */ +class ScheduleAction extends \Google\Protobuf\Internal\Message +{ + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Workflow\V1\NewWorkflowExecutionInfo $start_workflow + * All fields of NewWorkflowExecutionInfo are valid except for: + * - workflow_id_reuse_policy + * - cron_schedule + * The workflow id of the started workflow may not match this exactly, + * it may have a timestamp appended for uniqueness. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * All fields of NewWorkflowExecutionInfo are valid except for: + * - workflow_id_reuse_policy + * - cron_schedule + * The workflow id of the started workflow may not match this exactly, + * it may have a timestamp appended for uniqueness. + * + * Generated from protobuf field .temporal.api.workflow.v1.NewWorkflowExecutionInfo start_workflow = 1; + * @return \Temporal\Api\Workflow\V1\NewWorkflowExecutionInfo|null + */ + public function getStartWorkflow() + { + return $this->readOneof(1); + } + + public function hasStartWorkflow() + { + return $this->hasOneof(1); + } + + /** + * All fields of NewWorkflowExecutionInfo are valid except for: + * - workflow_id_reuse_policy + * - cron_schedule + * The workflow id of the started workflow may not match this exactly, + * it may have a timestamp appended for uniqueness. + * + * Generated from protobuf field .temporal.api.workflow.v1.NewWorkflowExecutionInfo start_workflow = 1; + * @param \Temporal\Api\Workflow\V1\NewWorkflowExecutionInfo $var + * @return $this + */ + public function setStartWorkflow($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\NewWorkflowExecutionInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleActionResult.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleActionResult.php new file mode 100644 index 0000000..a7c66cb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleActionResult.php @@ -0,0 +1,164 @@ +temporal.api.schedule.v1.ScheduleActionResult + */ +class ScheduleActionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Time that the action was taken (according to the schedule, including jitter). + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + */ + protected $schedule_time = null; + /** + * Time that the action was taken (real time). + * + * Generated from protobuf field .google.protobuf.Timestamp actual_time = 2; + */ + protected $actual_time = null; + /** + * If action was start_workflow: + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution start_workflow_result = 11; + */ + protected $start_workflow_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $schedule_time + * Time that the action was taken (according to the schedule, including jitter). + * @type \Google\Protobuf\Timestamp $actual_time + * Time that the action was taken (real time). + * @type \Temporal\Api\Common\V1\WorkflowExecution $start_workflow_result + * If action was start_workflow: + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Time that the action was taken (according to the schedule, including jitter). + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Time that the action was taken (according to the schedule, including jitter). + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Time that the action was taken (real time). + * + * Generated from protobuf field .google.protobuf.Timestamp actual_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getActualTime() + { + return $this->actual_time; + } + + public function hasActualTime() + { + return isset($this->actual_time); + } + + public function clearActualTime() + { + unset($this->actual_time); + } + + /** + * Time that the action was taken (real time). + * + * Generated from protobuf field .google.protobuf.Timestamp actual_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setActualTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->actual_time = $var; + + return $this; + } + + /** + * If action was start_workflow: + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution start_workflow_result = 11; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getStartWorkflowResult() + { + return $this->start_workflow_result; + } + + public function hasStartWorkflowResult() + { + return isset($this->start_workflow_result); + } + + public function clearStartWorkflowResult() + { + unset($this->start_workflow_result); + } + + /** + * If action was start_workflow: + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution start_workflow_result = 11; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setStartWorkflowResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->start_workflow_result = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleInfo.php new file mode 100644 index 0000000..ded5f8b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleInfo.php @@ -0,0 +1,441 @@ +temporal.api.schedule.v1.ScheduleInfo + */ +class ScheduleInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Number of actions taken so far. + * + * Generated from protobuf field int64 action_count = 1; + */ + protected $action_count = 0; + /** + * Number of times a scheduled action was skipped due to missing the catchup window. + * + * Generated from protobuf field int64 missed_catchup_window = 2; + */ + protected $missed_catchup_window = 0; + /** + * Number of skipped actions due to overlap. + * + * Generated from protobuf field int64 overlap_skipped = 3; + */ + protected $overlap_skipped = 0; + /** + * Number of dropped actions due to buffer limit. + * + * Generated from protobuf field int64 buffer_dropped = 10; + */ + protected $buffer_dropped = 0; + /** + * Number of actions in the buffer. The buffer holds the actions that cannot + * be immediately triggered (due to the overlap policy). These actions can be a result of + * the normal schedule or a backfill. + * + * Generated from protobuf field int64 buffer_size = 11; + */ + protected $buffer_size = 0; + /** + * Currently-running workflows started by this schedule. (There might be + * more than one if the overlap policy allows overlaps.) + * Note that the run_ids in here are the original execution run ids as + * started by the schedule. If the workflows retried, did continue-as-new, + * or were reset, they might still be running but with a different run_id. + * + * Generated from protobuf field repeated .temporal.api.common.v1.WorkflowExecution running_workflows = 9; + */ + private $running_workflows; + /** + * Most recent ten actual action times (including manual triggers). + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleActionResult recent_actions = 4; + */ + private $recent_actions; + /** + * Next ten scheduled action times. + * + * Generated from protobuf field repeated .google.protobuf.Timestamp future_action_times = 5; + */ + private $future_action_times; + /** + * Timestamps of schedule creation and last update. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + */ + protected $create_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + */ + protected $update_time = null; + /** + * Generated from protobuf field string invalid_schedule_error = 8 [deprecated = true]; + * @deprecated + */ + protected $invalid_schedule_error = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $action_count + * Number of actions taken so far. + * @type int|string $missed_catchup_window + * Number of times a scheduled action was skipped due to missing the catchup window. + * @type int|string $overlap_skipped + * Number of skipped actions due to overlap. + * @type int|string $buffer_dropped + * Number of dropped actions due to buffer limit. + * @type int|string $buffer_size + * Number of actions in the buffer. The buffer holds the actions that cannot + * be immediately triggered (due to the overlap policy). These actions can be a result of + * the normal schedule or a backfill. + * @type array<\Temporal\Api\Common\V1\WorkflowExecution>|\Google\Protobuf\Internal\RepeatedField $running_workflows + * Currently-running workflows started by this schedule. (There might be + * more than one if the overlap policy allows overlaps.) + * Note that the run_ids in here are the original execution run ids as + * started by the schedule. If the workflows retried, did continue-as-new, + * or were reset, they might still be running but with a different run_id. + * @type array<\Temporal\Api\Schedule\V1\ScheduleActionResult>|\Google\Protobuf\Internal\RepeatedField $recent_actions + * Most recent ten actual action times (including manual triggers). + * @type array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $future_action_times + * Next ten scheduled action times. + * @type \Google\Protobuf\Timestamp $create_time + * Timestamps of schedule creation and last update. + * @type \Google\Protobuf\Timestamp $update_time + * @type string $invalid_schedule_error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Number of actions taken so far. + * + * Generated from protobuf field int64 action_count = 1; + * @return int|string + */ + public function getActionCount() + { + return $this->action_count; + } + + /** + * Number of actions taken so far. + * + * Generated from protobuf field int64 action_count = 1; + * @param int|string $var + * @return $this + */ + public function setActionCount($var) + { + GPBUtil::checkInt64($var); + $this->action_count = $var; + + return $this; + } + + /** + * Number of times a scheduled action was skipped due to missing the catchup window. + * + * Generated from protobuf field int64 missed_catchup_window = 2; + * @return int|string + */ + public function getMissedCatchupWindow() + { + return $this->missed_catchup_window; + } + + /** + * Number of times a scheduled action was skipped due to missing the catchup window. + * + * Generated from protobuf field int64 missed_catchup_window = 2; + * @param int|string $var + * @return $this + */ + public function setMissedCatchupWindow($var) + { + GPBUtil::checkInt64($var); + $this->missed_catchup_window = $var; + + return $this; + } + + /** + * Number of skipped actions due to overlap. + * + * Generated from protobuf field int64 overlap_skipped = 3; + * @return int|string + */ + public function getOverlapSkipped() + { + return $this->overlap_skipped; + } + + /** + * Number of skipped actions due to overlap. + * + * Generated from protobuf field int64 overlap_skipped = 3; + * @param int|string $var + * @return $this + */ + public function setOverlapSkipped($var) + { + GPBUtil::checkInt64($var); + $this->overlap_skipped = $var; + + return $this; + } + + /** + * Number of dropped actions due to buffer limit. + * + * Generated from protobuf field int64 buffer_dropped = 10; + * @return int|string + */ + public function getBufferDropped() + { + return $this->buffer_dropped; + } + + /** + * Number of dropped actions due to buffer limit. + * + * Generated from protobuf field int64 buffer_dropped = 10; + * @param int|string $var + * @return $this + */ + public function setBufferDropped($var) + { + GPBUtil::checkInt64($var); + $this->buffer_dropped = $var; + + return $this; + } + + /** + * Number of actions in the buffer. The buffer holds the actions that cannot + * be immediately triggered (due to the overlap policy). These actions can be a result of + * the normal schedule or a backfill. + * + * Generated from protobuf field int64 buffer_size = 11; + * @return int|string + */ + public function getBufferSize() + { + return $this->buffer_size; + } + + /** + * Number of actions in the buffer. The buffer holds the actions that cannot + * be immediately triggered (due to the overlap policy). These actions can be a result of + * the normal schedule or a backfill. + * + * Generated from protobuf field int64 buffer_size = 11; + * @param int|string $var + * @return $this + */ + public function setBufferSize($var) + { + GPBUtil::checkInt64($var); + $this->buffer_size = $var; + + return $this; + } + + /** + * Currently-running workflows started by this schedule. (There might be + * more than one if the overlap policy allows overlaps.) + * Note that the run_ids in here are the original execution run ids as + * started by the schedule. If the workflows retried, did continue-as-new, + * or were reset, they might still be running but with a different run_id. + * + * Generated from protobuf field repeated .temporal.api.common.v1.WorkflowExecution running_workflows = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRunningWorkflows() + { + return $this->running_workflows; + } + + /** + * Currently-running workflows started by this schedule. (There might be + * more than one if the overlap policy allows overlaps.) + * Note that the run_ids in here are the original execution run ids as + * started by the schedule. If the workflows retried, did continue-as-new, + * or were reset, they might still be running but with a different run_id. + * + * Generated from protobuf field repeated .temporal.api.common.v1.WorkflowExecution running_workflows = 9; + * @param array<\Temporal\Api\Common\V1\WorkflowExecution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRunningWorkflows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->running_workflows = $arr; + + return $this; + } + + /** + * Most recent ten actual action times (including manual triggers). + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleActionResult recent_actions = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentActions() + { + return $this->recent_actions; + } + + /** + * Most recent ten actual action times (including manual triggers). + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleActionResult recent_actions = 4; + * @param array<\Temporal\Api\Schedule\V1\ScheduleActionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\ScheduleActionResult::class); + $this->recent_actions = $arr; + + return $this; + } + + /** + * Next ten scheduled action times. + * + * Generated from protobuf field repeated .google.protobuf.Timestamp future_action_times = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFutureActionTimes() + { + return $this->future_action_times; + } + + /** + * Next ten scheduled action times. + * + * Generated from protobuf field repeated .google.protobuf.Timestamp future_action_times = 5; + * @param array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFutureActionTimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Timestamp::class); + $this->future_action_times = $arr; + + return $this; + } + + /** + * Timestamps of schedule creation and last update. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @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); + } + + /** + * Timestamps of schedule creation and last update. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + * @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); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Generated from protobuf field string invalid_schedule_error = 8 [deprecated = true]; + * @return string + * @deprecated + */ + public function getInvalidScheduleError() + { + @trigger_error('invalid_schedule_error is deprecated.', E_USER_DEPRECATED); + return $this->invalid_schedule_error; + } + + /** + * Generated from protobuf field string invalid_schedule_error = 8 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setInvalidScheduleError($var) + { + @trigger_error('invalid_schedule_error is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->invalid_schedule_error = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleListEntry.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleListEntry.php new file mode 100644 index 0000000..bdd564b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleListEntry.php @@ -0,0 +1,172 @@ +temporal.api.schedule.v1.ScheduleListEntry + */ +class ScheduleListEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string schedule_id = 1; + */ + protected $schedule_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 2; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 3; + */ + protected $search_attributes = null; + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleListInfo info = 4; + */ + protected $info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schedule_id + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type \Temporal\Api\Schedule\V1\ScheduleListInfo $info + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string schedule_id = 1; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * Generated from protobuf field string schedule_id = 1; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 2; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 2; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 3; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 3; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleListInfo info = 4; + * @return \Temporal\Api\Schedule\V1\ScheduleListInfo|null + */ + public function getInfo() + { + return $this->info; + } + + public function hasInfo() + { + return isset($this->info); + } + + public function clearInfo() + { + unset($this->info); + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleListInfo info = 4; + * @param \Temporal\Api\Schedule\V1\ScheduleListInfo $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\ScheduleListInfo::class); + $this->info = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleListInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleListInfo.php new file mode 100644 index 0000000..69541e4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleListInfo.php @@ -0,0 +1,257 @@ +temporal.api.schedule.v1.ScheduleListInfo + */ +class ScheduleListInfo extends \Google\Protobuf\Internal\Message +{ + /** + * From spec: + * Some fields are dropped from this copy of spec: timezone_data + * + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleSpec spec = 1; + */ + protected $spec = null; + /** + * From action: + * Action is a oneof field, but we need to encode this in JSON and oneof fields don't work + * well with JSON. If action is start_workflow, this is set: + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + */ + protected $workflow_type = null; + /** + * From state: + * + * Generated from protobuf field string notes = 3; + */ + protected $notes = ''; + /** + * Generated from protobuf field bool paused = 4; + */ + protected $paused = false; + /** + * From info (maybe fewer entries): + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleActionResult recent_actions = 5; + */ + private $recent_actions; + /** + * Generated from protobuf field repeated .google.protobuf.Timestamp future_action_times = 6; + */ + private $future_action_times; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Schedule\V1\ScheduleSpec $spec + * From spec: + * Some fields are dropped from this copy of spec: timezone_data + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * From action: + * Action is a oneof field, but we need to encode this in JSON and oneof fields don't work + * well with JSON. If action is start_workflow, this is set: + * @type string $notes + * From state: + * @type bool $paused + * @type array<\Temporal\Api\Schedule\V1\ScheduleActionResult>|\Google\Protobuf\Internal\RepeatedField $recent_actions + * From info (maybe fewer entries): + * @type array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $future_action_times + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * From spec: + * Some fields are dropped from this copy of spec: timezone_data + * + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleSpec spec = 1; + * @return \Temporal\Api\Schedule\V1\ScheduleSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * From spec: + * Some fields are dropped from this copy of spec: timezone_data + * + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleSpec spec = 1; + * @param \Temporal\Api\Schedule\V1\ScheduleSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\ScheduleSpec::class); + $this->spec = $var; + + return $this; + } + + /** + * From action: + * Action is a oneof field, but we need to encode this in JSON and oneof fields don't work + * well with JSON. If action is start_workflow, this is set: + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * From action: + * Action is a oneof field, but we need to encode this in JSON and oneof fields don't work + * well with JSON. If action is start_workflow, this is set: + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * From state: + * + * Generated from protobuf field string notes = 3; + * @return string + */ + public function getNotes() + { + return $this->notes; + } + + /** + * From state: + * + * Generated from protobuf field string notes = 3; + * @param string $var + * @return $this + */ + public function setNotes($var) + { + GPBUtil::checkString($var, True); + $this->notes = $var; + + return $this; + } + + /** + * Generated from protobuf field bool paused = 4; + * @return bool + */ + public function getPaused() + { + return $this->paused; + } + + /** + * Generated from protobuf field bool paused = 4; + * @param bool $var + * @return $this + */ + public function setPaused($var) + { + GPBUtil::checkBool($var); + $this->paused = $var; + + return $this; + } + + /** + * From info (maybe fewer entries): + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleActionResult recent_actions = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentActions() + { + return $this->recent_actions; + } + + /** + * From info (maybe fewer entries): + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleActionResult recent_actions = 5; + * @param array<\Temporal\Api\Schedule\V1\ScheduleActionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\ScheduleActionResult::class); + $this->recent_actions = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.protobuf.Timestamp future_action_times = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFutureActionTimes() + { + return $this->future_action_times; + } + + /** + * Generated from protobuf field repeated .google.protobuf.Timestamp future_action_times = 6; + * @param array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFutureActionTimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Timestamp::class); + $this->future_action_times = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/SchedulePatch.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/SchedulePatch.php new file mode 100644 index 0000000..7dc3998 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/SchedulePatch.php @@ -0,0 +1,183 @@ +temporal.api.schedule.v1.SchedulePatch + */ +class SchedulePatch extends \Google\Protobuf\Internal\Message +{ + /** + * If set, trigger one action immediately. + * + * Generated from protobuf field .temporal.api.schedule.v1.TriggerImmediatelyRequest trigger_immediately = 1; + */ + protected $trigger_immediately = null; + /** + * If set, runs though the specified time period(s) and takes actions as if that time + * passed by right now, all at once. The overlap policy can be overridden for the + * scope of the backfill. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.BackfillRequest backfill_request = 2; + */ + private $backfill_request; + /** + * If set, change the state to paused or unpaused (respectively) and set the + * notes field to the value of the string. + * + * Generated from protobuf field string pause = 3; + */ + protected $pause = ''; + /** + * Generated from protobuf field string unpause = 4; + */ + protected $unpause = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Schedule\V1\TriggerImmediatelyRequest $trigger_immediately + * If set, trigger one action immediately. + * @type array<\Temporal\Api\Schedule\V1\BackfillRequest>|\Google\Protobuf\Internal\RepeatedField $backfill_request + * If set, runs though the specified time period(s) and takes actions as if that time + * passed by right now, all at once. The overlap policy can be overridden for the + * scope of the backfill. + * @type string $pause + * If set, change the state to paused or unpaused (respectively) and set the + * notes field to the value of the string. + * @type string $unpause + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * If set, trigger one action immediately. + * + * Generated from protobuf field .temporal.api.schedule.v1.TriggerImmediatelyRequest trigger_immediately = 1; + * @return \Temporal\Api\Schedule\V1\TriggerImmediatelyRequest|null + */ + public function getTriggerImmediately() + { + return $this->trigger_immediately; + } + + public function hasTriggerImmediately() + { + return isset($this->trigger_immediately); + } + + public function clearTriggerImmediately() + { + unset($this->trigger_immediately); + } + + /** + * If set, trigger one action immediately. + * + * Generated from protobuf field .temporal.api.schedule.v1.TriggerImmediatelyRequest trigger_immediately = 1; + * @param \Temporal\Api\Schedule\V1\TriggerImmediatelyRequest $var + * @return $this + */ + public function setTriggerImmediately($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\TriggerImmediatelyRequest::class); + $this->trigger_immediately = $var; + + return $this; + } + + /** + * If set, runs though the specified time period(s) and takes actions as if that time + * passed by right now, all at once. The overlap policy can be overridden for the + * scope of the backfill. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.BackfillRequest backfill_request = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackfillRequest() + { + return $this->backfill_request; + } + + /** + * If set, runs though the specified time period(s) and takes actions as if that time + * passed by right now, all at once. The overlap policy can be overridden for the + * scope of the backfill. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.BackfillRequest backfill_request = 2; + * @param array<\Temporal\Api\Schedule\V1\BackfillRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackfillRequest($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\BackfillRequest::class); + $this->backfill_request = $arr; + + return $this; + } + + /** + * If set, change the state to paused or unpaused (respectively) and set the + * notes field to the value of the string. + * + * Generated from protobuf field string pause = 3; + * @return string + */ + public function getPause() + { + return $this->pause; + } + + /** + * If set, change the state to paused or unpaused (respectively) and set the + * notes field to the value of the string. + * + * Generated from protobuf field string pause = 3; + * @param string $var + * @return $this + */ + public function setPause($var) + { + GPBUtil::checkString($var, True); + $this->pause = $var; + + return $this; + } + + /** + * Generated from protobuf field string unpause = 4; + * @return string + */ + public function getUnpause() + { + return $this->unpause; + } + + /** + * Generated from protobuf field string unpause = 4; + * @param string $var + * @return $this + */ + public function setUnpause($var) + { + GPBUtil::checkString($var, True); + $this->unpause = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/SchedulePolicies.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/SchedulePolicies.php new file mode 100644 index 0000000..31c81f0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/SchedulePolicies.php @@ -0,0 +1,218 @@ +temporal.api.schedule.v1.SchedulePolicies + */ +class SchedulePolicies extends \Google\Protobuf\Internal\Message +{ + /** + * Policy for overlaps. + * Note that this can be changed after a schedule has taken some actions, + * and some changes might produce unintuitive results. In general, the later + * policy overrides the earlier policy. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1; + */ + protected $overlap_policy = 0; + /** + * Policy for catchups: + * If the Temporal server misses an action due to one or more components + * being down, and comes back up, the action will be run if the scheduled + * time is within this window from the current time. + * This value defaults to one year, and can't be less than 10 seconds. + * + * Generated from protobuf field .google.protobuf.Duration catchup_window = 2; + */ + protected $catchup_window = null; + /** + * If true, and a workflow run fails or times out, turn on "paused". + * This applies after retry policies: the full chain of retries must fail to + * trigger a pause here. + * + * Generated from protobuf field bool pause_on_failure = 3; + */ + protected $pause_on_failure = false; + /** + * If true, and the action would start a workflow, a timestamp will not be + * appended to the scheduled workflow id. + * + * Generated from protobuf field bool keep_original_workflow_id = 4; + */ + protected $keep_original_workflow_id = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $overlap_policy + * Policy for overlaps. + * Note that this can be changed after a schedule has taken some actions, + * and some changes might produce unintuitive results. In general, the later + * policy overrides the earlier policy. + * @type \Google\Protobuf\Duration $catchup_window + * Policy for catchups: + * If the Temporal server misses an action due to one or more components + * being down, and comes back up, the action will be run if the scheduled + * time is within this window from the current time. + * This value defaults to one year, and can't be less than 10 seconds. + * @type bool $pause_on_failure + * If true, and a workflow run fails or times out, turn on "paused". + * This applies after retry policies: the full chain of retries must fail to + * trigger a pause here. + * @type bool $keep_original_workflow_id + * If true, and the action would start a workflow, a timestamp will not be + * appended to the scheduled workflow id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Policy for overlaps. + * Note that this can be changed after a schedule has taken some actions, + * and some changes might produce unintuitive results. In general, the later + * policy overrides the earlier policy. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1; + * @return int + */ + public function getOverlapPolicy() + { + return $this->overlap_policy; + } + + /** + * Policy for overlaps. + * Note that this can be changed after a schedule has taken some actions, + * and some changes might produce unintuitive results. In general, the later + * policy overrides the earlier policy. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1; + * @param int $var + * @return $this + */ + public function setOverlapPolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ScheduleOverlapPolicy::class); + $this->overlap_policy = $var; + + return $this; + } + + /** + * Policy for catchups: + * If the Temporal server misses an action due to one or more components + * being down, and comes back up, the action will be run if the scheduled + * time is within this window from the current time. + * This value defaults to one year, and can't be less than 10 seconds. + * + * Generated from protobuf field .google.protobuf.Duration catchup_window = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getCatchupWindow() + { + return $this->catchup_window; + } + + public function hasCatchupWindow() + { + return isset($this->catchup_window); + } + + public function clearCatchupWindow() + { + unset($this->catchup_window); + } + + /** + * Policy for catchups: + * If the Temporal server misses an action due to one or more components + * being down, and comes back up, the action will be run if the scheduled + * time is within this window from the current time. + * This value defaults to one year, and can't be less than 10 seconds. + * + * Generated from protobuf field .google.protobuf.Duration catchup_window = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCatchupWindow($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->catchup_window = $var; + + return $this; + } + + /** + * If true, and a workflow run fails or times out, turn on "paused". + * This applies after retry policies: the full chain of retries must fail to + * trigger a pause here. + * + * Generated from protobuf field bool pause_on_failure = 3; + * @return bool + */ + public function getPauseOnFailure() + { + return $this->pause_on_failure; + } + + /** + * If true, and a workflow run fails or times out, turn on "paused". + * This applies after retry policies: the full chain of retries must fail to + * trigger a pause here. + * + * Generated from protobuf field bool pause_on_failure = 3; + * @param bool $var + * @return $this + */ + public function setPauseOnFailure($var) + { + GPBUtil::checkBool($var); + $this->pause_on_failure = $var; + + return $this; + } + + /** + * If true, and the action would start a workflow, a timestamp will not be + * appended to the scheduled workflow id. + * + * Generated from protobuf field bool keep_original_workflow_id = 4; + * @return bool + */ + public function getKeepOriginalWorkflowId() + { + return $this->keep_original_workflow_id; + } + + /** + * If true, and the action would start a workflow, a timestamp will not be + * appended to the scheduled workflow id. + * + * Generated from protobuf field bool keep_original_workflow_id = 4; + * @param bool $var + * @return $this + */ + public function setKeepOriginalWorkflowId($var) + { + GPBUtil::checkBool($var); + $this->keep_original_workflow_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleSpec.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleSpec.php new file mode 100644 index 0000000..c331a93 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleSpec.php @@ -0,0 +1,591 @@ +temporal.api.schedule.v1.ScheduleSpec + */ +class ScheduleSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Calendar-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.StructuredCalendarSpec structured_calendar = 7; + */ + private $structured_calendar; + /** + * cron_string holds a traditional cron specification as a string. It + * accepts 5, 6, or 7 fields, separated by spaces, and interprets them the + * same way as CalendarSpec. + * 5 fields: minute, hour, day_of_month, month, day_of_week + * 6 fields: minute, hour, day_of_month, month, day_of_week, year + * 7 fields: second, minute, hour, day_of_month, month, day_of_week, year + * If year is not given, it defaults to *. If second is not given, it + * defaults to 0. + * Shorthands \@yearly, \@monthly, \@weekly, \@daily, and \@hourly are also + * accepted instead of the 5-7 time fields. + * Optionally, the string can be preceded by CRON_TZ= or + * TZ=, which will get copied to timezone_name. (There must + * not also be a timezone_name present.) + * Optionally "#" followed by a comment can appear at the end of the string. + * Note that the special case that some cron implementations have for + * treating day_of_month and day_of_week as "or" instead of "and" when both + * are set is not implemented. + * \@every [/] is accepted and gets compiled into an + * IntervalSpec instead. and should be a decimal integer + * with a unit suffix s, m, h, or d. + * + * Generated from protobuf field repeated string cron_string = 8; + */ + private $cron_string; + /** + * Calendar-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.CalendarSpec calendar = 1; + */ + private $calendar; + /** + * Interval-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.IntervalSpec interval = 2; + */ + private $interval; + /** + * Any timestamps matching any of exclude_* will be skipped. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.CalendarSpec exclude_calendar = 3 [deprecated = true]; + * @deprecated + */ + private $exclude_calendar; + /** + * Generated from protobuf field repeated .temporal.api.schedule.v1.StructuredCalendarSpec exclude_structured_calendar = 9; + */ + private $exclude_structured_calendar; + /** + * If start_time is set, any timestamps before start_time will be skipped. + * (Together, start_time and end_time make an inclusive interval.) + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * If end_time is set, any timestamps after end_time will be skipped. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + */ + protected $end_time = null; + /** + * All timestamps will be incremented by a random value from 0 to this + * amount of jitter. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration jitter = 6; + */ + protected $jitter = null; + /** + * Time zone to interpret all calendar-based specs in. + * If unset, defaults to UTC. We recommend using UTC for your application if + * at all possible, to avoid various surprising properties of time zones. + * Time zones may be provided by name, corresponding to names in the IANA + * time zone database (see https://www.iana.org/time-zones). The definition + * will be loaded by the Temporal server from the environment it runs in. + * If your application requires more control over the time zone definition + * used, it may pass in a complete definition in the form of a TZif file + * from the time zone database. If present, this will be used instead of + * loading anything from the environment. You are then responsible for + * updating timezone_data when the definition changes. + * Calendar spec matching is based on literal matching of the clock time + * with no special handling of DST: if you write a calendar spec that fires + * at 2:30am and specify a time zone that follows DST, that action will not + * be triggered on the day that has no 2:30am. Similarly, an action that + * fires at 1:30am will be triggered twice on the day that has two 1:30s. + * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). + * + * Generated from protobuf field string timezone_name = 10; + */ + protected $timezone_name = ''; + /** + * Generated from protobuf field bytes timezone_data = 11; + */ + protected $timezone_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Schedule\V1\StructuredCalendarSpec>|\Google\Protobuf\Internal\RepeatedField $structured_calendar + * Calendar-based specifications of times. + * @type array|\Google\Protobuf\Internal\RepeatedField $cron_string + * cron_string holds a traditional cron specification as a string. It + * accepts 5, 6, or 7 fields, separated by spaces, and interprets them the + * same way as CalendarSpec. + * 5 fields: minute, hour, day_of_month, month, day_of_week + * 6 fields: minute, hour, day_of_month, month, day_of_week, year + * 7 fields: second, minute, hour, day_of_month, month, day_of_week, year + * If year is not given, it defaults to *. If second is not given, it + * defaults to 0. + * Shorthands \@yearly, \@monthly, \@weekly, \@daily, and \@hourly are also + * accepted instead of the 5-7 time fields. + * Optionally, the string can be preceded by CRON_TZ= or + * TZ=, which will get copied to timezone_name. (There must + * not also be a timezone_name present.) + * Optionally "#" followed by a comment can appear at the end of the string. + * Note that the special case that some cron implementations have for + * treating day_of_month and day_of_week as "or" instead of "and" when both + * are set is not implemented. + * \@every [/] is accepted and gets compiled into an + * IntervalSpec instead. and should be a decimal integer + * with a unit suffix s, m, h, or d. + * @type array<\Temporal\Api\Schedule\V1\CalendarSpec>|\Google\Protobuf\Internal\RepeatedField $calendar + * Calendar-based specifications of times. + * @type array<\Temporal\Api\Schedule\V1\IntervalSpec>|\Google\Protobuf\Internal\RepeatedField $interval + * Interval-based specifications of times. + * @type array<\Temporal\Api\Schedule\V1\CalendarSpec>|\Google\Protobuf\Internal\RepeatedField $exclude_calendar + * Any timestamps matching any of exclude_* will be skipped. + * @type array<\Temporal\Api\Schedule\V1\StructuredCalendarSpec>|\Google\Protobuf\Internal\RepeatedField $exclude_structured_calendar + * @type \Google\Protobuf\Timestamp $start_time + * If start_time is set, any timestamps before start_time will be skipped. + * (Together, start_time and end_time make an inclusive interval.) + * @type \Google\Protobuf\Timestamp $end_time + * If end_time is set, any timestamps after end_time will be skipped. + * @type \Google\Protobuf\Duration $jitter + * All timestamps will be incremented by a random value from 0 to this + * amount of jitter. Default: 0 + * @type string $timezone_name + * Time zone to interpret all calendar-based specs in. + * If unset, defaults to UTC. We recommend using UTC for your application if + * at all possible, to avoid various surprising properties of time zones. + * Time zones may be provided by name, corresponding to names in the IANA + * time zone database (see https://www.iana.org/time-zones). The definition + * will be loaded by the Temporal server from the environment it runs in. + * If your application requires more control over the time zone definition + * used, it may pass in a complete definition in the form of a TZif file + * from the time zone database. If present, this will be used instead of + * loading anything from the environment. You are then responsible for + * updating timezone_data when the definition changes. + * Calendar spec matching is based on literal matching of the clock time + * with no special handling of DST: if you write a calendar spec that fires + * at 2:30am and specify a time zone that follows DST, that action will not + * be triggered on the day that has no 2:30am. Similarly, an action that + * fires at 1:30am will be triggered twice on the day that has two 1:30s. + * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). + * @type string $timezone_data + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Calendar-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.StructuredCalendarSpec structured_calendar = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStructuredCalendar() + { + return $this->structured_calendar; + } + + /** + * Calendar-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.StructuredCalendarSpec structured_calendar = 7; + * @param array<\Temporal\Api\Schedule\V1\StructuredCalendarSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStructuredCalendar($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\StructuredCalendarSpec::class); + $this->structured_calendar = $arr; + + return $this; + } + + /** + * cron_string holds a traditional cron specification as a string. It + * accepts 5, 6, or 7 fields, separated by spaces, and interprets them the + * same way as CalendarSpec. + * 5 fields: minute, hour, day_of_month, month, day_of_week + * 6 fields: minute, hour, day_of_month, month, day_of_week, year + * 7 fields: second, minute, hour, day_of_month, month, day_of_week, year + * If year is not given, it defaults to *. If second is not given, it + * defaults to 0. + * Shorthands \@yearly, \@monthly, \@weekly, \@daily, and \@hourly are also + * accepted instead of the 5-7 time fields. + * Optionally, the string can be preceded by CRON_TZ= or + * TZ=, which will get copied to timezone_name. (There must + * not also be a timezone_name present.) + * Optionally "#" followed by a comment can appear at the end of the string. + * Note that the special case that some cron implementations have for + * treating day_of_month and day_of_week as "or" instead of "and" when both + * are set is not implemented. + * \@every [/] is accepted and gets compiled into an + * IntervalSpec instead. and should be a decimal integer + * with a unit suffix s, m, h, or d. + * + * Generated from protobuf field repeated string cron_string = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCronString() + { + return $this->cron_string; + } + + /** + * cron_string holds a traditional cron specification as a string. It + * accepts 5, 6, or 7 fields, separated by spaces, and interprets them the + * same way as CalendarSpec. + * 5 fields: minute, hour, day_of_month, month, day_of_week + * 6 fields: minute, hour, day_of_month, month, day_of_week, year + * 7 fields: second, minute, hour, day_of_month, month, day_of_week, year + * If year is not given, it defaults to *. If second is not given, it + * defaults to 0. + * Shorthands \@yearly, \@monthly, \@weekly, \@daily, and \@hourly are also + * accepted instead of the 5-7 time fields. + * Optionally, the string can be preceded by CRON_TZ= or + * TZ=, which will get copied to timezone_name. (There must + * not also be a timezone_name present.) + * Optionally "#" followed by a comment can appear at the end of the string. + * Note that the special case that some cron implementations have for + * treating day_of_month and day_of_week as "or" instead of "and" when both + * are set is not implemented. + * \@every [/] is accepted and gets compiled into an + * IntervalSpec instead. and should be a decimal integer + * with a unit suffix s, m, h, or d. + * + * Generated from protobuf field repeated string cron_string = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCronString($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cron_string = $arr; + + return $this; + } + + /** + * Calendar-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.CalendarSpec calendar = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCalendar() + { + return $this->calendar; + } + + /** + * Calendar-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.CalendarSpec calendar = 1; + * @param array<\Temporal\Api\Schedule\V1\CalendarSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCalendar($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\CalendarSpec::class); + $this->calendar = $arr; + + return $this; + } + + /** + * Interval-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.IntervalSpec interval = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInterval() + { + return $this->interval; + } + + /** + * Interval-based specifications of times. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.IntervalSpec interval = 2; + * @param array<\Temporal\Api\Schedule\V1\IntervalSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInterval($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\IntervalSpec::class); + $this->interval = $arr; + + return $this; + } + + /** + * Any timestamps matching any of exclude_* will be skipped. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.CalendarSpec exclude_calendar = 3 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getExcludeCalendar() + { + @trigger_error('exclude_calendar is deprecated.', E_USER_DEPRECATED); + return $this->exclude_calendar; + } + + /** + * Any timestamps matching any of exclude_* will be skipped. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.CalendarSpec exclude_calendar = 3 [deprecated = true]; + * @param array<\Temporal\Api\Schedule\V1\CalendarSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setExcludeCalendar($var) + { + @trigger_error('exclude_calendar is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\CalendarSpec::class); + $this->exclude_calendar = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.schedule.v1.StructuredCalendarSpec exclude_structured_calendar = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludeStructuredCalendar() + { + return $this->exclude_structured_calendar; + } + + /** + * Generated from protobuf field repeated .temporal.api.schedule.v1.StructuredCalendarSpec exclude_structured_calendar = 9; + * @param array<\Temporal\Api\Schedule\V1\StructuredCalendarSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludeStructuredCalendar($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\StructuredCalendarSpec::class); + $this->exclude_structured_calendar = $arr; + + return $this; + } + + /** + * If start_time is set, any timestamps before start_time will be skipped. + * (Together, start_time and end_time make an inclusive interval.) + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @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); + } + + /** + * If start_time is set, any timestamps before start_time will be skipped. + * (Together, start_time and end_time make an inclusive interval.) + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * If end_time is set, any timestamps after end_time will be skipped. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @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); + } + + /** + * If end_time is set, any timestamps after end_time will be skipped. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * All timestamps will be incremented by a random value from 0 to this + * amount of jitter. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration jitter = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getJitter() + { + return $this->jitter; + } + + public function hasJitter() + { + return isset($this->jitter); + } + + public function clearJitter() + { + unset($this->jitter); + } + + /** + * All timestamps will be incremented by a random value from 0 to this + * amount of jitter. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration jitter = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setJitter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->jitter = $var; + + return $this; + } + + /** + * Time zone to interpret all calendar-based specs in. + * If unset, defaults to UTC. We recommend using UTC for your application if + * at all possible, to avoid various surprising properties of time zones. + * Time zones may be provided by name, corresponding to names in the IANA + * time zone database (see https://www.iana.org/time-zones). The definition + * will be loaded by the Temporal server from the environment it runs in. + * If your application requires more control over the time zone definition + * used, it may pass in a complete definition in the form of a TZif file + * from the time zone database. If present, this will be used instead of + * loading anything from the environment. You are then responsible for + * updating timezone_data when the definition changes. + * Calendar spec matching is based on literal matching of the clock time + * with no special handling of DST: if you write a calendar spec that fires + * at 2:30am and specify a time zone that follows DST, that action will not + * be triggered on the day that has no 2:30am. Similarly, an action that + * fires at 1:30am will be triggered twice on the day that has two 1:30s. + * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). + * + * Generated from protobuf field string timezone_name = 10; + * @return string + */ + public function getTimezoneName() + { + return $this->timezone_name; + } + + /** + * Time zone to interpret all calendar-based specs in. + * If unset, defaults to UTC. We recommend using UTC for your application if + * at all possible, to avoid various surprising properties of time zones. + * Time zones may be provided by name, corresponding to names in the IANA + * time zone database (see https://www.iana.org/time-zones). The definition + * will be loaded by the Temporal server from the environment it runs in. + * If your application requires more control over the time zone definition + * used, it may pass in a complete definition in the form of a TZif file + * from the time zone database. If present, this will be used instead of + * loading anything from the environment. You are then responsible for + * updating timezone_data when the definition changes. + * Calendar spec matching is based on literal matching of the clock time + * with no special handling of DST: if you write a calendar spec that fires + * at 2:30am and specify a time zone that follows DST, that action will not + * be triggered on the day that has no 2:30am. Similarly, an action that + * fires at 1:30am will be triggered twice on the day that has two 1:30s. + * Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). + * + * Generated from protobuf field string timezone_name = 10; + * @param string $var + * @return $this + */ + public function setTimezoneName($var) + { + GPBUtil::checkString($var, True); + $this->timezone_name = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes timezone_data = 11; + * @return string + */ + public function getTimezoneData() + { + return $this->timezone_data; + } + + /** + * Generated from protobuf field bytes timezone_data = 11; + * @param string $var + * @return $this + */ + public function setTimezoneData($var) + { + GPBUtil::checkString($var, False); + $this->timezone_data = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleState.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleState.php new file mode 100644 index 0000000..1335cf8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/ScheduleState.php @@ -0,0 +1,193 @@ +temporal.api.schedule.v1.ScheduleState + */ +class ScheduleState extends \Google\Protobuf\Internal\Message +{ + /** + * Informative human-readable message with contextual notes, e.g. the reason + * a schedule is paused. The system may overwrite this message on certain + * conditions, e.g. when pause-on-failure happens. + * + * Generated from protobuf field string notes = 1; + */ + protected $notes = ''; + /** + * If true, do not take any actions based on the schedule spec. + * + * Generated from protobuf field bool paused = 2; + */ + protected $paused = false; + /** + * If limited_actions is true, decrement remaining_actions after each + * action, and do not take any more scheduled actions if remaining_actions + * is zero. Actions may still be taken by explicit request (i.e. trigger + * immediately or backfill). Skipped actions (due to overlap policy) do not + * count against remaining actions. + * If a schedule has no more remaining actions, then the schedule will be + * subject to automatic deletion (after several days). + * + * Generated from protobuf field bool limited_actions = 3; + */ + protected $limited_actions = false; + /** + * Generated from protobuf field int64 remaining_actions = 4; + */ + protected $remaining_actions = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notes + * Informative human-readable message with contextual notes, e.g. the reason + * a schedule is paused. The system may overwrite this message on certain + * conditions, e.g. when pause-on-failure happens. + * @type bool $paused + * If true, do not take any actions based on the schedule spec. + * @type bool $limited_actions + * If limited_actions is true, decrement remaining_actions after each + * action, and do not take any more scheduled actions if remaining_actions + * is zero. Actions may still be taken by explicit request (i.e. trigger + * immediately or backfill). Skipped actions (due to overlap policy) do not + * count against remaining actions. + * If a schedule has no more remaining actions, then the schedule will be + * subject to automatic deletion (after several days). + * @type int|string $remaining_actions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Informative human-readable message with contextual notes, e.g. the reason + * a schedule is paused. The system may overwrite this message on certain + * conditions, e.g. when pause-on-failure happens. + * + * Generated from protobuf field string notes = 1; + * @return string + */ + public function getNotes() + { + return $this->notes; + } + + /** + * Informative human-readable message with contextual notes, e.g. the reason + * a schedule is paused. The system may overwrite this message on certain + * conditions, e.g. when pause-on-failure happens. + * + * Generated from protobuf field string notes = 1; + * @param string $var + * @return $this + */ + public function setNotes($var) + { + GPBUtil::checkString($var, True); + $this->notes = $var; + + return $this; + } + + /** + * If true, do not take any actions based on the schedule spec. + * + * Generated from protobuf field bool paused = 2; + * @return bool + */ + public function getPaused() + { + return $this->paused; + } + + /** + * If true, do not take any actions based on the schedule spec. + * + * Generated from protobuf field bool paused = 2; + * @param bool $var + * @return $this + */ + public function setPaused($var) + { + GPBUtil::checkBool($var); + $this->paused = $var; + + return $this; + } + + /** + * If limited_actions is true, decrement remaining_actions after each + * action, and do not take any more scheduled actions if remaining_actions + * is zero. Actions may still be taken by explicit request (i.e. trigger + * immediately or backfill). Skipped actions (due to overlap policy) do not + * count against remaining actions. + * If a schedule has no more remaining actions, then the schedule will be + * subject to automatic deletion (after several days). + * + * Generated from protobuf field bool limited_actions = 3; + * @return bool + */ + public function getLimitedActions() + { + return $this->limited_actions; + } + + /** + * If limited_actions is true, decrement remaining_actions after each + * action, and do not take any more scheduled actions if remaining_actions + * is zero. Actions may still be taken by explicit request (i.e. trigger + * immediately or backfill). Skipped actions (due to overlap policy) do not + * count against remaining actions. + * If a schedule has no more remaining actions, then the schedule will be + * subject to automatic deletion (after several days). + * + * Generated from protobuf field bool limited_actions = 3; + * @param bool $var + * @return $this + */ + public function setLimitedActions($var) + { + GPBUtil::checkBool($var); + $this->limited_actions = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 remaining_actions = 4; + * @return int|string + */ + public function getRemainingActions() + { + return $this->remaining_actions; + } + + /** + * Generated from protobuf field int64 remaining_actions = 4; + * @param int|string $var + * @return $this + */ + public function setRemainingActions($var) + { + GPBUtil::checkInt64($var); + $this->remaining_actions = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/StructuredCalendarSpec.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/StructuredCalendarSpec.php new file mode 100644 index 0000000..ff61a66 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/StructuredCalendarSpec.php @@ -0,0 +1,322 @@ +temporal.api.schedule.v1.StructuredCalendarSpec + */ +class StructuredCalendarSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Match seconds (0-59) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range second = 1; + */ + private $second; + /** + * Match minutes (0-59) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range minute = 2; + */ + private $minute; + /** + * Match hours (0-23) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range hour = 3; + */ + private $hour; + /** + * Match days of the month (1-31) + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range day_of_month = 4; + */ + private $day_of_month; + /** + * Match months (1-12) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range month = 5; + */ + private $month; + /** + * Match years. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range year = 6; + */ + private $year; + /** + * Match days of the week (0-6; 0 is Sunday). + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range day_of_week = 7; + */ + private $day_of_week; + /** + * Free-form comment describing the intention of this spec. + * + * Generated from protobuf field string comment = 8; + */ + protected $comment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $second + * Match seconds (0-59) + * @type array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $minute + * Match minutes (0-59) + * @type array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $hour + * Match hours (0-23) + * @type array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $day_of_month + * Match days of the month (1-31) + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * @type array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $month + * Match months (1-12) + * @type array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $year + * Match years. + * @type array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $day_of_week + * Match days of the week (0-6; 0 is Sunday). + * @type string $comment + * Free-form comment describing the intention of this spec. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Match seconds (0-59) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range second = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecond() + { + return $this->second; + } + + /** + * Match seconds (0-59) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range second = 1; + * @param array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecond($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\Range::class); + $this->second = $arr; + + return $this; + } + + /** + * Match minutes (0-59) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range minute = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMinute() + { + return $this->minute; + } + + /** + * Match minutes (0-59) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range minute = 2; + * @param array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMinute($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\Range::class); + $this->minute = $arr; + + return $this; + } + + /** + * Match hours (0-23) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range hour = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHour() + { + return $this->hour; + } + + /** + * Match hours (0-23) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range hour = 3; + * @param array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHour($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\Range::class); + $this->hour = $arr; + + return $this; + } + + /** + * Match days of the month (1-31) + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range day_of_month = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDayOfMonth() + { + return $this->day_of_month; + } + + /** + * Match days of the month (1-31) + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: standard name of field --) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range day_of_month = 4; + * @param array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDayOfMonth($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\Range::class); + $this->day_of_month = $arr; + + return $this; + } + + /** + * Match months (1-12) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range month = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMonth() + { + return $this->month; + } + + /** + * Match months (1-12) + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range month = 5; + * @param array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMonth($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\Range::class); + $this->month = $arr; + + return $this; + } + + /** + * Match years. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range year = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getYear() + { + return $this->year; + } + + /** + * Match years. + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range year = 6; + * @param array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setYear($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\Range::class); + $this->year = $arr; + + return $this; + } + + /** + * Match days of the week (0-6; 0 is Sunday). + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range day_of_week = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDayOfWeek() + { + return $this->day_of_week; + } + + /** + * Match days of the week (0-6; 0 is Sunday). + * + * Generated from protobuf field repeated .temporal.api.schedule.v1.Range day_of_week = 7; + * @param array<\Temporal\Api\Schedule\V1\Range>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDayOfWeek($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\Range::class); + $this->day_of_week = $arr; + + return $this; + } + + /** + * Free-form comment describing the intention of this spec. + * + * Generated from protobuf field string comment = 8; + * @return string + */ + public function getComment() + { + return $this->comment; + } + + /** + * Free-form comment describing the intention of this spec. + * + * Generated from protobuf field string comment = 8; + * @param string $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkString($var, True); + $this->comment = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/TriggerImmediatelyRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/TriggerImmediatelyRequest.php new file mode 100644 index 0000000..d12dd41 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Schedule/V1/TriggerImmediatelyRequest.php @@ -0,0 +1,66 @@ +temporal.api.schedule.v1.TriggerImmediatelyRequest + */ +class TriggerImmediatelyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * If set, override overlap policy for this one request. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1; + */ + protected $overlap_policy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $overlap_policy + * If set, override overlap policy for this one request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * If set, override overlap policy for this one request. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1; + * @return int + */ + public function getOverlapPolicy() + { + return $this->overlap_policy; + } + + /** + * If set, override overlap policy for this one request. + * + * Generated from protobuf field .temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1; + * @param int $var + * @return $this + */ + public function setOverlapPolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ScheduleOverlapPolicy::class); + $this->overlap_policy = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/EnhancedStackTrace.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/EnhancedStackTrace.php new file mode 100644 index 0000000..93027d2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/EnhancedStackTrace.php @@ -0,0 +1,146 @@ +temporal.api.sdk.v1.EnhancedStackTrace + */ +class EnhancedStackTrace extends \Google\Protobuf\Internal\Message +{ + /** + * Information pertaining to the SDK that the trace has been captured from. + * + * Generated from protobuf field .temporal.api.sdk.v1.StackTraceSDKInfo sdk = 1; + */ + protected $sdk = null; + /** + * Mapping of file path to file contents. + * + * Generated from protobuf field map sources = 2; + */ + private $sources; + /** + * Collection of stacks captured. + * + * Generated from protobuf field repeated .temporal.api.sdk.v1.StackTrace stacks = 3; + */ + private $stacks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Sdk\V1\StackTraceSDKInfo $sdk + * Information pertaining to the SDK that the trace has been captured from. + * @type array|\Google\Protobuf\Internal\MapField $sources + * Mapping of file path to file contents. + * @type array<\Temporal\Api\Sdk\V1\StackTrace>|\Google\Protobuf\Internal\RepeatedField $stacks + * Collection of stacks captured. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce(); + parent::__construct($data); + } + + /** + * Information pertaining to the SDK that the trace has been captured from. + * + * Generated from protobuf field .temporal.api.sdk.v1.StackTraceSDKInfo sdk = 1; + * @return \Temporal\Api\Sdk\V1\StackTraceSDKInfo|null + */ + public function getSdk() + { + return $this->sdk; + } + + public function hasSdk() + { + return isset($this->sdk); + } + + public function clearSdk() + { + unset($this->sdk); + } + + /** + * Information pertaining to the SDK that the trace has been captured from. + * + * Generated from protobuf field .temporal.api.sdk.v1.StackTraceSDKInfo sdk = 1; + * @param \Temporal\Api\Sdk\V1\StackTraceSDKInfo $var + * @return $this + */ + public function setSdk($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\StackTraceSDKInfo::class); + $this->sdk = $var; + + return $this; + } + + /** + * Mapping of file path to file contents. + * + * Generated from protobuf field map sources = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Mapping of file path to file contents. + * + * Generated from protobuf field map sources = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Sdk\V1\StackTraceFileSlice::class); + $this->sources = $arr; + + return $this; + } + + /** + * Collection of stacks captured. + * + * Generated from protobuf field repeated .temporal.api.sdk.v1.StackTrace stacks = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStacks() + { + return $this->stacks; + } + + /** + * Collection of stacks captured. + * + * Generated from protobuf field repeated .temporal.api.sdk.v1.StackTrace stacks = 3; + * @param array<\Temporal\Api\Sdk\V1\StackTrace>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStacks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Sdk\V1\StackTrace::class); + $this->stacks = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTrace.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTrace.php new file mode 100644 index 0000000..15779fd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTrace.php @@ -0,0 +1,68 @@ +temporal.api.sdk.v1.StackTrace + */ +class StackTrace extends \Google\Protobuf\Internal\Message +{ + /** + * Collection of `FileLocation`s, each for a stack frame that comprise a stack trace. + * + * Generated from protobuf field repeated .temporal.api.sdk.v1.StackTraceFileLocation locations = 1; + */ + private $locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Sdk\V1\StackTraceFileLocation>|\Google\Protobuf\Internal\RepeatedField $locations + * Collection of `FileLocation`s, each for a stack frame that comprise a stack trace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce(); + parent::__construct($data); + } + + /** + * Collection of `FileLocation`s, each for a stack frame that comprise a stack trace. + * + * Generated from protobuf field repeated .temporal.api.sdk.v1.StackTraceFileLocation locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Collection of `FileLocation`s, each for a stack frame that comprise a stack trace. + * + * Generated from protobuf field repeated .temporal.api.sdk.v1.StackTraceFileLocation locations = 1; + * @param array<\Temporal\Api\Sdk\V1\StackTraceFileLocation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Sdk\V1\StackTraceFileLocation::class); + $this->locations = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceFileLocation.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceFileLocation.php new file mode 100644 index 0000000..19daba9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceFileLocation.php @@ -0,0 +1,221 @@ +temporal.api.sdk.v1.StackTraceFileLocation + */ +class StackTraceFileLocation extends \Google\Protobuf\Internal\Message +{ + /** + * Path to source file (absolute or relative). + * If the paths are relative, ensure that they are all relative to the same root. + * + * Generated from protobuf field string file_path = 1; + */ + protected $file_path = ''; + /** + * Optional; If possible, SDK should send this -- this is required for displaying the code location. + * If not provided, set to -1. + * + * Generated from protobuf field int32 line = 2; + */ + protected $line = 0; + /** + * Optional; if possible, SDK should send this. + * If not provided, set to -1. + * + * Generated from protobuf field int32 column = 3; + */ + protected $column = 0; + /** + * Function name this line belongs to, if applicable. + * Used for falling back to stack trace view. + * + * Generated from protobuf field string function_name = 4; + */ + protected $function_name = ''; + /** + * Flag to communicate whether a location should be hidden by default in the stack view. + * + * Generated from protobuf field bool internal_code = 5; + */ + protected $internal_code = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_path + * Path to source file (absolute or relative). + * If the paths are relative, ensure that they are all relative to the same root. + * @type int $line + * Optional; If possible, SDK should send this -- this is required for displaying the code location. + * If not provided, set to -1. + * @type int $column + * Optional; if possible, SDK should send this. + * If not provided, set to -1. + * @type string $function_name + * Function name this line belongs to, if applicable. + * Used for falling back to stack trace view. + * @type bool $internal_code + * Flag to communicate whether a location should be hidden by default in the stack view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce(); + parent::__construct($data); + } + + /** + * Path to source file (absolute or relative). + * If the paths are relative, ensure that they are all relative to the same root. + * + * Generated from protobuf field string file_path = 1; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * Path to source file (absolute or relative). + * If the paths are relative, ensure that they are all relative to the same root. + * + * Generated from protobuf field string file_path = 1; + * @param string $var + * @return $this + */ + public function setFilePath($var) + { + GPBUtil::checkString($var, True); + $this->file_path = $var; + + return $this; + } + + /** + * Optional; If possible, SDK should send this -- this is required for displaying the code location. + * If not provided, set to -1. + * + * Generated from protobuf field int32 line = 2; + * @return int + */ + public function getLine() + { + return $this->line; + } + + /** + * Optional; If possible, SDK should send this -- this is required for displaying the code location. + * If not provided, set to -1. + * + * Generated from protobuf field int32 line = 2; + * @param int $var + * @return $this + */ + public function setLine($var) + { + GPBUtil::checkInt32($var); + $this->line = $var; + + return $this; + } + + /** + * Optional; if possible, SDK should send this. + * If not provided, set to -1. + * + * Generated from protobuf field int32 column = 3; + * @return int + */ + public function getColumn() + { + return $this->column; + } + + /** + * Optional; if possible, SDK should send this. + * If not provided, set to -1. + * + * Generated from protobuf field int32 column = 3; + * @param int $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkInt32($var); + $this->column = $var; + + return $this; + } + + /** + * Function name this line belongs to, if applicable. + * Used for falling back to stack trace view. + * + * Generated from protobuf field string function_name = 4; + * @return string + */ + public function getFunctionName() + { + return $this->function_name; + } + + /** + * Function name this line belongs to, if applicable. + * Used for falling back to stack trace view. + * + * Generated from protobuf field string function_name = 4; + * @param string $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkString($var, True); + $this->function_name = $var; + + return $this; + } + + /** + * Flag to communicate whether a location should be hidden by default in the stack view. + * + * Generated from protobuf field bool internal_code = 5; + * @return bool + */ + public function getInternalCode() + { + return $this->internal_code; + } + + /** + * Flag to communicate whether a location should be hidden by default in the stack view. + * + * Generated from protobuf field bool internal_code = 5; + * @param bool $var + * @return $this + */ + public function setInternalCode($var) + { + GPBUtil::checkBool($var); + $this->internal_code = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceFileSlice.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceFileSlice.php new file mode 100644 index 0000000..35d79b7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceFileSlice.php @@ -0,0 +1,114 @@ +temporal.api.sdk.v1.StackTraceFileSlice + */ +class StackTraceFileSlice extends \Google\Protobuf\Internal\Message +{ + /** + * Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike + * the `line` property of a `StackTraceFileLocation`. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field uint32 line_offset = 1; + */ + protected $line_offset = 0; + /** + * Slice of a file with the respective OS-specific line terminator. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $line_offset + * Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike + * the `line` property of a `StackTraceFileLocation`. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * @type string $content + * Slice of a file with the respective OS-specific line terminator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce(); + parent::__construct($data); + } + + /** + * Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike + * the `line` property of a `StackTraceFileLocation`. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field uint32 line_offset = 1; + * @return int + */ + public function getLineOffset() + { + return $this->line_offset; + } + + /** + * Only used (possibly) to trim the file without breaking syntax highlighting. This is not optional, unlike + * the `line` property of a `StackTraceFileLocation`. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field uint32 line_offset = 1; + * @param int $var + * @return $this + */ + public function setLineOffset($var) + { + GPBUtil::checkUint32($var); + $this->line_offset = $var; + + return $this; + } + + /** + * Slice of a file with the respective OS-specific line terminator. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Slice of a file with the respective OS-specific line terminator. + * + * 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; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceSDKInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceSDKInfo.php new file mode 100644 index 0000000..8b67dee --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/StackTraceSDKInfo.php @@ -0,0 +1,104 @@ +temporal.api.sdk.v1.StackTraceSDKInfo + */ +class StackTraceSDKInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the SDK + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Version string of the SDK + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the SDK + * @type string $version + * Version string of the SDK + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\EnhancedStackTrace::initOnce(); + parent::__construct($data); + } + + /** + * Name of the SDK + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the SDK + * + * 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; + } + + /** + * Version string of the SDK + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version string of the SDK + * + * 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/UserMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/UserMetadata.php new file mode 100644 index 0000000..89ec80d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/UserMetadata.php @@ -0,0 +1,142 @@ +temporal.api.sdk.v1.UserMetadata + */ +class UserMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may not + * apply to this text when used in "title" situations. The payload data section is limited to 400 + * bytes by default. + * + * Generated from protobuf field .temporal.api.common.v1.Payload summary = 1; + */ + protected $summary = null; + /** + * Long-form text that provides details. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may apply to + * this text in common use. The payload data section is limited to 20000 bytes by default. + * + * Generated from protobuf field .temporal.api.common.v1.Payload details = 2; + */ + protected $details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payload $summary + * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may not + * apply to this text when used in "title" situations. The payload data section is limited to 400 + * bytes by default. + * @type \Temporal\Api\Common\V1\Payload $details + * Long-form text that provides details. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may apply to + * this text in common use. The payload data section is limited to 20000 bytes by default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\UserMetadata::initOnce(); + parent::__construct($data); + } + + /** + * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may not + * apply to this text when used in "title" situations. The payload data section is limited to 400 + * bytes by default. + * + * Generated from protobuf field .temporal.api.common.v1.Payload summary = 1; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getSummary() + { + return $this->summary; + } + + public function hasSummary() + { + return isset($this->summary); + } + + public function clearSummary() + { + unset($this->summary); + } + + /** + * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may not + * apply to this text when used in "title" situations. The payload data section is limited to 400 + * bytes by default. + * + * Generated from protobuf field .temporal.api.common.v1.Payload summary = 1; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->summary = $var; + + return $this; + } + + /** + * Long-form text that provides details. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may apply to + * this text in common use. The payload data section is limited to 20000 bytes by default. + * + * Generated from protobuf field .temporal.api.common.v1.Payload details = 2; + * @return \Temporal\Api\Common\V1\Payload|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Long-form text that provides details. This payload should be a "json/plain"-encoded payload + * that is a single JSON string for use in user interfaces. User interface formatting may apply to + * this text in common use. The payload data section is limited to 20000 bytes by default. + * + * Generated from protobuf field .temporal.api.common.v1.Payload details = 2; + * @param \Temporal\Api\Common\V1\Payload $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class); + $this->details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowDefinition.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowDefinition.php new file mode 100644 index 0000000..937a3ce --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowDefinition.php @@ -0,0 +1,153 @@ +temporal.api.sdk.v1.WorkflowDefinition + */ +class WorkflowDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * A name scoped by the task queue that maps to this workflow definition. + * If missing, this workflow is a dynamic workflow. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition query_definitions = 2; + */ + private $query_definitions; + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition signal_definitions = 3; + */ + private $signal_definitions; + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition update_definitions = 4; + */ + private $update_definitions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * A name scoped by the task queue that maps to this workflow definition. + * If missing, this workflow is a dynamic workflow. + * @type array<\Temporal\Api\Sdk\V1\WorkflowInteractionDefinition>|\Google\Protobuf\Internal\RepeatedField $query_definitions + * @type array<\Temporal\Api\Sdk\V1\WorkflowInteractionDefinition>|\Google\Protobuf\Internal\RepeatedField $signal_definitions + * @type array<\Temporal\Api\Sdk\V1\WorkflowInteractionDefinition>|\Google\Protobuf\Internal\RepeatedField $update_definitions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\WorkflowMetadata::initOnce(); + parent::__construct($data); + } + + /** + * A name scoped by the task queue that maps to this workflow definition. + * If missing, this workflow is a dynamic workflow. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * A name scoped by the task queue that maps to this workflow definition. + * If missing, this workflow is a dynamic workflow. + * + * 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; + } + + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition query_definitions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQueryDefinitions() + { + return $this->query_definitions; + } + + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition query_definitions = 2; + * @param array<\Temporal\Api\Sdk\V1\WorkflowInteractionDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQueryDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Sdk\V1\WorkflowInteractionDefinition::class); + $this->query_definitions = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition signal_definitions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSignalDefinitions() + { + return $this->signal_definitions; + } + + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition signal_definitions = 3; + * @param array<\Temporal\Api\Sdk\V1\WorkflowInteractionDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSignalDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Sdk\V1\WorkflowInteractionDefinition::class); + $this->signal_definitions = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition update_definitions = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUpdateDefinitions() + { + return $this->update_definitions; + } + + /** + * Generated from protobuf field repeated .temporal.api.sdk.v1.WorkflowInteractionDefinition update_definitions = 4; + * @param array<\Temporal\Api\Sdk\V1\WorkflowInteractionDefinition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUpdateDefinitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Sdk\V1\WorkflowInteractionDefinition::class); + $this->update_definitions = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowInteractionDefinition.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowInteractionDefinition.php new file mode 100644 index 0000000..c211827 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowInteractionDefinition.php @@ -0,0 +1,120 @@ +temporal.api.sdk.v1.WorkflowInteractionDefinition + */ +class WorkflowInteractionDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * An optional name for the handler. If missing, it represents + * a dynamic handler that processes any interactions not handled by others. + * There is at most one dynamic handler per workflow and interaction kind. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * An optional interaction description provided by the application. + * By convention, external tools may interpret its first part, + * i.e., ending with a line break, as a summary of the description. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * An optional name for the handler. If missing, it represents + * a dynamic handler that processes any interactions not handled by others. + * There is at most one dynamic handler per workflow and interaction kind. + * @type string $description + * An optional interaction description provided by the application. + * By convention, external tools may interpret its first part, + * i.e., ending with a line break, as a summary of the description. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\WorkflowMetadata::initOnce(); + parent::__construct($data); + } + + /** + * An optional name for the handler. If missing, it represents + * a dynamic handler that processes any interactions not handled by others. + * There is at most one dynamic handler per workflow and interaction kind. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * An optional name for the handler. If missing, it represents + * a dynamic handler that processes any interactions not handled by others. + * There is at most one dynamic handler per workflow and interaction kind. + * + * 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; + } + + /** + * An optional interaction description provided by the application. + * By convention, external tools may interpret its first part, + * i.e., ending with a line break, as a summary of the description. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * An optional interaction description provided by the application. + * By convention, external tools may interpret its first part, + * i.e., ending with a line break, as a summary of the description. + * + * 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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowMetadata.php new file mode 100644 index 0000000..8bf6809 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowMetadata.php @@ -0,0 +1,116 @@ +temporal.api.sdk.v1.WorkflowMetadata + */ +class WorkflowMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Metadata provided at declaration or creation time. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowDefinition definition = 1; + */ + protected $definition = null; + /** + * Current long-form details of the workflow's state. This is used by user interfaces to show + * long-form text. This text may be formatted by the user interface. + * + * Generated from protobuf field string current_details = 2; + */ + protected $current_details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Sdk\V1\WorkflowDefinition $definition + * Metadata provided at declaration or creation time. + * @type string $current_details + * Current long-form details of the workflow's state. This is used by user interfaces to show + * long-form text. This text may be formatted by the user interface. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\WorkflowMetadata::initOnce(); + parent::__construct($data); + } + + /** + * Metadata provided at declaration or creation time. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowDefinition definition = 1; + * @return \Temporal\Api\Sdk\V1\WorkflowDefinition|null + */ + public function getDefinition() + { + return $this->definition; + } + + public function hasDefinition() + { + return isset($this->definition); + } + + public function clearDefinition() + { + unset($this->definition); + } + + /** + * Metadata provided at declaration or creation time. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowDefinition definition = 1; + * @param \Temporal\Api\Sdk\V1\WorkflowDefinition $var + * @return $this + */ + public function setDefinition($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\WorkflowDefinition::class); + $this->definition = $var; + + return $this; + } + + /** + * Current long-form details of the workflow's state. This is used by user interfaces to show + * long-form text. This text may be formatted by the user interface. + * + * Generated from protobuf field string current_details = 2; + * @return string + */ + public function getCurrentDetails() + { + return $this->current_details; + } + + /** + * Current long-form details of the workflow's state. This is used by user interfaces to show + * long-form text. This text may be formatted by the user interface. + * + * Generated from protobuf field string current_details = 2; + * @param string $var + * @return $this + */ + public function setCurrentDetails($var) + { + GPBUtil::checkString($var, True); + $this->current_details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowTaskCompletedMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowTaskCompletedMetadata.php new file mode 100644 index 0000000..ed9ef40 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Sdk/V1/WorkflowTaskCompletedMetadata.php @@ -0,0 +1,264 @@ +temporal.api.sdk.v1.WorkflowTaskCompletedMetadata + */ +class WorkflowTaskCompletedMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: + * During replay: + * * If a flag is not recognized (value is too high or not defined), it must fail the workflow + * task. + * * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for + * that flag during and after this WFT are allowed to assume that the flag is present. + * * If a code check for a flag does not find the flag in the set of used flags, it must take + * the branch corresponding to the absence of that flag. + * During non-replay execution of new WFTs: + * * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not + * previously recorded) flags when completing the WFT. + * SDKs which are too old to even know about this field at all are considered to produce + * undefined behavior if they replay workflows which used this mechanism. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field repeated uint32 core_used_flags = 1; + */ + private $core_used_flags; + /** + * Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages + * here as processing a workflow with a different language than the one which authored it is + * already undefined behavior. See `core_used_patches` for more. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field repeated uint32 lang_used_flags = 2; + */ + private $lang_used_flags; + /** + * Name of the SDK that processed the task. This is usually something like "temporal-go" and is + * usually the same as client-name gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * (-- api-linter: core::0122::name-suffix=disabled + * aip.dev/not-precedent: We're ok with a name suffix here. --) + * + * Generated from protobuf field string sdk_name = 3; + */ + protected $sdk_name = ''; + /** + * Version of the SDK that processed the task. This is usually something like "1.20.0" and is + * usually the same as client-version gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * + * Generated from protobuf field string sdk_version = 4; + */ + protected $sdk_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $core_used_flags + * Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: + * During replay: + * * If a flag is not recognized (value is too high or not defined), it must fail the workflow + * task. + * * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for + * that flag during and after this WFT are allowed to assume that the flag is present. + * * If a code check for a flag does not find the flag in the set of used flags, it must take + * the branch corresponding to the absence of that flag. + * During non-replay execution of new WFTs: + * * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not + * previously recorded) flags when completing the WFT. + * SDKs which are too old to even know about this field at all are considered to produce + * undefined behavior if they replay workflows which used this mechanism. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * @type array|\Google\Protobuf\Internal\RepeatedField $lang_used_flags + * Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages + * here as processing a workflow with a different language than the one which authored it is + * already undefined behavior. See `core_used_patches` for more. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * @type string $sdk_name + * Name of the SDK that processed the task. This is usually something like "temporal-go" and is + * usually the same as client-name gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * (-- api-linter: core::0122::name-suffix=disabled + * aip.dev/not-precedent: We're ok with a name suffix here. --) + * @type string $sdk_version + * Version of the SDK that processed the task. This is usually something like "1.20.0" and is + * usually the same as client-version gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Sdk\V1\TaskCompleteMetadata::initOnce(); + parent::__construct($data); + } + + /** + * Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: + * During replay: + * * If a flag is not recognized (value is too high or not defined), it must fail the workflow + * task. + * * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for + * that flag during and after this WFT are allowed to assume that the flag is present. + * * If a code check for a flag does not find the flag in the set of used flags, it must take + * the branch corresponding to the absence of that flag. + * During non-replay execution of new WFTs: + * * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not + * previously recorded) flags when completing the WFT. + * SDKs which are too old to even know about this field at all are considered to produce + * undefined behavior if they replay workflows which used this mechanism. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field repeated uint32 core_used_flags = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCoreUsedFlags() + { + return $this->core_used_flags; + } + + /** + * Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: + * During replay: + * * If a flag is not recognized (value is too high or not defined), it must fail the workflow + * task. + * * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for + * that flag during and after this WFT are allowed to assume that the flag is present. + * * If a code check for a flag does not find the flag in the set of used flags, it must take + * the branch corresponding to the absence of that flag. + * During non-replay execution of new WFTs: + * * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not + * previously recorded) flags when completing the WFT. + * SDKs which are too old to even know about this field at all are considered to produce + * undefined behavior if they replay workflows which used this mechanism. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field repeated uint32 core_used_flags = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCoreUsedFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->core_used_flags = $arr; + + return $this; + } + + /** + * Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages + * here as processing a workflow with a different language than the one which authored it is + * already undefined behavior. See `core_used_patches` for more. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field repeated uint32 lang_used_flags = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLangUsedFlags() + { + return $this->lang_used_flags; + } + + /** + * Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages + * here as processing a workflow with a different language than the one which authored it is + * already undefined behavior. See `core_used_patches` for more. + * (-- api-linter: core::0141::forbidden-types=disabled + * aip.dev/not-precedent: These really shouldn't have negative values. --) + * + * Generated from protobuf field repeated uint32 lang_used_flags = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLangUsedFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->lang_used_flags = $arr; + + return $this; + } + + /** + * Name of the SDK that processed the task. This is usually something like "temporal-go" and is + * usually the same as client-name gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * (-- api-linter: core::0122::name-suffix=disabled + * aip.dev/not-precedent: We're ok with a name suffix here. --) + * + * Generated from protobuf field string sdk_name = 3; + * @return string + */ + public function getSdkName() + { + return $this->sdk_name; + } + + /** + * Name of the SDK that processed the task. This is usually something like "temporal-go" and is + * usually the same as client-name gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * (-- api-linter: core::0122::name-suffix=disabled + * aip.dev/not-precedent: We're ok with a name suffix here. --) + * + * Generated from protobuf field string sdk_name = 3; + * @param string $var + * @return $this + */ + public function setSdkName($var) + { + GPBUtil::checkString($var, True); + $this->sdk_name = $var; + + return $this; + } + + /** + * Version of the SDK that processed the task. This is usually something like "1.20.0" and is + * usually the same as client-version gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * + * Generated from protobuf field string sdk_version = 4; + * @return string + */ + public function getSdkVersion() + { + return $this->sdk_version; + } + + /** + * Version of the SDK that processed the task. This is usually something like "1.20.0" and is + * usually the same as client-version gRPC header. This should only be set if its value changed + * since the last time recorded on the workflow (or be set on the first task). + * + * Generated from protobuf field string sdk_version = 4; + * @param string $var + * @return $this + */ + public function setSdkVersion($var) + { + GPBUtil::checkString($var, True); + $this->sdk_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/BuildIdAssignmentRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/BuildIdAssignmentRule.php new file mode 100644 index 0000000..2d274b0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/BuildIdAssignmentRule.php @@ -0,0 +1,138 @@ +temporal.api.taskqueue.v1.BuildIdAssignmentRule + */ +class BuildIdAssignmentRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string target_build_id = 1; + */ + protected $target_build_id = ''; + protected $ramp; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_build_id + * @type \Temporal\Api\Taskqueue\V1\RampByPercentage $percentage_ramp + * This ramp is useful for gradual Blue/Green deployments (and similar) + * where you want to send a certain portion of the traffic to the target + * Build ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string target_build_id = 1; + * @return string + */ + public function getTargetBuildId() + { + return $this->target_build_id; + } + + /** + * Generated from protobuf field string target_build_id = 1; + * @param string $var + * @return $this + */ + public function setTargetBuildId($var) + { + GPBUtil::checkString($var, True); + $this->target_build_id = $var; + + return $this; + } + + /** + * This ramp is useful for gradual Blue/Green deployments (and similar) + * where you want to send a certain portion of the traffic to the target + * Build ID. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3; + * @return \Temporal\Api\Taskqueue\V1\RampByPercentage|null + */ + public function getPercentageRamp() + { + return $this->readOneof(3); + } + + public function hasPercentageRamp() + { + return $this->hasOneof(3); + } + + /** + * This ramp is useful for gradual Blue/Green deployments (and similar) + * where you want to send a certain portion of the traffic to the target + * Build ID. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3; + * @param \Temporal\Api\Taskqueue\V1\RampByPercentage $var + * @return $this + */ + public function setPercentageRamp($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\RampByPercentage::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getRamp() + { + return $this->whichOneof("ramp"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/BuildIdReachability.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/BuildIdReachability.php new file mode 100644 index 0000000..29bae7a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/BuildIdReachability.php @@ -0,0 +1,102 @@ +temporal.api.taskqueue.v1.BuildIdReachability + */ +class BuildIdReachability extends \Google\Protobuf\Internal\Message +{ + /** + * A build id or empty if unversioned. + * + * Generated from protobuf field string build_id = 1; + */ + protected $build_id = ''; + /** + * Reachability per task queue. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueueReachability task_queue_reachability = 2; + */ + private $task_queue_reachability; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_id + * A build id or empty if unversioned. + * @type array<\Temporal\Api\Taskqueue\V1\TaskQueueReachability>|\Google\Protobuf\Internal\RepeatedField $task_queue_reachability + * Reachability per task queue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * A build id or empty if unversioned. + * + * Generated from protobuf field string build_id = 1; + * @return string + */ + public function getBuildId() + { + return $this->build_id; + } + + /** + * A build id or empty if unversioned. + * + * Generated from protobuf field string build_id = 1; + * @param string $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkString($var, True); + $this->build_id = $var; + + return $this; + } + + /** + * Reachability per task queue. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueueReachability task_queue_reachability = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaskQueueReachability() + { + return $this->task_queue_reachability; + } + + /** + * Reachability per task queue. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueueReachability task_queue_reachability = 2; + * @param array<\Temporal\Api\Taskqueue\V1\TaskQueueReachability>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaskQueueReachability($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TaskQueueReachability::class); + $this->task_queue_reachability = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/CompatibleBuildIdRedirectRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/CompatibleBuildIdRedirectRule.php new file mode 100644 index 0000000..f1ba916 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/CompatibleBuildIdRedirectRule.php @@ -0,0 +1,122 @@ +temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule + */ +class CompatibleBuildIdRedirectRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string source_build_id = 1; + */ + protected $source_build_id = ''; + /** + * Target Build ID must be compatible with the Source Build ID; that is it + * must be able to process event histories made by the Source Build ID by + * using [Patching](https://docs.temporal.io/workflows#patching) or other + * means. + * + * Generated from protobuf field string target_build_id = 2; + */ + protected $target_build_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_build_id + * @type string $target_build_id + * Target Build ID must be compatible with the Source Build ID; that is it + * must be able to process event histories made by the Source Build ID by + * using [Patching](https://docs.temporal.io/workflows#patching) or other + * means. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string source_build_id = 1; + * @return string + */ + public function getSourceBuildId() + { + return $this->source_build_id; + } + + /** + * Generated from protobuf field string source_build_id = 1; + * @param string $var + * @return $this + */ + public function setSourceBuildId($var) + { + GPBUtil::checkString($var, True); + $this->source_build_id = $var; + + return $this; + } + + /** + * Target Build ID must be compatible with the Source Build ID; that is it + * must be able to process event histories made by the Source Build ID by + * using [Patching](https://docs.temporal.io/workflows#patching) or other + * means. + * + * Generated from protobuf field string target_build_id = 2; + * @return string + */ + public function getTargetBuildId() + { + return $this->target_build_id; + } + + /** + * Target Build ID must be compatible with the Source Build ID; that is it + * must be able to process event histories made by the Source Build ID by + * using [Patching](https://docs.temporal.io/workflows#patching) or other + * means. + * + * Generated from protobuf field string target_build_id = 2; + * @param string $var + * @return $this + */ + public function setTargetBuildId($var) + { + GPBUtil::checkString($var, True); + $this->target_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/CompatibleVersionSet.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/CompatibleVersionSet.php new file mode 100644 index 0000000..a05e6fc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/CompatibleVersionSet.php @@ -0,0 +1,69 @@ +temporal.api.taskqueue.v1.CompatibleVersionSet + */ +class CompatibleVersionSet extends \Google\Protobuf\Internal\Message +{ + /** + * All the compatible versions, unordered, except for the last element, which is considered the set "default". + * + * Generated from protobuf field repeated string build_ids = 1; + */ + private $build_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $build_ids + * All the compatible versions, unordered, except for the last element, which is considered the set "default". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * All the compatible versions, unordered, except for the last element, which is considered the set "default". + * + * Generated from protobuf field repeated string build_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuildIds() + { + return $this->build_ids; + } + + /** + * All the compatible versions, unordered, except for the last element, which is considered the set "default". + * + * Generated from protobuf field repeated string build_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuildIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->build_ids = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/PollerInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/PollerInfo.php new file mode 100644 index 0000000..57eaf36 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/PollerInfo.php @@ -0,0 +1,171 @@ +temporal.api.taskqueue.v1.PollerInfo + */ +class PollerInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.protobuf.Timestamp last_access_time = 1; + */ + protected $last_access_time = null; + /** + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + /** + * Generated from protobuf field double rate_per_second = 3; + */ + protected $rate_per_second = 0.0; + /** + * If a worker has opted into the worker versioning feature while polling, its capabilities will + * appear here. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4; + */ + protected $worker_version_capabilities = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $last_access_time + * @type string $identity + * @type float $rate_per_second + * @type \Temporal\Api\Common\V1\WorkerVersionCapabilities $worker_version_capabilities + * If a worker has opted into the worker versioning feature while polling, its capabilities will + * appear here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_access_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastAccessTime() + { + return $this->last_access_time; + } + + public function hasLastAccessTime() + { + return isset($this->last_access_time); + } + + public function clearLastAccessTime() + { + unset($this->last_access_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_access_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastAccessTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_access_time = $var; + + return $this; + } + + /** + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field double rate_per_second = 3; + * @return float + */ + public function getRatePerSecond() + { + return $this->rate_per_second; + } + + /** + * Generated from protobuf field double rate_per_second = 3; + * @param float $var + * @return $this + */ + public function setRatePerSecond($var) + { + GPBUtil::checkDouble($var); + $this->rate_per_second = $var; + + return $this; + } + + /** + * If a worker has opted into the worker versioning feature while polling, its capabilities will + * appear here. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4; + * @return \Temporal\Api\Common\V1\WorkerVersionCapabilities|null + */ + public function getWorkerVersionCapabilities() + { + return $this->worker_version_capabilities; + } + + public function hasWorkerVersionCapabilities() + { + return isset($this->worker_version_capabilities); + } + + public function clearWorkerVersionCapabilities() + { + unset($this->worker_version_capabilities); + } + + /** + * If a worker has opted into the worker versioning feature while polling, its capabilities will + * appear here. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4; + * @param \Temporal\Api\Common\V1\WorkerVersionCapabilities $var + * @return $this + */ + public function setWorkerVersionCapabilities($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionCapabilities::class); + $this->worker_version_capabilities = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/RampByPercentage.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/RampByPercentage.php new file mode 100644 index 0000000..6de5ba3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/RampByPercentage.php @@ -0,0 +1,66 @@ +temporal.api.taskqueue.v1.RampByPercentage + */ +class RampByPercentage extends \Google\Protobuf\Internal\Message +{ + /** + * Acceptable range is [0,100). + * + * Generated from protobuf field float ramp_percentage = 1; + */ + protected $ramp_percentage = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $ramp_percentage + * Acceptable range is [0,100). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Acceptable range is [0,100). + * + * Generated from protobuf field float ramp_percentage = 1; + * @return float + */ + public function getRampPercentage() + { + return $this->ramp_percentage; + } + + /** + * Acceptable range is [0,100). + * + * Generated from protobuf field float ramp_percentage = 1; + * @param float $var + * @return $this + */ + public function setRampPercentage($var) + { + GPBUtil::checkFloat($var); + $this->ramp_percentage = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/StickyExecutionAttributes.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/StickyExecutionAttributes.php new file mode 100644 index 0000000..704291c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/StickyExecutionAttributes.php @@ -0,0 +1,117 @@ +temporal.api.taskqueue.v1.StickyExecutionAttributes + */ +class StickyExecutionAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue worker_task_queue = 1; + */ + protected $worker_task_queue = null; + /** + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 2; + */ + protected $schedule_to_start_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $worker_task_queue + * @type \Google\Protobuf\Duration $schedule_to_start_timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue worker_task_queue = 1; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getWorkerTaskQueue() + { + return $this->worker_task_queue; + } + + public function hasWorkerTaskQueue() + { + return isset($this->worker_task_queue); + } + + public function clearWorkerTaskQueue() + { + unset($this->worker_task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue worker_task_queue = 1; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setWorkerTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->worker_task_queue = $var; + + return $this; + } + + /** + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToStartTimeout() + { + return $this->schedule_to_start_timeout; + } + + public function hasScheduleToStartTimeout() + { + return isset($this->schedule_to_start_timeout); + } + + public function clearScheduleToStartTimeout() + { + unset($this->schedule_to_start_timeout); + } + + /** + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_start_timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToStartTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_start_timeout = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskIdBlock.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskIdBlock.php new file mode 100644 index 0000000..025252c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskIdBlock.php @@ -0,0 +1,86 @@ +temporal.api.taskqueue.v1.TaskIdBlock + */ +class TaskIdBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 start_id = 1; + */ + protected $start_id = 0; + /** + * Generated from protobuf field int64 end_id = 2; + */ + protected $end_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $start_id + * @type int|string $end_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 start_id = 1; + * @return int|string + */ + public function getStartId() + { + return $this->start_id; + } + + /** + * Generated from protobuf field int64 start_id = 1; + * @param int|string $var + * @return $this + */ + public function setStartId($var) + { + GPBUtil::checkInt64($var); + $this->start_id = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 end_id = 2; + * @return int|string + */ + public function getEndId() + { + return $this->end_id; + } + + /** + * Generated from protobuf field int64 end_id = 2; + * @param int|string $var + * @return $this + */ + public function setEndId($var) + { + GPBUtil::checkInt64($var); + $this->end_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueue.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueue.php new file mode 100644 index 0000000..d02e968 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueue.php @@ -0,0 +1,133 @@ +temporal.api.taskqueue.v1.TaskQueue + */ +class TaskQueue extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Default: TASK_QUEUE_KIND_NORMAL. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskQueueKind kind = 2; + */ + protected $kind = 0; + /** + * Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of + * the normal task queue that the sticky worker is running on. + * + * Generated from protobuf field string normal_name = 3; + */ + protected $normal_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * @type int $kind + * Default: TASK_QUEUE_KIND_NORMAL. + * @type string $normal_name + * Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of + * the normal task queue that the sticky worker is running on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->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; + } + + /** + * Default: TASK_QUEUE_KIND_NORMAL. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskQueueKind kind = 2; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Default: TASK_QUEUE_KIND_NORMAL. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskQueueKind kind = 2; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\TaskQueueKind::class); + $this->kind = $var; + + return $this; + } + + /** + * Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of + * the normal task queue that the sticky worker is running on. + * + * Generated from protobuf field string normal_name = 3; + * @return string + */ + public function getNormalName() + { + return $this->normal_name; + } + + /** + * Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of + * the normal task queue that the sticky worker is running on. + * + * Generated from protobuf field string normal_name = 3; + * @param string $var + * @return $this + */ + public function setNormalName($var) + { + GPBUtil::checkString($var, True); + $this->normal_name = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueMetadata.php new file mode 100644 index 0000000..12e5493 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueMetadata.php @@ -0,0 +1,105 @@ +temporal.api.taskqueue.v1.TaskQueueMetadata + */ +class TaskQueueMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Allows throttling dispatch of tasks from this queue + * + * Generated from protobuf field .google.protobuf.DoubleValue max_tasks_per_second = 1; + */ + protected $max_tasks_per_second = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\DoubleValue $max_tasks_per_second + * Allows throttling dispatch of tasks from this queue + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Allows throttling dispatch of tasks from this queue + * + * Generated from protobuf field .google.protobuf.DoubleValue max_tasks_per_second = 1; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getMaxTasksPerSecond() + { + return $this->max_tasks_per_second; + } + + public function hasMaxTasksPerSecond() + { + return isset($this->max_tasks_per_second); + } + + public function clearMaxTasksPerSecond() + { + unset($this->max_tasks_per_second); + } + + /** + * Returns the unboxed value from getMaxTasksPerSecond() + + * Allows throttling dispatch of tasks from this queue + * + * Generated from protobuf field .google.protobuf.DoubleValue max_tasks_per_second = 1; + * @return float|null + */ + public function getMaxTasksPerSecondUnwrapped() + { + return $this->readWrapperValue("max_tasks_per_second"); + } + + /** + * Allows throttling dispatch of tasks from this queue + * + * Generated from protobuf field .google.protobuf.DoubleValue max_tasks_per_second = 1; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setMaxTasksPerSecond($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->max_tasks_per_second = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Allows throttling dispatch of tasks from this queue + * + * Generated from protobuf field .google.protobuf.DoubleValue max_tasks_per_second = 1; + * @param float|null $var + * @return $this + */ + public function setMaxTasksPerSecondUnwrapped($var) + { + $this->writeWrapperValue("max_tasks_per_second", $var); + return $this;} + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueuePartitionMetadata.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueuePartitionMetadata.php new file mode 100644 index 0000000..60f9d1e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueuePartitionMetadata.php @@ -0,0 +1,86 @@ +temporal.api.taskqueue.v1.TaskQueuePartitionMetadata + */ +class TaskQueuePartitionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * Generated from protobuf field string owner_host_name = 2; + */ + protected $owner_host_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * @type string $owner_host_name + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->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; + } + + /** + * Generated from protobuf field string owner_host_name = 2; + * @return string + */ + public function getOwnerHostName() + { + return $this->owner_host_name; + } + + /** + * Generated from protobuf field string owner_host_name = 2; + * @param string $var + * @return $this + */ + public function setOwnerHostName($var) + { + GPBUtil::checkString($var, True); + $this->owner_host_name = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueReachability.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueReachability.php new file mode 100644 index 0000000..d2edc96 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueReachability.php @@ -0,0 +1,103 @@ +temporal.api.taskqueue.v1.TaskQueueReachability + */ +class TaskQueueReachability extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string task_queue = 1; + */ + protected $task_queue = ''; + /** + * Task reachability for a worker in a single task queue. + * See the TaskReachability docstring for information about each enum variant. + * If reachability is empty, this worker is considered unreachable in this task queue. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.TaskReachability reachability = 2; + */ + private $reachability; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_queue + * @type array|\Google\Protobuf\Internal\RepeatedField $reachability + * Task reachability for a worker in a single task queue. + * See the TaskReachability docstring for information about each enum variant. + * If reachability is empty, this worker is considered unreachable in this task queue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string task_queue = 1; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Generated from protobuf field string task_queue = 1; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + + /** + * Task reachability for a worker in a single task queue. + * See the TaskReachability docstring for information about each enum variant. + * If reachability is empty, this worker is considered unreachable in this task queue. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.TaskReachability reachability = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReachability() + { + return $this->reachability; + } + + /** + * Task reachability for a worker in a single task queue. + * See the TaskReachability docstring for information about each enum variant. + * If reachability is empty, this worker is considered unreachable in this task queue. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.TaskReachability reachability = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReachability($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\TaskReachability::class); + $this->reachability = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueStats.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueStats.php new file mode 100644 index 0000000..eb7c749 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueStats.php @@ -0,0 +1,194 @@ +temporal.api.taskqueue.v1.TaskQueueStats + */ +class TaskQueueStats extends \Google\Protobuf\Internal\Message +{ + /** + * The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges + * to the right value. + * + * Generated from protobuf field int64 approximate_backlog_count = 1; + */ + protected $approximate_backlog_count = 0; + /** + * Approximate age of the oldest task in the backlog based on the create timestamp of the task at the head of the queue. + * + * Generated from protobuf field .google.protobuf.Duration approximate_backlog_age = 2; + */ + protected $approximate_backlog_age = null; + /** + * Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * + * Generated from protobuf field float tasks_add_rate = 3; + */ + protected $tasks_add_rate = 0.0; + /** + * Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * + * Generated from protobuf field float tasks_dispatch_rate = 4; + */ + protected $tasks_dispatch_rate = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $approximate_backlog_count + * The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges + * to the right value. + * @type \Google\Protobuf\Duration $approximate_backlog_age + * Approximate age of the oldest task in the backlog based on the create timestamp of the task at the head of the queue. + * @type float $tasks_add_rate + * Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * @type float $tasks_dispatch_rate + * Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges + * to the right value. + * + * Generated from protobuf field int64 approximate_backlog_count = 1; + * @return int|string + */ + public function getApproximateBacklogCount() + { + return $this->approximate_backlog_count; + } + + /** + * The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges + * to the right value. + * + * Generated from protobuf field int64 approximate_backlog_count = 1; + * @param int|string $var + * @return $this + */ + public function setApproximateBacklogCount($var) + { + GPBUtil::checkInt64($var); + $this->approximate_backlog_count = $var; + + return $this; + } + + /** + * Approximate age of the oldest task in the backlog based on the create timestamp of the task at the head of the queue. + * + * Generated from protobuf field .google.protobuf.Duration approximate_backlog_age = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getApproximateBacklogAge() + { + return $this->approximate_backlog_age; + } + + public function hasApproximateBacklogAge() + { + return isset($this->approximate_backlog_age); + } + + public function clearApproximateBacklogAge() + { + unset($this->approximate_backlog_age); + } + + /** + * Approximate age of the oldest task in the backlog based on the create timestamp of the task at the head of the queue. + * + * Generated from protobuf field .google.protobuf.Duration approximate_backlog_age = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setApproximateBacklogAge($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->approximate_backlog_age = $var; + + return $this; + } + + /** + * Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * + * Generated from protobuf field float tasks_add_rate = 3; + * @return float + */ + public function getTasksAddRate() + { + return $this->tasks_add_rate; + } + + /** + * Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * + * Generated from protobuf field float tasks_add_rate = 3; + * @param float $var + * @return $this + */ + public function setTasksAddRate($var) + { + GPBUtil::checkFloat($var); + $this->tasks_add_rate = $var; + + return $this; + } + + /** + * Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * + * Generated from protobuf field float tasks_dispatch_rate = 4; + * @return float + */ + public function getTasksDispatchRate() + { + return $this->tasks_dispatch_rate; + } + + /** + * Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and + * sync-matched tasks. + * + * Generated from protobuf field float tasks_dispatch_rate = 4; + * @param float $var + * @return $this + */ + public function setTasksDispatchRate($var) + { + GPBUtil::checkFloat($var); + $this->tasks_dispatch_rate = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueStatus.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueStatus.php new file mode 100644 index 0000000..a93be65 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueStatus.php @@ -0,0 +1,179 @@ +temporal.api.taskqueue.v1.TaskQueueStatus + */ +class TaskQueueStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 backlog_count_hint = 1; + */ + protected $backlog_count_hint = 0; + /** + * Generated from protobuf field int64 read_level = 2; + */ + protected $read_level = 0; + /** + * Generated from protobuf field int64 ack_level = 3; + */ + protected $ack_level = 0; + /** + * Generated from protobuf field double rate_per_second = 4; + */ + protected $rate_per_second = 0.0; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskIdBlock task_id_block = 5; + */ + protected $task_id_block = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $backlog_count_hint + * @type int|string $read_level + * @type int|string $ack_level + * @type float $rate_per_second + * @type \Temporal\Api\Taskqueue\V1\TaskIdBlock $task_id_block + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 backlog_count_hint = 1; + * @return int|string + */ + public function getBacklogCountHint() + { + return $this->backlog_count_hint; + } + + /** + * Generated from protobuf field int64 backlog_count_hint = 1; + * @param int|string $var + * @return $this + */ + public function setBacklogCountHint($var) + { + GPBUtil::checkInt64($var); + $this->backlog_count_hint = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 read_level = 2; + * @return int|string + */ + public function getReadLevel() + { + return $this->read_level; + } + + /** + * Generated from protobuf field int64 read_level = 2; + * @param int|string $var + * @return $this + */ + public function setReadLevel($var) + { + GPBUtil::checkInt64($var); + $this->read_level = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 ack_level = 3; + * @return int|string + */ + public function getAckLevel() + { + return $this->ack_level; + } + + /** + * Generated from protobuf field int64 ack_level = 3; + * @param int|string $var + * @return $this + */ + public function setAckLevel($var) + { + GPBUtil::checkInt64($var); + $this->ack_level = $var; + + return $this; + } + + /** + * Generated from protobuf field double rate_per_second = 4; + * @return float + */ + public function getRatePerSecond() + { + return $this->rate_per_second; + } + + /** + * Generated from protobuf field double rate_per_second = 4; + * @param float $var + * @return $this + */ + public function setRatePerSecond($var) + { + GPBUtil::checkDouble($var); + $this->rate_per_second = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskIdBlock task_id_block = 5; + * @return \Temporal\Api\Taskqueue\V1\TaskIdBlock|null + */ + public function getTaskIdBlock() + { + return $this->task_id_block; + } + + public function hasTaskIdBlock() + { + return isset($this->task_id_block); + } + + public function clearTaskIdBlock() + { + unset($this->task_id_block); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskIdBlock task_id_block = 5; + * @param \Temporal\Api\Taskqueue\V1\TaskIdBlock $var + * @return $this + */ + public function setTaskIdBlock($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskIdBlock::class); + $this->task_id_block = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueTypeInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueTypeInfo.php new file mode 100644 index 0000000..155f9b7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueTypeInfo.php @@ -0,0 +1,103 @@ +temporal.api.taskqueue.v1.TaskQueueTypeInfo + */ +class TaskQueueTypeInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1; + */ + private $pollers; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueStats stats = 2; + */ + protected $stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Taskqueue\V1\PollerInfo>|\Google\Protobuf\Internal\RepeatedField $pollers + * Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. + * @type \Temporal\Api\Taskqueue\V1\TaskQueueStats $stats + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPollers() + { + return $this->pollers; + } + + /** + * Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1; + * @param array<\Temporal\Api\Taskqueue\V1\PollerInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPollers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\PollerInfo::class); + $this->pollers = $arr; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueStats stats = 2; + * @return \Temporal\Api\Taskqueue\V1\TaskQueueStats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueStats stats = 2; + * @param \Temporal\Api\Taskqueue\V1\TaskQueueStats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueStats::class); + $this->stats = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueVersionInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueVersionInfo.php new file mode 100644 index 0000000..14c80f6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueVersionInfo.php @@ -0,0 +1,128 @@ +temporal.api.taskqueue.v1.TaskQueueVersionInfo + */ +class TaskQueueVersionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. + * + * Generated from protobuf field map types_info = 1; + */ + private $types_info; + /** + * Task Reachability is eventually consistent; there may be a delay until it converges to the most + * accurate value but it is designed in a way to take the more conservative side until it converges. + * For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. + * Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be + * accounted for reachability as server cannot know if they'll happen as they do not use + * assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows + * who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make + * sure to query reachability for the parent/previous workflow's Task Queue as well. + * + * Generated from protobuf field .temporal.api.enums.v1.BuildIdTaskReachability task_reachability = 2; + */ + protected $task_reachability = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $types_info + * Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. + * @type int $task_reachability + * Task Reachability is eventually consistent; there may be a delay until it converges to the most + * accurate value but it is designed in a way to take the more conservative side until it converges. + * For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. + * Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be + * accounted for reachability as server cannot know if they'll happen as they do not use + * assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows + * who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make + * sure to query reachability for the parent/previous workflow's Task Queue as well. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. + * + * Generated from protobuf field map types_info = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTypesInfo() + { + return $this->types_info; + } + + /** + * Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. + * + * Generated from protobuf field map types_info = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTypesInfo($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TaskQueueTypeInfo::class); + $this->types_info = $arr; + + return $this; + } + + /** + * Task Reachability is eventually consistent; there may be a delay until it converges to the most + * accurate value but it is designed in a way to take the more conservative side until it converges. + * For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. + * Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be + * accounted for reachability as server cannot know if they'll happen as they do not use + * assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows + * who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make + * sure to query reachability for the parent/previous workflow's Task Queue as well. + * + * Generated from protobuf field .temporal.api.enums.v1.BuildIdTaskReachability task_reachability = 2; + * @return int + */ + public function getTaskReachability() + { + return $this->task_reachability; + } + + /** + * Task Reachability is eventually consistent; there may be a delay until it converges to the most + * accurate value but it is designed in a way to take the more conservative side until it converges. + * For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. + * Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be + * accounted for reachability as server cannot know if they'll happen as they do not use + * assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows + * who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make + * sure to query reachability for the parent/previous workflow's Task Queue as well. + * + * Generated from protobuf field .temporal.api.enums.v1.BuildIdTaskReachability task_reachability = 2; + * @param int $var + * @return $this + */ + public function setTaskReachability($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\BuildIdTaskReachability::class); + $this->task_reachability = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueVersionSelection.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueVersionSelection.php new file mode 100644 index 0000000..dcf471b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TaskQueueVersionSelection.php @@ -0,0 +1,140 @@ +temporal.api.taskqueue.v1.TaskQueueVersionSelection + */ +class TaskQueueVersionSelection extends \Google\Protobuf\Internal\Message +{ + /** + * Include specific Build IDs. + * + * Generated from protobuf field repeated string build_ids = 1; + */ + private $build_ids; + /** + * Include the unversioned queue. + * + * Generated from protobuf field bool unversioned = 2; + */ + protected $unversioned = false; + /** + * Include all active versions. A version is considered active if it has had new + * tasks or polls recently. + * + * Generated from protobuf field bool all_active = 3; + */ + protected $all_active = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $build_ids + * Include specific Build IDs. + * @type bool $unversioned + * Include the unversioned queue. + * @type bool $all_active + * Include all active versions. A version is considered active if it has had new + * tasks or polls recently. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Include specific Build IDs. + * + * Generated from protobuf field repeated string build_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuildIds() + { + return $this->build_ids; + } + + /** + * Include specific Build IDs. + * + * Generated from protobuf field repeated string build_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuildIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->build_ids = $arr; + + return $this; + } + + /** + * Include the unversioned queue. + * + * Generated from protobuf field bool unversioned = 2; + * @return bool + */ + public function getUnversioned() + { + return $this->unversioned; + } + + /** + * Include the unversioned queue. + * + * Generated from protobuf field bool unversioned = 2; + * @param bool $var + * @return $this + */ + public function setUnversioned($var) + { + GPBUtil::checkBool($var); + $this->unversioned = $var; + + return $this; + } + + /** + * Include all active versions. A version is considered active if it has had new + * tasks or polls recently. + * + * Generated from protobuf field bool all_active = 3; + * @return bool + */ + public function getAllActive() + { + return $this->all_active; + } + + /** + * Include all active versions. A version is considered active if it has had new + * tasks or polls recently. + * + * Generated from protobuf field bool all_active = 3; + * @param bool $var + * @return $this + */ + public function setAllActive($var) + { + GPBUtil::checkBool($var); + $this->all_active = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TimestampedBuildIdAssignmentRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TimestampedBuildIdAssignmentRule.php new file mode 100644 index 0000000..26c3ce9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TimestampedBuildIdAssignmentRule.php @@ -0,0 +1,106 @@ +temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule + */ +class TimestampedBuildIdAssignmentRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 1; + */ + protected $rule = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule $rule + * @type \Google\Protobuf\Timestamp $create_time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 1; + * @return \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 1; + * @param \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule::class); + $this->rule = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @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); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TimestampedCompatibleBuildIdRedirectRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TimestampedCompatibleBuildIdRedirectRule.php new file mode 100644 index 0000000..79d6f95 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Taskqueue/V1/TimestampedCompatibleBuildIdRedirectRule.php @@ -0,0 +1,106 @@ +temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule + */ +class TimestampedCompatibleBuildIdRedirectRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + */ + protected $rule = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule $rule + * @type \Google\Protobuf\Timestamp $create_time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + * @return \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + * @param \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule::class); + $this->rule = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @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); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Acceptance.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Acceptance.php new file mode 100644 index 0000000..bff551a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Acceptance.php @@ -0,0 +1,126 @@ +temporal.api.update.v1.Acceptance + */ +class Acceptance extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string accepted_request_message_id = 1; + */ + protected $accepted_request_message_id = ''; + /** + * Generated from protobuf field int64 accepted_request_sequencing_event_id = 2; + */ + protected $accepted_request_sequencing_event_id = 0; + /** + * Generated from protobuf field .temporal.api.update.v1.Request accepted_request = 3; + */ + protected $accepted_request = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $accepted_request_message_id + * @type int|string $accepted_request_sequencing_event_id + * @type \Temporal\Api\Update\V1\Request $accepted_request + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string accepted_request_message_id = 1; + * @return string + */ + public function getAcceptedRequestMessageId() + { + return $this->accepted_request_message_id; + } + + /** + * Generated from protobuf field string accepted_request_message_id = 1; + * @param string $var + * @return $this + */ + public function setAcceptedRequestMessageId($var) + { + GPBUtil::checkString($var, True); + $this->accepted_request_message_id = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 accepted_request_sequencing_event_id = 2; + * @return int|string + */ + public function getAcceptedRequestSequencingEventId() + { + return $this->accepted_request_sequencing_event_id; + } + + /** + * Generated from protobuf field int64 accepted_request_sequencing_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setAcceptedRequestSequencingEventId($var) + { + GPBUtil::checkInt64($var); + $this->accepted_request_sequencing_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Request accepted_request = 3; + * @return \Temporal\Api\Update\V1\Request|null + */ + public function getAcceptedRequest() + { + return $this->accepted_request; + } + + public function hasAcceptedRequest() + { + return isset($this->accepted_request); + } + + public function clearAcceptedRequest() + { + unset($this->accepted_request); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Request accepted_request = 3; + * @param \Temporal\Api\Update\V1\Request $var + * @return $this + */ + public function setAcceptedRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class); + $this->accepted_request = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Input.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Input.php new file mode 100644 index 0000000..d3985b1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Input.php @@ -0,0 +1,158 @@ +temporal.api.update.v1.Input + */ +class Input extends \Google\Protobuf\Internal\Message +{ + /** + * Headers that are passed with the update from the requesting entity. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 1; + */ + protected $header = null; + /** + * The name of the input handler to invoke on the target workflow + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The arguments to pass to the named handler. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads args = 3; + */ + protected $args = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Header $header + * Headers that are passed with the update from the requesting entity. + * These can include things like auth or tracing tokens. + * @type string $name + * The name of the input handler to invoke on the target workflow + * @type \Temporal\Api\Common\V1\Payloads $args + * The arguments to pass to the named handler. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Headers that are passed with the update from the requesting entity. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 1; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Headers that are passed with the update from the requesting entity. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 1; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * The name of the input handler to invoke on the target workflow + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the input handler to invoke on the target workflow + * + * 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 arguments to pass to the named handler. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads args = 3; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getArgs() + { + return $this->args; + } + + public function hasArgs() + { + return isset($this->args); + } + + public function clearArgs() + { + unset($this->args); + } + + /** + * The arguments to pass to the named handler. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads args = 3; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setArgs($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->args = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Meta.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Meta.php new file mode 100644 index 0000000..6823ca2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Meta.php @@ -0,0 +1,102 @@ +temporal.api.update.v1.Meta + */ +class Meta extends \Google\Protobuf\Internal\Message +{ + /** + * An ID with workflow-scoped uniqueness for this update + * + * Generated from protobuf field string update_id = 1; + */ + protected $update_id = ''; + /** + * A string identifying the agent that requested this update. + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $update_id + * An ID with workflow-scoped uniqueness for this update + * @type string $identity + * A string identifying the agent that requested this update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * An ID with workflow-scoped uniqueness for this update + * + * Generated from protobuf field string update_id = 1; + * @return string + */ + public function getUpdateId() + { + return $this->update_id; + } + + /** + * An ID with workflow-scoped uniqueness for this update + * + * Generated from protobuf field string update_id = 1; + * @param string $var + * @return $this + */ + public function setUpdateId($var) + { + GPBUtil::checkString($var, True); + $this->update_id = $var; + + return $this; + } + + /** + * A string identifying the agent that requested this update. + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * A string identifying the agent that requested this update. + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Outcome.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Outcome.php new file mode 100644 index 0000000..c06bfd8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Outcome.php @@ -0,0 +1,99 @@ +temporal.api.update.v1.Outcome + */ +class Outcome extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $success + * @type \Temporal\Api\Failure\V1\Failure $failure + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads success = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getSuccess() + { + return $this->readOneof(1); + } + + public function hasSuccess() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads success = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setSuccess($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->readOneof(2); + } + + public function hasFailure() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Rejection.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Rejection.php new file mode 100644 index 0000000..50d68eb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Rejection.php @@ -0,0 +1,163 @@ +temporal.api.update.v1.Rejection + */ +class Rejection extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string rejected_request_message_id = 1; + */ + protected $rejected_request_message_id = ''; + /** + * Generated from protobuf field int64 rejected_request_sequencing_event_id = 2; + */ + protected $rejected_request_sequencing_event_id = 0; + /** + * Generated from protobuf field .temporal.api.update.v1.Request rejected_request = 3; + */ + protected $rejected_request = null; + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + */ + protected $failure = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rejected_request_message_id + * @type int|string $rejected_request_sequencing_event_id + * @type \Temporal\Api\Update\V1\Request $rejected_request + * @type \Temporal\Api\Failure\V1\Failure $failure + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string rejected_request_message_id = 1; + * @return string + */ + public function getRejectedRequestMessageId() + { + return $this->rejected_request_message_id; + } + + /** + * Generated from protobuf field string rejected_request_message_id = 1; + * @param string $var + * @return $this + */ + public function setRejectedRequestMessageId($var) + { + GPBUtil::checkString($var, True); + $this->rejected_request_message_id = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 rejected_request_sequencing_event_id = 2; + * @return int|string + */ + public function getRejectedRequestSequencingEventId() + { + return $this->rejected_request_sequencing_event_id; + } + + /** + * Generated from protobuf field int64 rejected_request_sequencing_event_id = 2; + * @param int|string $var + * @return $this + */ + public function setRejectedRequestSequencingEventId($var) + { + GPBUtil::checkInt64($var); + $this->rejected_request_sequencing_event_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Request rejected_request = 3; + * @return \Temporal\Api\Update\V1\Request|null + */ + public function getRejectedRequest() + { + return $this->rejected_request; + } + + public function hasRejectedRequest() + { + return isset($this->rejected_request); + } + + public function clearRejectedRequest() + { + unset($this->rejected_request); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Request rejected_request = 3; + * @param \Temporal\Api\Update\V1\Request $var + * @return $this + */ + public function setRejectedRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class); + $this->rejected_request = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 4; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Request.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Request.php new file mode 100644 index 0000000..a9fe15c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Request.php @@ -0,0 +1,108 @@ +temporal.api.update.v1.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + */ + protected $meta = null; + /** + * Generated from protobuf field .temporal.api.update.v1.Input input = 2; + */ + protected $input = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Update\V1\Meta $meta + * @type \Temporal\Api\Update\V1\Input $input + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + * @return \Temporal\Api\Update\V1\Meta|null + */ + public function getMeta() + { + return $this->meta; + } + + public function hasMeta() + { + return isset($this->meta); + } + + public function clearMeta() + { + unset($this->meta); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + * @param \Temporal\Api\Update\V1\Meta $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Meta::class); + $this->meta = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Input input = 2; + * @return \Temporal\Api\Update\V1\Input|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Input input = 2; + * @param \Temporal\Api\Update\V1\Input $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Input::class); + $this->input = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Response.php new file mode 100644 index 0000000..cfc323b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/Response.php @@ -0,0 +1,109 @@ +temporal.api.update.v1.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + */ + protected $meta = null; + /** + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + */ + protected $outcome = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Update\V1\Meta $meta + * @type \Temporal\Api\Update\V1\Outcome $outcome + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + * @return \Temporal\Api\Update\V1\Meta|null + */ + public function getMeta() + { + return $this->meta; + } + + public function hasMeta() + { + return isset($this->meta); + } + + public function clearMeta() + { + unset($this->meta); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Meta meta = 1; + * @param \Temporal\Api\Update\V1\Meta $var + * @return $this + */ + public function setMeta($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Meta::class); + $this->meta = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + * @return \Temporal\Api\Update\V1\Outcome|null + */ + public function getOutcome() + { + return $this->outcome; + } + + public function hasOutcome() + { + return isset($this->outcome); + } + + public function clearOutcome() + { + unset($this->outcome); + } + + /** + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + * @param \Temporal\Api\Update\V1\Outcome $var + * @return $this + */ + public function setOutcome($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Outcome::class); + $this->outcome = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/UpdateRef.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/UpdateRef.php new file mode 100644 index 0000000..0d453b3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/UpdateRef.php @@ -0,0 +1,99 @@ +temporal.api.update.v1.UpdateRef + */ +class UpdateRef extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field string update_id = 2; + */ + protected $update_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $update_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 1; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field string update_id = 2; + * @return string + */ + public function getUpdateId() + { + return $this->update_id; + } + + /** + * Generated from protobuf field string update_id = 2; + * @param string $var + * @return $this + */ + public function setUpdateId($var) + { + GPBUtil::checkString($var, True); + $this->update_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/WaitPolicy.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/WaitPolicy.php new file mode 100644 index 0000000..98af669 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Update/V1/WaitPolicy.php @@ -0,0 +1,73 @@ +temporal.api.update.v1.WaitPolicy + */ +class WaitPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates the update lifecycle stage that the gRPC call should wait for + * before returning. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage lifecycle_stage = 1; + */ + protected $lifecycle_stage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $lifecycle_stage + * Indicates the update lifecycle stage that the gRPC call should wait for + * before returning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Indicates the update lifecycle stage that the gRPC call should wait for + * before returning. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage lifecycle_stage = 1; + * @return int + */ + public function getLifecycleStage() + { + return $this->lifecycle_stage; + } + + /** + * Indicates the update lifecycle stage that the gRPC call should wait for + * before returning. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage lifecycle_stage = 1; + * @param int $var + * @return $this + */ + public function setLifecycleStage($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\UpdateWorkflowExecutionLifecycleStage::class); + $this->lifecycle_stage = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/Alert.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/Alert.php new file mode 100644 index 0000000..ec68ee9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/Alert.php @@ -0,0 +1,88 @@ +temporal.api.version.v1.Alert + */ +class Alert extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * Generated from protobuf field .temporal.api.enums.v1.Severity severity = 2; + */ + protected $severity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * @type int $severity + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Version\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.Severity severity = 2; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.Severity severity = 2; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\Severity::class); + $this->severity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/ReleaseInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/ReleaseInfo.php new file mode 100644 index 0000000..b344f64 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/ReleaseInfo.php @@ -0,0 +1,125 @@ +temporal.api.version.v1.ReleaseInfo + */ +class ReleaseInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * Generated from protobuf field .google.protobuf.Timestamp release_time = 2; + */ + protected $release_time = null; + /** + * Generated from protobuf field string notes = 3; + */ + protected $notes = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * @type \Google\Protobuf\Timestamp $release_time + * @type string $notes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Version\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * 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; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp release_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReleaseTime() + { + return $this->release_time; + } + + public function hasReleaseTime() + { + return isset($this->release_time); + } + + public function clearReleaseTime() + { + unset($this->release_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp release_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReleaseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->release_time = $var; + + return $this; + } + + /** + * Generated from protobuf field string notes = 3; + * @return string + */ + public function getNotes() + { + return $this->notes; + } + + /** + * Generated from protobuf field string notes = 3; + * @param string $var + * @return $this + */ + public function setNotes($var) + { + GPBUtil::checkString($var, True); + $this->notes = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/VersionInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/VersionInfo.php new file mode 100644 index 0000000..eb0b428 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Version/V1/VersionInfo.php @@ -0,0 +1,199 @@ +temporal.api.version.v1.VersionInfo + */ +class VersionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.version.v1.ReleaseInfo current = 1; + */ + protected $current = null; + /** + * Generated from protobuf field .temporal.api.version.v1.ReleaseInfo recommended = 2; + */ + protected $recommended = null; + /** + * Generated from protobuf field string instructions = 3; + */ + protected $instructions = ''; + /** + * Generated from protobuf field repeated .temporal.api.version.v1.Alert alerts = 4; + */ + private $alerts; + /** + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + */ + protected $last_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Version\V1\ReleaseInfo $current + * @type \Temporal\Api\Version\V1\ReleaseInfo $recommended + * @type string $instructions + * @type array<\Temporal\Api\Version\V1\Alert>|\Google\Protobuf\Internal\RepeatedField $alerts + * @type \Google\Protobuf\Timestamp $last_update_time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Version\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.version.v1.ReleaseInfo current = 1; + * @return \Temporal\Api\Version\V1\ReleaseInfo|null + */ + public function getCurrent() + { + return $this->current; + } + + public function hasCurrent() + { + return isset($this->current); + } + + public function clearCurrent() + { + unset($this->current); + } + + /** + * Generated from protobuf field .temporal.api.version.v1.ReleaseInfo current = 1; + * @param \Temporal\Api\Version\V1\ReleaseInfo $var + * @return $this + */ + public function setCurrent($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Version\V1\ReleaseInfo::class); + $this->current = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.version.v1.ReleaseInfo recommended = 2; + * @return \Temporal\Api\Version\V1\ReleaseInfo|null + */ + public function getRecommended() + { + return $this->recommended; + } + + public function hasRecommended() + { + return isset($this->recommended); + } + + public function clearRecommended() + { + unset($this->recommended); + } + + /** + * Generated from protobuf field .temporal.api.version.v1.ReleaseInfo recommended = 2; + * @param \Temporal\Api\Version\V1\ReleaseInfo $var + * @return $this + */ + public function setRecommended($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Version\V1\ReleaseInfo::class); + $this->recommended = $var; + + return $this; + } + + /** + * Generated from protobuf field string instructions = 3; + * @return string + */ + public function getInstructions() + { + return $this->instructions; + } + + /** + * Generated from protobuf field string instructions = 3; + * @param string $var + * @return $this + */ + public function setInstructions($var) + { + GPBUtil::checkString($var, True); + $this->instructions = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.version.v1.Alert alerts = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAlerts() + { + return $this->alerts; + } + + /** + * Generated from protobuf field repeated .temporal.api.version.v1.Alert alerts = 4; + * @param array<\Temporal\Api\Version\V1\Alert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAlerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Version\V1\Alert::class); + $this->alerts = $arr; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo.php new file mode 100644 index 0000000..45a7bc9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo.php @@ -0,0 +1,363 @@ +temporal.api.workflow.v1.CallbackInfo + */ +class CallbackInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Information on how this callback should be invoked (e.g. its URL and type). + * + * Generated from protobuf field .temporal.api.common.v1.Callback callback = 1; + */ + protected $callback = null; + /** + * Trigger for this callback. + * + * Generated from protobuf field .temporal.api.workflow.v1.CallbackInfo.Trigger trigger = 2; + */ + protected $trigger = null; + /** + * The time when the callback was registered. + * + * Generated from protobuf field .google.protobuf.Timestamp registration_time = 3; + */ + protected $registration_time = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.CallbackState state = 4; + */ + protected $state = 0; + /** + * The number of attempts made to deliver the callback. + * This number represents a minimum bound since the attempt is incremented after the callback request completes. + * + * Generated from protobuf field int32 attempt = 5; + */ + protected $attempt = 0; + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 6; + */ + protected $last_attempt_complete_time = null; + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 7; + */ + protected $last_attempt_failure = null; + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 8; + */ + protected $next_attempt_schedule_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Callback $callback + * Information on how this callback should be invoked (e.g. its URL and type). + * @type \Temporal\Api\Workflow\V1\CallbackInfo\Trigger $trigger + * Trigger for this callback. + * @type \Google\Protobuf\Timestamp $registration_time + * The time when the callback was registered. + * @type int $state + * @type int $attempt + * The number of attempts made to deliver the callback. + * This number represents a minimum bound since the attempt is incremented after the callback request completes. + * @type \Google\Protobuf\Timestamp $last_attempt_complete_time + * The time when the last attempt completed. + * @type \Temporal\Api\Failure\V1\Failure $last_attempt_failure + * The last attempt's failure, if any. + * @type \Google\Protobuf\Timestamp $next_attempt_schedule_time + * The time when the next attempt is scheduled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Information on how this callback should be invoked (e.g. its URL and type). + * + * Generated from protobuf field .temporal.api.common.v1.Callback callback = 1; + * @return \Temporal\Api\Common\V1\Callback|null + */ + public function getCallback() + { + return $this->callback; + } + + public function hasCallback() + { + return isset($this->callback); + } + + public function clearCallback() + { + unset($this->callback); + } + + /** + * Information on how this callback should be invoked (e.g. its URL and type). + * + * Generated from protobuf field .temporal.api.common.v1.Callback callback = 1; + * @param \Temporal\Api\Common\V1\Callback $var + * @return $this + */ + public function setCallback($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Callback::class); + $this->callback = $var; + + return $this; + } + + /** + * Trigger for this callback. + * + * Generated from protobuf field .temporal.api.workflow.v1.CallbackInfo.Trigger trigger = 2; + * @return \Temporal\Api\Workflow\V1\CallbackInfo\Trigger|null + */ + public function getTrigger() + { + return $this->trigger; + } + + public function hasTrigger() + { + return isset($this->trigger); + } + + public function clearTrigger() + { + unset($this->trigger); + } + + /** + * Trigger for this callback. + * + * Generated from protobuf field .temporal.api.workflow.v1.CallbackInfo.Trigger trigger = 2; + * @param \Temporal\Api\Workflow\V1\CallbackInfo\Trigger $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\CallbackInfo\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * The time when the callback was registered. + * + * Generated from protobuf field .google.protobuf.Timestamp registration_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRegistrationTime() + { + return $this->registration_time; + } + + public function hasRegistrationTime() + { + return isset($this->registration_time); + } + + public function clearRegistrationTime() + { + unset($this->registration_time); + } + + /** + * The time when the callback was registered. + * + * Generated from protobuf field .google.protobuf.Timestamp registration_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRegistrationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->registration_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.CallbackState state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.CallbackState state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\CallbackState::class); + $this->state = $var; + + return $this; + } + + /** + * The number of attempts made to deliver the callback. + * This number represents a minimum bound since the attempt is incremented after the callback request completes. + * + * Generated from protobuf field int32 attempt = 5; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * The number of attempts made to deliver the callback. + * This number represents a minimum bound since the attempt is incremented after the callback request completes. + * + * Generated from protobuf field int32 attempt = 5; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastAttemptCompleteTime() + { + return $this->last_attempt_complete_time; + } + + public function hasLastAttemptCompleteTime() + { + return isset($this->last_attempt_complete_time); + } + + public function clearLastAttemptCompleteTime() + { + unset($this->last_attempt_complete_time); + } + + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastAttemptCompleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_attempt_complete_time = $var; + + return $this; + } + + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 7; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getLastAttemptFailure() + { + return $this->last_attempt_failure; + } + + public function hasLastAttemptFailure() + { + return isset($this->last_attempt_failure); + } + + public function clearLastAttemptFailure() + { + unset($this->last_attempt_failure); + } + + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 7; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setLastAttemptFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->last_attempt_failure = $var; + + return $this; + } + + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextAttemptScheduleTime() + { + return $this->next_attempt_schedule_time; + } + + public function hasNextAttemptScheduleTime() + { + return isset($this->next_attempt_schedule_time); + } + + public function clearNextAttemptScheduleTime() + { + unset($this->next_attempt_schedule_time); + } + + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextAttemptScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_attempt_schedule_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo/Trigger.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo/Trigger.php new file mode 100644 index 0000000..71b98cb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo/Trigger.php @@ -0,0 +1,69 @@ +temporal.api.workflow.v1.CallbackInfo.Trigger + */ +class Trigger extends \Google\Protobuf\Internal\Message +{ + protected $variant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed $workflow_closed + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.CallbackInfo.WorkflowClosed workflow_closed = 1; + * @return \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed|null + */ + public function getWorkflowClosed() + { + return $this->readOneof(1); + } + + public function hasWorkflowClosed() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.CallbackInfo.WorkflowClosed workflow_closed = 1; + * @param \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed $var + * @return $this + */ + public function setWorkflowClosed($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getVariant() + { + return $this->whichOneof("variant"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo/WorkflowClosed.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo/WorkflowClosed.php new file mode 100644 index 0000000..7b08bf4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/CallbackInfo/WorkflowClosed.php @@ -0,0 +1,34 @@ +temporal.api.workflow.v1.CallbackInfo.WorkflowClosed + */ +class WorkflowClosed extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/NewWorkflowExecutionInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/NewWorkflowExecutionInfo.php new file mode 100644 index 0000000..5fb444a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/NewWorkflowExecutionInfo.php @@ -0,0 +1,587 @@ +temporal.api.workflow.v1.NewWorkflowExecutionInfo + */ +class NewWorkflowExecutionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string workflow_id = 1; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + */ + protected $task_queue = null; + /** + * Serialized arguments to the workflow. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + */ + protected $input = null; + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 5; + */ + protected $workflow_execution_timeout = null; + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 6; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 7; + */ + protected $workflow_task_timeout = null; + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 8; + */ + protected $workflow_id_reuse_policy = 0; + /** + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 9; + */ + protected $retry_policy = null; + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 10; + */ + protected $cron_schedule = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 11; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 12; + */ + protected $search_attributes = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 13; + */ + protected $header = null; + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 14; + */ + protected $user_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $workflow_id + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Payloads $input + * Serialized arguments to the workflow. + * @type \Google\Protobuf\Duration $workflow_execution_timeout + * Total workflow execution timeout including retries and continue as new. + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run. + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task. + * @type int $workflow_id_reuse_policy + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * @type string $cron_schedule + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type \Temporal\Api\Common\V1\Header $header + * @type \Temporal\Api\Sdk\V1\UserMetadata $user_metadata + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 2; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Serialized arguments to the workflow. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Serialized arguments to the workflow. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionTimeout() + { + return $this->workflow_execution_timeout; + } + + public function hasWorkflowExecutionTimeout() + { + return isset($this->workflow_execution_timeout); + } + + public function clearWorkflowExecutionTimeout() + { + unset($this->workflow_execution_timeout); + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 8; + * @return int + */ + public function getWorkflowIdReusePolicy() + { + return $this->workflow_id_reuse_policy; + } + + /** + * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 8; + * @param int $var + * @return $this + */ + public function setWorkflowIdReusePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdReusePolicy::class); + $this->workflow_id_reuse_policy = $var; + + return $this; + } + + /** + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 9; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 9; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 10; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 10; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 11; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 11; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 12; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 12; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 13; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 13; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 14; + * @return \Temporal\Api\Sdk\V1\UserMetadata|null + */ + public function getUserMetadata() + { + return $this->user_metadata; + } + + public function hasUserMetadata() + { + return isset($this->user_metadata); + } + + public function clearUserMetadata() + { + unset($this->user_metadata); + } + + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 14; + * @param \Temporal\Api\Sdk\V1\UserMetadata $var + * @return $this + */ + public function setUserMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\UserMetadata::class); + $this->user_metadata = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/NexusOperationCancellationInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/NexusOperationCancellationInfo.php new file mode 100644 index 0000000..4b2a854 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/NexusOperationCancellationInfo.php @@ -0,0 +1,275 @@ +temporal.api.workflow.v1.NexusOperationCancellationInfo + */ +class NexusOperationCancellationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The time when cancellation was requested. + * + * Generated from protobuf field .google.protobuf.Timestamp requested_time = 1; + */ + protected $requested_time = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.NexusOperationCancellationState state = 2; + */ + protected $state = 0; + /** + * The number of attempts made to deliver the cancel operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * + * Generated from protobuf field int32 attempt = 3; + */ + protected $attempt = 0; + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 4; + */ + protected $last_attempt_complete_time = null; + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 5; + */ + protected $last_attempt_failure = null; + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 6; + */ + protected $next_attempt_schedule_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $requested_time + * The time when cancellation was requested. + * @type int $state + * @type int $attempt + * The number of attempts made to deliver the cancel operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * @type \Google\Protobuf\Timestamp $last_attempt_complete_time + * The time when the last attempt completed. + * @type \Temporal\Api\Failure\V1\Failure $last_attempt_failure + * The last attempt's failure, if any. + * @type \Google\Protobuf\Timestamp $next_attempt_schedule_time + * The time when the next attempt is scheduled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * The time when cancellation was requested. + * + * Generated from protobuf field .google.protobuf.Timestamp requested_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestedTime() + { + return $this->requested_time; + } + + public function hasRequestedTime() + { + return isset($this->requested_time); + } + + public function clearRequestedTime() + { + unset($this->requested_time); + } + + /** + * The time when cancellation was requested. + * + * Generated from protobuf field .google.protobuf.Timestamp requested_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->requested_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.NexusOperationCancellationState state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.NexusOperationCancellationState state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\NexusOperationCancellationState::class); + $this->state = $var; + + return $this; + } + + /** + * The number of attempts made to deliver the cancel operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * + * Generated from protobuf field int32 attempt = 3; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * The number of attempts made to deliver the cancel operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * + * Generated from protobuf field int32 attempt = 3; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastAttemptCompleteTime() + { + return $this->last_attempt_complete_time; + } + + public function hasLastAttemptCompleteTime() + { + return isset($this->last_attempt_complete_time); + } + + public function clearLastAttemptCompleteTime() + { + unset($this->last_attempt_complete_time); + } + + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastAttemptCompleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_attempt_complete_time = $var; + + return $this; + } + + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 5; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getLastAttemptFailure() + { + return $this->last_attempt_failure; + } + + public function hasLastAttemptFailure() + { + return isset($this->last_attempt_failure); + } + + public function clearLastAttemptFailure() + { + unset($this->last_attempt_failure); + } + + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 5; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setLastAttemptFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->last_attempt_failure = $var; + + return $this; + } + + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextAttemptScheduleTime() + { + return $this->next_attempt_schedule_time; + } + + public function hasNextAttemptScheduleTime() + { + return isset($this->next_attempt_schedule_time); + } + + public function clearNextAttemptScheduleTime() + { + unset($this->next_attempt_schedule_time); + } + + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextAttemptScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_attempt_schedule_time = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingActivityInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingActivityInfo.php new file mode 100644 index 0000000..7771059 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingActivityInfo.php @@ -0,0 +1,554 @@ +temporal.api.workflow.v1.PendingActivityInfo + */ +class PendingActivityInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string activity_id = 1; + */ + protected $activity_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + */ + protected $activity_type = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingActivityState state = 3; + */ + protected $state = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads heartbeat_details = 4; + */ + protected $heartbeat_details = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 5; + */ + protected $last_heartbeat_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp last_started_time = 6; + */ + protected $last_started_time = null; + /** + * Generated from protobuf field int32 attempt = 7; + */ + protected $attempt = 0; + /** + * Generated from protobuf field int32 maximum_attempts = 8; + */ + protected $maximum_attempts = 0; + /** + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 9; + */ + protected $scheduled_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 10; + */ + protected $expiration_time = null; + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure last_failure = 11; + */ + protected $last_failure = null; + /** + * Generated from protobuf field string last_worker_identity = 12; + */ + protected $last_worker_identity = ''; + /** + * The version stamp of the worker to whom this activity was most recently dispatched + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15; + */ + protected $last_worker_version_stamp = null; + protected $assigned_build_id; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $activity_id + * @type \Temporal\Api\Common\V1\ActivityType $activity_type + * @type int $state + * @type \Temporal\Api\Common\V1\Payloads $heartbeat_details + * @type \Google\Protobuf\Timestamp $last_heartbeat_time + * @type \Google\Protobuf\Timestamp $last_started_time + * @type int $attempt + * @type int $maximum_attempts + * @type \Google\Protobuf\Timestamp $scheduled_time + * @type \Google\Protobuf\Timestamp $expiration_time + * @type \Temporal\Api\Failure\V1\Failure $last_failure + * @type string $last_worker_identity + * @type \Google\Protobuf\GPBEmpty $use_workflow_build_id + * When present, it means this activity is assigned to the build ID of its workflow. + * @type string $last_independently_assigned_build_id + * This means the activity is independently versioned and not bound to the build ID of its workflow. + * The activity will use the build id in this field instead. + * If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning + * rules. + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $last_worker_version_stamp + * The version stamp of the worker to whom this activity was most recently dispatched + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string activity_id = 1; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * Generated from protobuf field string activity_id = 1; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + * @return \Temporal\Api\Common\V1\ActivityType|null + */ + public function getActivityType() + { + return $this->activity_type; + } + + public function hasActivityType() + { + return isset($this->activity_type); + } + + public function clearActivityType() + { + unset($this->activity_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 2; + * @param \Temporal\Api\Common\V1\ActivityType $var + * @return $this + */ + public function setActivityType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\ActivityType::class); + $this->activity_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingActivityState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingActivityState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\PendingActivityState::class); + $this->state = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads heartbeat_details = 4; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getHeartbeatDetails() + { + return $this->heartbeat_details; + } + + public function hasHeartbeatDetails() + { + return isset($this->heartbeat_details); + } + + public function clearHeartbeatDetails() + { + unset($this->heartbeat_details); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads heartbeat_details = 4; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setHeartbeatDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->heartbeat_details = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastHeartbeatTime() + { + return $this->last_heartbeat_time; + } + + public function hasLastHeartbeatTime() + { + return isset($this->last_heartbeat_time); + } + + public function clearLastHeartbeatTime() + { + unset($this->last_heartbeat_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastHeartbeatTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_heartbeat_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_started_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastStartedTime() + { + return $this->last_started_time; + } + + public function hasLastStartedTime() + { + return isset($this->last_started_time); + } + + public function clearLastStartedTime() + { + unset($this->last_started_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp last_started_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastStartedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_started_time = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 attempt = 7; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * Generated from protobuf field int32 attempt = 7; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 maximum_attempts = 8; + * @return int + */ + public function getMaximumAttempts() + { + return $this->maximum_attempts; + } + + /** + * Generated from protobuf field int32 maximum_attempts = 8; + * @param int $var + * @return $this + */ + public function setMaximumAttempts($var) + { + GPBUtil::checkInt32($var); + $this->maximum_attempts = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledTime() + { + return $this->scheduled_time; + } + + public function hasScheduledTime() + { + return isset($this->scheduled_time); + } + + public function clearScheduledTime() + { + unset($this->scheduled_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure last_failure = 11; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getLastFailure() + { + return $this->last_failure; + } + + public function hasLastFailure() + { + return isset($this->last_failure); + } + + public function clearLastFailure() + { + unset($this->last_failure); + } + + /** + * Generated from protobuf field .temporal.api.failure.v1.Failure last_failure = 11; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setLastFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->last_failure = $var; + + return $this; + } + + /** + * Generated from protobuf field string last_worker_identity = 12; + * @return string + */ + public function getLastWorkerIdentity() + { + return $this->last_worker_identity; + } + + /** + * Generated from protobuf field string last_worker_identity = 12; + * @param string $var + * @return $this + */ + public function setLastWorkerIdentity($var) + { + GPBUtil::checkString($var, True); + $this->last_worker_identity = $var; + + return $this; + } + + /** + * When present, it means this activity is assigned to the build ID of its workflow. + * + * Generated from protobuf field .google.protobuf.Empty use_workflow_build_id = 13; + * @return \Google\Protobuf\GPBEmpty|null + */ + public function getUseWorkflowBuildId() + { + return $this->readOneof(13); + } + + public function hasUseWorkflowBuildId() + { + return $this->hasOneof(13); + } + + /** + * When present, it means this activity is assigned to the build ID of its workflow. + * + * Generated from protobuf field .google.protobuf.Empty use_workflow_build_id = 13; + * @param \Google\Protobuf\GPBEmpty $var + * @return $this + */ + public function setUseWorkflowBuildId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\GPBEmpty::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * This means the activity is independently versioned and not bound to the build ID of its workflow. + * The activity will use the build id in this field instead. + * If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning + * rules. + * + * Generated from protobuf field string last_independently_assigned_build_id = 14; + * @return string + */ + public function getLastIndependentlyAssignedBuildId() + { + return $this->readOneof(14); + } + + public function hasLastIndependentlyAssignedBuildId() + { + return $this->hasOneof(14); + } + + /** + * This means the activity is independently versioned and not bound to the build ID of its workflow. + * The activity will use the build id in this field instead. + * If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning + * rules. + * + * Generated from protobuf field string last_independently_assigned_build_id = 14; + * @param string $var + * @return $this + */ + public function setLastIndependentlyAssignedBuildId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * The version stamp of the worker to whom this activity was most recently dispatched + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getLastWorkerVersionStamp() + { + return $this->last_worker_version_stamp; + } + + public function hasLastWorkerVersionStamp() + { + return isset($this->last_worker_version_stamp); + } + + public function clearLastWorkerVersionStamp() + { + unset($this->last_worker_version_stamp); + } + + /** + * The version stamp of the worker to whom this activity was most recently dispatched + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setLastWorkerVersionStamp($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->last_worker_version_stamp = $var; + + return $this; + } + + /** + * @return string + */ + public function getAssignedBuildId() + { + return $this->whichOneof("assigned_build_id"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingChildExecutionInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingChildExecutionInfo.php new file mode 100644 index 0000000..ea66779 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingChildExecutionInfo.php @@ -0,0 +1,174 @@ +temporal.api.workflow.v1.PendingChildExecutionInfo + */ +class PendingChildExecutionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string workflow_id = 1; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field string run_id = 2; + */ + protected $run_id = ''; + /** + * Generated from protobuf field string workflow_type_name = 3; + */ + protected $workflow_type_name = ''; + /** + * Generated from protobuf field int64 initiated_id = 4; + */ + protected $initiated_id = 0; + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 5; + */ + protected $parent_close_policy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $workflow_id + * @type string $run_id + * @type string $workflow_type_name + * @type int|string $initiated_id + * @type int $parent_close_policy + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 1; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string run_id = 2; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Generated from protobuf field string run_id = 2; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * Generated from protobuf field string workflow_type_name = 3; + * @return string + */ + public function getWorkflowTypeName() + { + return $this->workflow_type_name; + } + + /** + * Generated from protobuf field string workflow_type_name = 3; + * @param string $var + * @return $this + */ + public function setWorkflowTypeName($var) + { + GPBUtil::checkString($var, True); + $this->workflow_type_name = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 initiated_id = 4; + * @return int|string + */ + public function getInitiatedId() + { + return $this->initiated_id; + } + + /** + * Generated from protobuf field int64 initiated_id = 4; + * @param int|string $var + * @return $this + */ + public function setInitiatedId($var) + { + GPBUtil::checkInt64($var); + $this->initiated_id = $var; + + return $this; + } + + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 5; + * @return int + */ + public function getParentClosePolicy() + { + return $this->parent_close_policy; + } + + /** + * Default: PARENT_CLOSE_POLICY_TERMINATE. + * + * Generated from protobuf field .temporal.api.enums.v1.ParentClosePolicy parent_close_policy = 5; + * @param int $var + * @return $this + */ + public function setParentClosePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ParentClosePolicy::class); + $this->parent_close_policy = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingNexusOperationInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingNexusOperationInfo.php new file mode 100644 index 0000000..4eb3624 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingNexusOperationInfo.php @@ -0,0 +1,508 @@ +temporal.api.workflow.v1.PendingNexusOperationInfo + */ +class PendingNexusOperationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Endpoint name. + * Resolved to a URL via the cluster's endpoint registry. + * + * Generated from protobuf field string endpoint = 1; + */ + protected $endpoint = ''; + /** + * Service name. + * + * Generated from protobuf field string service = 2; + */ + protected $service = ''; + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + */ + protected $operation = ''; + /** + * Operation ID. Only set for asynchronous operations after a successful StartOperation call. + * + * Generated from protobuf field string operation_id = 4; + */ + protected $operation_id = ''; + /** + * Schedule-to-close timeout for this operation. + * This is the only timeout settable by a workflow. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + */ + protected $schedule_to_close_timeout = null; + /** + * The time when the operation was scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 6; + */ + protected $scheduled_time = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingNexusOperationState state = 7; + */ + protected $state = 0; + /** + * The number of attempts made to deliver the start operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * + * Generated from protobuf field int32 attempt = 8; + */ + protected $attempt = 0; + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 9; + */ + protected $last_attempt_complete_time = null; + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 10; + */ + protected $last_attempt_failure = null; + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 11; + */ + protected $next_attempt_schedule_time = null; + /** + * Generated from protobuf field .temporal.api.workflow.v1.NexusOperationCancellationInfo cancellation_info = 12; + */ + protected $cancellation_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $endpoint + * Endpoint name. + * Resolved to a URL via the cluster's endpoint registry. + * @type string $service + * Service name. + * @type string $operation + * Operation name. + * @type string $operation_id + * Operation ID. Only set for asynchronous operations after a successful StartOperation call. + * @type \Google\Protobuf\Duration $schedule_to_close_timeout + * Schedule-to-close timeout for this operation. + * This is the only timeout settable by a workflow. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Timestamp $scheduled_time + * The time when the operation was scheduled. + * @type int $state + * @type int $attempt + * The number of attempts made to deliver the start operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * @type \Google\Protobuf\Timestamp $last_attempt_complete_time + * The time when the last attempt completed. + * @type \Temporal\Api\Failure\V1\Failure $last_attempt_failure + * The last attempt's failure, if any. + * @type \Google\Protobuf\Timestamp $next_attempt_schedule_time + * The time when the next attempt is scheduled. + * @type \Temporal\Api\Workflow\V1\NexusOperationCancellationInfo $cancellation_info + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Endpoint name. + * Resolved to a URL via the cluster's endpoint registry. + * + * Generated from protobuf field string endpoint = 1; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Endpoint name. + * Resolved to a URL via the cluster's endpoint registry. + * + * Generated from protobuf field string endpoint = 1; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Service name. + * + * Generated from protobuf field string service = 2; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Service name. + * + * 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; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Operation name. + * + * Generated from protobuf field string operation = 3; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Operation ID. Only set for asynchronous operations after a successful StartOperation call. + * + * Generated from protobuf field string operation_id = 4; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * Operation ID. Only set for asynchronous operations after a successful StartOperation call. + * + * Generated from protobuf field string operation_id = 4; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + + /** + * Schedule-to-close timeout for this operation. + * This is the only timeout settable by a workflow. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToCloseTimeout() + { + return $this->schedule_to_close_timeout; + } + + public function hasScheduleToCloseTimeout() + { + return isset($this->schedule_to_close_timeout); + } + + public function clearScheduleToCloseTimeout() + { + unset($this->schedule_to_close_timeout); + } + + /** + * Schedule-to-close timeout for this operation. + * This is the only timeout settable by a workflow. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_close_timeout = $var; + + return $this; + } + + /** + * The time when the operation was scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledTime() + { + return $this->scheduled_time; + } + + public function hasScheduledTime() + { + return isset($this->scheduled_time); + } + + public function clearScheduledTime() + { + unset($this->scheduled_time); + } + + /** + * The time when the operation was scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingNexusOperationState state = 7; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingNexusOperationState state = 7; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\PendingNexusOperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The number of attempts made to deliver the start operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * + * Generated from protobuf field int32 attempt = 8; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * The number of attempts made to deliver the start operation request. + * This number represents a minimum bound since the attempt is incremented after the request completes. + * + * Generated from protobuf field int32 attempt = 8; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastAttemptCompleteTime() + { + return $this->last_attempt_complete_time; + } + + public function hasLastAttemptCompleteTime() + { + return isset($this->last_attempt_complete_time); + } + + public function clearLastAttemptCompleteTime() + { + unset($this->last_attempt_complete_time); + } + + /** + * The time when the last attempt completed. + * + * Generated from protobuf field .google.protobuf.Timestamp last_attempt_complete_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastAttemptCompleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_attempt_complete_time = $var; + + return $this; + } + + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 10; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getLastAttemptFailure() + { + return $this->last_attempt_failure; + } + + public function hasLastAttemptFailure() + { + return isset($this->last_attempt_failure); + } + + public function clearLastAttemptFailure() + { + unset($this->last_attempt_failure); + } + + /** + * The last attempt's failure, if any. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure last_attempt_failure = 10; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setLastAttemptFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->last_attempt_failure = $var; + + return $this; + } + + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 11; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextAttemptScheduleTime() + { + return $this->next_attempt_schedule_time; + } + + public function hasNextAttemptScheduleTime() + { + return isset($this->next_attempt_schedule_time); + } + + public function clearNextAttemptScheduleTime() + { + unset($this->next_attempt_schedule_time); + } + + /** + * The time when the next attempt is scheduled. + * + * Generated from protobuf field .google.protobuf.Timestamp next_attempt_schedule_time = 11; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextAttemptScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_attempt_schedule_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.NexusOperationCancellationInfo cancellation_info = 12; + * @return \Temporal\Api\Workflow\V1\NexusOperationCancellationInfo|null + */ + public function getCancellationInfo() + { + return $this->cancellation_info; + } + + public function hasCancellationInfo() + { + return isset($this->cancellation_info); + } + + public function clearCancellationInfo() + { + unset($this->cancellation_info); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.NexusOperationCancellationInfo cancellation_info = 12; + * @param \Temporal\Api\Workflow\V1\NexusOperationCancellationInfo $var + * @return $this + */ + public function setCancellationInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\NexusOperationCancellationInfo::class); + $this->cancellation_info = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingWorkflowTaskInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingWorkflowTaskInfo.php new file mode 100644 index 0000000..63d5954 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/PendingWorkflowTaskInfo.php @@ -0,0 +1,216 @@ +temporal.api.workflow.v1.PendingWorkflowTaskInfo + */ +class PendingWorkflowTaskInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingWorkflowTaskState state = 1; + */ + protected $state = 0; + /** + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 2; + */ + protected $scheduled_time = null; + /** + * original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. + * Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command + * In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds + * some threshold, the workflow task will be forced timeout. + * + * Generated from protobuf field .google.protobuf.Timestamp original_scheduled_time = 3; + */ + protected $original_scheduled_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp started_time = 4; + */ + protected $started_time = null; + /** + * Generated from protobuf field int32 attempt = 5; + */ + protected $attempt = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * @type \Google\Protobuf\Timestamp $scheduled_time + * @type \Google\Protobuf\Timestamp $original_scheduled_time + * original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. + * Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command + * In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds + * some threshold, the workflow task will be forced timeout. + * @type \Google\Protobuf\Timestamp $started_time + * @type int $attempt + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingWorkflowTaskState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.PendingWorkflowTaskState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\PendingWorkflowTaskState::class); + $this->state = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledTime() + { + return $this->scheduled_time; + } + + public function hasScheduledTime() + { + return isset($this->scheduled_time); + } + + public function clearScheduledTime() + { + unset($this->scheduled_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_time = $var; + + return $this; + } + + /** + * original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. + * Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command + * In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds + * some threshold, the workflow task will be forced timeout. + * + * Generated from protobuf field .google.protobuf.Timestamp original_scheduled_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getOriginalScheduledTime() + { + return $this->original_scheduled_time; + } + + public function hasOriginalScheduledTime() + { + return isset($this->original_scheduled_time); + } + + public function clearOriginalScheduledTime() + { + unset($this->original_scheduled_time); + } + + /** + * original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. + * Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command + * In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds + * some threshold, the workflow task will be forced timeout. + * + * Generated from protobuf field .google.protobuf.Timestamp original_scheduled_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setOriginalScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->original_scheduled_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp started_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartedTime() + { + return $this->started_time; + } + + public function hasStartedTime() + { + return isset($this->started_time); + } + + public function clearStartedTime() + { + unset($this->started_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp started_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->started_time = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 attempt = 5; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * Generated from protobuf field int32 attempt = 5; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/ResetPointInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/ResetPointInfo.php new file mode 100644 index 0000000..acdc0b0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/ResetPointInfo.php @@ -0,0 +1,295 @@ +temporal.api.workflow.v1.ResetPointInfo + */ +class ResetPointInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Worker build id. + * + * Generated from protobuf field string build_id = 7; + */ + protected $build_id = ''; + /** + * A worker binary version identifier (deprecated). + * + * Generated from protobuf field string binary_checksum = 1; + */ + protected $binary_checksum = ''; + /** + * The first run ID in the execution chain that was touched by this worker build. + * + * Generated from protobuf field string run_id = 2; + */ + protected $run_id = ''; + /** + * Event ID of the first WorkflowTaskCompleted event processed by this worker build. + * + * Generated from protobuf field int64 first_workflow_task_completed_id = 3; + */ + protected $first_workflow_task_completed_id = 0; + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + /** + * (-- api-linter: core::0214::resource-expiry=disabled + * aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) + * The time that the run is deleted due to retention. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5; + */ + protected $expire_time = null; + /** + * false if the reset point has pending childWFs/reqCancels/signalExternals. + * + * Generated from protobuf field bool resettable = 6; + */ + protected $resettable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_id + * Worker build id. + * @type string $binary_checksum + * A worker binary version identifier (deprecated). + * @type string $run_id + * The first run ID in the execution chain that was touched by this worker build. + * @type int|string $first_workflow_task_completed_id + * Event ID of the first WorkflowTaskCompleted event processed by this worker build. + * @type \Google\Protobuf\Timestamp $create_time + * @type \Google\Protobuf\Timestamp $expire_time + * (-- api-linter: core::0214::resource-expiry=disabled + * aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) + * The time that the run is deleted due to retention. + * @type bool $resettable + * false if the reset point has pending childWFs/reqCancels/signalExternals. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Worker build id. + * + * Generated from protobuf field string build_id = 7; + * @return string + */ + public function getBuildId() + { + return $this->build_id; + } + + /** + * Worker build id. + * + * Generated from protobuf field string build_id = 7; + * @param string $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkString($var, True); + $this->build_id = $var; + + return $this; + } + + /** + * A worker binary version identifier (deprecated). + * + * Generated from protobuf field string binary_checksum = 1; + * @return string + */ + public function getBinaryChecksum() + { + return $this->binary_checksum; + } + + /** + * A worker binary version identifier (deprecated). + * + * Generated from protobuf field string binary_checksum = 1; + * @param string $var + * @return $this + */ + public function setBinaryChecksum($var) + { + GPBUtil::checkString($var, True); + $this->binary_checksum = $var; + + return $this; + } + + /** + * The first run ID in the execution chain that was touched by this worker build. + * + * Generated from protobuf field string run_id = 2; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * The first run ID in the execution chain that was touched by this worker build. + * + * Generated from protobuf field string run_id = 2; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * Event ID of the first WorkflowTaskCompleted event processed by this worker build. + * + * Generated from protobuf field int64 first_workflow_task_completed_id = 3; + * @return int|string + */ + public function getFirstWorkflowTaskCompletedId() + { + return $this->first_workflow_task_completed_id; + } + + /** + * Event ID of the first WorkflowTaskCompleted event processed by this worker build. + * + * Generated from protobuf field int64 first_workflow_task_completed_id = 3; + * @param int|string $var + * @return $this + */ + public function setFirstWorkflowTaskCompletedId($var) + { + GPBUtil::checkInt64($var); + $this->first_workflow_task_completed_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @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); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * (-- api-linter: core::0214::resource-expiry=disabled + * aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) + * The time that the run is deleted due to retention. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * (-- api-linter: core::0214::resource-expiry=disabled + * aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) + * The time that the run is deleted due to retention. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * false if the reset point has pending childWFs/reqCancels/signalExternals. + * + * Generated from protobuf field bool resettable = 6; + * @return bool + */ + public function getResettable() + { + return $this->resettable; + } + + /** + * false if the reset point has pending childWFs/reqCancels/signalExternals. + * + * Generated from protobuf field bool resettable = 6; + * @param bool $var + * @return $this + */ + public function setResettable($var) + { + GPBUtil::checkBool($var); + $this->resettable = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/ResetPoints.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/ResetPoints.php new file mode 100644 index 0000000..f3e73c5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/ResetPoints.php @@ -0,0 +1,59 @@ +temporal.api.workflow.v1.ResetPoints + */ +class ResetPoints extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.ResetPointInfo points = 1; + */ + private $points; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflow\V1\ResetPointInfo>|\Google\Protobuf\Internal\RepeatedField $points + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.ResetPointInfo points = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPoints() + { + return $this->points; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.ResetPointInfo points = 1; + * @param array<\Temporal\Api\Workflow\V1\ResetPointInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\ResetPointInfo::class); + $this->points = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/WorkflowExecutionConfig.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/WorkflowExecutionConfig.php new file mode 100644 index 0000000..3b272b5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/WorkflowExecutionConfig.php @@ -0,0 +1,224 @@ +temporal.api.workflow.v1.WorkflowExecutionConfig + */ +class WorkflowExecutionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 1; + */ + protected $task_queue = null; + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 2; + */ + protected $workflow_execution_timeout = null; + /** + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 3; + */ + protected $workflow_run_timeout = null; + /** + * Generated from protobuf field .google.protobuf.Duration default_workflow_task_timeout = 4; + */ + protected $default_workflow_task_timeout = null; + /** + * User metadata provided on start workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 5; + */ + protected $user_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Google\Protobuf\Duration $workflow_execution_timeout + * @type \Google\Protobuf\Duration $workflow_run_timeout + * @type \Google\Protobuf\Duration $default_workflow_task_timeout + * @type \Temporal\Api\Sdk\V1\UserMetadata $user_metadata + * User metadata provided on start workflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 1; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 1; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionTimeout() + { + return $this->workflow_execution_timeout; + } + + public function hasWorkflowExecutionTimeout() + { + return isset($this->workflow_execution_timeout); + } + + public function clearWorkflowExecutionTimeout() + { + unset($this->workflow_execution_timeout); + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_timeout = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Duration default_workflow_task_timeout = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDefaultWorkflowTaskTimeout() + { + return $this->default_workflow_task_timeout; + } + + public function hasDefaultWorkflowTaskTimeout() + { + return isset($this->default_workflow_task_timeout); + } + + public function clearDefaultWorkflowTaskTimeout() + { + unset($this->default_workflow_task_timeout); + } + + /** + * Generated from protobuf field .google.protobuf.Duration default_workflow_task_timeout = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDefaultWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->default_workflow_task_timeout = $var; + + return $this; + } + + /** + * User metadata provided on start workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 5; + * @return \Temporal\Api\Sdk\V1\UserMetadata|null + */ + public function getUserMetadata() + { + return $this->user_metadata; + } + + public function hasUserMetadata() + { + return isset($this->user_metadata); + } + + public function clearUserMetadata() + { + unset($this->user_metadata); + } + + /** + * User metadata provided on start workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 5; + * @param \Temporal\Api\Sdk\V1\UserMetadata $var + * @return $this + */ + public function setUserMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\UserMetadata::class); + $this->user_metadata = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/WorkflowExecutionInfo.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/WorkflowExecutionInfo.php new file mode 100644 index 0000000..3accd78 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflow/V1/WorkflowExecutionInfo.php @@ -0,0 +1,815 @@ +temporal.api.workflow.v1.WorkflowExecutionInfo + */ +class WorkflowExecutionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 1; + */ + protected $execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType type = 2; + */ + protected $type = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp close_time = 4; + */ + protected $close_time = null; + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 5; + */ + protected $status = 0; + /** + * Generated from protobuf field int64 history_length = 6; + */ + protected $history_length = 0; + /** + * Generated from protobuf field string parent_namespace_id = 7; + */ + protected $parent_namespace_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution parent_execution = 8; + */ + protected $parent_execution = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 9; + */ + protected $execution_time = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 10; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 11; + */ + protected $search_attributes = null; + /** + * Generated from protobuf field .temporal.api.workflow.v1.ResetPoints auto_reset_points = 12; + */ + protected $auto_reset_points = null; + /** + * Generated from protobuf field string task_queue = 13; + */ + protected $task_queue = ''; + /** + * Generated from protobuf field int64 state_transition_count = 14; + */ + protected $state_transition_count = 0; + /** + * Generated from protobuf field int64 history_size_bytes = 15; + */ + protected $history_size_bytes = 0; + /** + * If set, the most recent worker version stamp that appeared in a workflow task completion + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp most_recent_worker_version_stamp = 16; + */ + protected $most_recent_worker_version_stamp = null; + /** + * Workflow execution duration is defined as difference between close time and execution time. + * This field is only populated if the workflow is closed. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 17; + */ + protected $execution_duration = null; + /** + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution root_execution = 18; + */ + protected $root_execution = null; + /** + * The currently assigned build ID for this execution. Presence of this value means worker versioning is used + * for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules + * when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled + * again, the assigned build ID may change according to the latest versioning rules. + * Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to + * this execution. + * + * Generated from protobuf field string assigned_build_id = 19; + */ + protected $assigned_build_id = ''; + /** + * Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead + * of using the assignment rules. + * + * Generated from protobuf field string inherited_build_id = 20; + */ + protected $inherited_build_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\WorkflowExecution $execution + * @type \Temporal\Api\Common\V1\WorkflowType $type + * @type \Google\Protobuf\Timestamp $start_time + * @type \Google\Protobuf\Timestamp $close_time + * @type int $status + * @type int|string $history_length + * @type string $parent_namespace_id + * @type \Temporal\Api\Common\V1\WorkflowExecution $parent_execution + * @type \Google\Protobuf\Timestamp $execution_time + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type \Temporal\Api\Workflow\V1\ResetPoints $auto_reset_points + * @type string $task_queue + * @type int|string $state_transition_count + * @type int|string $history_size_bytes + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $most_recent_worker_version_stamp + * If set, the most recent worker version stamp that appeared in a workflow task completion + * @type \Google\Protobuf\Duration $execution_duration + * Workflow execution duration is defined as difference between close time and execution time. + * This field is only populated if the workflow is closed. + * @type \Temporal\Api\Common\V1\WorkflowExecution $root_execution + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * @type string $assigned_build_id + * The currently assigned build ID for this execution. Presence of this value means worker versioning is used + * for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules + * when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled + * again, the assigned build ID may change according to the latest versioning rules. + * Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to + * this execution. + * @type string $inherited_build_id + * Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead + * of using the assignment rules. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 1; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 1; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType type = 2; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType type = 2; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->type = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @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); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp close_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCloseTime() + { + return $this->close_time; + } + + public function hasCloseTime() + { + return isset($this->close_time); + } + + public function clearCloseTime() + { + unset($this->close_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp close_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCloseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->close_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 5; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.WorkflowExecutionStatus status = 5; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowExecutionStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 history_length = 6; + * @return int|string + */ + public function getHistoryLength() + { + return $this->history_length; + } + + /** + * Generated from protobuf field int64 history_length = 6; + * @param int|string $var + * @return $this + */ + public function setHistoryLength($var) + { + GPBUtil::checkInt64($var); + $this->history_length = $var; + + return $this; + } + + /** + * Generated from protobuf field string parent_namespace_id = 7; + * @return string + */ + public function getParentNamespaceId() + { + return $this->parent_namespace_id; + } + + /** + * Generated from protobuf field string parent_namespace_id = 7; + * @param string $var + * @return $this + */ + public function setParentNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->parent_namespace_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution parent_execution = 8; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getParentExecution() + { + return $this->parent_execution; + } + + public function hasParentExecution() + { + return isset($this->parent_execution); + } + + public function clearParentExecution() + { + unset($this->parent_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution parent_execution = 8; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setParentExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->parent_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExecutionTime() + { + return $this->execution_time; + } + + public function hasExecutionTime() + { + return isset($this->execution_time); + } + + public function clearExecutionTime() + { + unset($this->execution_time); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExecutionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->execution_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 10; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 10; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 11; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 11; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.ResetPoints auto_reset_points = 12; + * @return \Temporal\Api\Workflow\V1\ResetPoints|null + */ + public function getAutoResetPoints() + { + return $this->auto_reset_points; + } + + public function hasAutoResetPoints() + { + return isset($this->auto_reset_points); + } + + public function clearAutoResetPoints() + { + unset($this->auto_reset_points); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.ResetPoints auto_reset_points = 12; + * @param \Temporal\Api\Workflow\V1\ResetPoints $var + * @return $this + */ + public function setAutoResetPoints($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\ResetPoints::class); + $this->auto_reset_points = $var; + + return $this; + } + + /** + * Generated from protobuf field string task_queue = 13; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Generated from protobuf field string task_queue = 13; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 state_transition_count = 14; + * @return int|string + */ + public function getStateTransitionCount() + { + return $this->state_transition_count; + } + + /** + * Generated from protobuf field int64 state_transition_count = 14; + * @param int|string $var + * @return $this + */ + public function setStateTransitionCount($var) + { + GPBUtil::checkInt64($var); + $this->state_transition_count = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 history_size_bytes = 15; + * @return int|string + */ + public function getHistorySizeBytes() + { + return $this->history_size_bytes; + } + + /** + * Generated from protobuf field int64 history_size_bytes = 15; + * @param int|string $var + * @return $this + */ + public function setHistorySizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->history_size_bytes = $var; + + return $this; + } + + /** + * If set, the most recent worker version stamp that appeared in a workflow task completion + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp most_recent_worker_version_stamp = 16; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getMostRecentWorkerVersionStamp() + { + return $this->most_recent_worker_version_stamp; + } + + public function hasMostRecentWorkerVersionStamp() + { + return isset($this->most_recent_worker_version_stamp); + } + + public function clearMostRecentWorkerVersionStamp() + { + unset($this->most_recent_worker_version_stamp); + } + + /** + * If set, the most recent worker version stamp that appeared in a workflow task completion + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp most_recent_worker_version_stamp = 16; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setMostRecentWorkerVersionStamp($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->most_recent_worker_version_stamp = $var; + + return $this; + } + + /** + * Workflow execution duration is defined as difference between close time and execution time. + * This field is only populated if the workflow is closed. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 17; + * @return \Google\Protobuf\Duration|null + */ + public function getExecutionDuration() + { + return $this->execution_duration; + } + + public function hasExecutionDuration() + { + return isset($this->execution_duration); + } + + public function clearExecutionDuration() + { + unset($this->execution_duration); + } + + /** + * Workflow execution duration is defined as difference between close time and execution time. + * This field is only populated if the workflow is closed. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 17; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExecutionDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->execution_duration = $var; + + return $this; + } + + /** + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution root_execution = 18; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getRootExecution() + { + return $this->root_execution; + } + + public function hasRootExecution() + { + return isset($this->root_execution); + } + + public function clearRootExecution() + { + unset($this->root_execution); + } + + /** + * Contains information about the root workflow execution. + * The root workflow execution is defined as follows: + * 1. A workflow without parent workflow is its own root workflow. + * 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. + * Note: workflows continued as new or reseted may or may not have parents, check examples below. + * Examples: + * Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. + * - The root workflow of all three workflows is W1. + * Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. + * - The root workflow of all three workflows is W1. + * Scenario 3: Workflow W1 continued as new W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 + * - The root workflow of all three workflows is W1. + * Scenario 5: Workflow W1 is reseted, creating W2. + * - The root workflow of W1 is W1 and the root workflow of W2 is W2. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution root_execution = 18; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setRootExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->root_execution = $var; + + return $this; + } + + /** + * The currently assigned build ID for this execution. Presence of this value means worker versioning is used + * for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules + * when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled + * again, the assigned build ID may change according to the latest versioning rules. + * Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to + * this execution. + * + * Generated from protobuf field string assigned_build_id = 19; + * @return string + */ + public function getAssignedBuildId() + { + return $this->assigned_build_id; + } + + /** + * The currently assigned build ID for this execution. Presence of this value means worker versioning is used + * for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules + * when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled + * again, the assigned build ID may change according to the latest versioning rules. + * Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to + * this execution. + * + * Generated from protobuf field string assigned_build_id = 19; + * @param string $var + * @return $this + */ + public function setAssignedBuildId($var) + { + GPBUtil::checkString($var, True); + $this->assigned_build_id = $var; + + return $this; + } + + /** + * Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead + * of using the assignment rules. + * + * Generated from protobuf field string inherited_build_id = 20; + * @return string + */ + public function getInheritedBuildId() + { + return $this->inherited_build_id; + } + + /** + * Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead + * of using the assignment rules. + * + * Generated from protobuf field string inherited_build_id = 20; + * @param string $var + * @return $this + */ + public function setInheritedBuildId($var) + { + GPBUtil::checkString($var, True); + $this->inherited_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsRequest.php new file mode 100644 index 0000000..f2765d2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsRequest.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest + */ +class CountWorkflowExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string query = 2; + */ + protected $query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $query + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string query = 2; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Generated from protobuf field string query = 2; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsResponse.php new file mode 100644 index 0000000..9f99f62 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsResponse.php @@ -0,0 +1,120 @@ +temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse + */ +class CountWorkflowExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If `query` is not grouping by any field, the count is an approximate number + * of workflows that matches the query. + * If `query` is grouping by a field, the count is simply the sum of the counts + * of the groups returned in the response. This number can be smaller than the + * total number of workflows matching the query. + * + * Generated from protobuf field int64 count = 1; + */ + protected $count = 0; + /** + * `groups` contains the groups if the request is grouping by a field. + * The list might not be complete, and the counts of each group is approximate. + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup groups = 2; + */ + private $groups; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $count + * If `query` is not grouping by any field, the count is an approximate number + * of workflows that matches the query. + * If `query` is grouping by a field, the count is simply the sum of the counts + * of the groups returned in the response. This number can be smaller than the + * total number of workflows matching the query. + * @type array<\Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsResponse\AggregationGroup>|\Google\Protobuf\Internal\RepeatedField $groups + * `groups` contains the groups if the request is grouping by a field. + * The list might not be complete, and the counts of each group is approximate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * If `query` is not grouping by any field, the count is an approximate number + * of workflows that matches the query. + * If `query` is grouping by a field, the count is simply the sum of the counts + * of the groups returned in the response. This number can be smaller than the + * total number of workflows matching the query. + * + * Generated from protobuf field int64 count = 1; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * If `query` is not grouping by any field, the count is an approximate number + * of workflows that matches the query. + * If `query` is grouping by a field, the count is simply the sum of the counts + * of the groups returned in the response. This number can be smaller than the + * total number of workflows matching the query. + * + * 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; + } + + /** + * `groups` contains the groups if the request is grouping by a field. + * The list might not be complete, and the counts of each group is approximate. + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup groups = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroups() + { + return $this->groups; + } + + /** + * `groups` contains the groups if the request is grouping by a field. + * The list might not be complete, and the counts of each group is approximate. + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup groups = 2; + * @param array<\Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsResponse\AggregationGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsResponse\AggregationGroup::class); + $this->groups = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsResponse/AggregationGroup.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsResponse/AggregationGroup.php new file mode 100644 index 0000000..36a6f25 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CountWorkflowExecutionsResponse/AggregationGroup.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup + */ +class AggregationGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.common.v1.Payload group_values = 1; + */ + private $group_values; + /** + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Common\V1\Payload>|\Google\Protobuf\Internal\RepeatedField $group_values + * @type int|string $count + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.common.v1.Payload group_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupValues() + { + return $this->group_values; + } + + /** + * Generated from protobuf field repeated .temporal.api.common.v1.Payload group_values = 1; + * @param array<\Temporal\Api\Common\V1\Payload>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Payload::class); + $this->group_values = $arr; + + return $this; + } + + /** + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CreateScheduleRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CreateScheduleRequest.php new file mode 100644 index 0000000..c593a6e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CreateScheduleRequest.php @@ -0,0 +1,340 @@ +temporal.api.workflowservice.v1.CreateScheduleRequest + */ +class CreateScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace the schedule should be created in. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The id of the new schedule. + * + * Generated from protobuf field string schedule_id = 2; + */ + protected $schedule_id = ''; + /** + * The schedule spec, policies, action, and initial state. + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 3; + */ + protected $schedule = null; + /** + * Optional initial patch (e.g. to run the action once immediately). + * + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePatch initial_patch = 4; + */ + protected $initial_patch = null; + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 5; + */ + protected $identity = ''; + /** + * A unique identifier for this create request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 6; + */ + protected $request_id = ''; + /** + * Memo and search attributes to attach to the schedule itself. + * + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 7; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 8; + */ + protected $search_attributes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace the schedule should be created in. + * @type string $schedule_id + * The id of the new schedule. + * @type \Temporal\Api\Schedule\V1\Schedule $schedule + * The schedule spec, policies, action, and initial state. + * @type \Temporal\Api\Schedule\V1\SchedulePatch $initial_patch + * Optional initial patch (e.g. to run the action once immediately). + * @type string $identity + * The identity of the client who initiated this request. + * @type string $request_id + * A unique identifier for this create request for idempotence. Typically UUIDv4. + * @type \Temporal\Api\Common\V1\Memo $memo + * Memo and search attributes to attach to the schedule itself. + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace the schedule should be created in. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace the schedule should be created in. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The id of the new schedule. + * + * Generated from protobuf field string schedule_id = 2; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * The id of the new schedule. + * + * Generated from protobuf field string schedule_id = 2; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + + /** + * The schedule spec, policies, action, and initial state. + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 3; + * @return \Temporal\Api\Schedule\V1\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * The schedule spec, policies, action, and initial state. + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 3; + * @param \Temporal\Api\Schedule\V1\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * Optional initial patch (e.g. to run the action once immediately). + * + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePatch initial_patch = 4; + * @return \Temporal\Api\Schedule\V1\SchedulePatch|null + */ + public function getInitialPatch() + { + return $this->initial_patch; + } + + public function hasInitialPatch() + { + return isset($this->initial_patch); + } + + public function clearInitialPatch() + { + unset($this->initial_patch); + } + + /** + * Optional initial patch (e.g. to run the action once immediately). + * + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePatch initial_patch = 4; + * @param \Temporal\Api\Schedule\V1\SchedulePatch $var + * @return $this + */ + public function setInitialPatch($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\SchedulePatch::class); + $this->initial_patch = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 5; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 5; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * A unique identifier for this create request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 6; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A unique identifier for this create request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 6; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Memo and search attributes to attach to the schedule itself. + * + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 7; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Memo and search attributes to attach to the schedule itself. + * + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 7; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 8; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 8; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CreateScheduleResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CreateScheduleResponse.php new file mode 100644 index 0000000..f16f595 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/CreateScheduleResponse.php @@ -0,0 +1,59 @@ +temporal.api.workflowservice.v1.CreateScheduleResponse + */ +class CreateScheduleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes conflict_token = 1; + */ + protected $conflict_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conflict_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes conflict_token = 1; + * @return string + */ + public function getConflictToken() + { + return $this->conflict_token; + } + + /** + * Generated from protobuf field bytes conflict_token = 1; + * @param string $var + * @return $this + */ + public function setConflictToken($var) + { + GPBUtil::checkString($var, False); + $this->conflict_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteScheduleRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteScheduleRequest.php new file mode 100644 index 0000000..28c932e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteScheduleRequest.php @@ -0,0 +1,134 @@ +temporal.api.workflowservice.v1.DeleteScheduleRequest + */ +class DeleteScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace of the schedule to delete. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The id of the schedule to delete. + * + * Generated from protobuf field string schedule_id = 2; + */ + protected $schedule_id = ''; + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace of the schedule to delete. + * @type string $schedule_id + * The id of the schedule to delete. + * @type string $identity + * The identity of the client who initiated this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace of the schedule to delete. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace of the schedule to delete. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The id of the schedule to delete. + * + * Generated from protobuf field string schedule_id = 2; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * The id of the schedule to delete. + * + * Generated from protobuf field string schedule_id = 2; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteScheduleResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteScheduleResponse.php new file mode 100644 index 0000000..630dcdb --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteScheduleResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.DeleteScheduleResponse + */ +class DeleteScheduleResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteWorkflowExecutionRequest.php new file mode 100644 index 0000000..dea1fc9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteWorkflowExecutionRequest.php @@ -0,0 +1,103 @@ +temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest + */ +class DeleteWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Workflow Execution to delete. If run_id is not specified, the latest one is used. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * Workflow Execution to delete. If run_id is not specified, the latest one is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Workflow Execution to delete. If run_id is not specified, the latest one is used. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Workflow Execution to delete. If run_id is not specified, the latest one is used. + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteWorkflowExecutionResponse.php new file mode 100644 index 0000000..546625b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeleteWorkflowExecutionResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse + */ +class DeleteWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeprecateNamespaceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeprecateNamespaceRequest.php new file mode 100644 index 0000000..2314d72 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeprecateNamespaceRequest.php @@ -0,0 +1,88 @@ +temporal.api.workflowservice.v1.DeprecateNamespaceRequest + */ +class DeprecateNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string security_token = 2; + */ + protected $security_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $security_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string security_token = 2; + * @return string + */ + public function getSecurityToken() + { + return $this->security_token; + } + + /** + * Generated from protobuf field string security_token = 2; + * @param string $var + * @return $this + */ + public function setSecurityToken($var) + { + GPBUtil::checkString($var, True); + $this->security_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeprecateNamespaceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeprecateNamespaceResponse.php new file mode 100644 index 0000000..6415c98 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DeprecateNamespaceResponse.php @@ -0,0 +1,34 @@ +temporal.api.workflowservice.v1.DeprecateNamespaceResponse + */ +class DeprecateNamespaceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeBatchOperationRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeBatchOperationRequest.php new file mode 100644 index 0000000..43396b9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeBatchOperationRequest.php @@ -0,0 +1,100 @@ +temporal.api.workflowservice.v1.DescribeBatchOperationRequest + */ +class DescribeBatchOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Batch job id + * + * Generated from protobuf field string job_id = 2; + */ + protected $job_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace that contains the batch operation + * @type string $job_id + * Batch job id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Batch job id + * + * Generated from protobuf field string job_id = 2; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Batch job id + * + * Generated from protobuf field string job_id = 2; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeBatchOperationResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeBatchOperationResponse.php new file mode 100644 index 0000000..32f5227 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeBatchOperationResponse.php @@ -0,0 +1,392 @@ +temporal.api.workflowservice.v1.DescribeBatchOperationResponse + */ +class DescribeBatchOperationResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Batch operation type + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationType operation_type = 1; + */ + protected $operation_type = 0; + /** + * Batch job ID + * + * Generated from protobuf field string job_id = 2; + */ + protected $job_id = ''; + /** + * Batch operation state + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationState state = 3; + */ + protected $state = 0; + /** + * Batch operation start time + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * Batch operation close time + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 5; + */ + protected $close_time = null; + /** + * Total operation count + * + * Generated from protobuf field int64 total_operation_count = 6; + */ + protected $total_operation_count = 0; + /** + * Complete operation count + * + * Generated from protobuf field int64 complete_operation_count = 7; + */ + protected $complete_operation_count = 0; + /** + * Failure operation count + * + * Generated from protobuf field int64 failure_operation_count = 8; + */ + protected $failure_operation_count = 0; + /** + * Identity indicates the operator identity + * + * Generated from protobuf field string identity = 9; + */ + protected $identity = ''; + /** + * Reason indicates the reason to stop a operation + * + * Generated from protobuf field string reason = 10; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $operation_type + * Batch operation type + * @type string $job_id + * Batch job ID + * @type int $state + * Batch operation state + * @type \Google\Protobuf\Timestamp $start_time + * Batch operation start time + * @type \Google\Protobuf\Timestamp $close_time + * Batch operation close time + * @type int|string $total_operation_count + * Total operation count + * @type int|string $complete_operation_count + * Complete operation count + * @type int|string $failure_operation_count + * Failure operation count + * @type string $identity + * Identity indicates the operator identity + * @type string $reason + * Reason indicates the reason to stop a operation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Batch operation type + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationType operation_type = 1; + * @return int + */ + public function getOperationType() + { + return $this->operation_type; + } + + /** + * Batch operation type + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationType operation_type = 1; + * @param int $var + * @return $this + */ + public function setOperationType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\BatchOperationType::class); + $this->operation_type = $var; + + return $this; + } + + /** + * Batch job ID + * + * Generated from protobuf field string job_id = 2; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Batch job ID + * + * Generated from protobuf field string job_id = 2; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * Batch operation state + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Batch operation state + * + * Generated from protobuf field .temporal.api.enums.v1.BatchOperationState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\BatchOperationState::class); + $this->state = $var; + + return $this; + } + + /** + * Batch operation start time + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @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); + } + + /** + * Batch operation start time + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Batch operation close time + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCloseTime() + { + return $this->close_time; + } + + public function hasCloseTime() + { + return isset($this->close_time); + } + + public function clearCloseTime() + { + unset($this->close_time); + } + + /** + * Batch operation close time + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCloseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->close_time = $var; + + return $this; + } + + /** + * Total operation count + * + * Generated from protobuf field int64 total_operation_count = 6; + * @return int|string + */ + public function getTotalOperationCount() + { + return $this->total_operation_count; + } + + /** + * Total operation count + * + * Generated from protobuf field int64 total_operation_count = 6; + * @param int|string $var + * @return $this + */ + public function setTotalOperationCount($var) + { + GPBUtil::checkInt64($var); + $this->total_operation_count = $var; + + return $this; + } + + /** + * Complete operation count + * + * Generated from protobuf field int64 complete_operation_count = 7; + * @return int|string + */ + public function getCompleteOperationCount() + { + return $this->complete_operation_count; + } + + /** + * Complete operation count + * + * Generated from protobuf field int64 complete_operation_count = 7; + * @param int|string $var + * @return $this + */ + public function setCompleteOperationCount($var) + { + GPBUtil::checkInt64($var); + $this->complete_operation_count = $var; + + return $this; + } + + /** + * Failure operation count + * + * Generated from protobuf field int64 failure_operation_count = 8; + * @return int|string + */ + public function getFailureOperationCount() + { + return $this->failure_operation_count; + } + + /** + * Failure operation count + * + * Generated from protobuf field int64 failure_operation_count = 8; + * @param int|string $var + * @return $this + */ + public function setFailureOperationCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_operation_count = $var; + + return $this; + } + + /** + * Identity indicates the operator identity + * + * Generated from protobuf field string identity = 9; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Identity indicates the operator identity + * + * Generated from protobuf field string identity = 9; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Reason indicates the reason to stop a operation + * + * Generated from protobuf field string reason = 10; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Reason indicates the reason to stop a operation + * + * Generated from protobuf field string reason = 10; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeNamespaceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeNamespaceRequest.php new file mode 100644 index 0000000..5523320 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeNamespaceRequest.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.DescribeNamespaceRequest + */ +class DescribeNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeNamespaceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeNamespaceResponse.php new file mode 100644 index 0000000..7734987 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeNamespaceResponse.php @@ -0,0 +1,235 @@ +temporal.api.workflowservice.v1.DescribeNamespaceResponse + */ +class DescribeNamespaceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo namespace_info = 1; + */ + protected $namespace_info = null; + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 2; + */ + protected $config = null; + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3; + */ + protected $replication_config = null; + /** + * Generated from protobuf field int64 failover_version = 4; + */ + protected $failover_version = 0; + /** + * Generated from protobuf field bool is_global_namespace = 5; + */ + protected $is_global_namespace = false; + /** + * Contains the historical state of failover_versions for the cluster, truncated to contain only the last N + * states to ensure that the list does not grow unbounded. + * + * Generated from protobuf field repeated .temporal.api.replication.v1.FailoverStatus failover_history = 6; + */ + private $failover_history; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\PBNamespace\V1\NamespaceInfo $namespace_info + * @type \Temporal\Api\PBNamespace\V1\NamespaceConfig $config + * @type \Temporal\Api\Replication\V1\NamespaceReplicationConfig $replication_config + * @type int|string $failover_version + * @type bool $is_global_namespace + * @type array<\Temporal\Api\Replication\V1\FailoverStatus>|\Google\Protobuf\Internal\RepeatedField $failover_history + * Contains the historical state of failover_versions for the cluster, truncated to contain only the last N + * states to ensure that the list does not grow unbounded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo namespace_info = 1; + * @return \Temporal\Api\PBNamespace\V1\NamespaceInfo|null + */ + public function getNamespaceInfo() + { + return $this->namespace_info; + } + + public function hasNamespaceInfo() + { + return isset($this->namespace_info); + } + + public function clearNamespaceInfo() + { + unset($this->namespace_info); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo namespace_info = 1; + * @param \Temporal\Api\PBNamespace\V1\NamespaceInfo $var + * @return $this + */ + public function setNamespaceInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceInfo::class); + $this->namespace_info = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 2; + * @return \Temporal\Api\PBNamespace\V1\NamespaceConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 2; + * @param \Temporal\Api\PBNamespace\V1\NamespaceConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceConfig::class); + $this->config = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3; + * @return \Temporal\Api\Replication\V1\NamespaceReplicationConfig|null + */ + public function getReplicationConfig() + { + return $this->replication_config; + } + + public function hasReplicationConfig() + { + return isset($this->replication_config); + } + + public function clearReplicationConfig() + { + unset($this->replication_config); + } + + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3; + * @param \Temporal\Api\Replication\V1\NamespaceReplicationConfig $var + * @return $this + */ + public function setReplicationConfig($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Replication\V1\NamespaceReplicationConfig::class); + $this->replication_config = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 failover_version = 4; + * @return int|string + */ + public function getFailoverVersion() + { + return $this->failover_version; + } + + /** + * Generated from protobuf field int64 failover_version = 4; + * @param int|string $var + * @return $this + */ + public function setFailoverVersion($var) + { + GPBUtil::checkInt64($var); + $this->failover_version = $var; + + return $this; + } + + /** + * Generated from protobuf field bool is_global_namespace = 5; + * @return bool + */ + public function getIsGlobalNamespace() + { + return $this->is_global_namespace; + } + + /** + * Generated from protobuf field bool is_global_namespace = 5; + * @param bool $var + * @return $this + */ + public function setIsGlobalNamespace($var) + { + GPBUtil::checkBool($var); + $this->is_global_namespace = $var; + + return $this; + } + + /** + * Contains the historical state of failover_versions for the cluster, truncated to contain only the last N + * states to ensure that the list does not grow unbounded. + * + * Generated from protobuf field repeated .temporal.api.replication.v1.FailoverStatus failover_history = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFailoverHistory() + { + return $this->failover_history; + } + + /** + * Contains the historical state of failover_versions for the cluster, truncated to contain only the last N + * states to ensure that the list does not grow unbounded. + * + * Generated from protobuf field repeated .temporal.api.replication.v1.FailoverStatus failover_history = 6; + * @param array<\Temporal\Api\Replication\V1\FailoverStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFailoverHistory($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Replication\V1\FailoverStatus::class); + $this->failover_history = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeScheduleRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeScheduleRequest.php new file mode 100644 index 0000000..8dbaa12 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeScheduleRequest.php @@ -0,0 +1,100 @@ +temporal.api.workflowservice.v1.DescribeScheduleRequest + */ +class DescribeScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace of the schedule to describe. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The id of the schedule to describe. + * + * Generated from protobuf field string schedule_id = 2; + */ + protected $schedule_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace of the schedule to describe. + * @type string $schedule_id + * The id of the schedule to describe. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace of the schedule to describe. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace of the schedule to describe. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The id of the schedule to describe. + * + * Generated from protobuf field string schedule_id = 2; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * The id of the schedule to describe. + * + * Generated from protobuf field string schedule_id = 2; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeScheduleResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeScheduleResponse.php new file mode 100644 index 0000000..53f73bc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeScheduleResponse.php @@ -0,0 +1,267 @@ +temporal.api.workflowservice.v1.DescribeScheduleResponse + */ +class DescribeScheduleResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The complete current schedule details. This may not match the schedule as + * created because: + * - some types of schedule specs may get compiled into others (e.g. + * CronString into StructuredCalendarSpec) + * - some unspecified fields may be replaced by defaults + * - some fields in the state are modified automatically + * - the schedule may have been modified by UpdateSchedule or PatchSchedule + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 1; + */ + protected $schedule = null; + /** + * Extra schedule state info. + * + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleInfo info = 2; + */ + protected $info = null; + /** + * The memo and search attributes that the schedule was created with. + * + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 3; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 4; + */ + protected $search_attributes = null; + /** + * This value can be passed back to UpdateSchedule to ensure that the + * schedule was not modified between a Describe and an Update, which could + * lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 5; + */ + protected $conflict_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Schedule\V1\Schedule $schedule + * The complete current schedule details. This may not match the schedule as + * created because: + * - some types of schedule specs may get compiled into others (e.g. + * CronString into StructuredCalendarSpec) + * - some unspecified fields may be replaced by defaults + * - some fields in the state are modified automatically + * - the schedule may have been modified by UpdateSchedule or PatchSchedule + * @type \Temporal\Api\Schedule\V1\ScheduleInfo $info + * Extra schedule state info. + * @type \Temporal\Api\Common\V1\Memo $memo + * The memo and search attributes that the schedule was created with. + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type string $conflict_token + * This value can be passed back to UpdateSchedule to ensure that the + * schedule was not modified between a Describe and an Update, which could + * lead to lost updates and other confusion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The complete current schedule details. This may not match the schedule as + * created because: + * - some types of schedule specs may get compiled into others (e.g. + * CronString into StructuredCalendarSpec) + * - some unspecified fields may be replaced by defaults + * - some fields in the state are modified automatically + * - the schedule may have been modified by UpdateSchedule or PatchSchedule + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 1; + * @return \Temporal\Api\Schedule\V1\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * The complete current schedule details. This may not match the schedule as + * created because: + * - some types of schedule specs may get compiled into others (e.g. + * CronString into StructuredCalendarSpec) + * - some unspecified fields may be replaced by defaults + * - some fields in the state are modified automatically + * - the schedule may have been modified by UpdateSchedule or PatchSchedule + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 1; + * @param \Temporal\Api\Schedule\V1\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * Extra schedule state info. + * + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleInfo info = 2; + * @return \Temporal\Api\Schedule\V1\ScheduleInfo|null + */ + public function getInfo() + { + return $this->info; + } + + public function hasInfo() + { + return isset($this->info); + } + + public function clearInfo() + { + unset($this->info); + } + + /** + * Extra schedule state info. + * + * Generated from protobuf field .temporal.api.schedule.v1.ScheduleInfo info = 2; + * @param \Temporal\Api\Schedule\V1\ScheduleInfo $var + * @return $this + */ + public function setInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\ScheduleInfo::class); + $this->info = $var; + + return $this; + } + + /** + * The memo and search attributes that the schedule was created with. + * + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 3; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * The memo and search attributes that the schedule was created with. + * + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 3; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 4; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 4; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * This value can be passed back to UpdateSchedule to ensure that the + * schedule was not modified between a Describe and an Update, which could + * lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 5; + * @return string + */ + public function getConflictToken() + { + return $this->conflict_token; + } + + /** + * This value can be passed back to UpdateSchedule to ensure that the + * schedule was not modified between a Describe and an Update, which could + * lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 5; + * @param string $var + * @return $this + */ + public function setConflictToken($var) + { + GPBUtil::checkString($var, False); + $this->conflict_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeTaskQueueRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeTaskQueueRequest.php new file mode 100644 index 0000000..40568e0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeTaskQueueRequest.php @@ -0,0 +1,408 @@ +temporal.api.workflowservice.v1.DescribeTaskQueueRequest + */ +class DescribeTaskQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Sticky queues are not supported in `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + */ + protected $task_queue = null; + /** + * Deprecated. Use `ENHANCED` mode with `task_queue_types`. Ignored in `ENHANCED` mode. + * If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskQueueType task_queue_type = 3; + */ + protected $task_queue_type = 0; + /** + * Deprecated. Ignored in `ENHANCED` mode. + * + * Generated from protobuf field bool include_task_queue_status = 4; + */ + protected $include_task_queue_status = false; + /** + * All options except `task_queue_type` and `include_task_queue_status` are only available in the `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.enums.v1.DescribeTaskQueueMode api_mode = 5; + */ + protected $api_mode = 0; + /** + * Optional. If not provided, the result for the default Build ID will be returned. The default Build ID is the one + * mentioned in the first unconditional Assignment Rule. If there is no default Build ID, the result for the + * unversioned queue will be returned. + * (-- api-linter: core::0140::prepositions --) + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueVersionSelection versions = 6; + */ + protected $versions = null; + /** + * Task queue types to report info about. If not specified, all types are considered. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.TaskQueueType task_queue_types = 7; + */ + private $task_queue_types; + /** + * Report stats for the requested task queue types and versions + * + * Generated from protobuf field bool report_stats = 8; + */ + protected $report_stats = false; + /** + * Report list of pollers for requested task queue types and versions + * + * Generated from protobuf field bool report_pollers = 9; + */ + protected $report_pollers = false; + /** + * Report task reachability for the requested versions and all task types (task reachability is not reported + * per task type). + * + * Generated from protobuf field bool report_task_reachability = 10; + */ + protected $report_task_reachability = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * Sticky queues are not supported in `ENHANCED` mode. + * @type int $task_queue_type + * Deprecated. Use `ENHANCED` mode with `task_queue_types`. Ignored in `ENHANCED` mode. + * If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. + * @type bool $include_task_queue_status + * Deprecated. Ignored in `ENHANCED` mode. + * @type int $api_mode + * All options except `task_queue_type` and `include_task_queue_status` are only available in the `ENHANCED` mode. + * @type \Temporal\Api\Taskqueue\V1\TaskQueueVersionSelection $versions + * Optional. If not provided, the result for the default Build ID will be returned. The default Build ID is the one + * mentioned in the first unconditional Assignment Rule. If there is no default Build ID, the result for the + * unversioned queue will be returned. + * (-- api-linter: core::0140::prepositions --) + * @type array|\Google\Protobuf\Internal\RepeatedField $task_queue_types + * Task queue types to report info about. If not specified, all types are considered. + * @type bool $report_stats + * Report stats for the requested task queue types and versions + * @type bool $report_pollers + * Report list of pollers for requested task queue types and versions + * @type bool $report_task_reachability + * Report task reachability for the requested versions and all task types (task reachability is not reported + * per task type). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Sticky queues are not supported in `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Sticky queues are not supported in `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Deprecated. Use `ENHANCED` mode with `task_queue_types`. Ignored in `ENHANCED` mode. + * If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskQueueType task_queue_type = 3; + * @return int + */ + public function getTaskQueueType() + { + return $this->task_queue_type; + } + + /** + * Deprecated. Use `ENHANCED` mode with `task_queue_types`. Ignored in `ENHANCED` mode. + * If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskQueueType task_queue_type = 3; + * @param int $var + * @return $this + */ + public function setTaskQueueType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\TaskQueueType::class); + $this->task_queue_type = $var; + + return $this; + } + + /** + * Deprecated. Ignored in `ENHANCED` mode. + * + * Generated from protobuf field bool include_task_queue_status = 4; + * @return bool + */ + public function getIncludeTaskQueueStatus() + { + return $this->include_task_queue_status; + } + + /** + * Deprecated. Ignored in `ENHANCED` mode. + * + * Generated from protobuf field bool include_task_queue_status = 4; + * @param bool $var + * @return $this + */ + public function setIncludeTaskQueueStatus($var) + { + GPBUtil::checkBool($var); + $this->include_task_queue_status = $var; + + return $this; + } + + /** + * All options except `task_queue_type` and `include_task_queue_status` are only available in the `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.enums.v1.DescribeTaskQueueMode api_mode = 5; + * @return int + */ + public function getApiMode() + { + return $this->api_mode; + } + + /** + * All options except `task_queue_type` and `include_task_queue_status` are only available in the `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.enums.v1.DescribeTaskQueueMode api_mode = 5; + * @param int $var + * @return $this + */ + public function setApiMode($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\DescribeTaskQueueMode::class); + $this->api_mode = $var; + + return $this; + } + + /** + * Optional. If not provided, the result for the default Build ID will be returned. The default Build ID is the one + * mentioned in the first unconditional Assignment Rule. If there is no default Build ID, the result for the + * unversioned queue will be returned. + * (-- api-linter: core::0140::prepositions --) + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueVersionSelection versions = 6; + * @return \Temporal\Api\Taskqueue\V1\TaskQueueVersionSelection|null + */ + public function getVersions() + { + return $this->versions; + } + + public function hasVersions() + { + return isset($this->versions); + } + + public function clearVersions() + { + unset($this->versions); + } + + /** + * Optional. If not provided, the result for the default Build ID will be returned. The default Build ID is the one + * mentioned in the first unconditional Assignment Rule. If there is no default Build ID, the result for the + * unversioned queue will be returned. + * (-- api-linter: core::0140::prepositions --) + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueVersionSelection versions = 6; + * @param \Temporal\Api\Taskqueue\V1\TaskQueueVersionSelection $var + * @return $this + */ + public function setVersions($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueVersionSelection::class); + $this->versions = $var; + + return $this; + } + + /** + * Task queue types to report info about. If not specified, all types are considered. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.TaskQueueType task_queue_types = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaskQueueTypes() + { + return $this->task_queue_types; + } + + /** + * Task queue types to report info about. If not specified, all types are considered. + * + * Generated from protobuf field repeated .temporal.api.enums.v1.TaskQueueType task_queue_types = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaskQueueTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\TaskQueueType::class); + $this->task_queue_types = $arr; + + return $this; + } + + /** + * Report stats for the requested task queue types and versions + * + * Generated from protobuf field bool report_stats = 8; + * @return bool + */ + public function getReportStats() + { + return $this->report_stats; + } + + /** + * Report stats for the requested task queue types and versions + * + * Generated from protobuf field bool report_stats = 8; + * @param bool $var + * @return $this + */ + public function setReportStats($var) + { + GPBUtil::checkBool($var); + $this->report_stats = $var; + + return $this; + } + + /** + * Report list of pollers for requested task queue types and versions + * + * Generated from protobuf field bool report_pollers = 9; + * @return bool + */ + public function getReportPollers() + { + return $this->report_pollers; + } + + /** + * Report list of pollers for requested task queue types and versions + * + * Generated from protobuf field bool report_pollers = 9; + * @param bool $var + * @return $this + */ + public function setReportPollers($var) + { + GPBUtil::checkBool($var); + $this->report_pollers = $var; + + return $this; + } + + /** + * Report task reachability for the requested versions and all task types (task reachability is not reported + * per task type). + * + * Generated from protobuf field bool report_task_reachability = 10; + * @return bool + */ + public function getReportTaskReachability() + { + return $this->report_task_reachability; + } + + /** + * Report task reachability for the requested versions and all task types (task reachability is not reported + * per task type). + * + * Generated from protobuf field bool report_task_reachability = 10; + * @param bool $var + * @return $this + */ + public function setReportTaskReachability($var) + { + GPBUtil::checkBool($var); + $this->report_task_reachability = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeTaskQueueResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeTaskQueueResponse.php new file mode 100644 index 0000000..dc19e60 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeTaskQueueResponse.php @@ -0,0 +1,152 @@ +temporal.api.workflowservice.v1.DescribeTaskQueueResponse + */ +class DescribeTaskQueueResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Deprecated. Use `versions_info.types_info.pollers` with `ENHANCED` mode instead. + * Not set in `ENHANCED` mode. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1; + */ + private $pollers; + /** + * Deprecated. Not set in `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2; + */ + protected $task_queue_status = null; + /** + * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. + * Only set in `ENHANCED` mode. + * + * Generated from protobuf field map versions_info = 3; + */ + private $versions_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Taskqueue\V1\PollerInfo>|\Google\Protobuf\Internal\RepeatedField $pollers + * Deprecated. Use `versions_info.types_info.pollers` with `ENHANCED` mode instead. + * Not set in `ENHANCED` mode. + * @type \Temporal\Api\Taskqueue\V1\TaskQueueStatus $task_queue_status + * Deprecated. Not set in `ENHANCED` mode. + * @type array|\Google\Protobuf\Internal\MapField $versions_info + * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. + * Only set in `ENHANCED` mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated. Use `versions_info.types_info.pollers` with `ENHANCED` mode instead. + * Not set in `ENHANCED` mode. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPollers() + { + return $this->pollers; + } + + /** + * Deprecated. Use `versions_info.types_info.pollers` with `ENHANCED` mode instead. + * Not set in `ENHANCED` mode. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1; + * @param array<\Temporal\Api\Taskqueue\V1\PollerInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPollers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\PollerInfo::class); + $this->pollers = $arr; + + return $this; + } + + /** + * Deprecated. Not set in `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2; + * @return \Temporal\Api\Taskqueue\V1\TaskQueueStatus|null + */ + public function getTaskQueueStatus() + { + return $this->task_queue_status; + } + + public function hasTaskQueueStatus() + { + return isset($this->task_queue_status); + } + + public function clearTaskQueueStatus() + { + unset($this->task_queue_status); + } + + /** + * Deprecated. Not set in `ENHANCED` mode. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2; + * @param \Temporal\Api\Taskqueue\V1\TaskQueueStatus $var + * @return $this + */ + public function setTaskQueueStatus($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueStatus::class); + $this->task_queue_status = $var; + + return $this; + } + + /** + * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. + * Only set in `ENHANCED` mode. + * + * Generated from protobuf field map versions_info = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVersionsInfo() + { + return $this->versions_info; + } + + /** + * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. + * Only set in `ENHANCED` mode. + * + * Generated from protobuf field map versions_info = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVersionsInfo($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TaskQueueVersionInfo::class); + $this->versions_info = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeWorkflowExecutionRequest.php new file mode 100644 index 0000000..14f0c8d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeWorkflowExecutionRequest.php @@ -0,0 +1,96 @@ +temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest + */ +class DescribeWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + */ + protected $execution = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $execution + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->execution = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeWorkflowExecutionResponse.php new file mode 100644 index 0000000..9c9dd6f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/DescribeWorkflowExecutionResponse.php @@ -0,0 +1,251 @@ +temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse + */ +class DescribeWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.workflow.v1.WorkflowExecutionConfig execution_config = 1; + */ + protected $execution_config = null; + /** + * Generated from protobuf field .temporal.api.workflow.v1.WorkflowExecutionInfo workflow_execution_info = 2; + */ + protected $workflow_execution_info = null; + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingActivityInfo pending_activities = 3; + */ + private $pending_activities; + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingChildExecutionInfo pending_children = 4; + */ + private $pending_children; + /** + * Generated from protobuf field .temporal.api.workflow.v1.PendingWorkflowTaskInfo pending_workflow_task = 5; + */ + protected $pending_workflow_task = null; + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.CallbackInfo callbacks = 6; + */ + private $callbacks; + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingNexusOperationInfo pending_nexus_operations = 7; + */ + private $pending_nexus_operations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Workflow\V1\WorkflowExecutionConfig $execution_config + * @type \Temporal\Api\Workflow\V1\WorkflowExecutionInfo $workflow_execution_info + * @type array<\Temporal\Api\Workflow\V1\PendingActivityInfo>|\Google\Protobuf\Internal\RepeatedField $pending_activities + * @type array<\Temporal\Api\Workflow\V1\PendingChildExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $pending_children + * @type \Temporal\Api\Workflow\V1\PendingWorkflowTaskInfo $pending_workflow_task + * @type array<\Temporal\Api\Workflow\V1\CallbackInfo>|\Google\Protobuf\Internal\RepeatedField $callbacks + * @type array<\Temporal\Api\Workflow\V1\PendingNexusOperationInfo>|\Google\Protobuf\Internal\RepeatedField $pending_nexus_operations + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.WorkflowExecutionConfig execution_config = 1; + * @return \Temporal\Api\Workflow\V1\WorkflowExecutionConfig|null + */ + public function getExecutionConfig() + { + return $this->execution_config; + } + + public function hasExecutionConfig() + { + return isset($this->execution_config); + } + + public function clearExecutionConfig() + { + unset($this->execution_config); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.WorkflowExecutionConfig execution_config = 1; + * @param \Temporal\Api\Workflow\V1\WorkflowExecutionConfig $var + * @return $this + */ + public function setExecutionConfig($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\WorkflowExecutionConfig::class); + $this->execution_config = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.WorkflowExecutionInfo workflow_execution_info = 2; + * @return \Temporal\Api\Workflow\V1\WorkflowExecutionInfo|null + */ + public function getWorkflowExecutionInfo() + { + return $this->workflow_execution_info; + } + + public function hasWorkflowExecutionInfo() + { + return isset($this->workflow_execution_info); + } + + public function clearWorkflowExecutionInfo() + { + unset($this->workflow_execution_info); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.WorkflowExecutionInfo workflow_execution_info = 2; + * @param \Temporal\Api\Workflow\V1\WorkflowExecutionInfo $var + * @return $this + */ + public function setWorkflowExecutionInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\WorkflowExecutionInfo::class); + $this->workflow_execution_info = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingActivityInfo pending_activities = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPendingActivities() + { + return $this->pending_activities; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingActivityInfo pending_activities = 3; + * @param array<\Temporal\Api\Workflow\V1\PendingActivityInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPendingActivities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\PendingActivityInfo::class); + $this->pending_activities = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingChildExecutionInfo pending_children = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPendingChildren() + { + return $this->pending_children; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingChildExecutionInfo pending_children = 4; + * @param array<\Temporal\Api\Workflow\V1\PendingChildExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPendingChildren($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\PendingChildExecutionInfo::class); + $this->pending_children = $arr; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.PendingWorkflowTaskInfo pending_workflow_task = 5; + * @return \Temporal\Api\Workflow\V1\PendingWorkflowTaskInfo|null + */ + public function getPendingWorkflowTask() + { + return $this->pending_workflow_task; + } + + public function hasPendingWorkflowTask() + { + return isset($this->pending_workflow_task); + } + + public function clearPendingWorkflowTask() + { + unset($this->pending_workflow_task); + } + + /** + * Generated from protobuf field .temporal.api.workflow.v1.PendingWorkflowTaskInfo pending_workflow_task = 5; + * @param \Temporal\Api\Workflow\V1\PendingWorkflowTaskInfo $var + * @return $this + */ + public function setPendingWorkflowTask($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\PendingWorkflowTaskInfo::class); + $this->pending_workflow_task = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.CallbackInfo callbacks = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCallbacks() + { + return $this->callbacks; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.CallbackInfo callbacks = 6; + * @param array<\Temporal\Api\Workflow\V1\CallbackInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCallbacks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\CallbackInfo::class); + $this->callbacks = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingNexusOperationInfo pending_nexus_operations = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPendingNexusOperations() + { + return $this->pending_nexus_operations; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.PendingNexusOperationInfo pending_nexus_operations = 7; + * @param array<\Temporal\Api\Workflow\V1\PendingNexusOperationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPendingNexusOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\PendingNexusOperationInfo::class); + $this->pending_nexus_operations = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationRequest.php new file mode 100644 index 0000000..e34e07b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationRequest.php @@ -0,0 +1,113 @@ +temporal.api.workflowservice.v1.ExecuteMultiOperationRequest + */ +class ExecuteMultiOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * List of operations to execute within a single workflow. + * Preconditions: + * - The list of operations must not be empty. + * - The workflow ids must match across operations. + * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order. + * Note that additional operation-specific restrictions have to be considered. + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation operations = 2; + */ + private $operations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type array<\Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest\Operation>|\Google\Protobuf\Internal\RepeatedField $operations + * List of operations to execute within a single workflow. + * Preconditions: + * - The list of operations must not be empty. + * - The workflow ids must match across operations. + * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order. + * Note that additional operation-specific restrictions have to be considered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * List of operations to execute within a single workflow. + * Preconditions: + * - The list of operations must not be empty. + * - The workflow ids must match across operations. + * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order. + * Note that additional operation-specific restrictions have to be considered. + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * List of operations to execute within a single workflow. + * Preconditions: + * - The list of operations must not be empty. + * - The workflow ids must match across operations. + * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order. + * Note that additional operation-specific restrictions have to be considered. + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation operations = 2; + * @param array<\Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest\Operation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest\Operation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationRequest/Operation.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationRequest/Operation.php new file mode 100644 index 0000000..ee2a28e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationRequest/Operation.php @@ -0,0 +1,108 @@ +temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation + */ +class Operation extends \Google\Protobuf\Internal\Message +{ + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionRequest $start_workflow + * Additional restrictions: + * - setting `cron_schedule` is invalid + * - setting `request_eager_execution` is invalid + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionRequest $update_workflow + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Additional restrictions: + * - setting `cron_schedule` is invalid + * - setting `request_eager_execution` is invalid + * + * Generated from protobuf field .temporal.api.workflowservice.v1.StartWorkflowExecutionRequest start_workflow = 1; + * @return \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionRequest|null + */ + public function getStartWorkflow() + { + return $this->readOneof(1); + } + + public function hasStartWorkflow() + { + return $this->hasOneof(1); + } + + /** + * Additional restrictions: + * - setting `cron_schedule` is invalid + * - setting `request_eager_execution` is invalid + * + * Generated from protobuf field .temporal.api.workflowservice.v1.StartWorkflowExecutionRequest start_workflow = 1; + * @param \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionRequest $var + * @return $this + */ + public function setStartWorkflow($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionRequest::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest update_workflow = 2; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionRequest|null + */ + public function getUpdateWorkflow() + { + return $this->readOneof(2); + } + + public function hasUpdateWorkflow() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest update_workflow = 2; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionRequest $var + * @return $this + */ + public function setUpdateWorkflow($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionRequest::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationResponse.php new file mode 100644 index 0000000..8bdb5d5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationResponse.php @@ -0,0 +1,59 @@ +temporal.api.workflowservice.v1.ExecuteMultiOperationResponse + */ +class ExecuteMultiOperationResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflowservice\V1\ExecuteMultiOperationResponse\Response>|\Google\Protobuf\Internal\RepeatedField $responses + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response responses = 1; + * @param array<\Temporal\Api\Workflowservice\V1\ExecuteMultiOperationResponse\Response>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflowservice\V1\ExecuteMultiOperationResponse\Response::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationResponse/Response.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationResponse/Response.php new file mode 100644 index 0000000..e395e4a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ExecuteMultiOperationResponse/Response.php @@ -0,0 +1,97 @@ +temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionResponse $start_workflow + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionResponse $update_workflow + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.StartWorkflowExecutionResponse start_workflow = 1; + * @return \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionResponse|null + */ + public function getStartWorkflow() + { + return $this->readOneof(1); + } + + public function hasStartWorkflow() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.StartWorkflowExecutionResponse start_workflow = 1; + * @param \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionResponse $var + * @return $this + */ + public function setStartWorkflow($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionResponse::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse update_workflow = 2; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionResponse|null + */ + public function getUpdateWorkflow() + { + return $this->readOneof(2); + } + + public function hasUpdateWorkflow() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse update_workflow = 2; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionResponse $var + * @return $this + */ + public function setUpdateWorkflow($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionResponse::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetClusterInfoRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetClusterInfoRequest.php new file mode 100644 index 0000000..323daae --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetClusterInfoRequest.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.GetClusterInfoRequest + */ +class GetClusterInfoRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetClusterInfoResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetClusterInfoResponse.php new file mode 100644 index 0000000..7df218f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetClusterInfoResponse.php @@ -0,0 +1,271 @@ +temporal.api.workflowservice.v1.GetClusterInfoResponse + */ +class GetClusterInfoResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". + * Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". + * + * Generated from protobuf field map supported_clients = 1; + */ + private $supported_clients; + /** + * Generated from protobuf field string server_version = 2; + */ + protected $server_version = ''; + /** + * Generated from protobuf field string cluster_id = 3; + */ + protected $cluster_id = ''; + /** + * Generated from protobuf field .temporal.api.version.v1.VersionInfo version_info = 4; + */ + protected $version_info = null; + /** + * Generated from protobuf field string cluster_name = 5; + */ + protected $cluster_name = ''; + /** + * Generated from protobuf field int32 history_shard_count = 6; + */ + protected $history_shard_count = 0; + /** + * Generated from protobuf field string persistence_store = 7; + */ + protected $persistence_store = ''; + /** + * Generated from protobuf field string visibility_store = 8; + */ + protected $visibility_store = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $supported_clients + * Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". + * Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". + * @type string $server_version + * @type string $cluster_id + * @type \Temporal\Api\Version\V1\VersionInfo $version_info + * @type string $cluster_name + * @type int $history_shard_count + * @type string $persistence_store + * @type string $visibility_store + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". + * Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". + * + * Generated from protobuf field map supported_clients = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSupportedClients() + { + return $this->supported_clients; + } + + /** + * Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". + * Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". + * + * Generated from protobuf field map supported_clients = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSupportedClients($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_clients = $arr; + + return $this; + } + + /** + * Generated from protobuf field string server_version = 2; + * @return string + */ + public function getServerVersion() + { + return $this->server_version; + } + + /** + * Generated from protobuf field string server_version = 2; + * @param string $var + * @return $this + */ + public function setServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->server_version = $var; + + return $this; + } + + /** + * Generated from protobuf field string cluster_id = 3; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Generated from protobuf field string cluster_id = 3; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.version.v1.VersionInfo version_info = 4; + * @return \Temporal\Api\Version\V1\VersionInfo|null + */ + public function getVersionInfo() + { + return $this->version_info; + } + + public function hasVersionInfo() + { + return isset($this->version_info); + } + + public function clearVersionInfo() + { + unset($this->version_info); + } + + /** + * Generated from protobuf field .temporal.api.version.v1.VersionInfo version_info = 4; + * @param \Temporal\Api\Version\V1\VersionInfo $var + * @return $this + */ + public function setVersionInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Version\V1\VersionInfo::class); + $this->version_info = $var; + + return $this; + } + + /** + * Generated from protobuf field string cluster_name = 5; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * Generated from protobuf field string cluster_name = 5; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 history_shard_count = 6; + * @return int + */ + public function getHistoryShardCount() + { + return $this->history_shard_count; + } + + /** + * Generated from protobuf field int32 history_shard_count = 6; + * @param int $var + * @return $this + */ + public function setHistoryShardCount($var) + { + GPBUtil::checkInt32($var); + $this->history_shard_count = $var; + + return $this; + } + + /** + * Generated from protobuf field string persistence_store = 7; + * @return string + */ + public function getPersistenceStore() + { + return $this->persistence_store; + } + + /** + * Generated from protobuf field string persistence_store = 7; + * @param string $var + * @return $this + */ + public function setPersistenceStore($var) + { + GPBUtil::checkString($var, True); + $this->persistence_store = $var; + + return $this; + } + + /** + * Generated from protobuf field string visibility_store = 8; + * @return string + */ + public function getVisibilityStore() + { + return $this->visibility_store; + } + + /** + * Generated from protobuf field string visibility_store = 8; + * @param string $var + * @return $this + */ + public function setVisibilityStore($var) + { + GPBUtil::checkString($var, True); + $this->visibility_store = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSearchAttributesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSearchAttributesRequest.php new file mode 100644 index 0000000..945b489 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSearchAttributesRequest.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.GetSearchAttributesRequest + */ +class GetSearchAttributesRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSearchAttributesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSearchAttributesResponse.php new file mode 100644 index 0000000..8a5b598 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSearchAttributesResponse.php @@ -0,0 +1,59 @@ +temporal.api.workflowservice.v1.GetSearchAttributesResponse + */ +class GetSearchAttributesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map keys = 1; + */ + private $keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $keys + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map keys = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getKeys() + { + return $this->keys; + } + + /** + * Generated from protobuf field map keys = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setKeys($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\IndexedValueType::class); + $this->keys = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoRequest.php new file mode 100644 index 0000000..fa9794f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoRequest.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.GetSystemInfoRequest + */ +class GetSystemInfoRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoResponse.php new file mode 100644 index 0000000..714bbf1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoResponse.php @@ -0,0 +1,110 @@ +temporal.api.workflowservice.v1.GetSystemInfoResponse + */ +class GetSystemInfoResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Version of the server. + * + * Generated from protobuf field string server_version = 1; + */ + protected $server_version = ''; + /** + * All capabilities the system supports. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities capabilities = 2; + */ + protected $capabilities = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $server_version + * Version of the server. + * @type \Temporal\Api\Workflowservice\V1\GetSystemInfoResponse\Capabilities $capabilities + * All capabilities the system supports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Version of the server. + * + * Generated from protobuf field string server_version = 1; + * @return string + */ + public function getServerVersion() + { + return $this->server_version; + } + + /** + * Version of the server. + * + * Generated from protobuf field string server_version = 1; + * @param string $var + * @return $this + */ + public function setServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->server_version = $var; + + return $this; + } + + /** + * All capabilities the system supports. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities capabilities = 2; + * @return \Temporal\Api\Workflowservice\V1\GetSystemInfoResponse\Capabilities|null + */ + public function getCapabilities() + { + return $this->capabilities; + } + + public function hasCapabilities() + { + return isset($this->capabilities); + } + + public function clearCapabilities() + { + unset($this->capabilities); + } + + /** + * All capabilities the system supports. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities capabilities = 2; + * @param \Temporal\Api\Workflowservice\V1\GetSystemInfoResponse\Capabilities $var + * @return $this + */ + public function setCapabilities($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\GetSystemInfoResponse\Capabilities::class); + $this->capabilities = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoResponse/Capabilities.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoResponse/Capabilities.php new file mode 100644 index 0000000..b5ddef1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetSystemInfoResponse/Capabilities.php @@ -0,0 +1,440 @@ +temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities + */ +class Capabilities extends \Google\Protobuf\Internal\Message +{ + /** + * True if signal and query headers are supported. + * + * Generated from protobuf field bool signal_and_query_header = 1; + */ + protected $signal_and_query_header = false; + /** + * True if internal errors are differentiated from other types of errors for purposes of + * retrying non-internal errors. + * When unset/false, clients retry all failures. When true, clients should only retry + * non-internal errors. + * + * Generated from protobuf field bool internal_error_differentiation = 2; + */ + protected $internal_error_differentiation = false; + /** + * True if RespondActivityTaskFailed API supports including heartbeat details + * + * Generated from protobuf field bool activity_failure_include_heartbeat = 3; + */ + protected $activity_failure_include_heartbeat = false; + /** + * Supports scheduled workflow features. + * + * Generated from protobuf field bool supports_schedules = 4; + */ + protected $supports_schedules = false; + /** + * True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes + * + * Generated from protobuf field bool encoded_failure_attributes = 5; + */ + protected $encoded_failure_attributes = false; + /** + * True if server supports dispatching Workflow and Activity tasks based on a worker's build_id + * (see: + * https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md) + * + * Generated from protobuf field bool build_id_based_versioning = 6; + */ + protected $build_id_based_versioning = false; + /** + * True if server supports upserting workflow memo + * + * Generated from protobuf field bool upsert_memo = 7; + */ + protected $upsert_memo = false; + /** + * True if server supports eager workflow task dispatching for the StartWorkflowExecution API + * + * Generated from protobuf field bool eager_workflow_start = 8; + */ + protected $eager_workflow_start = false; + /** + * True if the server knows about the sdk metadata field on WFT completions and will record + * it in history + * + * Generated from protobuf field bool sdk_metadata = 9; + */ + protected $sdk_metadata = false; + /** + * True if the server supports count group by execution status + * (-- api-linter: core::0140::prepositions=disabled --) + * + * Generated from protobuf field bool count_group_by_execution_status = 10; + */ + protected $count_group_by_execution_status = false; + /** + * True if the server supports Nexus operations. + * This flag is dependent both on server version and for Nexus to be enabled via server configuration. + * + * Generated from protobuf field bool nexus = 11; + */ + protected $nexus = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $signal_and_query_header + * True if signal and query headers are supported. + * @type bool $internal_error_differentiation + * True if internal errors are differentiated from other types of errors for purposes of + * retrying non-internal errors. + * When unset/false, clients retry all failures. When true, clients should only retry + * non-internal errors. + * @type bool $activity_failure_include_heartbeat + * True if RespondActivityTaskFailed API supports including heartbeat details + * @type bool $supports_schedules + * Supports scheduled workflow features. + * @type bool $encoded_failure_attributes + * True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes + * @type bool $build_id_based_versioning + * True if server supports dispatching Workflow and Activity tasks based on a worker's build_id + * (see: + * https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md) + * @type bool $upsert_memo + * True if server supports upserting workflow memo + * @type bool $eager_workflow_start + * True if server supports eager workflow task dispatching for the StartWorkflowExecution API + * @type bool $sdk_metadata + * True if the server knows about the sdk metadata field on WFT completions and will record + * it in history + * @type bool $count_group_by_execution_status + * True if the server supports count group by execution status + * (-- api-linter: core::0140::prepositions=disabled --) + * @type bool $nexus + * True if the server supports Nexus operations. + * This flag is dependent both on server version and for Nexus to be enabled via server configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * True if signal and query headers are supported. + * + * Generated from protobuf field bool signal_and_query_header = 1; + * @return bool + */ + public function getSignalAndQueryHeader() + { + return $this->signal_and_query_header; + } + + /** + * True if signal and query headers are supported. + * + * Generated from protobuf field bool signal_and_query_header = 1; + * @param bool $var + * @return $this + */ + public function setSignalAndQueryHeader($var) + { + GPBUtil::checkBool($var); + $this->signal_and_query_header = $var; + + return $this; + } + + /** + * True if internal errors are differentiated from other types of errors for purposes of + * retrying non-internal errors. + * When unset/false, clients retry all failures. When true, clients should only retry + * non-internal errors. + * + * Generated from protobuf field bool internal_error_differentiation = 2; + * @return bool + */ + public function getInternalErrorDifferentiation() + { + return $this->internal_error_differentiation; + } + + /** + * True if internal errors are differentiated from other types of errors for purposes of + * retrying non-internal errors. + * When unset/false, clients retry all failures. When true, clients should only retry + * non-internal errors. + * + * Generated from protobuf field bool internal_error_differentiation = 2; + * @param bool $var + * @return $this + */ + public function setInternalErrorDifferentiation($var) + { + GPBUtil::checkBool($var); + $this->internal_error_differentiation = $var; + + return $this; + } + + /** + * True if RespondActivityTaskFailed API supports including heartbeat details + * + * Generated from protobuf field bool activity_failure_include_heartbeat = 3; + * @return bool + */ + public function getActivityFailureIncludeHeartbeat() + { + return $this->activity_failure_include_heartbeat; + } + + /** + * True if RespondActivityTaskFailed API supports including heartbeat details + * + * Generated from protobuf field bool activity_failure_include_heartbeat = 3; + * @param bool $var + * @return $this + */ + public function setActivityFailureIncludeHeartbeat($var) + { + GPBUtil::checkBool($var); + $this->activity_failure_include_heartbeat = $var; + + return $this; + } + + /** + * Supports scheduled workflow features. + * + * Generated from protobuf field bool supports_schedules = 4; + * @return bool + */ + public function getSupportsSchedules() + { + return $this->supports_schedules; + } + + /** + * Supports scheduled workflow features. + * + * Generated from protobuf field bool supports_schedules = 4; + * @param bool $var + * @return $this + */ + public function setSupportsSchedules($var) + { + GPBUtil::checkBool($var); + $this->supports_schedules = $var; + + return $this; + } + + /** + * True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes + * + * Generated from protobuf field bool encoded_failure_attributes = 5; + * @return bool + */ + public function getEncodedFailureAttributes() + { + return $this->encoded_failure_attributes; + } + + /** + * True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes + * + * Generated from protobuf field bool encoded_failure_attributes = 5; + * @param bool $var + * @return $this + */ + public function setEncodedFailureAttributes($var) + { + GPBUtil::checkBool($var); + $this->encoded_failure_attributes = $var; + + return $this; + } + + /** + * True if server supports dispatching Workflow and Activity tasks based on a worker's build_id + * (see: + * https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md) + * + * Generated from protobuf field bool build_id_based_versioning = 6; + * @return bool + */ + public function getBuildIdBasedVersioning() + { + return $this->build_id_based_versioning; + } + + /** + * True if server supports dispatching Workflow and Activity tasks based on a worker's build_id + * (see: + * https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md) + * + * Generated from protobuf field bool build_id_based_versioning = 6; + * @param bool $var + * @return $this + */ + public function setBuildIdBasedVersioning($var) + { + GPBUtil::checkBool($var); + $this->build_id_based_versioning = $var; + + return $this; + } + + /** + * True if server supports upserting workflow memo + * + * Generated from protobuf field bool upsert_memo = 7; + * @return bool + */ + public function getUpsertMemo() + { + return $this->upsert_memo; + } + + /** + * True if server supports upserting workflow memo + * + * Generated from protobuf field bool upsert_memo = 7; + * @param bool $var + * @return $this + */ + public function setUpsertMemo($var) + { + GPBUtil::checkBool($var); + $this->upsert_memo = $var; + + return $this; + } + + /** + * True if server supports eager workflow task dispatching for the StartWorkflowExecution API + * + * Generated from protobuf field bool eager_workflow_start = 8; + * @return bool + */ + public function getEagerWorkflowStart() + { + return $this->eager_workflow_start; + } + + /** + * True if server supports eager workflow task dispatching for the StartWorkflowExecution API + * + * Generated from protobuf field bool eager_workflow_start = 8; + * @param bool $var + * @return $this + */ + public function setEagerWorkflowStart($var) + { + GPBUtil::checkBool($var); + $this->eager_workflow_start = $var; + + return $this; + } + + /** + * True if the server knows about the sdk metadata field on WFT completions and will record + * it in history + * + * Generated from protobuf field bool sdk_metadata = 9; + * @return bool + */ + public function getSdkMetadata() + { + return $this->sdk_metadata; + } + + /** + * True if the server knows about the sdk metadata field on WFT completions and will record + * it in history + * + * Generated from protobuf field bool sdk_metadata = 9; + * @param bool $var + * @return $this + */ + public function setSdkMetadata($var) + { + GPBUtil::checkBool($var); + $this->sdk_metadata = $var; + + return $this; + } + + /** + * True if the server supports count group by execution status + * (-- api-linter: core::0140::prepositions=disabled --) + * + * Generated from protobuf field bool count_group_by_execution_status = 10; + * @return bool + */ + public function getCountGroupByExecutionStatus() + { + return $this->count_group_by_execution_status; + } + + /** + * True if the server supports count group by execution status + * (-- api-linter: core::0140::prepositions=disabled --) + * + * Generated from protobuf field bool count_group_by_execution_status = 10; + * @param bool $var + * @return $this + */ + public function setCountGroupByExecutionStatus($var) + { + GPBUtil::checkBool($var); + $this->count_group_by_execution_status = $var; + + return $this; + } + + /** + * True if the server supports Nexus operations. + * This flag is dependent both on server version and for Nexus to be enabled via server configuration. + * + * Generated from protobuf field bool nexus = 11; + * @return bool + */ + public function getNexus() + { + return $this->nexus; + } + + /** + * True if the server supports Nexus operations. + * This flag is dependent both on server version and for Nexus to be enabled via server configuration. + * + * Generated from protobuf field bool nexus = 11; + * @param bool $var + * @return $this + */ + public function setNexus($var) + { + GPBUtil::checkBool($var); + $this->nexus = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerBuildIdCompatibilityRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerBuildIdCompatibilityRequest.php new file mode 100644 index 0000000..a681414 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerBuildIdCompatibilityRequest.php @@ -0,0 +1,131 @@ +temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest + */ +class GetWorkerBuildIdCompatibilityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Must be set, the task queue to interrogate about worker id compatibility. + * + * Generated from protobuf field string task_queue = 2; + */ + protected $task_queue = ''; + /** + * Limits how many compatible sets will be returned. Specify 1 to only return the current + * default major version set. 0 returns all sets. + * + * Generated from protobuf field int32 max_sets = 3; + */ + protected $max_sets = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $task_queue + * Must be set, the task queue to interrogate about worker id compatibility. + * @type int $max_sets + * Limits how many compatible sets will be returned. Specify 1 to only return the current + * default major version set. 0 returns all sets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Must be set, the task queue to interrogate about worker id compatibility. + * + * Generated from protobuf field string task_queue = 2; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Must be set, the task queue to interrogate about worker id compatibility. + * + * Generated from protobuf field string task_queue = 2; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + + /** + * Limits how many compatible sets will be returned. Specify 1 to only return the current + * default major version set. 0 returns all sets. + * + * Generated from protobuf field int32 max_sets = 3; + * @return int + */ + public function getMaxSets() + { + return $this->max_sets; + } + + /** + * Limits how many compatible sets will be returned. Specify 1 to only return the current + * default major version set. 0 returns all sets. + * + * Generated from protobuf field int32 max_sets = 3; + * @param int $var + * @return $this + */ + public function setMaxSets($var) + { + GPBUtil::checkInt32($var); + $this->max_sets = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerBuildIdCompatibilityResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerBuildIdCompatibilityResponse.php new file mode 100644 index 0000000..78dbcbf --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerBuildIdCompatibilityResponse.php @@ -0,0 +1,78 @@ +temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse + */ +class GetWorkerBuildIdCompatibilityResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Major version sets, in order from oldest to newest. The last element of the list will always + * be the current default major version. IE: New workflows will target the most recent version + * in that version set. + * There may be fewer sets returned than exist, if the request chose to limit this response. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.CompatibleVersionSet major_version_sets = 1; + */ + private $major_version_sets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Taskqueue\V1\CompatibleVersionSet>|\Google\Protobuf\Internal\RepeatedField $major_version_sets + * Major version sets, in order from oldest to newest. The last element of the list will always + * be the current default major version. IE: New workflows will target the most recent version + * in that version set. + * There may be fewer sets returned than exist, if the request chose to limit this response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Major version sets, in order from oldest to newest. The last element of the list will always + * be the current default major version. IE: New workflows will target the most recent version + * in that version set. + * There may be fewer sets returned than exist, if the request chose to limit this response. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.CompatibleVersionSet major_version_sets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMajorVersionSets() + { + return $this->major_version_sets; + } + + /** + * Major version sets, in order from oldest to newest. The last element of the list will always + * be the current default major version. IE: New workflows will target the most recent version + * in that version set. + * There may be fewer sets returned than exist, if the request chose to limit this response. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.CompatibleVersionSet major_version_sets = 1; + * @param array<\Temporal\Api\Taskqueue\V1\CompatibleVersionSet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMajorVersionSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\CompatibleVersionSet::class); + $this->major_version_sets = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerTaskReachabilityRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerTaskReachabilityRequest.php new file mode 100644 index 0000000..d632e1c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerTaskReachabilityRequest.php @@ -0,0 +1,211 @@ +temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest + */ +class GetWorkerTaskReachabilityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker. + * The number of build ids that can be queried in a single API call is limited. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. + * + * Generated from protobuf field repeated string build_ids = 2; + */ + private $build_ids; + /** + * Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given + * build ids in the namespace. + * Must specify at least one task queue if querying for an unversioned worker. + * The number of task queues that the server will fetch reachability information for is limited. + * See the `GetWorkerTaskReachabilityResponse` documentation for more information. + * + * Generated from protobuf field repeated string task_queues = 3; + */ + private $task_queues; + /** + * Type of reachability to query for. + * `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. + * Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. + * Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left + * unspecified. + * See the TaskReachability docstring for information about each enum variant. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskReachability reachability = 4; + */ + protected $reachability = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type array|\Google\Protobuf\Internal\RepeatedField $build_ids + * Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker. + * The number of build ids that can be queried in a single API call is limited. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. + * @type array|\Google\Protobuf\Internal\RepeatedField $task_queues + * Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given + * build ids in the namespace. + * Must specify at least one task queue if querying for an unversioned worker. + * The number of task queues that the server will fetch reachability information for is limited. + * See the `GetWorkerTaskReachabilityResponse` documentation for more information. + * @type int $reachability + * Type of reachability to query for. + * `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. + * Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. + * Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left + * unspecified. + * See the TaskReachability docstring for information about each enum variant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker. + * The number of build ids that can be queried in a single API call is limited. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. + * + * Generated from protobuf field repeated string build_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuildIds() + { + return $this->build_ids; + } + + /** + * Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker. + * The number of build ids that can be queried in a single API call is limited. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. + * + * Generated from protobuf field repeated string build_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuildIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->build_ids = $arr; + + return $this; + } + + /** + * Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given + * build ids in the namespace. + * Must specify at least one task queue if querying for an unversioned worker. + * The number of task queues that the server will fetch reachability information for is limited. + * See the `GetWorkerTaskReachabilityResponse` documentation for more information. + * + * Generated from protobuf field repeated string task_queues = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaskQueues() + { + return $this->task_queues; + } + + /** + * Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given + * build ids in the namespace. + * Must specify at least one task queue if querying for an unversioned worker. + * The number of task queues that the server will fetch reachability information for is limited. + * See the `GetWorkerTaskReachabilityResponse` documentation for more information. + * + * Generated from protobuf field repeated string task_queues = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaskQueues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->task_queues = $arr; + + return $this; + } + + /** + * Type of reachability to query for. + * `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. + * Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. + * Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left + * unspecified. + * See the TaskReachability docstring for information about each enum variant. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskReachability reachability = 4; + * @return int + */ + public function getReachability() + { + return $this->reachability; + } + + /** + * Type of reachability to query for. + * `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. + * Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. + * Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left + * unspecified. + * See the TaskReachability docstring for information about each enum variant. + * + * Generated from protobuf field .temporal.api.enums.v1.TaskReachability reachability = 4; + * @param int $var + * @return $this + */ + public function setReachability($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\TaskReachability::class); + $this->reachability = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerTaskReachabilityResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerTaskReachabilityResponse.php new file mode 100644 index 0000000..14e62cc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerTaskReachabilityResponse.php @@ -0,0 +1,96 @@ +temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse + */ +class GetWorkerTaskReachabilityResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Task reachability, broken down by build id and then task queue. + * When requesting a large number of task queues or all task queues associated with the given build ids in a + * namespace, all task queues will be listed in the response but some of them may not contain reachability + * information due to a server enforced limit. When reaching the limit, task queues that reachability information + * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue + * another call to get the reachability for those task queues. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.BuildIdReachability build_id_reachability = 1; + */ + private $build_id_reachability; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Taskqueue\V1\BuildIdReachability>|\Google\Protobuf\Internal\RepeatedField $build_id_reachability + * Task reachability, broken down by build id and then task queue. + * When requesting a large number of task queues or all task queues associated with the given build ids in a + * namespace, all task queues will be listed in the response but some of them may not contain reachability + * information due to a server enforced limit. When reaching the limit, task queues that reachability information + * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue + * another call to get the reachability for those task queues. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Task reachability, broken down by build id and then task queue. + * When requesting a large number of task queues or all task queues associated with the given build ids in a + * namespace, all task queues will be listed in the response but some of them may not contain reachability + * information due to a server enforced limit. When reaching the limit, task queues that reachability information + * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue + * another call to get the reachability for those task queues. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.BuildIdReachability build_id_reachability = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuildIdReachability() + { + return $this->build_id_reachability; + } + + /** + * Task reachability, broken down by build id and then task queue. + * When requesting a large number of task queues or all task queues associated with the given build ids in a + * namespace, all task queues will be listed in the response but some of them may not contain reachability + * information due to a server enforced limit. When reaching the limit, task queues that reachability information + * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue + * another call to get the reachability for those task queues. + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. + * + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.BuildIdReachability build_id_reachability = 1; + * @param array<\Temporal\Api\Taskqueue\V1\BuildIdReachability>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuildIdReachability($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\BuildIdReachability::class); + $this->build_id_reachability = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerVersioningRulesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerVersioningRulesRequest.php new file mode 100644 index 0000000..5e3e200 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerVersioningRulesRequest.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest + */ +class GetWorkerVersioningRulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string task_queue = 2; + */ + protected $task_queue = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $task_queue + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string task_queue = 2; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Generated from protobuf field string task_queue = 2; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerVersioningRulesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerVersioningRulesResponse.php new file mode 100644 index 0000000..2077040 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkerVersioningRulesResponse.php @@ -0,0 +1,128 @@ +temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse + */ +class GetWorkerVersioningRulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1; + */ + private $assignment_rules; + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2; + */ + private $compatible_redirect_rules; + /** + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between this List and the Update, + * which could lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 3; + */ + protected $conflict_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule>|\Google\Protobuf\Internal\RepeatedField $assignment_rules + * @type array<\Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule>|\Google\Protobuf\Internal\RepeatedField $compatible_redirect_rules + * @type string $conflict_token + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between this List and the Update, + * which could lead to lost updates and other confusion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssignmentRules() + { + return $this->assignment_rules; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1; + * @param array<\Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssignmentRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule::class); + $this->assignment_rules = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompatibleRedirectRules() + { + return $this->compatible_redirect_rules; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2; + * @param array<\Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompatibleRedirectRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule::class); + $this->compatible_redirect_rules = $arr; + + return $this; + } + + /** + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between this List and the Update, + * which could lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 3; + * @return string + */ + public function getConflictToken() + { + return $this->conflict_token; + } + + /** + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between this List and the Update, + * which could lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 3; + * @param string $var + * @return $this + */ + public function setConflictToken($var) + { + GPBUtil::checkString($var, False); + $this->conflict_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryRequest.php new file mode 100644 index 0000000..d92590e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryRequest.php @@ -0,0 +1,264 @@ +temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest + */ +class GetWorkflowExecutionHistoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + */ + protected $execution = null; + /** + * Generated from protobuf field int32 maximum_page_size = 3; + */ + protected $maximum_page_size = 0; + /** + * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of + * these, it should be passed here to fetch the next page. + * + * Generated from protobuf field bytes next_page_token = 4; + */ + protected $next_page_token = ''; + /** + * If set to true, the RPC call will not resolve until there is a new event which matches + * the `history_event_filter_type`, or a timeout is hit. + * + * Generated from protobuf field bool wait_new_event = 5; + */ + protected $wait_new_event = false; + /** + * Filter returned events such that they match the specified filter type. + * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. + * + * Generated from protobuf field .temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6; + */ + protected $history_event_filter_type = 0; + /** + * Generated from protobuf field bool skip_archival = 7; + */ + protected $skip_archival = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $execution + * @type int $maximum_page_size + * @type string $next_page_token + * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of + * these, it should be passed here to fetch the next page. + * @type bool $wait_new_event + * If set to true, the RPC call will not resolve until there is a new event which matches + * the `history_event_filter_type`, or a timeout is hit. + * @type int $history_event_filter_type + * Filter returned events such that they match the specified filter type. + * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. + * @type bool $skip_archival + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->execution = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 3; + * @return int + */ + public function getMaximumPageSize() + { + return $this->maximum_page_size; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 3; + * @param int $var + * @return $this + */ + public function setMaximumPageSize($var) + { + GPBUtil::checkInt32($var); + $this->maximum_page_size = $var; + + return $this; + } + + /** + * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of + * these, it should be passed here to fetch the next page. + * + * Generated from protobuf field bytes next_page_token = 4; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of + * these, it should be passed here to fetch the next page. + * + * Generated from protobuf field bytes next_page_token = 4; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * If set to true, the RPC call will not resolve until there is a new event which matches + * the `history_event_filter_type`, or a timeout is hit. + * + * Generated from protobuf field bool wait_new_event = 5; + * @return bool + */ + public function getWaitNewEvent() + { + return $this->wait_new_event; + } + + /** + * If set to true, the RPC call will not resolve until there is a new event which matches + * the `history_event_filter_type`, or a timeout is hit. + * + * Generated from protobuf field bool wait_new_event = 5; + * @param bool $var + * @return $this + */ + public function setWaitNewEvent($var) + { + GPBUtil::checkBool($var); + $this->wait_new_event = $var; + + return $this; + } + + /** + * Filter returned events such that they match the specified filter type. + * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. + * + * Generated from protobuf field .temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6; + * @return int + */ + public function getHistoryEventFilterType() + { + return $this->history_event_filter_type; + } + + /** + * Filter returned events such that they match the specified filter type. + * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. + * + * Generated from protobuf field .temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6; + * @param int $var + * @return $this + */ + public function setHistoryEventFilterType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\HistoryEventFilterType::class); + $this->history_event_filter_type = $var; + + return $this; + } + + /** + * Generated from protobuf field bool skip_archival = 7; + * @return bool + */ + public function getSkipArchival() + { + return $this->skip_archival; + } + + /** + * Generated from protobuf field bool skip_archival = 7; + * @param bool $var + * @return $this + */ + public function setSkipArchival($var) + { + GPBUtil::checkBool($var); + $this->skip_archival = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryResponse.php new file mode 100644 index 0000000..d2c84f3 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryResponse.php @@ -0,0 +1,168 @@ +temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse + */ +class GetWorkflowExecutionHistoryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + */ + protected $history = null; + /** + * Raw history is an alternate representation of history that may be returned if configured on + * the frontend. This is not supported by all SDKs. Either this or `history` will be set. + * + * Generated from protobuf field repeated .temporal.api.common.v1.DataBlob raw_history = 2; + */ + private $raw_history; + /** + * Will be set if there are more history events than were included in this response + * + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field bool archived = 4; + */ + protected $archived = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\History\V1\History $history + * @type array<\Temporal\Api\Common\V1\DataBlob>|\Google\Protobuf\Internal\RepeatedField $raw_history + * Raw history is an alternate representation of history that may be returned if configured on + * the frontend. This is not supported by all SDKs. Either this or `history` will be set. + * @type string $next_page_token + * Will be set if there are more history events than were included in this response + * @type bool $archived + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @return \Temporal\Api\History\V1\History|null + */ + public function getHistory() + { + return $this->history; + } + + public function hasHistory() + { + return isset($this->history); + } + + public function clearHistory() + { + unset($this->history); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @param \Temporal\Api\History\V1\History $var + * @return $this + */ + public function setHistory($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\History::class); + $this->history = $var; + + return $this; + } + + /** + * Raw history is an alternate representation of history that may be returned if configured on + * the frontend. This is not supported by all SDKs. Either this or `history` will be set. + * + * Generated from protobuf field repeated .temporal.api.common.v1.DataBlob raw_history = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRawHistory() + { + return $this->raw_history; + } + + /** + * Raw history is an alternate representation of history that may be returned if configured on + * the frontend. This is not supported by all SDKs. Either this or `history` will be set. + * + * Generated from protobuf field repeated .temporal.api.common.v1.DataBlob raw_history = 2; + * @param array<\Temporal\Api\Common\V1\DataBlob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRawHistory($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\DataBlob::class); + $this->raw_history = $arr; + + return $this; + } + + /** + * Will be set if there are more history events than were included in this response + * + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Will be set if there are more history events than were included in this response + * + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field bool archived = 4; + * @return bool + */ + public function getArchived() + { + return $this->archived; + } + + /** + * Generated from protobuf field bool archived = 4; + * @param bool $var + * @return $this + */ + public function setArchived($var) + { + GPBUtil::checkBool($var); + $this->archived = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryReverseRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryReverseRequest.php new file mode 100644 index 0000000..b262911 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryReverseRequest.php @@ -0,0 +1,150 @@ +temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest + */ +class GetWorkflowExecutionHistoryReverseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + */ + protected $execution = null; + /** + * Generated from protobuf field int32 maximum_page_size = 3; + */ + protected $maximum_page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 4; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $execution + * @type int $maximum_page_size + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->execution = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 3; + * @return int + */ + public function getMaximumPageSize() + { + return $this->maximum_page_size; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 3; + * @param int $var + * @return $this + */ + public function setMaximumPageSize($var) + { + GPBUtil::checkInt32($var); + $this->maximum_page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 4; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 4; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryReverseResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryReverseResponse.php new file mode 100644 index 0000000..dc2f6ea --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/GetWorkflowExecutionHistoryReverseResponse.php @@ -0,0 +1,103 @@ +temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse + */ +class GetWorkflowExecutionHistoryReverseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + */ + protected $history = null; + /** + * Will be set if there are more history events than were included in this response + * + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\History\V1\History $history + * @type string $next_page_token + * Will be set if there are more history events than were included in this response + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @return \Temporal\Api\History\V1\History|null + */ + public function getHistory() + { + return $this->history; + } + + public function hasHistory() + { + return isset($this->history); + } + + public function clearHistory() + { + unset($this->history); + } + + /** + * Generated from protobuf field .temporal.api.history.v1.History history = 1; + * @param \Temporal\Api\History\V1\History $var + * @return $this + */ + public function setHistory($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\History::class); + $this->history = $var; + + return $this; + } + + /** + * Will be set if there are more history events than were included in this response + * + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Will be set if there are more history events than were included in this response + * + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListArchivedWorkflowExecutionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListArchivedWorkflowExecutionsRequest.php new file mode 100644 index 0000000..1345827 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListArchivedWorkflowExecutionsRequest.php @@ -0,0 +1,140 @@ +temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest + */ +class ListArchivedWorkflowExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field string query = 4; + */ + protected $query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type int $page_size + * @type string $next_page_token + * @type string $query + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field string query = 4; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Generated from protobuf field string query = 4; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListArchivedWorkflowExecutionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListArchivedWorkflowExecutionsResponse.php new file mode 100644 index 0000000..5a1b217 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListArchivedWorkflowExecutionsResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse + */ +class ListArchivedWorkflowExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + */ + private $executions; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $executions + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @param array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\WorkflowExecutionInfo::class); + $this->executions = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListBatchOperationsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListBatchOperationsRequest.php new file mode 100644 index 0000000..6693206 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListBatchOperationsRequest.php @@ -0,0 +1,134 @@ +temporal.api.workflowservice.v1.ListBatchOperationsRequest + */ +class ListBatchOperationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * List page size + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Next page token + * + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace that contains the batch operation + * @type int $page_size + * List page size + * @type string $next_page_token + * Next page token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * List page size + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * List page size + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Next page token + * + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Next page token + * + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListBatchOperationsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListBatchOperationsResponse.php new file mode 100644 index 0000000..2965ad9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListBatchOperationsResponse.php @@ -0,0 +1,93 @@ +temporal.api.workflowservice.v1.ListBatchOperationsResponse + */ +class ListBatchOperationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * BatchOperationInfo contains the basic info about batch operation + * + * Generated from protobuf field repeated .temporal.api.batch.v1.BatchOperationInfo operation_info = 1; + */ + private $operation_info; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Batch\V1\BatchOperationInfo>|\Google\Protobuf\Internal\RepeatedField $operation_info + * BatchOperationInfo contains the basic info about batch operation + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * BatchOperationInfo contains the basic info about batch operation + * + * Generated from protobuf field repeated .temporal.api.batch.v1.BatchOperationInfo operation_info = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperationInfo() + { + return $this->operation_info; + } + + /** + * BatchOperationInfo contains the basic info about batch operation + * + * Generated from protobuf field repeated .temporal.api.batch.v1.BatchOperationInfo operation_info = 1; + * @param array<\Temporal\Api\Batch\V1\BatchOperationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperationInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Batch\V1\BatchOperationInfo::class); + $this->operation_info = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListClosedWorkflowExecutionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListClosedWorkflowExecutionsRequest.php new file mode 100644 index 0000000..3886f68 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListClosedWorkflowExecutionsRequest.php @@ -0,0 +1,243 @@ +temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest + */ +class ListClosedWorkflowExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field int32 maximum_page_size = 2; + */ + protected $maximum_page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field .temporal.api.filter.v1.StartTimeFilter start_time_filter = 4; + */ + protected $start_time_filter = null; + protected $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type int $maximum_page_size + * @type string $next_page_token + * @type \Temporal\Api\Filter\V1\StartTimeFilter $start_time_filter + * @type \Temporal\Api\Filter\V1\WorkflowExecutionFilter $execution_filter + * @type \Temporal\Api\Filter\V1\WorkflowTypeFilter $type_filter + * @type \Temporal\Api\Filter\V1\StatusFilter $status_filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 2; + * @return int + */ + public function getMaximumPageSize() + { + return $this->maximum_page_size; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 2; + * @param int $var + * @return $this + */ + public function setMaximumPageSize($var) + { + GPBUtil::checkInt32($var); + $this->maximum_page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.StartTimeFilter start_time_filter = 4; + * @return \Temporal\Api\Filter\V1\StartTimeFilter|null + */ + public function getStartTimeFilter() + { + return $this->start_time_filter; + } + + public function hasStartTimeFilter() + { + return isset($this->start_time_filter); + } + + public function clearStartTimeFilter() + { + unset($this->start_time_filter); + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.StartTimeFilter start_time_filter = 4; + * @param \Temporal\Api\Filter\V1\StartTimeFilter $var + * @return $this + */ + public function setStartTimeFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Filter\V1\StartTimeFilter::class); + $this->start_time_filter = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5; + * @return \Temporal\Api\Filter\V1\WorkflowExecutionFilter|null + */ + public function getExecutionFilter() + { + return $this->readOneof(5); + } + + public function hasExecutionFilter() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5; + * @param \Temporal\Api\Filter\V1\WorkflowExecutionFilter $var + * @return $this + */ + public function setExecutionFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Filter\V1\WorkflowExecutionFilter::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6; + * @return \Temporal\Api\Filter\V1\WorkflowTypeFilter|null + */ + public function getTypeFilter() + { + return $this->readOneof(6); + } + + public function hasTypeFilter() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6; + * @param \Temporal\Api\Filter\V1\WorkflowTypeFilter $var + * @return $this + */ + public function setTypeFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Filter\V1\WorkflowTypeFilter::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.StatusFilter status_filter = 7; + * @return \Temporal\Api\Filter\V1\StatusFilter|null + */ + public function getStatusFilter() + { + return $this->readOneof(7); + } + + public function hasStatusFilter() + { + return $this->hasOneof(7); + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.StatusFilter status_filter = 7; + * @param \Temporal\Api\Filter\V1\StatusFilter $var + * @return $this + */ + public function setStatusFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Filter\V1\StatusFilter::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilters() + { + return $this->whichOneof("filters"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListClosedWorkflowExecutionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListClosedWorkflowExecutionsResponse.php new file mode 100644 index 0000000..db19b18 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListClosedWorkflowExecutionsResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse + */ +class ListClosedWorkflowExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + */ + private $executions; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $executions + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @param array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\WorkflowExecutionInfo::class); + $this->executions = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListNamespacesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListNamespacesRequest.php new file mode 100644 index 0000000..98a5611 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListNamespacesRequest.php @@ -0,0 +1,123 @@ +temporal.api.workflowservice.v1.ListNamespacesRequest + */ +class ListNamespacesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 page_size = 1; + */ + protected $page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceFilter namespace_filter = 3; + */ + protected $namespace_filter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * @type string $next_page_token + * @type \Temporal\Api\PBNamespace\V1\NamespaceFilter $namespace_filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Generated from protobuf field int32 page_size = 1; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceFilter namespace_filter = 3; + * @return \Temporal\Api\PBNamespace\V1\NamespaceFilter|null + */ + public function getNamespaceFilter() + { + return $this->namespace_filter; + } + + public function hasNamespaceFilter() + { + return isset($this->namespace_filter); + } + + public function clearNamespaceFilter() + { + unset($this->namespace_filter); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceFilter namespace_filter = 3; + * @param \Temporal\Api\PBNamespace\V1\NamespaceFilter $var + * @return $this + */ + public function setNamespaceFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceFilter::class); + $this->namespace_filter = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListNamespacesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListNamespacesResponse.php new file mode 100644 index 0000000..a9bc375 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListNamespacesResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ListNamespacesResponse + */ +class ListNamespacesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.DescribeNamespaceResponse namespaces = 1; + */ + private $namespaces; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflowservice\V1\DescribeNamespaceResponse>|\Google\Protobuf\Internal\RepeatedField $namespaces + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.DescribeNamespaceResponse namespaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNamespaces() + { + return $this->namespaces; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.DescribeNamespaceResponse namespaces = 1; + * @param array<\Temporal\Api\Workflowservice\V1\DescribeNamespaceResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNamespaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflowservice\V1\DescribeNamespaceResponse::class); + $this->namespaces = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListOpenWorkflowExecutionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListOpenWorkflowExecutionsRequest.php new file mode 100644 index 0000000..63cbd82 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListOpenWorkflowExecutionsRequest.php @@ -0,0 +1,215 @@ +temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest + */ +class ListOpenWorkflowExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field int32 maximum_page_size = 2; + */ + protected $maximum_page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field .temporal.api.filter.v1.StartTimeFilter start_time_filter = 4; + */ + protected $start_time_filter = null; + protected $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type int $maximum_page_size + * @type string $next_page_token + * @type \Temporal\Api\Filter\V1\StartTimeFilter $start_time_filter + * @type \Temporal\Api\Filter\V1\WorkflowExecutionFilter $execution_filter + * @type \Temporal\Api\Filter\V1\WorkflowTypeFilter $type_filter + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 2; + * @return int + */ + public function getMaximumPageSize() + { + return $this->maximum_page_size; + } + + /** + * Generated from protobuf field int32 maximum_page_size = 2; + * @param int $var + * @return $this + */ + public function setMaximumPageSize($var) + { + GPBUtil::checkInt32($var); + $this->maximum_page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.StartTimeFilter start_time_filter = 4; + * @return \Temporal\Api\Filter\V1\StartTimeFilter|null + */ + public function getStartTimeFilter() + { + return $this->start_time_filter; + } + + public function hasStartTimeFilter() + { + return isset($this->start_time_filter); + } + + public function clearStartTimeFilter() + { + unset($this->start_time_filter); + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.StartTimeFilter start_time_filter = 4; + * @param \Temporal\Api\Filter\V1\StartTimeFilter $var + * @return $this + */ + public function setStartTimeFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Filter\V1\StartTimeFilter::class); + $this->start_time_filter = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5; + * @return \Temporal\Api\Filter\V1\WorkflowExecutionFilter|null + */ + public function getExecutionFilter() + { + return $this->readOneof(5); + } + + public function hasExecutionFilter() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5; + * @param \Temporal\Api\Filter\V1\WorkflowExecutionFilter $var + * @return $this + */ + public function setExecutionFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Filter\V1\WorkflowExecutionFilter::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6; + * @return \Temporal\Api\Filter\V1\WorkflowTypeFilter|null + */ + public function getTypeFilter() + { + return $this->readOneof(6); + } + + public function hasTypeFilter() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6; + * @param \Temporal\Api\Filter\V1\WorkflowTypeFilter $var + * @return $this + */ + public function setTypeFilter($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Filter\V1\WorkflowTypeFilter::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilters() + { + return $this->whichOneof("filters"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListOpenWorkflowExecutionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListOpenWorkflowExecutionsResponse.php new file mode 100644 index 0000000..9d6662f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListOpenWorkflowExecutionsResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse + */ +class ListOpenWorkflowExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + */ + private $executions; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $executions + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @param array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\WorkflowExecutionInfo::class); + $this->executions = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListScheduleMatchingTimesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListScheduleMatchingTimesRequest.php new file mode 100644 index 0000000..aa07527 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListScheduleMatchingTimesRequest.php @@ -0,0 +1,181 @@ +temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest + */ +class ListScheduleMatchingTimesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace of the schedule to query. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The id of the schedule to query. + * + * Generated from protobuf field string schedule_id = 2; + */ + protected $schedule_id = ''; + /** + * Time range to query. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace of the schedule to query. + * @type string $schedule_id + * The id of the schedule to query. + * @type \Google\Protobuf\Timestamp $start_time + * Time range to query. + * @type \Google\Protobuf\Timestamp $end_time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace of the schedule to query. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace of the schedule to query. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The id of the schedule to query. + * + * Generated from protobuf field string schedule_id = 2; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * The id of the schedule to query. + * + * Generated from protobuf field string schedule_id = 2; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + + /** + * Time range to query. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @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); + } + + /** + * Time range to query. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + * @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); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + * @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/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListScheduleMatchingTimesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListScheduleMatchingTimesResponse.php new file mode 100644 index 0000000..260534f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListScheduleMatchingTimesResponse.php @@ -0,0 +1,59 @@ +temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse + */ +class ListScheduleMatchingTimesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .google.protobuf.Timestamp start_time = 1; + */ + private $start_time; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $start_time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartTime() + { + return $this->start_time; + } + + /** + * Generated from protobuf field repeated .google.protobuf.Timestamp start_time = 1; + * @param array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartTime($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Timestamp::class); + $this->start_time = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListSchedulesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListSchedulesRequest.php new file mode 100644 index 0000000..9aa1a6d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListSchedulesRequest.php @@ -0,0 +1,168 @@ +temporal.api.workflowservice.v1.ListSchedulesRequest + */ +class ListSchedulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace to list schedules in. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * How many to return at once. + * + * Generated from protobuf field int32 maximum_page_size = 2; + */ + protected $maximum_page_size = 0; + /** + * Token to get the next page of results. + * + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Query to filter schedules. + * + * Generated from protobuf field string query = 4; + */ + protected $query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace to list schedules in. + * @type int $maximum_page_size + * How many to return at once. + * @type string $next_page_token + * Token to get the next page of results. + * @type string $query + * Query to filter schedules. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace to list schedules in. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace to list schedules in. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * How many to return at once. + * + * Generated from protobuf field int32 maximum_page_size = 2; + * @return int + */ + public function getMaximumPageSize() + { + return $this->maximum_page_size; + } + + /** + * How many to return at once. + * + * Generated from protobuf field int32 maximum_page_size = 2; + * @param int $var + * @return $this + */ + public function setMaximumPageSize($var) + { + GPBUtil::checkInt32($var); + $this->maximum_page_size = $var; + + return $this; + } + + /** + * Token to get the next page of results. + * + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to get the next page of results. + * + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Query to filter schedules. + * + * Generated from protobuf field string query = 4; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Query to filter schedules. + * + * Generated from protobuf field string query = 4; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListSchedulesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListSchedulesResponse.php new file mode 100644 index 0000000..b807339 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListSchedulesResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ListSchedulesResponse + */ +class ListSchedulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleListEntry schedules = 1; + */ + private $schedules; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Schedule\V1\ScheduleListEntry>|\Google\Protobuf\Internal\RepeatedField $schedules + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleListEntry schedules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchedules() + { + return $this->schedules; + } + + /** + * Generated from protobuf field repeated .temporal.api.schedule.v1.ScheduleListEntry schedules = 1; + * @param array<\Temporal\Api\Schedule\V1\ScheduleListEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchedules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Schedule\V1\ScheduleListEntry::class); + $this->schedules = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListTaskQueuePartitionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListTaskQueuePartitionsRequest.php new file mode 100644 index 0000000..bf084e5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListTaskQueuePartitionsRequest.php @@ -0,0 +1,96 @@ +temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest + */ +class ListTaskQueuePartitionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + */ + protected $task_queue = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListTaskQueuePartitionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListTaskQueuePartitionsResponse.php new file mode 100644 index 0000000..2375221 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListTaskQueuePartitionsResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse + */ +class ListTaskQueuePartitionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueuePartitionMetadata activity_task_queue_partitions = 1; + */ + private $activity_task_queue_partitions; + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueuePartitionMetadata workflow_task_queue_partitions = 2; + */ + private $workflow_task_queue_partitions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Taskqueue\V1\TaskQueuePartitionMetadata>|\Google\Protobuf\Internal\RepeatedField $activity_task_queue_partitions + * @type array<\Temporal\Api\Taskqueue\V1\TaskQueuePartitionMetadata>|\Google\Protobuf\Internal\RepeatedField $workflow_task_queue_partitions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueuePartitionMetadata activity_task_queue_partitions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActivityTaskQueuePartitions() + { + return $this->activity_task_queue_partitions; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueuePartitionMetadata activity_task_queue_partitions = 1; + * @param array<\Temporal\Api\Taskqueue\V1\TaskQueuePartitionMetadata>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActivityTaskQueuePartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TaskQueuePartitionMetadata::class); + $this->activity_task_queue_partitions = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueuePartitionMetadata workflow_task_queue_partitions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWorkflowTaskQueuePartitions() + { + return $this->workflow_task_queue_partitions; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TaskQueuePartitionMetadata workflow_task_queue_partitions = 2; + * @param array<\Temporal\Api\Taskqueue\V1\TaskQueuePartitionMetadata>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWorkflowTaskQueuePartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TaskQueuePartitionMetadata::class); + $this->workflow_task_queue_partitions = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListWorkflowExecutionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListWorkflowExecutionsRequest.php new file mode 100644 index 0000000..d701f63 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListWorkflowExecutionsRequest.php @@ -0,0 +1,140 @@ +temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest + */ +class ListWorkflowExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field string query = 4; + */ + protected $query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type int $page_size + * @type string $next_page_token + * @type string $query + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field string query = 4; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Generated from protobuf field string query = 4; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListWorkflowExecutionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListWorkflowExecutionsResponse.php new file mode 100644 index 0000000..e9bd11c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ListWorkflowExecutionsResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse + */ +class ListWorkflowExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + */ + private $executions; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $executions + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @param array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\WorkflowExecutionInfo::class); + $this->executions = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PatchScheduleRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PatchScheduleRequest.php new file mode 100644 index 0000000..f92acab --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PatchScheduleRequest.php @@ -0,0 +1,205 @@ +temporal.api.workflowservice.v1.PatchScheduleRequest + */ +class PatchScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace of the schedule to patch. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The id of the schedule to patch. + * + * Generated from protobuf field string schedule_id = 2; + */ + protected $schedule_id = ''; + /** + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePatch patch = 3; + */ + protected $patch = null; + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + /** + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 5; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace of the schedule to patch. + * @type string $schedule_id + * The id of the schedule to patch. + * @type \Temporal\Api\Schedule\V1\SchedulePatch $patch + * @type string $identity + * The identity of the client who initiated this request. + * @type string $request_id + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace of the schedule to patch. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace of the schedule to patch. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The id of the schedule to patch. + * + * Generated from protobuf field string schedule_id = 2; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * The id of the schedule to patch. + * + * Generated from protobuf field string schedule_id = 2; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePatch patch = 3; + * @return \Temporal\Api\Schedule\V1\SchedulePatch|null + */ + public function getPatch() + { + return $this->patch; + } + + public function hasPatch() + { + return isset($this->patch); + } + + public function clearPatch() + { + unset($this->patch); + } + + /** + * Generated from protobuf field .temporal.api.schedule.v1.SchedulePatch patch = 3; + * @param \Temporal\Api\Schedule\V1\SchedulePatch $var + * @return $this + */ + public function setPatch($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\SchedulePatch::class); + $this->patch = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 5; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 5; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PatchScheduleResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PatchScheduleResponse.php new file mode 100644 index 0000000..208936f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PatchScheduleResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.PatchScheduleResponse + */ +class PatchScheduleResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollActivityTaskQueueRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollActivityTaskQueueRequest.php new file mode 100644 index 0000000..c137673 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollActivityTaskQueueRequest.php @@ -0,0 +1,215 @@ +temporal.api.workflowservice.v1.PollActivityTaskQueueRequest + */ +class PollActivityTaskQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + */ + protected $task_queue = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4; + */ + protected $task_queue_metadata = null; + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5; + */ + protected $worker_version_capabilities = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type string $identity + * The identity of the worker/client + * @type \Temporal\Api\Taskqueue\V1\TaskQueueMetadata $task_queue_metadata + * @type \Temporal\Api\Common\V1\WorkerVersionCapabilities $worker_version_capabilities + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4; + * @return \Temporal\Api\Taskqueue\V1\TaskQueueMetadata|null + */ + public function getTaskQueueMetadata() + { + return $this->task_queue_metadata; + } + + public function hasTaskQueueMetadata() + { + return isset($this->task_queue_metadata); + } + + public function clearTaskQueueMetadata() + { + unset($this->task_queue_metadata); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4; + * @param \Temporal\Api\Taskqueue\V1\TaskQueueMetadata $var + * @return $this + */ + public function setTaskQueueMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueMetadata::class); + $this->task_queue_metadata = $var; + + return $this; + } + + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5; + * @return \Temporal\Api\Common\V1\WorkerVersionCapabilities|null + */ + public function getWorkerVersionCapabilities() + { + return $this->worker_version_capabilities; + } + + public function hasWorkerVersionCapabilities() + { + return isset($this->worker_version_capabilities); + } + + public function clearWorkerVersionCapabilities() + { + unset($this->worker_version_capabilities); + } + + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5; + * @param \Temporal\Api\Common\V1\WorkerVersionCapabilities $var + * @return $this + */ + public function setWorkerVersionCapabilities($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionCapabilities::class); + $this->worker_version_capabilities = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollActivityTaskQueueResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollActivityTaskQueueResponse.php new file mode 100644 index 0000000..6e77d37 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollActivityTaskQueueResponse.php @@ -0,0 +1,773 @@ +temporal.api.workflowservice.v1.PollActivityTaskQueueResponse + */ +class PollActivityTaskQueueResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A unique identifier for this task + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * The namespace the workflow which requested this activity lives in + * + * Generated from protobuf field string workflow_namespace = 2; + */ + protected $workflow_namespace = ''; + /** + * Type of the requesting workflow + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Execution info of the requesting workflow + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 5; + */ + protected $activity_type = null; + /** + * The autogenerated or user specified identifier of this activity. Can be used to complete the + * activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage + * has resolved, but unique IDs for every activity invocation is a good idea. + * + * Generated from protobuf field string activity_id = 6; + */ + protected $activity_id = ''; + /** + * Headers specified by the scheduling workflow. Commonly used to propagate contextual info + * from the workflow to its activities. For example, tracing contexts. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 7; + */ + protected $header = null; + /** + * Arguments to the activity invocation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 8; + */ + protected $input = null; + /** + * Details of the last heartbeat that was recorded for this activity as of the time this task + * was delivered. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads heartbeat_details = 9; + */ + protected $heartbeat_details = null; + /** + * When was this task first scheduled + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 10; + */ + protected $scheduled_time = null; + /** + * When was this task attempt scheduled + * + * Generated from protobuf field .google.protobuf.Timestamp current_attempt_scheduled_time = 11; + */ + protected $current_attempt_scheduled_time = null; + /** + * When was this task started (this attempt) + * + * Generated from protobuf field .google.protobuf.Timestamp started_time = 12; + */ + protected $started_time = null; + /** + * Starting at 1, the number of attempts to perform this activity + * + * Generated from protobuf field int32 attempt = 13; + */ + protected $attempt = 0; + /** + * First scheduled -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 14; + */ + protected $schedule_to_close_timeout = null; + /** + * Current attempt start -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 15; + */ + protected $start_to_close_timeout = null; + /** + * Window within which the activity must report a heartbeat, or be timed out. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 16; + */ + protected $heartbeat_timeout = null; + /** + * This is the retry policy the service uses which may be different from the one provided + * (or not) during activity scheduling. The service can override the provided one if some + * values are not specified or exceed configured system limits. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 17; + */ + protected $retry_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * A unique identifier for this task + * @type string $workflow_namespace + * The namespace the workflow which requested this activity lives in + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * Type of the requesting workflow + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * Execution info of the requesting workflow + * @type \Temporal\Api\Common\V1\ActivityType $activity_type + * @type string $activity_id + * The autogenerated or user specified identifier of this activity. Can be used to complete the + * activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage + * has resolved, but unique IDs for every activity invocation is a good idea. + * @type \Temporal\Api\Common\V1\Header $header + * Headers specified by the scheduling workflow. Commonly used to propagate contextual info + * from the workflow to its activities. For example, tracing contexts. + * @type \Temporal\Api\Common\V1\Payloads $input + * Arguments to the activity invocation + * @type \Temporal\Api\Common\V1\Payloads $heartbeat_details + * Details of the last heartbeat that was recorded for this activity as of the time this task + * was delivered. + * @type \Google\Protobuf\Timestamp $scheduled_time + * When was this task first scheduled + * @type \Google\Protobuf\Timestamp $current_attempt_scheduled_time + * When was this task attempt scheduled + * @type \Google\Protobuf\Timestamp $started_time + * When was this task started (this attempt) + * @type int $attempt + * Starting at 1, the number of attempts to perform this activity + * @type \Google\Protobuf\Duration $schedule_to_close_timeout + * First scheduled -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $start_to_close_timeout + * Current attempt start -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * @type \Google\Protobuf\Duration $heartbeat_timeout + * Window within which the activity must report a heartbeat, or be timed out. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * This is the retry policy the service uses which may be different from the one provided + * (or not) during activity scheduling. The service can override the provided one if some + * values are not specified or exceed configured system limits. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * A unique identifier for this task + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * A unique identifier for this task + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * The namespace the workflow which requested this activity lives in + * + * Generated from protobuf field string workflow_namespace = 2; + * @return string + */ + public function getWorkflowNamespace() + { + return $this->workflow_namespace; + } + + /** + * The namespace the workflow which requested this activity lives in + * + * Generated from protobuf field string workflow_namespace = 2; + * @param string $var + * @return $this + */ + public function setWorkflowNamespace($var) + { + GPBUtil::checkString($var, True); + $this->workflow_namespace = $var; + + return $this; + } + + /** + * Type of the requesting workflow + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Type of the requesting workflow + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Execution info of the requesting workflow + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Execution info of the requesting workflow + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 4; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 5; + * @return \Temporal\Api\Common\V1\ActivityType|null + */ + public function getActivityType() + { + return $this->activity_type; + } + + public function hasActivityType() + { + return isset($this->activity_type); + } + + public function clearActivityType() + { + unset($this->activity_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.ActivityType activity_type = 5; + * @param \Temporal\Api\Common\V1\ActivityType $var + * @return $this + */ + public function setActivityType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\ActivityType::class); + $this->activity_type = $var; + + return $this; + } + + /** + * The autogenerated or user specified identifier of this activity. Can be used to complete the + * activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage + * has resolved, but unique IDs for every activity invocation is a good idea. + * + * Generated from protobuf field string activity_id = 6; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * The autogenerated or user specified identifier of this activity. Can be used to complete the + * activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage + * has resolved, but unique IDs for every activity invocation is a good idea. + * + * Generated from protobuf field string activity_id = 6; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Headers specified by the scheduling workflow. Commonly used to propagate contextual info + * from the workflow to its activities. For example, tracing contexts. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 7; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Headers specified by the scheduling workflow. Commonly used to propagate contextual info + * from the workflow to its activities. For example, tracing contexts. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 7; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Arguments to the activity invocation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 8; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Arguments to the activity invocation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 8; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Details of the last heartbeat that was recorded for this activity as of the time this task + * was delivered. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads heartbeat_details = 9; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getHeartbeatDetails() + { + return $this->heartbeat_details; + } + + public function hasHeartbeatDetails() + { + return isset($this->heartbeat_details); + } + + public function clearHeartbeatDetails() + { + unset($this->heartbeat_details); + } + + /** + * Details of the last heartbeat that was recorded for this activity as of the time this task + * was delivered. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads heartbeat_details = 9; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setHeartbeatDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->heartbeat_details = $var; + + return $this; + } + + /** + * When was this task first scheduled + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledTime() + { + return $this->scheduled_time; + } + + public function hasScheduledTime() + { + return isset($this->scheduled_time); + } + + public function clearScheduledTime() + { + unset($this->scheduled_time); + } + + /** + * When was this task first scheduled + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_time = $var; + + return $this; + } + + /** + * When was this task attempt scheduled + * + * Generated from protobuf field .google.protobuf.Timestamp current_attempt_scheduled_time = 11; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCurrentAttemptScheduledTime() + { + return $this->current_attempt_scheduled_time; + } + + public function hasCurrentAttemptScheduledTime() + { + return isset($this->current_attempt_scheduled_time); + } + + public function clearCurrentAttemptScheduledTime() + { + unset($this->current_attempt_scheduled_time); + } + + /** + * When was this task attempt scheduled + * + * Generated from protobuf field .google.protobuf.Timestamp current_attempt_scheduled_time = 11; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCurrentAttemptScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->current_attempt_scheduled_time = $var; + + return $this; + } + + /** + * When was this task started (this attempt) + * + * Generated from protobuf field .google.protobuf.Timestamp started_time = 12; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartedTime() + { + return $this->started_time; + } + + public function hasStartedTime() + { + return isset($this->started_time); + } + + public function clearStartedTime() + { + unset($this->started_time); + } + + /** + * When was this task started (this attempt) + * + * Generated from protobuf field .google.protobuf.Timestamp started_time = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->started_time = $var; + + return $this; + } + + /** + * Starting at 1, the number of attempts to perform this activity + * + * Generated from protobuf field int32 attempt = 13; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * Starting at 1, the number of attempts to perform this activity + * + * Generated from protobuf field int32 attempt = 13; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * First scheduled -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 14; + * @return \Google\Protobuf\Duration|null + */ + public function getScheduleToCloseTimeout() + { + return $this->schedule_to_close_timeout; + } + + public function hasScheduleToCloseTimeout() + { + return isset($this->schedule_to_close_timeout); + } + + public function clearScheduleToCloseTimeout() + { + unset($this->schedule_to_close_timeout); + } + + /** + * First scheduled -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration schedule_to_close_timeout = 14; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setScheduleToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->schedule_to_close_timeout = $var; + + return $this; + } + + /** + * Current attempt start -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 15; + * @return \Google\Protobuf\Duration|null + */ + public function getStartToCloseTimeout() + { + return $this->start_to_close_timeout; + } + + public function hasStartToCloseTimeout() + { + return isset($this->start_to_close_timeout); + } + + public function clearStartToCloseTimeout() + { + unset($this->start_to_close_timeout); + } + + /** + * Current attempt start -> final result reported timeout + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: "to" is used to indicate interval. --) + * + * Generated from protobuf field .google.protobuf.Duration start_to_close_timeout = 15; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartToCloseTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_to_close_timeout = $var; + + return $this; + } + + /** + * Window within which the activity must report a heartbeat, or be timed out. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 16; + * @return \Google\Protobuf\Duration|null + */ + public function getHeartbeatTimeout() + { + return $this->heartbeat_timeout; + } + + public function hasHeartbeatTimeout() + { + return isset($this->heartbeat_timeout); + } + + public function clearHeartbeatTimeout() + { + unset($this->heartbeat_timeout); + } + + /** + * Window within which the activity must report a heartbeat, or be timed out. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_timeout = 16; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setHeartbeatTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->heartbeat_timeout = $var; + + return $this; + } + + /** + * This is the retry policy the service uses which may be different from the one provided + * (or not) during activity scheduling. The service can override the provided one if some + * values are not specified or exceed configured system limits. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 17; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * This is the retry policy the service uses which may be different from the one provided + * (or not) during activity scheduling. The service can override the provided one if some + * values are not specified or exceed configured system limits. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 17; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollNexusTaskQueueRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollNexusTaskQueueRequest.php new file mode 100644 index 0000000..6e338e4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollNexusTaskQueueRequest.php @@ -0,0 +1,178 @@ +temporal.api.workflowservice.v1.PollNexusTaskQueueRequest + */ +class PollNexusTaskQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + */ + protected $task_queue = null; + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4; + */ + protected $worker_version_capabilities = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $identity + * The identity of the client who initiated this request. + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\WorkerVersionCapabilities $worker_version_capabilities + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4; + * @return \Temporal\Api\Common\V1\WorkerVersionCapabilities|null + */ + public function getWorkerVersionCapabilities() + { + return $this->worker_version_capabilities; + } + + public function hasWorkerVersionCapabilities() + { + return isset($this->worker_version_capabilities); + } + + public function clearWorkerVersionCapabilities() + { + unset($this->worker_version_capabilities); + } + + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4; + * @param \Temporal\Api\Common\V1\WorkerVersionCapabilities $var + * @return $this + */ + public function setWorkerVersionCapabilities($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionCapabilities::class); + $this->worker_version_capabilities = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollNexusTaskQueueResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollNexusTaskQueueResponse.php new file mode 100644 index 0000000..e54e310 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollNexusTaskQueueResponse.php @@ -0,0 +1,110 @@ +temporal.api.workflowservice.v1.PollNexusTaskQueueResponse + */ +class PollNexusTaskQueueResponse extends \Google\Protobuf\Internal\Message +{ + /** + * An opaque unique identifier for this task for correlating a completion request the embedded request. + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * Embedded request as translated from the incoming frontend request. + * + * Generated from protobuf field .temporal.api.nexus.v1.Request request = 2; + */ + protected $request = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * An opaque unique identifier for this task for correlating a completion request the embedded request. + * @type \Temporal\Api\Nexus\V1\Request $request + * Embedded request as translated from the incoming frontend request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * An opaque unique identifier for this task for correlating a completion request the embedded request. + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * An opaque unique identifier for this task for correlating a completion request the embedded request. + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Embedded request as translated from the incoming frontend request. + * + * Generated from protobuf field .temporal.api.nexus.v1.Request request = 2; + * @return \Temporal\Api\Nexus\V1\Request|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * Embedded request as translated from the incoming frontend request. + * + * Generated from protobuf field .temporal.api.nexus.v1.Request request = 2; + * @param \Temporal\Api\Nexus\V1\Request $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Request::class); + $this->request = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowExecutionUpdateRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowExecutionUpdateRequest.php new file mode 100644 index 0000000..eb348af --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowExecutionUpdateRequest.php @@ -0,0 +1,200 @@ +temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest + */ +class PollWorkflowExecutionUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace of the workflow execution to which the update was + * originally issued. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The update reference returned in the initial + * UpdateWorkflowExecutionResponse + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 2; + */ + protected $update_ref = null; + /** + * The identity of the worker/client who is polling this update outcome + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Describes when this poll request should return a response. + * Omit to request a non-blocking poll. + * + * Generated from protobuf field .temporal.api.update.v1.WaitPolicy wait_policy = 4; + */ + protected $wait_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace of the workflow execution to which the update was + * originally issued. + * @type \Temporal\Api\Update\V1\UpdateRef $update_ref + * The update reference returned in the initial + * UpdateWorkflowExecutionResponse + * @type string $identity + * The identity of the worker/client who is polling this update outcome + * @type \Temporal\Api\Update\V1\WaitPolicy $wait_policy + * Describes when this poll request should return a response. + * Omit to request a non-blocking poll. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace of the workflow execution to which the update was + * originally issued. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace of the workflow execution to which the update was + * originally issued. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The update reference returned in the initial + * UpdateWorkflowExecutionResponse + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 2; + * @return \Temporal\Api\Update\V1\UpdateRef|null + */ + public function getUpdateRef() + { + return $this->update_ref; + } + + public function hasUpdateRef() + { + return isset($this->update_ref); + } + + public function clearUpdateRef() + { + unset($this->update_ref); + } + + /** + * The update reference returned in the initial + * UpdateWorkflowExecutionResponse + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 2; + * @param \Temporal\Api\Update\V1\UpdateRef $var + * @return $this + */ + public function setUpdateRef($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\UpdateRef::class); + $this->update_ref = $var; + + return $this; + } + + /** + * The identity of the worker/client who is polling this update outcome + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client who is polling this update outcome + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Describes when this poll request should return a response. + * Omit to request a non-blocking poll. + * + * Generated from protobuf field .temporal.api.update.v1.WaitPolicy wait_policy = 4; + * @return \Temporal\Api\Update\V1\WaitPolicy|null + */ + public function getWaitPolicy() + { + return $this->wait_policy; + } + + public function hasWaitPolicy() + { + return isset($this->wait_policy); + } + + public function clearWaitPolicy() + { + unset($this->wait_policy); + } + + /** + * Describes when this poll request should return a response. + * Omit to request a non-blocking poll. + * + * Generated from protobuf field .temporal.api.update.v1.WaitPolicy wait_policy = 4; + * @param \Temporal\Api\Update\V1\WaitPolicy $var + * @return $this + */ + public function setWaitPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\WaitPolicy::class); + $this->wait_policy = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowExecutionUpdateResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowExecutionUpdateResponse.php new file mode 100644 index 0000000..98374ef --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowExecutionUpdateResponse.php @@ -0,0 +1,206 @@ +temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse + */ +class PollWorkflowExecutionUpdateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The outcome of the update if and only if the update has completed. If + * this response is being returned before the update has completed (e.g. due + * to the specification of a wait policy that only waits on + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will + * not be set. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 1; + */ + protected $outcome = null; + /** + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 2; + */ + protected $stage = 0; + /** + * Sufficient information to address this update. + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 3; + */ + protected $update_ref = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Update\V1\Outcome $outcome + * The outcome of the update if and only if the update has completed. If + * this response is being returned before the update has completed (e.g. due + * to the specification of a wait policy that only waits on + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will + * not be set. + * @type int $stage + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * @type \Temporal\Api\Update\V1\UpdateRef $update_ref + * Sufficient information to address this update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The outcome of the update if and only if the update has completed. If + * this response is being returned before the update has completed (e.g. due + * to the specification of a wait policy that only waits on + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will + * not be set. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 1; + * @return \Temporal\Api\Update\V1\Outcome|null + */ + public function getOutcome() + { + return $this->outcome; + } + + public function hasOutcome() + { + return isset($this->outcome); + } + + public function clearOutcome() + { + unset($this->outcome); + } + + /** + * The outcome of the update if and only if the update has completed. If + * this response is being returned before the update has completed (e.g. due + * to the specification of a wait policy that only waits on + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will + * not be set. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 1; + * @param \Temporal\Api\Update\V1\Outcome $var + * @return $this + */ + public function setOutcome($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Outcome::class); + $this->outcome = $var; + + return $this; + } + + /** + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 2; + * @return int + */ + public function getStage() + { + return $this->stage; + } + + /** + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 2; + * @param int $var + * @return $this + */ + public function setStage($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\UpdateWorkflowExecutionLifecycleStage::class); + $this->stage = $var; + + return $this; + } + + /** + * Sufficient information to address this update. + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 3; + * @return \Temporal\Api\Update\V1\UpdateRef|null + */ + public function getUpdateRef() + { + return $this->update_ref; + } + + public function hasUpdateRef() + { + return isset($this->update_ref); + } + + public function clearUpdateRef() + { + unset($this->update_ref); + } + + /** + * Sufficient information to address this update. + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 3; + * @param \Temporal\Api\Update\V1\UpdateRef $var + * @return $this + */ + public function setUpdateRef($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\UpdateRef::class); + $this->update_ref = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowTaskQueueRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowTaskQueueRequest.php new file mode 100644 index 0000000..011d3b5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowTaskQueueRequest.php @@ -0,0 +1,220 @@ +temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest + */ +class PollWorkflowTaskQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + */ + protected $task_queue = null; + /** + * The identity of the worker/client who is polling this task queue + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * DEPRECATED since 1.21 - use `worker_version_capabilities` instead. + * Each worker process should provide an ID unique to the specific set of code it is running + * "checksum" in this field name isn't very accurate, it should be though of as an id. + * + * Generated from protobuf field string binary_checksum = 4; + */ + protected $binary_checksum = ''; + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5; + */ + protected $worker_version_capabilities = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type string $identity + * The identity of the worker/client who is polling this task queue + * @type string $binary_checksum + * DEPRECATED since 1.21 - use `worker_version_capabilities` instead. + * Each worker process should provide an ID unique to the specific set of code it is running + * "checksum" in this field name isn't very accurate, it should be though of as an id. + * @type \Temporal\Api\Common\V1\WorkerVersionCapabilities $worker_version_capabilities + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * The identity of the worker/client who is polling this task queue + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client who is polling this task queue + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * DEPRECATED since 1.21 - use `worker_version_capabilities` instead. + * Each worker process should provide an ID unique to the specific set of code it is running + * "checksum" in this field name isn't very accurate, it should be though of as an id. + * + * Generated from protobuf field string binary_checksum = 4; + * @return string + */ + public function getBinaryChecksum() + { + return $this->binary_checksum; + } + + /** + * DEPRECATED since 1.21 - use `worker_version_capabilities` instead. + * Each worker process should provide an ID unique to the specific set of code it is running + * "checksum" in this field name isn't very accurate, it should be though of as an id. + * + * Generated from protobuf field string binary_checksum = 4; + * @param string $var + * @return $this + */ + public function setBinaryChecksum($var) + { + GPBUtil::checkString($var, True); + $this->binary_checksum = $var; + + return $this; + } + + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5; + * @return \Temporal\Api\Common\V1\WorkerVersionCapabilities|null + */ + public function getWorkerVersionCapabilities() + { + return $this->worker_version_capabilities; + } + + public function hasWorkerVersionCapabilities() + { + return isset($this->worker_version_capabilities); + } + + public function clearWorkerVersionCapabilities() + { + unset($this->worker_version_capabilities); + } + + /** + * Information about this worker's build identifier and if it is choosing to use the versioning + * feature. See the `WorkerVersionCapabilities` docstring for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5; + * @param \Temporal\Api\Common\V1\WorkerVersionCapabilities $var + * @return $this + */ + public function setWorkerVersionCapabilities($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionCapabilities::class); + $this->worker_version_capabilities = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowTaskQueueResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowTaskQueueResponse.php new file mode 100644 index 0000000..a13f608 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/PollWorkflowTaskQueueResponse.php @@ -0,0 +1,678 @@ +temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse + */ +class PollWorkflowTaskQueueResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A unique identifier for this task + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * The last workflow task started event which was processed by some worker for this execution. + * Will be zero if no task has ever started. + * + * Generated from protobuf field int64 previous_started_event_id = 4; + */ + protected $previous_started_event_id = 0; + /** + * The id of the most recent workflow task started event, which will have been generated as a + * result of this poll request being served. Will be zero if the task + * does not contain any events which would advance history (no new WFT started). + * Currently this can happen for queries. + * + * Generated from protobuf field int64 started_event_id = 5; + */ + protected $started_event_id = 0; + /** + * Starting at 1, the number of attempts to complete this task by any worker. + * + * Generated from protobuf field int32 attempt = 6; + */ + protected $attempt = 0; + /** + * A hint that there are more tasks already present in this task queue + * partition. Can be used to prioritize draining a sticky queue. + * Specifically, the returned number is the number of tasks remaining in + * the in-memory buffer for this partition, which is currently capped at + * 1000. Because sticky queues only have one partition, this number is + * more useful when draining them. Normal queues, typically having more than one + * partition, will return a number representing only some portion of the + * overall backlog. Subsequent RPCs may not hit the same partition as + * this call. + * + * Generated from protobuf field int64 backlog_count_hint = 7; + */ + protected $backlog_count_hint = 0; + /** + * The history for this workflow, which will either be complete or partial. Partial histories + * are sent to workers who have signaled that they are using a sticky queue when completing + * a workflow task. + * + * Generated from protobuf field .temporal.api.history.v1.History history = 8; + */ + protected $history = null; + /** + * Will be set if there are more history events than were included in this response. Such events + * should be fetched via `GetWorkflowExecutionHistory`. + * + * Generated from protobuf field bytes next_page_token = 9; + */ + protected $next_page_token = ''; + /** + * Legacy queries appear in this field. The query must be responded to via + * `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on + * closed workflows) then the `history` field will be populated with the entire history. It + * may also be populated if this task originates on a non-sticky queue. + * + * Generated from protobuf field .temporal.api.query.v1.WorkflowQuery query = 10; + */ + protected $query = null; + /** + * The task queue this task originated from, which will always be the original non-sticky name + * for the queue, even if this response came from polling a sticky queue. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue workflow_execution_task_queue = 11; + */ + protected $workflow_execution_task_queue = null; + /** + * When this task was scheduled by the server + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 12; + */ + protected $scheduled_time = null; + /** + * When the current workflow task started event was generated, meaning the current attempt. + * + * Generated from protobuf field .google.protobuf.Timestamp started_time = 13; + */ + protected $started_time = null; + /** + * Queries that should be executed after applying the history in this task. Responses should be + * attached to `RespondWorkflowTaskCompletedRequest::query_results` + * + * Generated from protobuf field map queries = 14; + */ + private $queries; + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 15; + */ + private $messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * A unique identifier for this task + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type int|string $previous_started_event_id + * The last workflow task started event which was processed by some worker for this execution. + * Will be zero if no task has ever started. + * @type int|string $started_event_id + * The id of the most recent workflow task started event, which will have been generated as a + * result of this poll request being served. Will be zero if the task + * does not contain any events which would advance history (no new WFT started). + * Currently this can happen for queries. + * @type int $attempt + * Starting at 1, the number of attempts to complete this task by any worker. + * @type int|string $backlog_count_hint + * A hint that there are more tasks already present in this task queue + * partition. Can be used to prioritize draining a sticky queue. + * Specifically, the returned number is the number of tasks remaining in + * the in-memory buffer for this partition, which is currently capped at + * 1000. Because sticky queues only have one partition, this number is + * more useful when draining them. Normal queues, typically having more than one + * partition, will return a number representing only some portion of the + * overall backlog. Subsequent RPCs may not hit the same partition as + * this call. + * @type \Temporal\Api\History\V1\History $history + * The history for this workflow, which will either be complete or partial. Partial histories + * are sent to workers who have signaled that they are using a sticky queue when completing + * a workflow task. + * @type string $next_page_token + * Will be set if there are more history events than were included in this response. Such events + * should be fetched via `GetWorkflowExecutionHistory`. + * @type \Temporal\Api\Query\V1\WorkflowQuery $query + * Legacy queries appear in this field. The query must be responded to via + * `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on + * closed workflows) then the `history` field will be populated with the entire history. It + * may also be populated if this task originates on a non-sticky queue. + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $workflow_execution_task_queue + * The task queue this task originated from, which will always be the original non-sticky name + * for the queue, even if this response came from polling a sticky queue. + * @type \Google\Protobuf\Timestamp $scheduled_time + * When this task was scheduled by the server + * @type \Google\Protobuf\Timestamp $started_time + * When the current workflow task started event was generated, meaning the current attempt. + * @type array|\Google\Protobuf\Internal\MapField $queries + * Queries that should be executed after applying the history in this task. Responses should be + * attached to `RespondWorkflowTaskCompletedRequest::query_results` + * @type array<\Temporal\Api\Protocol\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * Protocol messages piggybacking on a WFT as a transport + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * A unique identifier for this task + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * A unique identifier for this task + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * The last workflow task started event which was processed by some worker for this execution. + * Will be zero if no task has ever started. + * + * Generated from protobuf field int64 previous_started_event_id = 4; + * @return int|string + */ + public function getPreviousStartedEventId() + { + return $this->previous_started_event_id; + } + + /** + * The last workflow task started event which was processed by some worker for this execution. + * Will be zero if no task has ever started. + * + * Generated from protobuf field int64 previous_started_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setPreviousStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->previous_started_event_id = $var; + + return $this; + } + + /** + * The id of the most recent workflow task started event, which will have been generated as a + * result of this poll request being served. Will be zero if the task + * does not contain any events which would advance history (no new WFT started). + * Currently this can happen for queries. + * + * Generated from protobuf field int64 started_event_id = 5; + * @return int|string + */ + public function getStartedEventId() + { + return $this->started_event_id; + } + + /** + * The id of the most recent workflow task started event, which will have been generated as a + * result of this poll request being served. Will be zero if the task + * does not contain any events which would advance history (no new WFT started). + * Currently this can happen for queries. + * + * Generated from protobuf field int64 started_event_id = 5; + * @param int|string $var + * @return $this + */ + public function setStartedEventId($var) + { + GPBUtil::checkInt64($var); + $this->started_event_id = $var; + + return $this; + } + + /** + * Starting at 1, the number of attempts to complete this task by any worker. + * + * Generated from protobuf field int32 attempt = 6; + * @return int + */ + public function getAttempt() + { + return $this->attempt; + } + + /** + * Starting at 1, the number of attempts to complete this task by any worker. + * + * Generated from protobuf field int32 attempt = 6; + * @param int $var + * @return $this + */ + public function setAttempt($var) + { + GPBUtil::checkInt32($var); + $this->attempt = $var; + + return $this; + } + + /** + * A hint that there are more tasks already present in this task queue + * partition. Can be used to prioritize draining a sticky queue. + * Specifically, the returned number is the number of tasks remaining in + * the in-memory buffer for this partition, which is currently capped at + * 1000. Because sticky queues only have one partition, this number is + * more useful when draining them. Normal queues, typically having more than one + * partition, will return a number representing only some portion of the + * overall backlog. Subsequent RPCs may not hit the same partition as + * this call. + * + * Generated from protobuf field int64 backlog_count_hint = 7; + * @return int|string + */ + public function getBacklogCountHint() + { + return $this->backlog_count_hint; + } + + /** + * A hint that there are more tasks already present in this task queue + * partition. Can be used to prioritize draining a sticky queue. + * Specifically, the returned number is the number of tasks remaining in + * the in-memory buffer for this partition, which is currently capped at + * 1000. Because sticky queues only have one partition, this number is + * more useful when draining them. Normal queues, typically having more than one + * partition, will return a number representing only some portion of the + * overall backlog. Subsequent RPCs may not hit the same partition as + * this call. + * + * Generated from protobuf field int64 backlog_count_hint = 7; + * @param int|string $var + * @return $this + */ + public function setBacklogCountHint($var) + { + GPBUtil::checkInt64($var); + $this->backlog_count_hint = $var; + + return $this; + } + + /** + * The history for this workflow, which will either be complete or partial. Partial histories + * are sent to workers who have signaled that they are using a sticky queue when completing + * a workflow task. + * + * Generated from protobuf field .temporal.api.history.v1.History history = 8; + * @return \Temporal\Api\History\V1\History|null + */ + public function getHistory() + { + return $this->history; + } + + public function hasHistory() + { + return isset($this->history); + } + + public function clearHistory() + { + unset($this->history); + } + + /** + * The history for this workflow, which will either be complete or partial. Partial histories + * are sent to workers who have signaled that they are using a sticky queue when completing + * a workflow task. + * + * Generated from protobuf field .temporal.api.history.v1.History history = 8; + * @param \Temporal\Api\History\V1\History $var + * @return $this + */ + public function setHistory($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\History\V1\History::class); + $this->history = $var; + + return $this; + } + + /** + * Will be set if there are more history events than were included in this response. Such events + * should be fetched via `GetWorkflowExecutionHistory`. + * + * Generated from protobuf field bytes next_page_token = 9; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Will be set if there are more history events than were included in this response. Such events + * should be fetched via `GetWorkflowExecutionHistory`. + * + * Generated from protobuf field bytes next_page_token = 9; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Legacy queries appear in this field. The query must be responded to via + * `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on + * closed workflows) then the `history` field will be populated with the entire history. It + * may also be populated if this task originates on a non-sticky queue. + * + * Generated from protobuf field .temporal.api.query.v1.WorkflowQuery query = 10; + * @return \Temporal\Api\Query\V1\WorkflowQuery|null + */ + public function getQuery() + { + return $this->query; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * Legacy queries appear in this field. The query must be responded to via + * `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on + * closed workflows) then the `history` field will be populated with the entire history. It + * may also be populated if this task originates on a non-sticky queue. + * + * Generated from protobuf field .temporal.api.query.v1.WorkflowQuery query = 10; + * @param \Temporal\Api\Query\V1\WorkflowQuery $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Query\V1\WorkflowQuery::class); + $this->query = $var; + + return $this; + } + + /** + * The task queue this task originated from, which will always be the original non-sticky name + * for the queue, even if this response came from polling a sticky queue. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue workflow_execution_task_queue = 11; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getWorkflowExecutionTaskQueue() + { + return $this->workflow_execution_task_queue; + } + + public function hasWorkflowExecutionTaskQueue() + { + return isset($this->workflow_execution_task_queue); + } + + public function clearWorkflowExecutionTaskQueue() + { + unset($this->workflow_execution_task_queue); + } + + /** + * The task queue this task originated from, which will always be the original non-sticky name + * for the queue, even if this response came from polling a sticky queue. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue workflow_execution_task_queue = 11; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setWorkflowExecutionTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->workflow_execution_task_queue = $var; + + return $this; + } + + /** + * When this task was scheduled by the server + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 12; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledTime() + { + return $this->scheduled_time; + } + + public function hasScheduledTime() + { + return isset($this->scheduled_time); + } + + public function clearScheduledTime() + { + unset($this->scheduled_time); + } + + /** + * When this task was scheduled by the server + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_time = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_time = $var; + + return $this; + } + + /** + * When the current workflow task started event was generated, meaning the current attempt. + * + * Generated from protobuf field .google.protobuf.Timestamp started_time = 13; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartedTime() + { + return $this->started_time; + } + + public function hasStartedTime() + { + return isset($this->started_time); + } + + public function clearStartedTime() + { + unset($this->started_time); + } + + /** + * When the current workflow task started event was generated, meaning the current attempt. + * + * Generated from protobuf field .google.protobuf.Timestamp started_time = 13; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->started_time = $var; + + return $this; + } + + /** + * Queries that should be executed after applying the history in this task. Responses should be + * attached to `RespondWorkflowTaskCompletedRequest::query_results` + * + * Generated from protobuf field map queries = 14; + * @return \Google\Protobuf\Internal\MapField + */ + public function getQueries() + { + return $this->queries; + } + + /** + * Queries that should be executed after applying the history in this task. Responses should be + * attached to `RespondWorkflowTaskCompletedRequest::query_results` + * + * Generated from protobuf field map queries = 14; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setQueries($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Query\V1\WorkflowQuery::class); + $this->queries = $arr; + + return $this; + } + + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 15; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 15; + * @param array<\Temporal\Api\Protocol\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Protocol\V1\Message::class); + $this->messages = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/QueryWorkflowRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/QueryWorkflowRequest.php new file mode 100644 index 0000000..c1c73b9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/QueryWorkflowRequest.php @@ -0,0 +1,171 @@ +temporal.api.workflowservice.v1.QueryWorkflowRequest + */ +class QueryWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + */ + protected $execution = null; + /** + * Generated from protobuf field .temporal.api.query.v1.WorkflowQuery query = 3; + */ + protected $query = null; + /** + * QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. + * Default: QUERY_REJECT_CONDITION_NONE. + * + * Generated from protobuf field .temporal.api.enums.v1.QueryRejectCondition query_reject_condition = 4; + */ + protected $query_reject_condition = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $execution + * @type \Temporal\Api\Query\V1\WorkflowQuery $query + * @type int $query_reject_condition + * QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. + * Default: QUERY_REJECT_CONDITION_NONE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->execution = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.query.v1.WorkflowQuery query = 3; + * @return \Temporal\Api\Query\V1\WorkflowQuery|null + */ + public function getQuery() + { + return $this->query; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * Generated from protobuf field .temporal.api.query.v1.WorkflowQuery query = 3; + * @param \Temporal\Api\Query\V1\WorkflowQuery $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Query\V1\WorkflowQuery::class); + $this->query = $var; + + return $this; + } + + /** + * QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. + * Default: QUERY_REJECT_CONDITION_NONE. + * + * Generated from protobuf field .temporal.api.enums.v1.QueryRejectCondition query_reject_condition = 4; + * @return int + */ + public function getQueryRejectCondition() + { + return $this->query_reject_condition; + } + + /** + * QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. + * Default: QUERY_REJECT_CONDITION_NONE. + * + * Generated from protobuf field .temporal.api.enums.v1.QueryRejectCondition query_reject_condition = 4; + * @param int $var + * @return $this + */ + public function setQueryRejectCondition($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\QueryRejectCondition::class); + $this->query_reject_condition = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/QueryWorkflowResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/QueryWorkflowResponse.php new file mode 100644 index 0000000..3a28d8c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/QueryWorkflowResponse.php @@ -0,0 +1,106 @@ +temporal.api.workflowservice.v1.QueryWorkflowResponse + */ +class QueryWorkflowResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads query_result = 1; + */ + protected $query_result = null; + /** + * Generated from protobuf field .temporal.api.query.v1.QueryRejected query_rejected = 2; + */ + protected $query_rejected = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Common\V1\Payloads $query_result + * @type \Temporal\Api\Query\V1\QueryRejected $query_rejected + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads query_result = 1; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getQueryResult() + { + return $this->query_result; + } + + public function hasQueryResult() + { + return isset($this->query_result); + } + + public function clearQueryResult() + { + unset($this->query_result); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads query_result = 1; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setQueryResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->query_result = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.query.v1.QueryRejected query_rejected = 2; + * @return \Temporal\Api\Query\V1\QueryRejected|null + */ + public function getQueryRejected() + { + return $this->query_rejected; + } + + public function hasQueryRejected() + { + return isset($this->query_rejected); + } + + public function clearQueryRejected() + { + unset($this->query_rejected); + } + + /** + * Generated from protobuf field .temporal.api.query.v1.QueryRejected query_rejected = 2; + * @param \Temporal\Api\Query\V1\QueryRejected $var + * @return $this + */ + public function setQueryRejected($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Query\V1\QueryRejected::class); + $this->query_rejected = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatByIdRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatByIdRequest.php new file mode 100644 index 0000000..ec317aa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatByIdRequest.php @@ -0,0 +1,246 @@ +temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest + */ +class RecordActivityTaskHeartbeatByIdRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + */ + protected $run_id = ''; + /** + * Id of the activity we're heartbeating + * + * Generated from protobuf field string activity_id = 4; + */ + protected $activity_id = ''; + /** + * Arbitrary data, of which the most recent call is kept, to store for this activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 5; + */ + protected $details = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the workflow which scheduled this activity + * @type string $workflow_id + * Id of the workflow which scheduled this activity + * @type string $run_id + * Run Id of the workflow which scheduled this activity + * @type string $activity_id + * Id of the activity we're heartbeating + * @type \Temporal\Api\Common\V1\Payloads $details + * Arbitrary data, of which the most recent call is kept, to store for this activity + * @type string $identity + * The identity of the worker/client + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * Id of the activity we're heartbeating + * + * Generated from protobuf field string activity_id = 4; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * Id of the activity we're heartbeating + * + * Generated from protobuf field string activity_id = 4; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Arbitrary data, of which the most recent call is kept, to store for this activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Arbitrary data, of which the most recent call is kept, to store for this activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatByIdResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatByIdResponse.php new file mode 100644 index 0000000..7089b70 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatByIdResponse.php @@ -0,0 +1,70 @@ +temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse + */ +class RecordActivityTaskHeartbeatByIdResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * + * Generated from protobuf field bool cancel_requested = 1; + */ + protected $cancel_requested = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $cancel_requested + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * + * Generated from protobuf field bool cancel_requested = 1; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * + * Generated from protobuf field bool cancel_requested = 1; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatRequest.php new file mode 100644 index 0000000..c0d26b0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatRequest.php @@ -0,0 +1,171 @@ +temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest + */ +class RecordActivityTaskHeartbeatRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * Arbitrary data, of which the most recent call is kept, to store for this activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + */ + protected $details = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Generated from protobuf field string namespace = 4; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * The task token as received in `PollActivityTaskQueueResponse` + * @type \Temporal\Api\Common\V1\Payloads $details + * Arbitrary data, of which the most recent call is kept, to store for this activity + * @type string $identity + * The identity of the worker/client + * @type string $namespace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Arbitrary data, of which the most recent call is kept, to store for this activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Arbitrary data, of which the most recent call is kept, to store for this activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 4; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 4; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatResponse.php new file mode 100644 index 0000000..8ed77f1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RecordActivityTaskHeartbeatResponse.php @@ -0,0 +1,70 @@ +temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse + */ +class RecordActivityTaskHeartbeatResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * + * Generated from protobuf field bool cancel_requested = 1; + */ + protected $cancel_requested = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $cancel_requested + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * + * Generated from protobuf field bool cancel_requested = 1; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * Will be set to true if the activity has been asked to cancel itself. The SDK should then + * notify the activity of cancellation if it is still running. + * + * Generated from protobuf field bool cancel_requested = 1; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RegisterNamespaceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RegisterNamespaceRequest.php new file mode 100644 index 0000000..7799112 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RegisterNamespaceRequest.php @@ -0,0 +1,414 @@ +temporal.api.workflowservice.v1.RegisterNamespaceRequest + */ +class RegisterNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Generated from protobuf field string owner_email = 3; + */ + protected $owner_email = ''; + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_retention_period = 4; + */ + protected $workflow_execution_retention_period = null; + /** + * Generated from protobuf field repeated .temporal.api.replication.v1.ClusterReplicationConfig clusters = 5; + */ + private $clusters; + /** + * Generated from protobuf field string active_cluster_name = 6; + */ + protected $active_cluster_name = ''; + /** + * A key-value map for any customized purpose. + * + * Generated from protobuf field map data = 7; + */ + private $data; + /** + * Generated from protobuf field string security_token = 8; + */ + protected $security_token = ''; + /** + * Generated from protobuf field bool is_global_namespace = 9; + */ + protected $is_global_namespace = false; + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState history_archival_state = 10; + */ + protected $history_archival_state = 0; + /** + * Generated from protobuf field string history_archival_uri = 11; + */ + protected $history_archival_uri = ''; + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState visibility_archival_state = 12; + */ + protected $visibility_archival_state = 0; + /** + * Generated from protobuf field string visibility_archival_uri = 13; + */ + protected $visibility_archival_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $description + * @type string $owner_email + * @type \Google\Protobuf\Duration $workflow_execution_retention_period + * @type array<\Temporal\Api\Replication\V1\ClusterReplicationConfig>|\Google\Protobuf\Internal\RepeatedField $clusters + * @type string $active_cluster_name + * @type array|\Google\Protobuf\Internal\MapField $data + * A key-value map for any customized purpose. + * @type string $security_token + * @type bool $is_global_namespace + * @type int $history_archival_state + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * @type string $history_archival_uri + * @type int $visibility_archival_state + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * @type string $visibility_archival_uri + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * 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; + } + + /** + * Generated from protobuf field string owner_email = 3; + * @return string + */ + public function getOwnerEmail() + { + return $this->owner_email; + } + + /** + * Generated from protobuf field string owner_email = 3; + * @param string $var + * @return $this + */ + public function setOwnerEmail($var) + { + GPBUtil::checkString($var, True); + $this->owner_email = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_retention_period = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionRetentionPeriod() + { + return $this->workflow_execution_retention_period; + } + + public function hasWorkflowExecutionRetentionPeriod() + { + return isset($this->workflow_execution_retention_period); + } + + public function clearWorkflowExecutionRetentionPeriod() + { + unset($this->workflow_execution_retention_period); + } + + /** + * Generated from protobuf field .google.protobuf.Duration workflow_execution_retention_period = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionRetentionPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_retention_period = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.replication.v1.ClusterReplicationConfig clusters = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * Generated from protobuf field repeated .temporal.api.replication.v1.ClusterReplicationConfig clusters = 5; + * @param array<\Temporal\Api\Replication\V1\ClusterReplicationConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Replication\V1\ClusterReplicationConfig::class); + $this->clusters = $arr; + + return $this; + } + + /** + * Generated from protobuf field string active_cluster_name = 6; + * @return string + */ + public function getActiveClusterName() + { + return $this->active_cluster_name; + } + + /** + * Generated from protobuf field string active_cluster_name = 6; + * @param string $var + * @return $this + */ + public function setActiveClusterName($var) + { + GPBUtil::checkString($var, True); + $this->active_cluster_name = $var; + + return $this; + } + + /** + * A key-value map for any customized purpose. + * + * Generated from protobuf field map data = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getData() + { + return $this->data; + } + + /** + * A key-value map for any customized purpose. + * + * Generated from protobuf field map data = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setData($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->data = $arr; + + return $this; + } + + /** + * Generated from protobuf field string security_token = 8; + * @return string + */ + public function getSecurityToken() + { + return $this->security_token; + } + + /** + * Generated from protobuf field string security_token = 8; + * @param string $var + * @return $this + */ + public function setSecurityToken($var) + { + GPBUtil::checkString($var, True); + $this->security_token = $var; + + return $this; + } + + /** + * Generated from protobuf field bool is_global_namespace = 9; + * @return bool + */ + public function getIsGlobalNamespace() + { + return $this->is_global_namespace; + } + + /** + * Generated from protobuf field bool is_global_namespace = 9; + * @param bool $var + * @return $this + */ + public function setIsGlobalNamespace($var) + { + GPBUtil::checkBool($var); + $this->is_global_namespace = $var; + + return $this; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState history_archival_state = 10; + * @return int + */ + public function getHistoryArchivalState() + { + return $this->history_archival_state; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState history_archival_state = 10; + * @param int $var + * @return $this + */ + public function setHistoryArchivalState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ArchivalState::class); + $this->history_archival_state = $var; + + return $this; + } + + /** + * Generated from protobuf field string history_archival_uri = 11; + * @return string + */ + public function getHistoryArchivalUri() + { + return $this->history_archival_uri; + } + + /** + * Generated from protobuf field string history_archival_uri = 11; + * @param string $var + * @return $this + */ + public function setHistoryArchivalUri($var) + { + GPBUtil::checkString($var, True); + $this->history_archival_uri = $var; + + return $this; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState visibility_archival_state = 12; + * @return int + */ + public function getVisibilityArchivalState() + { + return $this->visibility_archival_state; + } + + /** + * If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. + * + * Generated from protobuf field .temporal.api.enums.v1.ArchivalState visibility_archival_state = 12; + * @param int $var + * @return $this + */ + public function setVisibilityArchivalState($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ArchivalState::class); + $this->visibility_archival_state = $var; + + return $this; + } + + /** + * Generated from protobuf field string visibility_archival_uri = 13; + * @return string + */ + public function getVisibilityArchivalUri() + { + return $this->visibility_archival_uri; + } + + /** + * Generated from protobuf field string visibility_archival_uri = 13; + * @param string $var + * @return $this + */ + public function setVisibilityArchivalUri($var) + { + GPBUtil::checkString($var, True); + $this->visibility_archival_uri = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RegisterNamespaceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RegisterNamespaceResponse.php new file mode 100644 index 0000000..a6a57c8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RegisterNamespaceResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RegisterNamespaceResponse + */ +class RegisterNamespaceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RequestCancelWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RequestCancelWorkflowExecutionRequest.php new file mode 100644 index 0000000..6c1cb39 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RequestCancelWorkflowExecutionRequest.php @@ -0,0 +1,240 @@ +temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest + */ +class RequestCancelWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Used to de-dupe cancellation requests + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 5; + */ + protected $first_execution_run_id = ''; + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $identity + * The identity of the worker/client + * @type string $request_id + * Used to de-dupe cancellation requests + * @type string $first_execution_run_id + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * @type string $reason + * Reason for requesting the cancellation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Used to de-dupe cancellation requests + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Used to de-dupe cancellation requests + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 5; + * @return string + */ + public function getFirstExecutionRunId() + { + return $this->first_execution_run_id; + } + + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 5; + * @param string $var + * @return $this + */ + public function setFirstExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->first_execution_run_id = $var; + + return $this; + } + + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Reason for requesting the cancellation + * + * Generated from protobuf field string reason = 6; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RequestCancelWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RequestCancelWorkflowExecutionResponse.php new file mode 100644 index 0000000..cb382b5 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RequestCancelWorkflowExecutionResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse + */ +class RequestCancelWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetStickyTaskQueueRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetStickyTaskQueueRequest.php new file mode 100644 index 0000000..e997f48 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetStickyTaskQueueRequest.php @@ -0,0 +1,96 @@ +temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest + */ +class ResetStickyTaskQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + */ + protected $execution = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $execution + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->execution = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetStickyTaskQueueResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetStickyTaskQueueResponse.php new file mode 100644 index 0000000..341ad0d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetStickyTaskQueueResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse + */ +class ResetStickyTaskQueueResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetWorkflowExecutionRequest.php new file mode 100644 index 0000000..8ed23e8 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetWorkflowExecutionRequest.php @@ -0,0 +1,267 @@ +temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest + */ +class ResetWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field string reason = 3; + */ + protected $reason = ''; + /** + * The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or + * `WORKFLOW_TASK_STARTED` event to reset to. + * + * Generated from protobuf field int64 workflow_task_finish_event_id = 4; + */ + protected $workflow_task_finish_event_id = 0; + /** + * Used to de-dupe reset requests + * + * Generated from protobuf field string request_id = 5; + */ + protected $request_id = ''; + /** + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6; + */ + protected $reset_reapply_type = 0; + /** + * Event types not to be reapplied + * + * Generated from protobuf field repeated .temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7; + */ + private $reset_reapply_exclude_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $reason + * @type int|string $workflow_task_finish_event_id + * The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or + * `WORKFLOW_TASK_STARTED` event to reset to. + * @type string $request_id + * Used to de-dupe reset requests + * @type int $reset_reapply_type + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * @type array|\Google\Protobuf\Internal\RepeatedField $reset_reapply_exclude_types + * Event types not to be reapplied + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field string reason = 3; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Generated from protobuf field string reason = 3; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or + * `WORKFLOW_TASK_STARTED` event to reset to. + * + * Generated from protobuf field int64 workflow_task_finish_event_id = 4; + * @return int|string + */ + public function getWorkflowTaskFinishEventId() + { + return $this->workflow_task_finish_event_id; + } + + /** + * The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or + * `WORKFLOW_TASK_STARTED` event to reset to. + * + * Generated from protobuf field int64 workflow_task_finish_event_id = 4; + * @param int|string $var + * @return $this + */ + public function setWorkflowTaskFinishEventId($var) + { + GPBUtil::checkInt64($var); + $this->workflow_task_finish_event_id = $var; + + return $this; + } + + /** + * Used to de-dupe reset requests + * + * Generated from protobuf field string request_id = 5; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Used to de-dupe reset requests + * + * Generated from protobuf field string request_id = 5; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6; + * @return int + */ + public function getResetReapplyType() + { + return $this->reset_reapply_type; + } + + /** + * Event types to be reapplied (deprecated) + * Default: RESET_REAPPLY_TYPE_SIGNAL + * + * Generated from protobuf field .temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6; + * @param int $var + * @return $this + */ + public function setResetReapplyType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ResetReapplyType::class); + $this->reset_reapply_type = $var; + + return $this; + } + + /** + * Event types not to be reapplied + * + * Generated from protobuf field repeated .temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResetReapplyExcludeTypes() + { + return $this->reset_reapply_exclude_types; + } + + /** + * Event types not to be reapplied + * + * Generated from protobuf field repeated .temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResetReapplyExcludeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\ResetReapplyExcludeType::class); + $this->reset_reapply_exclude_types = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetWorkflowExecutionResponse.php new file mode 100644 index 0000000..5dc21f2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ResetWorkflowExecutionResponse.php @@ -0,0 +1,59 @@ +temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse + */ +class ResetWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string run_id = 1; + */ + protected $run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $run_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string run_id = 1; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Generated from protobuf field string run_id = 1; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledByIdRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledByIdRequest.php new file mode 100644 index 0000000..74aa595 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledByIdRequest.php @@ -0,0 +1,246 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest + */ +class RespondActivityTaskCanceledByIdRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + */ + protected $run_id = ''; + /** + * Id of the activity to confirm is cancelled + * + * Generated from protobuf field string activity_id = 4; + */ + protected $activity_id = ''; + /** + * Serialized additional information to attach to the cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 5; + */ + protected $details = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the workflow which scheduled this activity + * @type string $workflow_id + * Id of the workflow which scheduled this activity + * @type string $run_id + * Run Id of the workflow which scheduled this activity + * @type string $activity_id + * Id of the activity to confirm is cancelled + * @type \Temporal\Api\Common\V1\Payloads $details + * Serialized additional information to attach to the cancellation + * @type string $identity + * The identity of the worker/client + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * Id of the activity to confirm is cancelled + * + * Generated from protobuf field string activity_id = 4; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * Id of the activity to confirm is cancelled + * + * Generated from protobuf field string activity_id = 4; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Serialized additional information to attach to the cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Serialized additional information to attach to the cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledByIdResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledByIdResponse.php new file mode 100644 index 0000000..b6416d4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledByIdResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse + */ +class RespondActivityTaskCanceledByIdResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledRequest.php new file mode 100644 index 0000000..8fbe39f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledRequest.php @@ -0,0 +1,223 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest + */ +class RespondActivityTaskCanceledRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * Serialized additional information to attach to the cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + */ + protected $details = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Generated from protobuf field string namespace = 4; + */ + protected $namespace = ''; + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * The task token as received in `PollActivityTaskQueueResponse` + * @type \Temporal\Api\Common\V1\Payloads $details + * Serialized additional information to attach to the cancellation + * @type string $identity + * The identity of the worker/client + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Serialized additional information to attach to the cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Serialized additional information to attach to the cancellation + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 4; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 4; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledResponse.php new file mode 100644 index 0000000..571d80e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCanceledResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse + */ +class RespondActivityTaskCanceledResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedByIdRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedByIdRequest.php new file mode 100644 index 0000000..2c32a24 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedByIdRequest.php @@ -0,0 +1,246 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest + */ +class RespondActivityTaskCompletedByIdRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + */ + protected $run_id = ''; + /** + * Id of the activity to complete + * + * Generated from protobuf field string activity_id = 4; + */ + protected $activity_id = ''; + /** + * The serialized result of activity execution + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 5; + */ + protected $result = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the workflow which scheduled this activity + * @type string $workflow_id + * Id of the workflow which scheduled this activity + * @type string $run_id + * Run Id of the workflow which scheduled this activity + * @type string $activity_id + * Id of the activity to complete + * @type \Temporal\Api\Common\V1\Payloads $result + * The serialized result of activity execution + * @type string $identity + * The identity of the worker/client + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * Id of the activity to complete + * + * Generated from protobuf field string activity_id = 4; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * Id of the activity to complete + * + * Generated from protobuf field string activity_id = 4; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * The serialized result of activity execution + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * The serialized result of activity execution + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->result = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedByIdResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedByIdResponse.php new file mode 100644 index 0000000..680555d --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedByIdResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse + */ +class RespondActivityTaskCompletedByIdResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedRequest.php new file mode 100644 index 0000000..8c562e4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedRequest.php @@ -0,0 +1,223 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest + */ +class RespondActivityTaskCompletedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * The result of successfully executing the activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 2; + */ + protected $result = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Generated from protobuf field string namespace = 4; + */ + protected $namespace = ''; + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * The task token as received in `PollActivityTaskQueueResponse` + * @type \Temporal\Api\Common\V1\Payloads $result + * The result of successfully executing the activity + * @type string $identity + * The identity of the worker/client + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * The result of successfully executing the activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 2; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * The result of successfully executing the activity + * + * Generated from protobuf field .temporal.api.common.v1.Payloads result = 2; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->result = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 4; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 4; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedResponse.php new file mode 100644 index 0000000..5360887 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskCompletedResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse + */ +class RespondActivityTaskCompletedResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedByIdRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedByIdRequest.php new file mode 100644 index 0000000..a5aebcc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedByIdRequest.php @@ -0,0 +1,290 @@ +temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest + */ +class RespondActivityTaskFailedByIdRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + */ + protected $run_id = ''; + /** + * Id of the activity to fail + * + * Generated from protobuf field string activity_id = 4; + */ + protected $activity_id = ''; + /** + * Detailed failure information + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + */ + protected $failure = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + */ + protected $identity = ''; + /** + * Additional details to be stored as last activity heartbeat + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 7; + */ + protected $last_heartbeat_details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace of the workflow which scheduled this activity + * @type string $workflow_id + * Id of the workflow which scheduled this activity + * @type string $run_id + * Run Id of the workflow which scheduled this activity + * @type string $activity_id + * Id of the activity to fail + * @type \Temporal\Api\Failure\V1\Failure $failure + * Detailed failure information + * @type string $identity + * The identity of the worker/client + * @type \Temporal\Api\Common\V1\Payloads $last_heartbeat_details + * Additional details to be stored as last activity heartbeat + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace of the workflow which scheduled this activity + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Id of the workflow which scheduled this activity + * + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * Run Id of the workflow which scheduled this activity + * + * Generated from protobuf field string run_id = 3; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * Id of the activity to fail + * + * Generated from protobuf field string activity_id = 4; + * @return string + */ + public function getActivityId() + { + return $this->activity_id; + } + + /** + * Id of the activity to fail + * + * Generated from protobuf field string activity_id = 4; + * @param string $var + * @return $this + */ + public function setActivityId($var) + { + GPBUtil::checkString($var, True); + $this->activity_id = $var; + + return $this; + } + + /** + * Detailed failure information + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Detailed failure information + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 5; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 6; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Additional details to be stored as last activity heartbeat + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 7; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastHeartbeatDetails() + { + return $this->last_heartbeat_details; + } + + public function hasLastHeartbeatDetails() + { + return isset($this->last_heartbeat_details); + } + + public function clearLastHeartbeatDetails() + { + unset($this->last_heartbeat_details); + } + + /** + * Additional details to be stored as last activity heartbeat + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 7; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastHeartbeatDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_heartbeat_details = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedByIdResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedByIdResponse.php new file mode 100644 index 0000000..8ff22a6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedByIdResponse.php @@ -0,0 +1,70 @@ +temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse + */ +class RespondActivityTaskFailedByIdResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * + * Generated from protobuf field repeated .temporal.api.failure.v1.Failure failures = 1; + */ + private $failures; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Failure\V1\Failure>|\Google\Protobuf\Internal\RepeatedField $failures + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * + * Generated from protobuf field repeated .temporal.api.failure.v1.Failure failures = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFailures() + { + return $this->failures; + } + + /** + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * + * Generated from protobuf field repeated .temporal.api.failure.v1.Failure failures = 1; + * @param array<\Temporal\Api\Failure\V1\Failure>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFailures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Failure\V1\Failure::class); + $this->failures = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedRequest.php new file mode 100644 index 0000000..1617772 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedRequest.php @@ -0,0 +1,267 @@ +temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest + */ +class RespondActivityTaskFailedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * Detailed failure information + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + */ + protected $failure = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * Generated from protobuf field string namespace = 4; + */ + protected $namespace = ''; + /** + * Additional details to be stored as last activity heartbeat + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 5; + */ + protected $last_heartbeat_details = null; + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * The task token as received in `PollActivityTaskQueueResponse` + * @type \Temporal\Api\Failure\V1\Failure $failure + * Detailed failure information + * @type string $identity + * The identity of the worker/client + * @type string $namespace + * @type \Temporal\Api\Common\V1\Payloads $last_heartbeat_details + * Additional details to be stored as last activity heartbeat + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * The task token as received in `PollActivityTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Detailed failure information + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Detailed failure information + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 2; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 4; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 4; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Additional details to be stored as last activity heartbeat + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastHeartbeatDetails() + { + return $this->last_heartbeat_details; + } + + public function hasLastHeartbeatDetails() + { + return isset($this->last_heartbeat_details); + } + + public function clearLastHeartbeatDetails() + { + unset($this->last_heartbeat_details); + } + + /** + * Additional details to be stored as last activity heartbeat + * + * Generated from protobuf field .temporal.api.common.v1.Payloads last_heartbeat_details = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastHeartbeatDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_heartbeat_details = $var; + + return $this; + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedResponse.php new file mode 100644 index 0000000..fff4676 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondActivityTaskFailedResponse.php @@ -0,0 +1,70 @@ +temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse + */ +class RespondActivityTaskFailedResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * + * Generated from protobuf field repeated .temporal.api.failure.v1.Failure failures = 1; + */ + private $failures; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Failure\V1\Failure>|\Google\Protobuf\Internal\RepeatedField $failures + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * + * Generated from protobuf field repeated .temporal.api.failure.v1.Failure failures = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFailures() + { + return $this->failures; + } + + /** + * Server validation failures could include + * last_heartbeat_details payload is too large, request failure is too large + * + * Generated from protobuf field repeated .temporal.api.failure.v1.Failure failures = 1; + * @param array<\Temporal\Api\Failure\V1\Failure>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFailures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Failure\V1\Failure::class); + $this->failures = $arr; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskCompletedRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskCompletedRequest.php new file mode 100644 index 0000000..b4fbd7f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskCompletedRequest.php @@ -0,0 +1,171 @@ +temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest + */ +class RespondNexusTaskCompletedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + /** + * A unique identifier for this task as received via a poll response. + * + * Generated from protobuf field bytes task_token = 3; + */ + protected $task_token = ''; + /** + * Embedded response to be translated into a frontend response. + * + * Generated from protobuf field .temporal.api.nexus.v1.Response response = 4; + */ + protected $response = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $identity + * The identity of the client who initiated this request. + * @type string $task_token + * A unique identifier for this task as received via a poll response. + * @type \Temporal\Api\Nexus\V1\Response $response + * Embedded response to be translated into a frontend response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * A unique identifier for this task as received via a poll response. + * + * Generated from protobuf field bytes task_token = 3; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * A unique identifier for this task as received via a poll response. + * + * Generated from protobuf field bytes task_token = 3; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Embedded response to be translated into a frontend response. + * + * Generated from protobuf field .temporal.api.nexus.v1.Response response = 4; + * @return \Temporal\Api\Nexus\V1\Response|null + */ + public function getResponse() + { + return $this->response; + } + + public function hasResponse() + { + return isset($this->response); + } + + public function clearResponse() + { + unset($this->response); + } + + /** + * Embedded response to be translated into a frontend response. + * + * Generated from protobuf field .temporal.api.nexus.v1.Response response = 4; + * @param \Temporal\Api\Nexus\V1\Response $var + * @return $this + */ + public function setResponse($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Response::class); + $this->response = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskCompletedResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskCompletedResponse.php new file mode 100644 index 0000000..a7d19ac --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskCompletedResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse + */ +class RespondNexusTaskCompletedResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskFailedRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskFailedRequest.php new file mode 100644 index 0000000..43f7be7 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskFailedRequest.php @@ -0,0 +1,171 @@ +temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest + */ +class RespondNexusTaskFailedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + */ + protected $identity = ''; + /** + * A unique identifier for this task. + * + * Generated from protobuf field bytes task_token = 3; + */ + protected $task_token = ''; + /** + * The error the handler failed with. + * + * Generated from protobuf field .temporal.api.nexus.v1.HandlerError error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $identity + * The identity of the client who initiated this request. + * @type string $task_token + * A unique identifier for this task. + * @type \Temporal\Api\Nexus\V1\HandlerError $error + * The error the handler failed with. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 2; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * A unique identifier for this task. + * + * Generated from protobuf field bytes task_token = 3; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * A unique identifier for this task. + * + * Generated from protobuf field bytes task_token = 3; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * The error the handler failed with. + * + * Generated from protobuf field .temporal.api.nexus.v1.HandlerError error = 4; + * @return \Temporal\Api\Nexus\V1\HandlerError|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * The error the handler failed with. + * + * Generated from protobuf field .temporal.api.nexus.v1.HandlerError error = 4; + * @param \Temporal\Api\Nexus\V1\HandlerError $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\HandlerError::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskFailedResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskFailedResponse.php new file mode 100644 index 0000000..310357b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondNexusTaskFailedResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse + */ +class RespondNexusTaskFailedResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondQueryTaskCompletedRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondQueryTaskCompletedRequest.php new file mode 100644 index 0000000..6e69c92 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondQueryTaskCompletedRequest.php @@ -0,0 +1,177 @@ +temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest + */ +class RespondQueryTaskCompletedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * Generated from protobuf field .temporal.api.enums.v1.QueryResultType completed_type = 2; + */ + protected $completed_type = 0; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads query_result = 3; + */ + protected $query_result = null; + /** + * Generated from protobuf field string error_message = 4; + */ + protected $error_message = ''; + /** + * Generated from protobuf field string namespace = 6; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * @type int $completed_type + * @type \Temporal\Api\Common\V1\Payloads $query_result + * @type string $error_message + * @type string $namespace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.QueryResultType completed_type = 2; + * @return int + */ + public function getCompletedType() + { + return $this->completed_type; + } + + /** + * Generated from protobuf field .temporal.api.enums.v1.QueryResultType completed_type = 2; + * @param int $var + * @return $this + */ + public function setCompletedType($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\QueryResultType::class); + $this->completed_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads query_result = 3; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getQueryResult() + { + return $this->query_result; + } + + public function hasQueryResult() + { + return isset($this->query_result); + } + + public function clearQueryResult() + { + unset($this->query_result); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads query_result = 3; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setQueryResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->query_result = $var; + + return $this; + } + + /** + * Generated from protobuf field string error_message = 4; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Generated from protobuf field string error_message = 4; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 6; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 6; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondQueryTaskCompletedResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondQueryTaskCompletedResponse.php new file mode 100644 index 0000000..df26121 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondQueryTaskCompletedResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse + */ +class RespondQueryTaskCompletedResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedRequest.php new file mode 100644 index 0000000..c30d97b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedRequest.php @@ -0,0 +1,543 @@ +temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest + */ +class RespondWorkflowTaskCompletedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The task token as received in `PollWorkflowTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * A list of commands generated when driving the workflow code in response to the new task + * + * Generated from protobuf field repeated .temporal.api.command.v1.Command commands = 2; + */ + private $commands; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + */ + protected $identity = ''; + /** + * May be set by workers to indicate that the worker desires future tasks to be provided with + * incremental history on a sticky queue. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4; + */ + protected $sticky_attributes = null; + /** + * If set, the worker wishes to immediately receive the next workflow task as a response to + * this completion. This can save on polling round-trips. + * + * Generated from protobuf field bool return_new_workflow_task = 5; + */ + protected $return_new_workflow_task = false; + /** + * Can be used to *force* creation of a new workflow task, even if no commands have resolved or + * one would not otherwise have been generated. This is used when the worker knows it is doing + * something useful, but cannot complete it within the workflow task timeout. Local activities + * which run for longer than the task timeout being the prime example. + * + * Generated from protobuf field bool force_create_new_workflow_task = 6; + */ + protected $force_create_new_workflow_task = false; + /** + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * + * Generated from protobuf field string binary_checksum = 7; + */ + protected $binary_checksum = ''; + /** + * Responses to the `queries` field in the task being responded to + * + * Generated from protobuf field map query_results = 8; + */ + private $query_results; + /** + * Generated from protobuf field string namespace = 9; + */ + protected $namespace = ''; + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10; + */ + protected $worker_version_stamp = null; + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 11; + */ + private $messages; + /** + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 12; + */ + protected $sdk_metadata = null; + /** + * Local usage data collected for metering + * + * Generated from protobuf field .temporal.api.common.v1.MeteringMetadata metering_metadata = 13; + */ + protected $metering_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * The task token as received in `PollWorkflowTaskQueueResponse` + * @type array<\Temporal\Api\Command\V1\Command>|\Google\Protobuf\Internal\RepeatedField $commands + * A list of commands generated when driving the workflow code in response to the new task + * @type string $identity + * The identity of the worker/client + * @type \Temporal\Api\Taskqueue\V1\StickyExecutionAttributes $sticky_attributes + * May be set by workers to indicate that the worker desires future tasks to be provided with + * incremental history on a sticky queue. + * @type bool $return_new_workflow_task + * If set, the worker wishes to immediately receive the next workflow task as a response to + * this completion. This can save on polling round-trips. + * @type bool $force_create_new_workflow_task + * Can be used to *force* creation of a new workflow task, even if no commands have resolved or + * one would not otherwise have been generated. This is used when the worker knows it is doing + * something useful, but cannot complete it within the workflow task timeout. Local activities + * which run for longer than the task timeout being the prime example. + * @type string $binary_checksum + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * @type array|\Google\Protobuf\Internal\MapField $query_results + * Responses to the `queries` field in the task being responded to + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version_stamp + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * @type array<\Temporal\Api\Protocol\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * Protocol messages piggybacking on a WFT as a transport + * @type \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata $sdk_metadata + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * @type \Temporal\Api\Common\V1\MeteringMetadata $metering_metadata + * Local usage data collected for metering + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The task token as received in `PollWorkflowTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * The task token as received in `PollWorkflowTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * A list of commands generated when driving the workflow code in response to the new task + * + * Generated from protobuf field repeated .temporal.api.command.v1.Command commands = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCommands() + { + return $this->commands; + } + + /** + * A list of commands generated when driving the workflow code in response to the new task + * + * Generated from protobuf field repeated .temporal.api.command.v1.Command commands = 2; + * @param array<\Temporal\Api\Command\V1\Command>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCommands($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Command\V1\Command::class); + $this->commands = $arr; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 3; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * May be set by workers to indicate that the worker desires future tasks to be provided with + * incremental history on a sticky queue. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4; + * @return \Temporal\Api\Taskqueue\V1\StickyExecutionAttributes|null + */ + public function getStickyAttributes() + { + return $this->sticky_attributes; + } + + public function hasStickyAttributes() + { + return isset($this->sticky_attributes); + } + + public function clearStickyAttributes() + { + unset($this->sticky_attributes); + } + + /** + * May be set by workers to indicate that the worker desires future tasks to be provided with + * incremental history on a sticky queue. + * + * Generated from protobuf field .temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4; + * @param \Temporal\Api\Taskqueue\V1\StickyExecutionAttributes $var + * @return $this + */ + public function setStickyAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\StickyExecutionAttributes::class); + $this->sticky_attributes = $var; + + return $this; + } + + /** + * If set, the worker wishes to immediately receive the next workflow task as a response to + * this completion. This can save on polling round-trips. + * + * Generated from protobuf field bool return_new_workflow_task = 5; + * @return bool + */ + public function getReturnNewWorkflowTask() + { + return $this->return_new_workflow_task; + } + + /** + * If set, the worker wishes to immediately receive the next workflow task as a response to + * this completion. This can save on polling round-trips. + * + * Generated from protobuf field bool return_new_workflow_task = 5; + * @param bool $var + * @return $this + */ + public function setReturnNewWorkflowTask($var) + { + GPBUtil::checkBool($var); + $this->return_new_workflow_task = $var; + + return $this; + } + + /** + * Can be used to *force* creation of a new workflow task, even if no commands have resolved or + * one would not otherwise have been generated. This is used when the worker knows it is doing + * something useful, but cannot complete it within the workflow task timeout. Local activities + * which run for longer than the task timeout being the prime example. + * + * Generated from protobuf field bool force_create_new_workflow_task = 6; + * @return bool + */ + public function getForceCreateNewWorkflowTask() + { + return $this->force_create_new_workflow_task; + } + + /** + * Can be used to *force* creation of a new workflow task, even if no commands have resolved or + * one would not otherwise have been generated. This is used when the worker knows it is doing + * something useful, but cannot complete it within the workflow task timeout. Local activities + * which run for longer than the task timeout being the prime example. + * + * Generated from protobuf field bool force_create_new_workflow_task = 6; + * @param bool $var + * @return $this + */ + public function setForceCreateNewWorkflowTask($var) + { + GPBUtil::checkBool($var); + $this->force_create_new_workflow_task = $var; + + return $this; + } + + /** + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * + * Generated from protobuf field string binary_checksum = 7; + * @return string + */ + public function getBinaryChecksum() + { + return $this->binary_checksum; + } + + /** + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * + * Generated from protobuf field string binary_checksum = 7; + * @param string $var + * @return $this + */ + public function setBinaryChecksum($var) + { + GPBUtil::checkString($var, True); + $this->binary_checksum = $var; + + return $this; + } + + /** + * Responses to the `queries` field in the task being responded to + * + * Generated from protobuf field map query_results = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getQueryResults() + { + return $this->query_results; + } + + /** + * Responses to the `queries` field in the task being responded to + * + * Generated from protobuf field map query_results = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setQueryResults($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Query\V1\WorkflowQueryResult::class); + $this->query_results = $arr; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 9; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 9; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersionStamp() + { + return $this->worker_version_stamp; + } + + public function hasWorkerVersionStamp() + { + return isset($this->worker_version_stamp); + } + + public function clearWorkerVersionStamp() + { + unset($this->worker_version_stamp); + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersionStamp($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version_stamp = $var; + + return $this; + } + + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 11; + * @param array<\Temporal\Api\Protocol\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Protocol\V1\Message::class); + $this->messages = $arr; + + return $this; + } + + /** + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 12; + * @return \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata|null + */ + public function getSdkMetadata() + { + return $this->sdk_metadata; + } + + public function hasSdkMetadata() + { + return isset($this->sdk_metadata); + } + + public function clearSdkMetadata() + { + unset($this->sdk_metadata); + } + + /** + * Data the SDK wishes to record for itself, but server need not interpret, and does not + * directly impact workflow state. + * + * Generated from protobuf field .temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 12; + * @param \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata $var + * @return $this + */ + public function setSdkMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\WorkflowTaskCompletedMetadata::class); + $this->sdk_metadata = $var; + + return $this; + } + + /** + * Local usage data collected for metering + * + * Generated from protobuf field .temporal.api.common.v1.MeteringMetadata metering_metadata = 13; + * @return \Temporal\Api\Common\V1\MeteringMetadata|null + */ + public function getMeteringMetadata() + { + return $this->metering_metadata; + } + + public function hasMeteringMetadata() + { + return isset($this->metering_metadata); + } + + public function clearMeteringMetadata() + { + unset($this->metering_metadata); + } + + /** + * Local usage data collected for metering + * + * Generated from protobuf field .temporal.api.common.v1.MeteringMetadata metering_metadata = 13; + * @param \Temporal\Api\Common\V1\MeteringMetadata $var + * @return $this + */ + public function setMeteringMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\MeteringMetadata::class); + $this->metering_metadata = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedResponse.php new file mode 100644 index 0000000..a978e3c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskCompletedResponse.php @@ -0,0 +1,152 @@ +temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse + */ +class RespondWorkflowTaskCompletedResponse extends \Google\Protobuf\Internal\Message +{ + /** + * See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task` + * + * Generated from protobuf field .temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse workflow_task = 1; + */ + protected $workflow_task = null; + /** + * See `ScheduleActivityTaskCommandAttributes::request_start` + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.PollActivityTaskQueueResponse activity_tasks = 2; + */ + private $activity_tasks; + /** + * If non zero, indicates the server has discarded the workflow task that was being responded to. + * Will be the event ID of the last workflow task started event in the history before the new workflow task. + * Server is only expected to discard a workflow task if it could not have modified the workflow state. + * + * Generated from protobuf field int64 reset_history_event_id = 3; + */ + protected $reset_history_event_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse $workflow_task + * See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task` + * @type array<\Temporal\Api\Workflowservice\V1\PollActivityTaskQueueResponse>|\Google\Protobuf\Internal\RepeatedField $activity_tasks + * See `ScheduleActivityTaskCommandAttributes::request_start` + * @type int|string $reset_history_event_id + * If non zero, indicates the server has discarded the workflow task that was being responded to. + * Will be the event ID of the last workflow task started event in the history before the new workflow task. + * Server is only expected to discard a workflow task if it could not have modified the workflow state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task` + * + * Generated from protobuf field .temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse workflow_task = 1; + * @return \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse|null + */ + public function getWorkflowTask() + { + return $this->workflow_task; + } + + public function hasWorkflowTask() + { + return isset($this->workflow_task); + } + + public function clearWorkflowTask() + { + unset($this->workflow_task); + } + + /** + * See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task` + * + * Generated from protobuf field .temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse workflow_task = 1; + * @param \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse $var + * @return $this + */ + public function setWorkflowTask($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse::class); + $this->workflow_task = $var; + + return $this; + } + + /** + * See `ScheduleActivityTaskCommandAttributes::request_start` + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.PollActivityTaskQueueResponse activity_tasks = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActivityTasks() + { + return $this->activity_tasks; + } + + /** + * See `ScheduleActivityTaskCommandAttributes::request_start` + * + * Generated from protobuf field repeated .temporal.api.workflowservice.v1.PollActivityTaskQueueResponse activity_tasks = 2; + * @param array<\Temporal\Api\Workflowservice\V1\PollActivityTaskQueueResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActivityTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflowservice\V1\PollActivityTaskQueueResponse::class); + $this->activity_tasks = $arr; + + return $this; + } + + /** + * If non zero, indicates the server has discarded the workflow task that was being responded to. + * Will be the event ID of the last workflow task started event in the history before the new workflow task. + * Server is only expected to discard a workflow task if it could not have modified the workflow state. + * + * Generated from protobuf field int64 reset_history_event_id = 3; + * @return int|string + */ + public function getResetHistoryEventId() + { + return $this->reset_history_event_id; + } + + /** + * If non zero, indicates the server has discarded the workflow task that was being responded to. + * Will be the event ID of the last workflow task started event in the history before the new workflow task. + * Server is only expected to discard a workflow task if it could not have modified the workflow state. + * + * Generated from protobuf field int64 reset_history_event_id = 3; + * @param int|string $var + * @return $this + */ + public function setResetHistoryEventId($var) + { + GPBUtil::checkInt64($var); + $this->reset_history_event_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskFailedRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskFailedRequest.php new file mode 100644 index 0000000..2c003ee --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskFailedRequest.php @@ -0,0 +1,333 @@ +temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest + */ +class RespondWorkflowTaskFailedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The task token as received in `PollWorkflowTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + */ + protected $task_token = ''; + /** + * Why did the task fail? It's important to note that many of the variants in this enum cannot + * apply to worker responses. See the type's doc for more. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowTaskFailedCause cause = 2; + */ + protected $cause = 0; + /** + * Failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 3; + */ + protected $failure = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + /** + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * + * Generated from protobuf field string binary_checksum = 5; + */ + protected $binary_checksum = ''; + /** + * Generated from protobuf field string namespace = 6; + */ + protected $namespace = ''; + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 7; + */ + private $messages; + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 8; + */ + protected $worker_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_token + * The task token as received in `PollWorkflowTaskQueueResponse` + * @type int $cause + * Why did the task fail? It's important to note that many of the variants in this enum cannot + * apply to worker responses. See the type's doc for more. + * @type \Temporal\Api\Failure\V1\Failure $failure + * Failure details + * @type string $identity + * The identity of the worker/client + * @type string $binary_checksum + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * @type string $namespace + * @type array<\Temporal\Api\Protocol\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * Protocol messages piggybacking on a WFT as a transport + * @type \Temporal\Api\Common\V1\WorkerVersionStamp $worker_version + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The task token as received in `PollWorkflowTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @return string + */ + public function getTaskToken() + { + return $this->task_token; + } + + /** + * The task token as received in `PollWorkflowTaskQueueResponse` + * + * Generated from protobuf field bytes task_token = 1; + * @param string $var + * @return $this + */ + public function setTaskToken($var) + { + GPBUtil::checkString($var, False); + $this->task_token = $var; + + return $this; + } + + /** + * Why did the task fail? It's important to note that many of the variants in this enum cannot + * apply to worker responses. See the type's doc for more. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowTaskFailedCause cause = 2; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Why did the task fail? It's important to note that many of the variants in this enum cannot + * apply to worker responses. See the type's doc for more. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowTaskFailedCause cause = 2; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowTaskFailedCause::class); + $this->cause = $var; + + return $this; + } + + /** + * Failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 3; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getFailure() + { + return $this->failure; + } + + public function hasFailure() + { + return isset($this->failure); + } + + public function clearFailure() + { + unset($this->failure); + } + + /** + * Failure details + * + * Generated from protobuf field .temporal.api.failure.v1.Failure failure = 3; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->failure = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * + * Generated from protobuf field string binary_checksum = 5; + * @return string + */ + public function getBinaryChecksum() + { + return $this->binary_checksum; + } + + /** + * DEPRECATED since 1.21 - use `worker_version_stamp` instead. + * Worker process' unique binary id + * + * Generated from protobuf field string binary_checksum = 5; + * @param string $var + * @return $this + */ + public function setBinaryChecksum($var) + { + GPBUtil::checkString($var, True); + $this->binary_checksum = $var; + + return $this; + } + + /** + * Generated from protobuf field string namespace = 6; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 6; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Protocol messages piggybacking on a WFT as a transport + * + * Generated from protobuf field repeated .temporal.api.protocol.v1.Message messages = 7; + * @param array<\Temporal\Api\Protocol\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Protocol\V1\Message::class); + $this->messages = $arr; + + return $this; + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 8; + * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null + */ + public function getWorkerVersion() + { + return $this->worker_version; + } + + public function hasWorkerVersion() + { + return isset($this->worker_version); + } + + public function clearWorkerVersion() + { + unset($this->worker_version); + } + + /** + * Version info of the worker who processed this task. This message's `build_id` field should + * always be set by SDKs. Workers opting into versioning will also set the `use_versioning` + * field to true. See message docstrings for more. + * + * Generated from protobuf field .temporal.api.common.v1.WorkerVersionStamp worker_version = 8; + * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var + * @return $this + */ + public function setWorkerVersion($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class); + $this->worker_version = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskFailedResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskFailedResponse.php new file mode 100644 index 0000000..dc85854 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/RespondWorkflowTaskFailedResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse + */ +class RespondWorkflowTaskFailedResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ScanWorkflowExecutionsRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ScanWorkflowExecutionsRequest.php new file mode 100644 index 0000000..91080b6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ScanWorkflowExecutionsRequest.php @@ -0,0 +1,140 @@ +temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest + */ +class ScanWorkflowExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Generated from protobuf field bytes next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * Generated from protobuf field string query = 4; + */ + protected $query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type int $page_size + * @type string $next_page_token + * @type string $query + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + + /** + * Generated from protobuf field string query = 4; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Generated from protobuf field string query = 4; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ScanWorkflowExecutionsResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ScanWorkflowExecutionsResponse.php new file mode 100644 index 0000000..66ca409 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/ScanWorkflowExecutionsResponse.php @@ -0,0 +1,86 @@ +temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse + */ +class ScanWorkflowExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + */ + private $executions; + /** + * Generated from protobuf field bytes next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $executions + * @type string $next_page_token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * Generated from protobuf field repeated .temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1; + * @param array<\Temporal\Api\Workflow\V1\WorkflowExecutionInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\WorkflowExecutionInfo::class); + $this->executions = $arr; + + return $this; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Generated from protobuf field bytes next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, False); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWithStartWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWithStartWorkflowExecutionRequest.php new file mode 100644 index 0000000..8eefe1a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWithStartWorkflowExecutionRequest.php @@ -0,0 +1,950 @@ +temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest + */ +class SignalWithStartWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * The task queue to start this workflow on, if it will be started + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + */ + protected $task_queue = null; + /** + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + */ + protected $input = null; + /** + * Total workflow execution timeout including retries and continue as new + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + */ + protected $workflow_execution_timeout = null; + /** + * Timeout of a single workflow run + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + */ + protected $workflow_task_timeout = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 9; + */ + protected $identity = ''; + /** + * Used to de-dupe signal w/ start requests + * + * Generated from protobuf field string request_id = 10; + */ + protected $request_id = ''; + /** + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + */ + protected $workflow_id_reuse_policy = 0; + /** + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. + * Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22; + */ + protected $workflow_id_conflict_policy = 0; + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal_name = 12; + */ + protected $signal_name = ''; + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads signal_input = 13; + */ + protected $signal_input = null; + /** + * Deprecated + * + * Generated from protobuf field string control = 14; + */ + protected $control = ''; + /** + * Retry policy for the workflow + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 15; + */ + protected $retry_policy = null; + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 16; + */ + protected $cron_schedule = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 17; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 18; + */ + protected $search_attributes = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 19; + */ + protected $header = null; + /** + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * Note that the signal will be delivered with the first workflow task. If the workflow gets + * another SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false + * or not set, a workflow task will be dispatched immediately and the rest of the delay period + * will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution + * will not unblock the workflow. + * + * Generated from protobuf field .google.protobuf.Duration workflow_start_delay = 20; + */ + protected $workflow_start_delay = null; + /** + * Indicates that a new workflow task should not be generated when this signal is received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 21; + */ + protected $skip_generate_workflow_task = false; + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 23; + */ + protected $user_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $workflow_id + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * The task queue to start this workflow on, if it will be started + * @type \Temporal\Api\Common\V1\Payloads $input + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * @type \Google\Protobuf\Duration $workflow_execution_timeout + * Total workflow execution timeout including retries and continue as new + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task + * @type string $identity + * The identity of the worker/client + * @type string $request_id + * Used to de-dupe signal w/ start requests + * @type int $workflow_id_reuse_policy + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. + * @type int $workflow_id_conflict_policy + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. + * Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * @type string $signal_name + * The workflow author-defined name of the signal to send to the workflow + * @type \Temporal\Api\Common\V1\Payloads $signal_input + * Serialized value(s) to provide with the signal + * @type string $control + * Deprecated + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * Retry policy for the workflow + * @type string $cron_schedule + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type \Temporal\Api\Common\V1\Header $header + * @type \Google\Protobuf\Duration $workflow_start_delay + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * Note that the signal will be delivered with the first workflow task. If the workflow gets + * another SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false + * or not set, a workflow task will be dispatched immediately and the rest of the delay period + * will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution + * will not unblock the workflow. + * @type bool $skip_generate_workflow_task + * Indicates that a new workflow task should not be generated when this signal is received. + * @type \Temporal\Api\Sdk\V1\UserMetadata $user_metadata + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * The task queue to start this workflow on, if it will be started + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * The task queue to start this workflow on, if it will be started + * + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Total workflow execution timeout including retries and continue as new + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionTimeout() + { + return $this->workflow_execution_timeout; + } + + public function hasWorkflowExecutionTimeout() + { + return isset($this->workflow_execution_timeout); + } + + public function clearWorkflowExecutionTimeout() + { + unset($this->workflow_execution_timeout); + } + + /** + * Total workflow execution timeout including retries and continue as new + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow run + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 9; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 9; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Used to de-dupe signal w/ start requests + * + * Generated from protobuf field string request_id = 10; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Used to de-dupe signal w/ start requests + * + * Generated from protobuf field string request_id = 10; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + * @return int + */ + public function getWorkflowIdReusePolicy() + { + return $this->workflow_id_reuse_policy; + } + + /** + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + * @param int $var + * @return $this + */ + public function setWorkflowIdReusePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdReusePolicy::class); + $this->workflow_id_reuse_policy = $var; + + return $this; + } + + /** + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. + * Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22; + * @return int + */ + public function getWorkflowIdConflictPolicy() + { + return $this->workflow_id_conflict_policy; + } + + /** + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. + * Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22; + * @param int $var + * @return $this + */ + public function setWorkflowIdConflictPolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdConflictPolicy::class); + $this->workflow_id_conflict_policy = $var; + + return $this; + } + + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal_name = 12; + * @return string + */ + public function getSignalName() + { + return $this->signal_name; + } + + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal_name = 12; + * @param string $var + * @return $this + */ + public function setSignalName($var) + { + GPBUtil::checkString($var, True); + $this->signal_name = $var; + + return $this; + } + + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads signal_input = 13; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getSignalInput() + { + return $this->signal_input; + } + + public function hasSignalInput() + { + return isset($this->signal_input); + } + + public function clearSignalInput() + { + unset($this->signal_input); + } + + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads signal_input = 13; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setSignalInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->signal_input = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 14; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 14; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Retry policy for the workflow + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 15; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Retry policy for the workflow + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 15; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 16; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 16; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 17; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 17; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 18; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 18; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 19; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 19; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * Note that the signal will be delivered with the first workflow task. If the workflow gets + * another SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false + * or not set, a workflow task will be dispatched immediately and the rest of the delay period + * will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution + * will not unblock the workflow. + * + * Generated from protobuf field .google.protobuf.Duration workflow_start_delay = 20; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowStartDelay() + { + return $this->workflow_start_delay; + } + + public function hasWorkflowStartDelay() + { + return isset($this->workflow_start_delay); + } + + public function clearWorkflowStartDelay() + { + unset($this->workflow_start_delay); + } + + /** + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * Note that the signal will be delivered with the first workflow task. If the workflow gets + * another SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false + * or not set, a workflow task will be dispatched immediately and the rest of the delay period + * will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution + * will not unblock the workflow. + * + * Generated from protobuf field .google.protobuf.Duration workflow_start_delay = 20; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowStartDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_start_delay = $var; + + return $this; + } + + /** + * Indicates that a new workflow task should not be generated when this signal is received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 21; + * @return bool + */ + public function getSkipGenerateWorkflowTask() + { + return $this->skip_generate_workflow_task; + } + + /** + * Indicates that a new workflow task should not be generated when this signal is received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 21; + * @param bool $var + * @return $this + */ + public function setSkipGenerateWorkflowTask($var) + { + GPBUtil::checkBool($var); + $this->skip_generate_workflow_task = $var; + + return $this; + } + + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 23; + * @return \Temporal\Api\Sdk\V1\UserMetadata|null + */ + public function getUserMetadata() + { + return $this->user_metadata; + } + + public function hasUserMetadata() + { + return isset($this->user_metadata); + } + + public function clearUserMetadata() + { + unset($this->user_metadata); + } + + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 23; + * @param \Temporal\Api\Sdk\V1\UserMetadata $var + * @return $this + */ + public function setUserMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\UserMetadata::class); + $this->user_metadata = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWithStartWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWithStartWorkflowExecutionResponse.php new file mode 100644 index 0000000..d9cd610 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWithStartWorkflowExecutionResponse.php @@ -0,0 +1,100 @@ +temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse + */ +class SignalWithStartWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The run id of the workflow that was started - or just signaled, if it was already running. + * + * Generated from protobuf field string run_id = 1; + */ + protected $run_id = ''; + /** + * If true, a new workflow was started. + * + * Generated from protobuf field bool started = 2; + */ + protected $started = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $run_id + * The run id of the workflow that was started - or just signaled, if it was already running. + * @type bool $started + * If true, a new workflow was started. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The run id of the workflow that was started - or just signaled, if it was already running. + * + * Generated from protobuf field string run_id = 1; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * The run id of the workflow that was started - or just signaled, if it was already running. + * + * Generated from protobuf field string run_id = 1; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * If true, a new workflow was started. + * + * Generated from protobuf field bool started = 2; + * @return bool + */ + public function getStarted() + { + return $this->started; + } + + /** + * If true, a new workflow was started. + * + * Generated from protobuf field bool started = 2; + * @param bool $var + * @return $this + */ + public function setStarted($var) + { + GPBUtil::checkBool($var); + $this->started = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWorkflowExecutionRequest.php new file mode 100644 index 0000000..42a6ce4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWorkflowExecutionRequest.php @@ -0,0 +1,358 @@ +temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest + */ +class SignalWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal_name = 3; + */ + protected $signal_name = ''; + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + */ + protected $input = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 5; + */ + protected $identity = ''; + /** + * Used to de-dupe sent signals + * + * Generated from protobuf field string request_id = 6; + */ + protected $request_id = ''; + /** + * Deprecated + * + * Generated from protobuf field string control = 7; + */ + protected $control = ''; + /** + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 8; + */ + protected $header = null; + /** + * Indicates that a new workflow task should not be generated when this signal is received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 9; + */ + protected $skip_generate_workflow_task = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $signal_name + * The workflow author-defined name of the signal to send to the workflow + * @type \Temporal\Api\Common\V1\Payloads $input + * Serialized value(s) to provide with the signal + * @type string $identity + * The identity of the worker/client + * @type string $request_id + * Used to de-dupe sent signals + * @type string $control + * Deprecated + * @type \Temporal\Api\Common\V1\Header $header + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * @type bool $skip_generate_workflow_task + * Indicates that a new workflow task should not be generated when this signal is received. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal_name = 3; + * @return string + */ + public function getSignalName() + { + return $this->signal_name; + } + + /** + * The workflow author-defined name of the signal to send to the workflow + * + * Generated from protobuf field string signal_name = 3; + * @param string $var + * @return $this + */ + public function setSignalName($var) + { + GPBUtil::checkString($var, True); + $this->signal_name = $var; + + return $this; + } + + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Serialized value(s) to provide with the signal + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 4; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 5; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 5; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * Used to de-dupe sent signals + * + * Generated from protobuf field string request_id = 6; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Used to de-dupe sent signals + * + * Generated from protobuf field string request_id = 6; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 7; + * @return string + */ + public function getControl() + { + return $this->control; + } + + /** + * Deprecated + * + * Generated from protobuf field string control = 7; + * @param string $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkString($var, True); + $this->control = $var; + + return $this; + } + + /** + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 8; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Headers that are passed with the signal to the processing workflow. + * These can include things like auth or tracing tokens. + * + * Generated from protobuf field .temporal.api.common.v1.Header header = 8; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Indicates that a new workflow task should not be generated when this signal is received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 9; + * @return bool + */ + public function getSkipGenerateWorkflowTask() + { + return $this->skip_generate_workflow_task; + } + + /** + * Indicates that a new workflow task should not be generated when this signal is received. + * + * Generated from protobuf field bool skip_generate_workflow_task = 9; + * @param bool $var + * @return $this + */ + public function setSkipGenerateWorkflowTask($var) + { + GPBUtil::checkBool($var); + $this->skip_generate_workflow_task = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWorkflowExecutionResponse.php new file mode 100644 index 0000000..dac5138 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/SignalWorkflowExecutionResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse + */ +class SignalWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartBatchOperationRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartBatchOperationRequest.php new file mode 100644 index 0000000..9134c50 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartBatchOperationRequest.php @@ -0,0 +1,413 @@ +temporal.api.workflowservice.v1.StartBatchOperationRequest + */ +class StartBatchOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Visibility query defines the the group of workflow to apply the batch operation + * This field and `executions` are mutually exclusive + * + * Generated from protobuf field string visibility_query = 2; + */ + protected $visibility_query = ''; + /** + * Job ID defines the unique ID for the batch job + * + * Generated from protobuf field string job_id = 3; + */ + protected $job_id = ''; + /** + * Reason to perform the batch operation + * + * Generated from protobuf field string reason = 4; + */ + protected $reason = ''; + /** + * Executions to apply the batch operation + * This field and `visibility_query` are mutually exclusive + * + * Generated from protobuf field repeated .temporal.api.common.v1.WorkflowExecution executions = 5; + */ + private $executions; + /** + * Limit for the number of operations processed per second within this batch. + * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system + * overload and minimize potential delays in executing ongoing tasks for user workers. + * Note that when no explicit limit is provided, the server will operate according to its limit defined by the + * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the + * server's configured limit. + * + * Generated from protobuf field float max_operations_per_second = 6; + */ + protected $max_operations_per_second = 0.0; + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace that contains the batch operation + * @type string $visibility_query + * Visibility query defines the the group of workflow to apply the batch operation + * This field and `executions` are mutually exclusive + * @type string $job_id + * Job ID defines the unique ID for the batch job + * @type string $reason + * Reason to perform the batch operation + * @type array<\Temporal\Api\Common\V1\WorkflowExecution>|\Google\Protobuf\Internal\RepeatedField $executions + * Executions to apply the batch operation + * This field and `visibility_query` are mutually exclusive + * @type float $max_operations_per_second + * Limit for the number of operations processed per second within this batch. + * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system + * overload and minimize potential delays in executing ongoing tasks for user workers. + * Note that when no explicit limit is provided, the server will operate according to its limit defined by the + * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the + * server's configured limit. + * @type \Temporal\Api\Batch\V1\BatchOperationTermination $termination_operation + * @type \Temporal\Api\Batch\V1\BatchOperationSignal $signal_operation + * @type \Temporal\Api\Batch\V1\BatchOperationCancellation $cancellation_operation + * @type \Temporal\Api\Batch\V1\BatchOperationDeletion $deletion_operation + * @type \Temporal\Api\Batch\V1\BatchOperationReset $reset_operation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Visibility query defines the the group of workflow to apply the batch operation + * This field and `executions` are mutually exclusive + * + * Generated from protobuf field string visibility_query = 2; + * @return string + */ + public function getVisibilityQuery() + { + return $this->visibility_query; + } + + /** + * Visibility query defines the the group of workflow to apply the batch operation + * This field and `executions` are mutually exclusive + * + * Generated from protobuf field string visibility_query = 2; + * @param string $var + * @return $this + */ + public function setVisibilityQuery($var) + { + GPBUtil::checkString($var, True); + $this->visibility_query = $var; + + return $this; + } + + /** + * Job ID defines the unique ID for the batch job + * + * Generated from protobuf field string job_id = 3; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Job ID defines the unique ID for the batch job + * + * Generated from protobuf field string job_id = 3; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * Reason to perform the batch operation + * + * Generated from protobuf field string reason = 4; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Reason to perform the batch operation + * + * Generated from protobuf field string reason = 4; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * Executions to apply the batch operation + * This field and `visibility_query` are mutually exclusive + * + * Generated from protobuf field repeated .temporal.api.common.v1.WorkflowExecution executions = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * Executions to apply the batch operation + * This field and `visibility_query` are mutually exclusive + * + * Generated from protobuf field repeated .temporal.api.common.v1.WorkflowExecution executions = 5; + * @param array<\Temporal\Api\Common\V1\WorkflowExecution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->executions = $arr; + + return $this; + } + + /** + * Limit for the number of operations processed per second within this batch. + * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system + * overload and minimize potential delays in executing ongoing tasks for user workers. + * Note that when no explicit limit is provided, the server will operate according to its limit defined by the + * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the + * server's configured limit. + * + * Generated from protobuf field float max_operations_per_second = 6; + * @return float + */ + public function getMaxOperationsPerSecond() + { + return $this->max_operations_per_second; + } + + /** + * Limit for the number of operations processed per second within this batch. + * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system + * overload and minimize potential delays in executing ongoing tasks for user workers. + * Note that when no explicit limit is provided, the server will operate according to its limit defined by the + * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the + * server's configured limit. + * + * Generated from protobuf field float max_operations_per_second = 6; + * @param float $var + * @return $this + */ + public function setMaxOperationsPerSecond($var) + { + GPBUtil::checkFloat($var); + $this->max_operations_per_second = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationTermination termination_operation = 10; + * @return \Temporal\Api\Batch\V1\BatchOperationTermination|null + */ + public function getTerminationOperation() + { + return $this->readOneof(10); + } + + public function hasTerminationOperation() + { + return $this->hasOneof(10); + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationTermination termination_operation = 10; + * @param \Temporal\Api\Batch\V1\BatchOperationTermination $var + * @return $this + */ + public function setTerminationOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationTermination::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationSignal signal_operation = 11; + * @return \Temporal\Api\Batch\V1\BatchOperationSignal|null + */ + public function getSignalOperation() + { + return $this->readOneof(11); + } + + public function hasSignalOperation() + { + return $this->hasOneof(11); + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationSignal signal_operation = 11; + * @param \Temporal\Api\Batch\V1\BatchOperationSignal $var + * @return $this + */ + public function setSignalOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationSignal::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationCancellation cancellation_operation = 12; + * @return \Temporal\Api\Batch\V1\BatchOperationCancellation|null + */ + public function getCancellationOperation() + { + return $this->readOneof(12); + } + + public function hasCancellationOperation() + { + return $this->hasOneof(12); + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationCancellation cancellation_operation = 12; + * @param \Temporal\Api\Batch\V1\BatchOperationCancellation $var + * @return $this + */ + public function setCancellationOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationCancellation::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationDeletion deletion_operation = 13; + * @return \Temporal\Api\Batch\V1\BatchOperationDeletion|null + */ + public function getDeletionOperation() + { + return $this->readOneof(13); + } + + public function hasDeletionOperation() + { + return $this->hasOneof(13); + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationDeletion deletion_operation = 13; + * @param \Temporal\Api\Batch\V1\BatchOperationDeletion $var + * @return $this + */ + public function setDeletionOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationDeletion::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationReset reset_operation = 14; + * @return \Temporal\Api\Batch\V1\BatchOperationReset|null + */ + public function getResetOperation() + { + return $this->readOneof(14); + } + + public function hasResetOperation() + { + return $this->hasOneof(14); + } + + /** + * Generated from protobuf field .temporal.api.batch.v1.BatchOperationReset reset_operation = 14; + * @param \Temporal\Api\Batch\V1\BatchOperationReset $var + * @return $this + */ + public function setResetOperation($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationReset::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartBatchOperationResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartBatchOperationResponse.php new file mode 100644 index 0000000..a165a6b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartBatchOperationResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.StartBatchOperationResponse + */ +class StartBatchOperationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartWorkflowExecutionRequest.php new file mode 100644 index 0000000..f29737e --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartWorkflowExecutionRequest.php @@ -0,0 +1,962 @@ +temporal.api.workflowservice.v1.StartWorkflowExecutionRequest + */ +class StartWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string workflow_id = 2; + */ + protected $workflow_id = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + */ + protected $workflow_type = null; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + */ + protected $task_queue = null; + /** + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + */ + protected $input = null; + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + */ + protected $workflow_execution_timeout = null; + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + */ + protected $workflow_run_timeout = null; + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + */ + protected $workflow_task_timeout = null; + /** + * The identity of the client who initiated this request + * + * Generated from protobuf field string identity = 9; + */ + protected $identity = ''; + /** + * A unique identifier for this start request. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 10; + */ + protected $request_id = ''; + /** + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + */ + protected $workflow_id_reuse_policy = 0; + /** + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22; + */ + protected $workflow_id_conflict_policy = 0; + /** + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + */ + protected $retry_policy = null; + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 13; + */ + protected $cron_schedule = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 14; + */ + protected $memo = null; + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 15; + */ + protected $search_attributes = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 16; + */ + protected $header = null; + /** + * Request to get the first workflow task inline in the response bypassing matching service and worker polling. + * If set to `true` the caller is expected to have a worker available and capable of processing the task. + * The returned task will be marked as started and is expected to be completed by the specified + * `workflow_task_timeout`. + * + * Generated from protobuf field bool request_eager_execution = 17; + */ + protected $request_eager_execution = false; + /** + * These values will be available as ContinuedFailure and LastCompletionResult in the + * WorkflowExecutionStarted event and through SDKs. The are currently only used by the + * server itself (for the schedules feature) and are not intended to be exposed in + * StartWorkflowExecution. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure continued_failure = 18; + */ + protected $continued_failure = null; + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 19; + */ + protected $last_completion_result = null; + /** + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest + * of the delay will be ignored. + * + * Generated from protobuf field .google.protobuf.Duration workflow_start_delay = 20; + */ + protected $workflow_start_delay = null; + /** + * Callbacks to be called by the server when this workflow reaches a terminal state. + * If the workflow continues-as-new, these callbacks will be carried over to the new execution. + * Callback addresses must be whitelisted in the server's dynamic configuration. + * + * Generated from protobuf field repeated .temporal.api.common.v1.Callback completion_callbacks = 21; + */ + private $completion_callbacks; + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 23; + */ + protected $user_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $workflow_id + * @type \Temporal\Api\Common\V1\WorkflowType $workflow_type + * @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue + * @type \Temporal\Api\Common\V1\Payloads $input + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * @type \Google\Protobuf\Duration $workflow_execution_timeout + * Total workflow execution timeout including retries and continue as new. + * @type \Google\Protobuf\Duration $workflow_run_timeout + * Timeout of a single workflow run. + * @type \Google\Protobuf\Duration $workflow_task_timeout + * Timeout of a single workflow task. + * @type string $identity + * The identity of the client who initiated this request + * @type string $request_id + * A unique identifier for this start request. Typically UUIDv4. + * @type int $workflow_id_reuse_policy + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. + * @type int $workflow_id_conflict_policy + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * @type string $cron_schedule + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * @type \Temporal\Api\Common\V1\Memo $memo + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * @type \Temporal\Api\Common\V1\Header $header + * @type bool $request_eager_execution + * Request to get the first workflow task inline in the response bypassing matching service and worker polling. + * If set to `true` the caller is expected to have a worker available and capable of processing the task. + * The returned task will be marked as started and is expected to be completed by the specified + * `workflow_task_timeout`. + * @type \Temporal\Api\Failure\V1\Failure $continued_failure + * These values will be available as ContinuedFailure and LastCompletionResult in the + * WorkflowExecutionStarted event and through SDKs. The are currently only used by the + * server itself (for the schedules feature) and are not intended to be exposed in + * StartWorkflowExecution. + * @type \Temporal\Api\Common\V1\Payloads $last_completion_result + * @type \Google\Protobuf\Duration $workflow_start_delay + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest + * of the delay will be ignored. + * @type array<\Temporal\Api\Common\V1\Callback>|\Google\Protobuf\Internal\RepeatedField $completion_callbacks + * Callbacks to be called by the server when this workflow reaches a terminal state. + * If the workflow continues-as-new, these callbacks will be carried over to the new execution. + * Callback addresses must be whitelisted in the server's dynamic configuration. + * @type \Temporal\Api\Sdk\V1\UserMetadata $user_metadata + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Generated from protobuf field string workflow_id = 2; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @return \Temporal\Api\Common\V1\WorkflowType|null + */ + public function getWorkflowType() + { + return $this->workflow_type; + } + + public function hasWorkflowType() + { + return isset($this->workflow_type); + } + + public function clearWorkflowType() + { + unset($this->workflow_type); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowType workflow_type = 3; + * @param \Temporal\Api\Common\V1\WorkflowType $var + * @return $this + */ + public function setWorkflowType($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowType::class); + $this->workflow_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + public function hasTaskQueue() + { + return isset($this->task_queue); + } + + public function clearTaskQueue() + { + unset($this->task_queue); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.TaskQueue task_queue = 4; + * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class); + $this->task_queue = $var; + + return $this; + } + + /** + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Serialized arguments to the workflow. These are passed as arguments to the workflow function. + * + * Generated from protobuf field .temporal.api.common.v1.Payloads input = 5; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->input = $var; + + return $this; + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowExecutionTimeout() + { + return $this->workflow_execution_timeout; + } + + public function hasWorkflowExecutionTimeout() + { + return isset($this->workflow_execution_timeout); + } + + public function clearWorkflowExecutionTimeout() + { + unset($this->workflow_execution_timeout); + } + + /** + * Total workflow execution timeout including retries and continue as new. + * + * Generated from protobuf field .google.protobuf.Duration workflow_execution_timeout = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowExecutionTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_execution_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowRunTimeout() + { + return $this->workflow_run_timeout; + } + + public function hasWorkflowRunTimeout() + { + return isset($this->workflow_run_timeout); + } + + public function clearWorkflowRunTimeout() + { + unset($this->workflow_run_timeout); + } + + /** + * Timeout of a single workflow run. + * + * Generated from protobuf field .google.protobuf.Duration workflow_run_timeout = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowRunTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_run_timeout = $var; + + return $this; + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowTaskTimeout() + { + return $this->workflow_task_timeout; + } + + public function hasWorkflowTaskTimeout() + { + return isset($this->workflow_task_timeout); + } + + public function clearWorkflowTaskTimeout() + { + unset($this->workflow_task_timeout); + } + + /** + * Timeout of a single workflow task. + * + * Generated from protobuf field .google.protobuf.Duration workflow_task_timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowTaskTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_task_timeout = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request + * + * Generated from protobuf field string identity = 9; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request + * + * Generated from protobuf field string identity = 9; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * A unique identifier for this start request. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 10; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A unique identifier for this start request. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 10; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + * @return int + */ + public function getWorkflowIdReusePolicy() + { + return $this->workflow_id_reuse_policy; + } + + /** + * Defines whether to allow re-using the workflow id from a previously *closed* workflow. + * The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + * See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11; + * @param int $var + * @return $this + */ + public function setWorkflowIdReusePolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdReusePolicy::class); + $this->workflow_id_reuse_policy = $var; + + return $this; + } + + /** + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22; + * @return int + */ + public function getWorkflowIdConflictPolicy() + { + return $this->workflow_id_conflict_policy; + } + + /** + * Defines how to resolve a workflow id conflict with a *running* workflow. + * The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. + * See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. + * + * Generated from protobuf field .temporal.api.enums.v1.WorkflowIdConflictPolicy workflow_id_conflict_policy = 22; + * @param int $var + * @return $this + */ + public function setWorkflowIdConflictPolicy($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdConflictPolicy::class); + $this->workflow_id_conflict_policy = $var; + + return $this; + } + + /** + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + * @return \Temporal\Api\Common\V1\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. + * + * Generated from protobuf field .temporal.api.common.v1.RetryPolicy retry_policy = 12; + * @param \Temporal\Api\Common\V1\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 13; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + * + * Generated from protobuf field string cron_schedule = 13; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 14; + * @return \Temporal\Api\Common\V1\Memo|null + */ + public function getMemo() + { + return $this->memo; + } + + public function hasMemo() + { + return isset($this->memo); + } + + public function clearMemo() + { + unset($this->memo); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Memo memo = 14; + * @param \Temporal\Api\Common\V1\Memo $var + * @return $this + */ + public function setMemo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class); + $this->memo = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 15; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 15; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 16; + * @return \Temporal\Api\Common\V1\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Header header = 16; + * @param \Temporal\Api\Common\V1\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class); + $this->header = $var; + + return $this; + } + + /** + * Request to get the first workflow task inline in the response bypassing matching service and worker polling. + * If set to `true` the caller is expected to have a worker available and capable of processing the task. + * The returned task will be marked as started and is expected to be completed by the specified + * `workflow_task_timeout`. + * + * Generated from protobuf field bool request_eager_execution = 17; + * @return bool + */ + public function getRequestEagerExecution() + { + return $this->request_eager_execution; + } + + /** + * Request to get the first workflow task inline in the response bypassing matching service and worker polling. + * If set to `true` the caller is expected to have a worker available and capable of processing the task. + * The returned task will be marked as started and is expected to be completed by the specified + * `workflow_task_timeout`. + * + * Generated from protobuf field bool request_eager_execution = 17; + * @param bool $var + * @return $this + */ + public function setRequestEagerExecution($var) + { + GPBUtil::checkBool($var); + $this->request_eager_execution = $var; + + return $this; + } + + /** + * These values will be available as ContinuedFailure and LastCompletionResult in the + * WorkflowExecutionStarted event and through SDKs. The are currently only used by the + * server itself (for the schedules feature) and are not intended to be exposed in + * StartWorkflowExecution. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure continued_failure = 18; + * @return \Temporal\Api\Failure\V1\Failure|null + */ + public function getContinuedFailure() + { + return $this->continued_failure; + } + + public function hasContinuedFailure() + { + return isset($this->continued_failure); + } + + public function clearContinuedFailure() + { + unset($this->continued_failure); + } + + /** + * These values will be available as ContinuedFailure and LastCompletionResult in the + * WorkflowExecutionStarted event and through SDKs. The are currently only used by the + * server itself (for the schedules feature) and are not intended to be exposed in + * StartWorkflowExecution. + * + * Generated from protobuf field .temporal.api.failure.v1.Failure continued_failure = 18; + * @param \Temporal\Api\Failure\V1\Failure $var + * @return $this + */ + public function setContinuedFailure($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class); + $this->continued_failure = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 19; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getLastCompletionResult() + { + return $this->last_completion_result; + } + + public function hasLastCompletionResult() + { + return isset($this->last_completion_result); + } + + public function clearLastCompletionResult() + { + unset($this->last_completion_result); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.Payloads last_completion_result = 19; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setLastCompletionResult($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->last_completion_result = $var; + + return $this; + } + + /** + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest + * of the delay will be ignored. + * + * Generated from protobuf field .google.protobuf.Duration workflow_start_delay = 20; + * @return \Google\Protobuf\Duration|null + */ + public function getWorkflowStartDelay() + { + return $this->workflow_start_delay; + } + + public function hasWorkflowStartDelay() + { + return isset($this->workflow_start_delay); + } + + public function clearWorkflowStartDelay() + { + unset($this->workflow_start_delay); + } + + /** + * Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + * If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest + * of the delay will be ignored. + * + * Generated from protobuf field .google.protobuf.Duration workflow_start_delay = 20; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWorkflowStartDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->workflow_start_delay = $var; + + return $this; + } + + /** + * Callbacks to be called by the server when this workflow reaches a terminal state. + * If the workflow continues-as-new, these callbacks will be carried over to the new execution. + * Callback addresses must be whitelisted in the server's dynamic configuration. + * + * Generated from protobuf field repeated .temporal.api.common.v1.Callback completion_callbacks = 21; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompletionCallbacks() + { + return $this->completion_callbacks; + } + + /** + * Callbacks to be called by the server when this workflow reaches a terminal state. + * If the workflow continues-as-new, these callbacks will be carried over to the new execution. + * Callback addresses must be whitelisted in the server's dynamic configuration. + * + * Generated from protobuf field repeated .temporal.api.common.v1.Callback completion_callbacks = 21; + * @param array<\Temporal\Api\Common\V1\Callback>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompletionCallbacks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Callback::class); + $this->completion_callbacks = $arr; + + return $this; + } + + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 23; + * @return \Temporal\Api\Sdk\V1\UserMetadata|null + */ + public function getUserMetadata() + { + return $this->user_metadata; + } + + public function hasUserMetadata() + { + return isset($this->user_metadata); + } + + public function clearUserMetadata() + { + unset($this->user_metadata); + } + + /** + * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo + * for use by user interfaces to display the fixed as-of-start summary and details of the + * workflow. + * + * Generated from protobuf field .temporal.api.sdk.v1.UserMetadata user_metadata = 23; + * @param \Temporal\Api\Sdk\V1\UserMetadata $var + * @return $this + */ + public function setUserMetadata($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\UserMetadata::class); + $this->user_metadata = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartWorkflowExecutionResponse.php new file mode 100644 index 0000000..f69d642 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StartWorkflowExecutionResponse.php @@ -0,0 +1,152 @@ +temporal.api.workflowservice.v1.StartWorkflowExecutionResponse + */ +class StartWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING). + * + * Generated from protobuf field string run_id = 1; + */ + protected $run_id = ''; + /** + * If true, a new workflow was started. + * + * Generated from protobuf field bool started = 3; + */ + protected $started = false; + /** + * When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will + * return the first workflow task to be eagerly executed. + * The caller is expected to have a worker available to process the task. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse eager_workflow_task = 2; + */ + protected $eager_workflow_task = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $run_id + * The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING). + * @type bool $started + * If true, a new workflow was started. + * @type \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse $eager_workflow_task + * When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will + * return the first workflow task to be eagerly executed. + * The caller is expected to have a worker available to process the task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING). + * + * Generated from protobuf field string run_id = 1; + * @return string + */ + public function getRunId() + { + return $this->run_id; + } + + /** + * The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING). + * + * Generated from protobuf field string run_id = 1; + * @param string $var + * @return $this + */ + public function setRunId($var) + { + GPBUtil::checkString($var, True); + $this->run_id = $var; + + return $this; + } + + /** + * If true, a new workflow was started. + * + * Generated from protobuf field bool started = 3; + * @return bool + */ + public function getStarted() + { + return $this->started; + } + + /** + * If true, a new workflow was started. + * + * Generated from protobuf field bool started = 3; + * @param bool $var + * @return $this + */ + public function setStarted($var) + { + GPBUtil::checkBool($var); + $this->started = $var; + + return $this; + } + + /** + * When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will + * return the first workflow task to be eagerly executed. + * The caller is expected to have a worker available to process the task. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse eager_workflow_task = 2; + * @return \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse|null + */ + public function getEagerWorkflowTask() + { + return $this->eager_workflow_task; + } + + public function hasEagerWorkflowTask() + { + return isset($this->eager_workflow_task); + } + + public function clearEagerWorkflowTask() + { + unset($this->eager_workflow_task); + } + + /** + * When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will + * return the first workflow task to be eagerly executed. + * The caller is expected to have a worker available to process the task. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse eager_workflow_task = 2; + * @param \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse $var + * @return $this + */ + public function setEagerWorkflowTask($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse::class); + $this->eager_workflow_task = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StopBatchOperationRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StopBatchOperationRequest.php new file mode 100644 index 0000000..b1a04d9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StopBatchOperationRequest.php @@ -0,0 +1,168 @@ +temporal.api.workflowservice.v1.StopBatchOperationRequest + */ +class StopBatchOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Batch job id + * + * Generated from protobuf field string job_id = 2; + */ + protected $job_id = ''; + /** + * Reason to stop a batch operation + * + * Generated from protobuf field string reason = 3; + */ + protected $reason = ''; + /** + * Identity of the operator + * + * Generated from protobuf field string identity = 4; + */ + protected $identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace that contains the batch operation + * @type string $job_id + * Batch job id + * @type string $reason + * Reason to stop a batch operation + * @type string $identity + * Identity of the operator + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace that contains the batch operation + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Batch job id + * + * Generated from protobuf field string job_id = 2; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Batch job id + * + * Generated from protobuf field string job_id = 2; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * Reason to stop a batch operation + * + * Generated from protobuf field string reason = 3; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Reason to stop a batch operation + * + * Generated from protobuf field string reason = 3; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * Identity of the operator + * + * Generated from protobuf field string identity = 4; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Identity of the operator + * + * Generated from protobuf field string identity = 4; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StopBatchOperationResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StopBatchOperationResponse.php new file mode 100644 index 0000000..1a909a4 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/StopBatchOperationResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.StopBatchOperationResponse + */ +class StopBatchOperationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/TerminateWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/TerminateWorkflowExecutionRequest.php new file mode 100644 index 0000000..6ecf822 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/TerminateWorkflowExecutionRequest.php @@ -0,0 +1,243 @@ +temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest + */ +class TerminateWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * Generated from protobuf field string reason = 3; + */ + protected $reason = ''; + /** + * Serialized additional information to attach to the termination event + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 4; + */ + protected $details = null; + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 5; + */ + protected $identity = ''; + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 6; + */ + protected $first_execution_run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * @type string $reason + * @type \Temporal\Api\Common\V1\Payloads $details + * Serialized additional information to attach to the termination event + * @type string $identity + * The identity of the worker/client + * @type string $first_execution_run_id + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * Generated from protobuf field string reason = 3; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Generated from protobuf field string reason = 3; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * Serialized additional information to attach to the termination event + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 4; + * @return \Temporal\Api\Common\V1\Payloads|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Serialized additional information to attach to the termination event + * + * Generated from protobuf field .temporal.api.common.v1.Payloads details = 4; + * @param \Temporal\Api\Common\V1\Payloads $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class); + $this->details = $var; + + return $this; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 5; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the worker/client + * + * Generated from protobuf field string identity = 5; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 6; + * @return string + */ + public function getFirstExecutionRunId() + { + return $this->first_execution_run_id; + } + + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not part of the same + * execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 6; + * @param string $var + * @return $this + */ + public function setFirstExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->first_execution_run_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/TerminateWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/TerminateWorkflowExecutionResponse.php new file mode 100644 index 0000000..9f19f68 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/TerminateWorkflowExecutionResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse + */ +class TerminateWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateNamespaceRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateNamespaceRequest.php new file mode 100644 index 0000000..de1a6fc --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateNamespaceRequest.php @@ -0,0 +1,258 @@ +temporal.api.workflowservice.v1.UpdateNamespaceRequest + */ +class UpdateNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field .temporal.api.namespace.v1.UpdateNamespaceInfo update_info = 2; + */ + protected $update_info = null; + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 3; + */ + protected $config = null; + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 4; + */ + protected $replication_config = null; + /** + * Generated from protobuf field string security_token = 5; + */ + protected $security_token = ''; + /** + * Generated from protobuf field string delete_bad_binary = 6; + */ + protected $delete_bad_binary = ''; + /** + * promote local namespace to global namespace. Ignored if namespace is already global namespace. + * + * Generated from protobuf field bool promote_namespace = 7; + */ + protected $promote_namespace = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type \Temporal\Api\PBNamespace\V1\UpdateNamespaceInfo $update_info + * @type \Temporal\Api\PBNamespace\V1\NamespaceConfig $config + * @type \Temporal\Api\Replication\V1\NamespaceReplicationConfig $replication_config + * @type string $security_token + * @type string $delete_bad_binary + * @type bool $promote_namespace + * promote local namespace to global namespace. Ignored if namespace is already global namespace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.UpdateNamespaceInfo update_info = 2; + * @return \Temporal\Api\PBNamespace\V1\UpdateNamespaceInfo|null + */ + public function getUpdateInfo() + { + return $this->update_info; + } + + public function hasUpdateInfo() + { + return isset($this->update_info); + } + + public function clearUpdateInfo() + { + unset($this->update_info); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.UpdateNamespaceInfo update_info = 2; + * @param \Temporal\Api\PBNamespace\V1\UpdateNamespaceInfo $var + * @return $this + */ + public function setUpdateInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\UpdateNamespaceInfo::class); + $this->update_info = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 3; + * @return \Temporal\Api\PBNamespace\V1\NamespaceConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 3; + * @param \Temporal\Api\PBNamespace\V1\NamespaceConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceConfig::class); + $this->config = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 4; + * @return \Temporal\Api\Replication\V1\NamespaceReplicationConfig|null + */ + public function getReplicationConfig() + { + return $this->replication_config; + } + + public function hasReplicationConfig() + { + return isset($this->replication_config); + } + + public function clearReplicationConfig() + { + unset($this->replication_config); + } + + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 4; + * @param \Temporal\Api\Replication\V1\NamespaceReplicationConfig $var + * @return $this + */ + public function setReplicationConfig($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Replication\V1\NamespaceReplicationConfig::class); + $this->replication_config = $var; + + return $this; + } + + /** + * Generated from protobuf field string security_token = 5; + * @return string + */ + public function getSecurityToken() + { + return $this->security_token; + } + + /** + * Generated from protobuf field string security_token = 5; + * @param string $var + * @return $this + */ + public function setSecurityToken($var) + { + GPBUtil::checkString($var, True); + $this->security_token = $var; + + return $this; + } + + /** + * Generated from protobuf field string delete_bad_binary = 6; + * @return string + */ + public function getDeleteBadBinary() + { + return $this->delete_bad_binary; + } + + /** + * Generated from protobuf field string delete_bad_binary = 6; + * @param string $var + * @return $this + */ + public function setDeleteBadBinary($var) + { + GPBUtil::checkString($var, True); + $this->delete_bad_binary = $var; + + return $this; + } + + /** + * promote local namespace to global namespace. Ignored if namespace is already global namespace. + * + * Generated from protobuf field bool promote_namespace = 7; + * @return bool + */ + public function getPromoteNamespace() + { + return $this->promote_namespace; + } + + /** + * promote local namespace to global namespace. Ignored if namespace is already global namespace. + * + * Generated from protobuf field bool promote_namespace = 7; + * @param bool $var + * @return $this + */ + public function setPromoteNamespace($var) + { + GPBUtil::checkBool($var); + $this->promote_namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateNamespaceResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateNamespaceResponse.php new file mode 100644 index 0000000..04e77e1 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateNamespaceResponse.php @@ -0,0 +1,197 @@ +temporal.api.workflowservice.v1.UpdateNamespaceResponse + */ +class UpdateNamespaceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo namespace_info = 1; + */ + protected $namespace_info = null; + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 2; + */ + protected $config = null; + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3; + */ + protected $replication_config = null; + /** + * Generated from protobuf field int64 failover_version = 4; + */ + protected $failover_version = 0; + /** + * Generated from protobuf field bool is_global_namespace = 5; + */ + protected $is_global_namespace = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\PBNamespace\V1\NamespaceInfo $namespace_info + * @type \Temporal\Api\PBNamespace\V1\NamespaceConfig $config + * @type \Temporal\Api\Replication\V1\NamespaceReplicationConfig $replication_config + * @type int|string $failover_version + * @type bool $is_global_namespace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo namespace_info = 1; + * @return \Temporal\Api\PBNamespace\V1\NamespaceInfo|null + */ + public function getNamespaceInfo() + { + return $this->namespace_info; + } + + public function hasNamespaceInfo() + { + return isset($this->namespace_info); + } + + public function clearNamespaceInfo() + { + unset($this->namespace_info); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceInfo namespace_info = 1; + * @param \Temporal\Api\PBNamespace\V1\NamespaceInfo $var + * @return $this + */ + public function setNamespaceInfo($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceInfo::class); + $this->namespace_info = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 2; + * @return \Temporal\Api\PBNamespace\V1\NamespaceConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Generated from protobuf field .temporal.api.namespace.v1.NamespaceConfig config = 2; + * @param \Temporal\Api\PBNamespace\V1\NamespaceConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceConfig::class); + $this->config = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3; + * @return \Temporal\Api\Replication\V1\NamespaceReplicationConfig|null + */ + public function getReplicationConfig() + { + return $this->replication_config; + } + + public function hasReplicationConfig() + { + return isset($this->replication_config); + } + + public function clearReplicationConfig() + { + unset($this->replication_config); + } + + /** + * Generated from protobuf field .temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3; + * @param \Temporal\Api\Replication\V1\NamespaceReplicationConfig $var + * @return $this + */ + public function setReplicationConfig($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Replication\V1\NamespaceReplicationConfig::class); + $this->replication_config = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 failover_version = 4; + * @return int|string + */ + public function getFailoverVersion() + { + return $this->failover_version; + } + + /** + * Generated from protobuf field int64 failover_version = 4; + * @param int|string $var + * @return $this + */ + public function setFailoverVersion($var) + { + GPBUtil::checkInt64($var); + $this->failover_version = $var; + + return $this; + } + + /** + * Generated from protobuf field bool is_global_namespace = 5; + * @return bool + */ + public function getIsGlobalNamespace() + { + return $this->is_global_namespace; + } + + /** + * Generated from protobuf field bool is_global_namespace = 5; + * @param bool $var + * @return $this + */ + public function setIsGlobalNamespace($var) + { + GPBUtil::checkBool($var); + $this->is_global_namespace = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateScheduleRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateScheduleRequest.php new file mode 100644 index 0000000..56085a9 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateScheduleRequest.php @@ -0,0 +1,322 @@ +temporal.api.workflowservice.v1.UpdateScheduleRequest + */ +class UpdateScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace of the schedule to update. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The id of the schedule to update. + * + * Generated from protobuf field string schedule_id = 2; + */ + protected $schedule_id = ''; + /** + * The new schedule. The four main fields of the schedule (spec, action, + * policies, state) are replaced completely by the values in this message. + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 3; + */ + protected $schedule = null; + /** + * This can be the value of conflict_token from a DescribeScheduleResponse, + * which will cause this request to fail if the schedule has been modified + * between the Describe and this Update. + * If missing, the schedule will be updated unconditionally. + * + * Generated from protobuf field bytes conflict_token = 4; + */ + protected $conflict_token = ''; + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 5; + */ + protected $identity = ''; + /** + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 6; + */ + protected $request_id = ''; + /** + * Schedule search attributes to be updated. + * Do not set this field if you do not want to update the search attributes. + * A non-null empty object will set the search attributes to an empty map. + * Note: you cannot only update the search attributes with `UpdateScheduleRequest`, + * you must also set the `schedule` field; otherwise, it will unset the schedule. + * + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 7; + */ + protected $search_attributes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace of the schedule to update. + * @type string $schedule_id + * The id of the schedule to update. + * @type \Temporal\Api\Schedule\V1\Schedule $schedule + * The new schedule. The four main fields of the schedule (spec, action, + * policies, state) are replaced completely by the values in this message. + * @type string $conflict_token + * This can be the value of conflict_token from a DescribeScheduleResponse, + * which will cause this request to fail if the schedule has been modified + * between the Describe and this Update. + * If missing, the schedule will be updated unconditionally. + * @type string $identity + * The identity of the client who initiated this request. + * @type string $request_id + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes + * Schedule search attributes to be updated. + * Do not set this field if you do not want to update the search attributes. + * A non-null empty object will set the search attributes to an empty map. + * Note: you cannot only update the search attributes with `UpdateScheduleRequest`, + * you must also set the `schedule` field; otherwise, it will unset the schedule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace of the schedule to update. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace of the schedule to update. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The id of the schedule to update. + * + * Generated from protobuf field string schedule_id = 2; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * The id of the schedule to update. + * + * Generated from protobuf field string schedule_id = 2; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + + /** + * The new schedule. The four main fields of the schedule (spec, action, + * policies, state) are replaced completely by the values in this message. + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 3; + * @return \Temporal\Api\Schedule\V1\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * The new schedule. The four main fields of the schedule (spec, action, + * policies, state) are replaced completely by the values in this message. + * + * Generated from protobuf field .temporal.api.schedule.v1.Schedule schedule = 3; + * @param \Temporal\Api\Schedule\V1\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * This can be the value of conflict_token from a DescribeScheduleResponse, + * which will cause this request to fail if the schedule has been modified + * between the Describe and this Update. + * If missing, the schedule will be updated unconditionally. + * + * Generated from protobuf field bytes conflict_token = 4; + * @return string + */ + public function getConflictToken() + { + return $this->conflict_token; + } + + /** + * This can be the value of conflict_token from a DescribeScheduleResponse, + * which will cause this request to fail if the schedule has been modified + * between the Describe and this Update. + * If missing, the schedule will be updated unconditionally. + * + * Generated from protobuf field bytes conflict_token = 4; + * @param string $var + * @return $this + */ + public function setConflictToken($var) + { + GPBUtil::checkString($var, False); + $this->conflict_token = $var; + + return $this; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 5; + * @return string + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * The identity of the client who initiated this request. + * + * Generated from protobuf field string identity = 5; + * @param string $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkString($var, True); + $this->identity = $var; + + return $this; + } + + /** + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 6; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A unique identifier for this update request for idempotence. Typically UUIDv4. + * + * Generated from protobuf field string request_id = 6; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Schedule search attributes to be updated. + * Do not set this field if you do not want to update the search attributes. + * A non-null empty object will set the search attributes to an empty map. + * Note: you cannot only update the search attributes with `UpdateScheduleRequest`, + * you must also set the `schedule` field; otherwise, it will unset the schedule. + * + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 7; + * @return \Temporal\Api\Common\V1\SearchAttributes|null + */ + public function getSearchAttributes() + { + return $this->search_attributes; + } + + public function hasSearchAttributes() + { + return isset($this->search_attributes); + } + + public function clearSearchAttributes() + { + unset($this->search_attributes); + } + + /** + * Schedule search attributes to be updated. + * Do not set this field if you do not want to update the search attributes. + * A non-null empty object will set the search attributes to an empty map. + * Note: you cannot only update the search attributes with `UpdateScheduleRequest`, + * you must also set the `schedule` field; otherwise, it will unset the schedule. + * + * Generated from protobuf field .temporal.api.common.v1.SearchAttributes search_attributes = 7; + * @param \Temporal\Api\Common\V1\SearchAttributes $var + * @return $this + */ + public function setSearchAttributes($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class); + $this->search_attributes = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateScheduleResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateScheduleResponse.php new file mode 100644 index 0000000..f39354a --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateScheduleResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.UpdateScheduleResponse + */ +class UpdateScheduleResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest.php new file mode 100644 index 0000000..a610365 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest.php @@ -0,0 +1,314 @@ +temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest + */ +class UpdateWorkerBuildIdCompatibilityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Must be set, the task queue to apply changes to. Because all workers on a given task queue + * must have the same set of workflow & activity implementations, there is no reason to specify + * a task queue type here. + * + * Generated from protobuf field string task_queue = 2; + */ + protected $task_queue = ''; + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $task_queue + * Must be set, the task queue to apply changes to. Because all workers on a given task queue + * must have the same set of workflow & activity implementations, there is no reason to specify + * a task queue type here. + * @type string $add_new_build_id_in_new_default_set + * A new build id. This operation will create a new set which will be the new overall + * default version for the queue, with this id as its only member. This new set is + * incompatible with all previous sets/versions. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: In makes perfect sense here. --) + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\AddNewCompatibleVersion $add_new_compatible_build_id + * Adds a new id to an existing compatible set, see sub-message definition for more. + * @type string $promote_set_by_build_id + * Promote an existing set to be the current default (if it isn't already) by targeting + * an existing build id within it. This field's value is the extant build id. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: Names are hard. --) + * @type string $promote_build_id_within_set + * Promote an existing build id within some set to be the current default for that set. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: Within makes perfect sense here. --) + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\MergeSets $merge_sets + * Merge two existing sets together, thus declaring all build IDs in both sets compatible + * with one another. The primary set's default will become the default for the merged set. + * This is useful if you've accidentally declared a new ID as incompatible you meant to + * declare as compatible. The unusual case of incomplete replication during failover could + * also result in a split set, which this operation can repair. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Must be set, the task queue to apply changes to. Because all workers on a given task queue + * must have the same set of workflow & activity implementations, there is no reason to specify + * a task queue type here. + * + * Generated from protobuf field string task_queue = 2; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Must be set, the task queue to apply changes to. Because all workers on a given task queue + * must have the same set of workflow & activity implementations, there is no reason to specify + * a task queue type here. + * + * Generated from protobuf field string task_queue = 2; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + + /** + * A new build id. This operation will create a new set which will be the new overall + * default version for the queue, with this id as its only member. This new set is + * incompatible with all previous sets/versions. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: In makes perfect sense here. --) + * + * Generated from protobuf field string add_new_build_id_in_new_default_set = 3; + * @return string + */ + public function getAddNewBuildIdInNewDefaultSet() + { + return $this->readOneof(3); + } + + public function hasAddNewBuildIdInNewDefaultSet() + { + return $this->hasOneof(3); + } + + /** + * A new build id. This operation will create a new set which will be the new overall + * default version for the queue, with this id as its only member. This new set is + * incompatible with all previous sets/versions. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: In makes perfect sense here. --) + * + * Generated from protobuf field string add_new_build_id_in_new_default_set = 3; + * @param string $var + * @return $this + */ + public function setAddNewBuildIdInNewDefaultSet($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Adds a new id to an existing compatible set, see sub-message definition for more. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion add_new_compatible_build_id = 4; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\AddNewCompatibleVersion|null + */ + public function getAddNewCompatibleBuildId() + { + return $this->readOneof(4); + } + + public function hasAddNewCompatibleBuildId() + { + return $this->hasOneof(4); + } + + /** + * Adds a new id to an existing compatible set, see sub-message definition for more. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion add_new_compatible_build_id = 4; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\AddNewCompatibleVersion $var + * @return $this + */ + public function setAddNewCompatibleBuildId($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\AddNewCompatibleVersion::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Promote an existing set to be the current default (if it isn't already) by targeting + * an existing build id within it. This field's value is the extant build id. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: Names are hard. --) + * + * Generated from protobuf field string promote_set_by_build_id = 5; + * @return string + */ + public function getPromoteSetByBuildId() + { + return $this->readOneof(5); + } + + public function hasPromoteSetByBuildId() + { + return $this->hasOneof(5); + } + + /** + * Promote an existing set to be the current default (if it isn't already) by targeting + * an existing build id within it. This field's value is the extant build id. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: Names are hard. --) + * + * Generated from protobuf field string promote_set_by_build_id = 5; + * @param string $var + * @return $this + */ + public function setPromoteSetByBuildId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Promote an existing build id within some set to be the current default for that set. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: Within makes perfect sense here. --) + * + * Generated from protobuf field string promote_build_id_within_set = 6; + * @return string + */ + public function getPromoteBuildIdWithinSet() + { + return $this->readOneof(6); + } + + public function hasPromoteBuildIdWithinSet() + { + return $this->hasOneof(6); + } + + /** + * Promote an existing build id within some set to be the current default for that set. + * (-- api-linter: core::0140::prepositions=disabled + * aip.dev/not-precedent: Within makes perfect sense here. --) + * + * Generated from protobuf field string promote_build_id_within_set = 6; + * @param string $var + * @return $this + */ + public function setPromoteBuildIdWithinSet($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Merge two existing sets together, thus declaring all build IDs in both sets compatible + * with one another. The primary set's default will become the default for the merged set. + * This is useful if you've accidentally declared a new ID as incompatible you meant to + * declare as compatible. The unusual case of incomplete replication during failover could + * also result in a split set, which this operation can repair. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets merge_sets = 7; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\MergeSets|null + */ + public function getMergeSets() + { + return $this->readOneof(7); + } + + public function hasMergeSets() + { + return $this->hasOneof(7); + } + + /** + * Merge two existing sets together, thus declaring all build IDs in both sets compatible + * with one another. The primary set's default will become the default for the merged set. + * This is useful if you've accidentally declared a new ID as incompatible you meant to + * declare as compatible. The unusual case of incomplete replication during failover could + * also result in a split set, which this operation can repair. + * + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets merge_sets = 7; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\MergeSets $var + * @return $this + */ + public function setMergeSets($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest\MergeSets::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest/AddNewCompatibleVersion.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest/AddNewCompatibleVersion.php new file mode 100644 index 0000000..10edaf6 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest/AddNewCompatibleVersion.php @@ -0,0 +1,150 @@ +temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion + */ +class AddNewCompatibleVersion extends \Google\Protobuf\Internal\Message +{ + /** + * A new id to be added to an existing compatible set. + * + * Generated from protobuf field string new_build_id = 1; + */ + protected $new_build_id = ''; + /** + * A build id which must already exist in the version sets known by the task queue. The new + * id will be stored in the set containing this id, marking it as compatible with + * the versions within. + * + * Generated from protobuf field string existing_compatible_build_id = 2; + */ + protected $existing_compatible_build_id = ''; + /** + * When set, establishes the compatible set being targeted as the overall default for the + * queue. If a different set was the current default, the targeted set will replace it as + * the new default. + * + * Generated from protobuf field bool make_set_default = 3; + */ + protected $make_set_default = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $new_build_id + * A new id to be added to an existing compatible set. + * @type string $existing_compatible_build_id + * A build id which must already exist in the version sets known by the task queue. The new + * id will be stored in the set containing this id, marking it as compatible with + * the versions within. + * @type bool $make_set_default + * When set, establishes the compatible set being targeted as the overall default for the + * queue. If a different set was the current default, the targeted set will replace it as + * the new default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * A new id to be added to an existing compatible set. + * + * Generated from protobuf field string new_build_id = 1; + * @return string + */ + public function getNewBuildId() + { + return $this->new_build_id; + } + + /** + * A new id to be added to an existing compatible set. + * + * Generated from protobuf field string new_build_id = 1; + * @param string $var + * @return $this + */ + public function setNewBuildId($var) + { + GPBUtil::checkString($var, True); + $this->new_build_id = $var; + + return $this; + } + + /** + * A build id which must already exist in the version sets known by the task queue. The new + * id will be stored in the set containing this id, marking it as compatible with + * the versions within. + * + * Generated from protobuf field string existing_compatible_build_id = 2; + * @return string + */ + public function getExistingCompatibleBuildId() + { + return $this->existing_compatible_build_id; + } + + /** + * A build id which must already exist in the version sets known by the task queue. The new + * id will be stored in the set containing this id, marking it as compatible with + * the versions within. + * + * Generated from protobuf field string existing_compatible_build_id = 2; + * @param string $var + * @return $this + */ + public function setExistingCompatibleBuildId($var) + { + GPBUtil::checkString($var, True); + $this->existing_compatible_build_id = $var; + + return $this; + } + + /** + * When set, establishes the compatible set being targeted as the overall default for the + * queue. If a different set was the current default, the targeted set will replace it as + * the new default. + * + * Generated from protobuf field bool make_set_default = 3; + * @return bool + */ + public function getMakeSetDefault() + { + return $this->make_set_default; + } + + /** + * When set, establishes the compatible set being targeted as the overall default for the + * queue. If a different set was the current default, the targeted set will replace it as + * the new default. + * + * Generated from protobuf field bool make_set_default = 3; + * @param bool $var + * @return $this + */ + public function setMakeSetDefault($var) + { + GPBUtil::checkBool($var); + $this->make_set_default = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest/MergeSets.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest/MergeSets.php new file mode 100644 index 0000000..ecd1f86 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityRequest/MergeSets.php @@ -0,0 +1,100 @@ +temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets + */ +class MergeSets extends \Google\Protobuf\Internal\Message +{ + /** + * A build ID in the set whose default will become the merged set default + * + * Generated from protobuf field string primary_set_build_id = 1; + */ + protected $primary_set_build_id = ''; + /** + * A build ID in the set which will be merged into the primary set + * + * Generated from protobuf field string secondary_set_build_id = 2; + */ + protected $secondary_set_build_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $primary_set_build_id + * A build ID in the set whose default will become the merged set default + * @type string $secondary_set_build_id + * A build ID in the set which will be merged into the primary set + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * A build ID in the set whose default will become the merged set default + * + * Generated from protobuf field string primary_set_build_id = 1; + * @return string + */ + public function getPrimarySetBuildId() + { + return $this->primary_set_build_id; + } + + /** + * A build ID in the set whose default will become the merged set default + * + * Generated from protobuf field string primary_set_build_id = 1; + * @param string $var + * @return $this + */ + public function setPrimarySetBuildId($var) + { + GPBUtil::checkString($var, True); + $this->primary_set_build_id = $var; + + return $this; + } + + /** + * A build ID in the set which will be merged into the primary set + * + * Generated from protobuf field string secondary_set_build_id = 2; + * @return string + */ + public function getSecondarySetBuildId() + { + return $this->secondary_set_build_id; + } + + /** + * A build ID in the set which will be merged into the primary set + * + * Generated from protobuf field string secondary_set_build_id = 2; + * @param string $var + * @return $this + */ + public function setSecondarySetBuildId($var) + { + GPBUtil::checkString($var, True); + $this->secondary_set_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityResponse.php new file mode 100644 index 0000000..78e883f --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerBuildIdCompatibilityResponse.php @@ -0,0 +1,32 @@ +temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse + */ +class UpdateWorkerBuildIdCompatibilityResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest.php new file mode 100644 index 0000000..1b44b6c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest.php @@ -0,0 +1,346 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest + */ +class UpdateWorkerVersioningRulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Generated from protobuf field string task_queue = 2; + */ + protected $task_queue = ''; + /** + * A valid conflict_token can be taken from the previous + * ListWorkerVersioningRulesResponse or UpdateWorkerVersioningRulesResponse. + * An invalid token will cause this request to fail, ensuring that if the rules + * for this Task Queue have been modified between the previous and current + * operation, the request will fail instead of causing an unpredictable mutation. + * + * Generated from protobuf field bytes conflict_token = 3; + */ + protected $conflict_token = ''; + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * @type string $task_queue + * @type string $conflict_token + * A valid conflict_token can be taken from the previous + * ListWorkerVersioningRulesResponse or UpdateWorkerVersioningRulesResponse. + * An invalid token will cause this request to fail, ensuring that if the rules + * for this Task Queue have been modified between the previous and current + * operation, the request will fail instead of causing an unpredictable mutation. + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\InsertBuildIdAssignmentRule $insert_assignment_rule + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceBuildIdAssignmentRule $replace_assignment_rule + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteBuildIdAssignmentRule $delete_assignment_rule + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\AddCompatibleBuildIdRedirectRule $add_compatible_redirect_rule + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceCompatibleBuildIdRedirectRule $replace_compatible_redirect_rule + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteCompatibleBuildIdRedirectRule $delete_compatible_redirect_rule + * @type \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\CommitBuildId $commit_build_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Generated from protobuf field string task_queue = 2; + * @return string + */ + public function getTaskQueue() + { + return $this->task_queue; + } + + /** + * Generated from protobuf field string task_queue = 2; + * @param string $var + * @return $this + */ + public function setTaskQueue($var) + { + GPBUtil::checkString($var, True); + $this->task_queue = $var; + + return $this; + } + + /** + * A valid conflict_token can be taken from the previous + * ListWorkerVersioningRulesResponse or UpdateWorkerVersioningRulesResponse. + * An invalid token will cause this request to fail, ensuring that if the rules + * for this Task Queue have been modified between the previous and current + * operation, the request will fail instead of causing an unpredictable mutation. + * + * Generated from protobuf field bytes conflict_token = 3; + * @return string + */ + public function getConflictToken() + { + return $this->conflict_token; + } + + /** + * A valid conflict_token can be taken from the previous + * ListWorkerVersioningRulesResponse or UpdateWorkerVersioningRulesResponse. + * An invalid token will cause this request to fail, ensuring that if the rules + * for this Task Queue have been modified between the previous and current + * operation, the request will fail instead of causing an unpredictable mutation. + * + * Generated from protobuf field bytes conflict_token = 3; + * @param string $var + * @return $this + */ + public function setConflictToken($var) + { + GPBUtil::checkString($var, False); + $this->conflict_token = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule insert_assignment_rule = 4; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\InsertBuildIdAssignmentRule|null + */ + public function getInsertAssignmentRule() + { + return $this->readOneof(4); + } + + public function hasInsertAssignmentRule() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule insert_assignment_rule = 4; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\InsertBuildIdAssignmentRule $var + * @return $this + */ + public function setInsertAssignmentRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\InsertBuildIdAssignmentRule::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule replace_assignment_rule = 5; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceBuildIdAssignmentRule|null + */ + public function getReplaceAssignmentRule() + { + return $this->readOneof(5); + } + + public function hasReplaceAssignmentRule() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule replace_assignment_rule = 5; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceBuildIdAssignmentRule $var + * @return $this + */ + public function setReplaceAssignmentRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceBuildIdAssignmentRule::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule delete_assignment_rule = 6; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteBuildIdAssignmentRule|null + */ + public function getDeleteAssignmentRule() + { + return $this->readOneof(6); + } + + public function hasDeleteAssignmentRule() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule delete_assignment_rule = 6; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteBuildIdAssignmentRule $var + * @return $this + */ + public function setDeleteAssignmentRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteBuildIdAssignmentRule::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule add_compatible_redirect_rule = 7; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\AddCompatibleBuildIdRedirectRule|null + */ + public function getAddCompatibleRedirectRule() + { + return $this->readOneof(7); + } + + public function hasAddCompatibleRedirectRule() + { + return $this->hasOneof(7); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule add_compatible_redirect_rule = 7; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\AddCompatibleBuildIdRedirectRule $var + * @return $this + */ + public function setAddCompatibleRedirectRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\AddCompatibleBuildIdRedirectRule::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule replace_compatible_redirect_rule = 8; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceCompatibleBuildIdRedirectRule|null + */ + public function getReplaceCompatibleRedirectRule() + { + return $this->readOneof(8); + } + + public function hasReplaceCompatibleRedirectRule() + { + return $this->hasOneof(8); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule replace_compatible_redirect_rule = 8; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceCompatibleBuildIdRedirectRule $var + * @return $this + */ + public function setReplaceCompatibleRedirectRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\ReplaceCompatibleBuildIdRedirectRule::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule delete_compatible_redirect_rule = 9; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteCompatibleBuildIdRedirectRule|null + */ + public function getDeleteCompatibleRedirectRule() + { + return $this->readOneof(9); + } + + public function hasDeleteCompatibleRedirectRule() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule delete_compatible_redirect_rule = 9; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteCompatibleBuildIdRedirectRule $var + * @return $this + */ + public function setDeleteCompatibleRedirectRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\DeleteCompatibleBuildIdRedirectRule::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId commit_build_id = 10; + * @return \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\CommitBuildId|null + */ + public function getCommitBuildId() + { + return $this->readOneof(10); + } + + public function hasCommitBuildId() + { + return $this->hasOneof(10); + } + + /** + * Generated from protobuf field .temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId commit_build_id = 10; + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\CommitBuildId $var + * @return $this + */ + public function setCommitBuildId($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest\CommitBuildId::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/AddCompatibleBuildIdRedirectRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/AddCompatibleBuildIdRedirectRule.php new file mode 100644 index 0000000..c0e2df0 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/AddCompatibleBuildIdRedirectRule.php @@ -0,0 +1,72 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule + */ +class AddCompatibleBuildIdRedirectRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + */ + protected $rule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule $rule + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + * @return \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + * @param \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule::class); + $this->rule = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/CommitBuildId.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/CommitBuildId.php new file mode 100644 index 0000000..a540d18 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/CommitBuildId.php @@ -0,0 +1,111 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId + */ +class CommitBuildId extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string target_build_id = 1; + */ + protected $target_build_id = ''; + /** + * To prevent committing invalid Build IDs, we reject the request if no + * pollers has been seen recently for this Build ID. Use the `force` + * option to disable this validation. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_build_id + * @type bool $force + * To prevent committing invalid Build IDs, we reject the request if no + * pollers has been seen recently for this Build ID. Use the `force` + * option to disable this validation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string target_build_id = 1; + * @return string + */ + public function getTargetBuildId() + { + return $this->target_build_id; + } + + /** + * Generated from protobuf field string target_build_id = 1; + * @param string $var + * @return $this + */ + public function setTargetBuildId($var) + { + GPBUtil::checkString($var, True); + $this->target_build_id = $var; + + return $this; + } + + /** + * To prevent committing invalid Build IDs, we reject the request if no + * pollers has been seen recently for this Build ID. Use the `force` + * option to disable this validation. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * To prevent committing invalid Build IDs, we reject the request if no + * pollers has been seen recently for this Build ID. Use the `force` + * option to disable this validation. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/DeleteBuildIdAssignmentRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/DeleteBuildIdAssignmentRule.php new file mode 100644 index 0000000..abcb3cd --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/DeleteBuildIdAssignmentRule.php @@ -0,0 +1,109 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule + */ +class DeleteBuildIdAssignmentRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 rule_index = 1; + */ + protected $rule_index = 0; + /** + * By default presence of one unconditional rule is enforced, otherwise + * the delete operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $rule_index + * @type bool $force + * By default presence of one unconditional rule is enforced, otherwise + * the delete operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 rule_index = 1; + * @return int + */ + public function getRuleIndex() + { + return $this->rule_index; + } + + /** + * Generated from protobuf field int32 rule_index = 1; + * @param int $var + * @return $this + */ + public function setRuleIndex($var) + { + GPBUtil::checkInt32($var); + $this->rule_index = $var; + + return $this; + } + + /** + * By default presence of one unconditional rule is enforced, otherwise + * the delete operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * By default presence of one unconditional rule is enforced, otherwise + * the delete operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/DeleteCompatibleBuildIdRedirectRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/DeleteCompatibleBuildIdRedirectRule.php new file mode 100644 index 0000000..d44fe90 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/DeleteCompatibleBuildIdRedirectRule.php @@ -0,0 +1,59 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule + */ +class DeleteCompatibleBuildIdRedirectRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string source_build_id = 1; + */ + protected $source_build_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_build_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string source_build_id = 1; + * @return string + */ + public function getSourceBuildId() + { + return $this->source_build_id; + } + + /** + * Generated from protobuf field string source_build_id = 1; + * @param string $var + * @return $this + */ + public function setSourceBuildId($var) + { + GPBUtil::checkString($var, True); + $this->source_build_id = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/InsertBuildIdAssignmentRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/InsertBuildIdAssignmentRule.php new file mode 100644 index 0000000..9f46c47 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/InsertBuildIdAssignmentRule.php @@ -0,0 +1,119 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule + */ +class InsertBuildIdAssignmentRule extends \Google\Protobuf\Internal\Message +{ + /** + * Use this option to insert the rule in a particular index. By + * default, the new rule is inserted at the beginning of the list + * (index 0). If the given index is too larger the rule will be + * inserted at the end of the list. + * + * Generated from protobuf field int32 rule_index = 1; + */ + protected $rule_index = 0; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2; + */ + protected $rule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $rule_index + * Use this option to insert the rule in a particular index. By + * default, the new rule is inserted at the beginning of the list + * (index 0). If the given index is too larger the rule will be + * inserted at the end of the list. + * @type \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule $rule + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Use this option to insert the rule in a particular index. By + * default, the new rule is inserted at the beginning of the list + * (index 0). If the given index is too larger the rule will be + * inserted at the end of the list. + * + * Generated from protobuf field int32 rule_index = 1; + * @return int + */ + public function getRuleIndex() + { + return $this->rule_index; + } + + /** + * Use this option to insert the rule in a particular index. By + * default, the new rule is inserted at the beginning of the list + * (index 0). If the given index is too larger the rule will be + * inserted at the end of the list. + * + * Generated from protobuf field int32 rule_index = 1; + * @param int $var + * @return $this + */ + public function setRuleIndex($var) + { + GPBUtil::checkInt32($var); + $this->rule_index = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2; + * @return \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2; + * @param \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule::class); + $this->rule = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/ReplaceBuildIdAssignmentRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/ReplaceBuildIdAssignmentRule.php new file mode 100644 index 0000000..cbd28c2 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/ReplaceBuildIdAssignmentRule.php @@ -0,0 +1,148 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule + */ +class ReplaceBuildIdAssignmentRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 rule_index = 1; + */ + protected $rule_index = 0; + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2; + */ + protected $rule = null; + /** + * By default presence of one unconditional rule is enforced, otherwise + * the replace operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $rule_index + * @type \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule $rule + * @type bool $force + * By default presence of one unconditional rule is enforced, otherwise + * the replace operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 rule_index = 1; + * @return int + */ + public function getRuleIndex() + { + return $this->rule_index; + } + + /** + * Generated from protobuf field int32 rule_index = 1; + * @param int $var + * @return $this + */ + public function setRuleIndex($var) + { + GPBUtil::checkInt32($var); + $this->rule_index = $var; + + return $this; + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2; + * @return \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.BuildIdAssignmentRule rule = 2; + * @param \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\BuildIdAssignmentRule::class); + $this->rule = $var; + + return $this; + } + + /** + * By default presence of one unconditional rule is enforced, otherwise + * the replace operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * By default presence of one unconditional rule is enforced, otherwise + * the replace operation will be rejected. Set `force` to true to + * bypass this validation. An unconditional assignment rule: + * - Has no hint filter + * - Has no ramp + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/ReplaceCompatibleBuildIdRedirectRule.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/ReplaceCompatibleBuildIdRedirectRule.php new file mode 100644 index 0000000..b79c72b --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesRequest/ReplaceCompatibleBuildIdRedirectRule.php @@ -0,0 +1,71 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule + */ +class ReplaceCompatibleBuildIdRedirectRule extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + */ + protected $rule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule $rule + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + * @return \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * Generated from protobuf field .temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule rule = 1; + * @param \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\CompatibleBuildIdRedirectRule::class); + $this->rule = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesResponse.php new file mode 100644 index 0000000..0dc9791 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkerVersioningRulesResponse.php @@ -0,0 +1,128 @@ +temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse + */ +class UpdateWorkerVersioningRulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1; + */ + private $assignment_rules; + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2; + */ + private $compatible_redirect_rules; + /** + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between the two updates, which + * could lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 3; + */ + protected $conflict_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule>|\Google\Protobuf\Internal\RepeatedField $assignment_rules + * @type array<\Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule>|\Google\Protobuf\Internal\RepeatedField $compatible_redirect_rules + * @type string $conflict_token + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between the two updates, which + * could lead to lost updates and other confusion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssignmentRules() + { + return $this->assignment_rules; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1; + * @param array<\Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssignmentRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule::class); + $this->assignment_rules = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompatibleRedirectRules() + { + return $this->compatible_redirect_rules; + } + + /** + * Generated from protobuf field repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2; + * @param array<\Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompatibleRedirectRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule::class); + $this->compatible_redirect_rules = $arr; + + return $this; + } + + /** + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between the two updates, which + * could lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 3; + * @return string + */ + public function getConflictToken() + { + return $this->conflict_token; + } + + /** + * This value can be passed back to UpdateWorkerVersioningRulesRequest to + * ensure that the rules were not modified between the two updates, which + * could lead to lost updates and other confusion. + * + * Generated from protobuf field bytes conflict_token = 3; + * @param string $var + * @return $this + */ + public function setConflictToken($var) + { + GPBUtil::checkString($var, False); + $this->conflict_token = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkflowExecutionRequest.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkflowExecutionRequest.php new file mode 100644 index 0000000..3b5b5db --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkflowExecutionRequest.php @@ -0,0 +1,259 @@ +temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest + */ +class UpdateWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The namespace name of the target workflow + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The target workflow id and (optionally) a specific run thereof + * (-- api-linter: core::0203::optional=disabled + * aip.dev/not-precedent: false positive triggered by the word "optional" --) + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + */ + protected $workflow_execution = null; + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not + * part of the same execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 3; + */ + protected $first_execution_run_id = ''; + /** + * Describes when this request should return - basically whether the + * update is synchronous, asynchronous, or somewhere in between. + * + * Generated from protobuf field .temporal.api.update.v1.WaitPolicy wait_policy = 4; + */ + protected $wait_policy = null; + /** + * The request information that will be delivered all the way down to the + * workflow execution. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 5; + */ + protected $request = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The namespace name of the target workflow + * @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution + * The target workflow id and (optionally) a specific run thereof + * (-- api-linter: core::0203::optional=disabled + * aip.dev/not-precedent: false positive triggered by the word "optional" --) + * @type string $first_execution_run_id + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not + * part of the same execution chain as this id. + * @type \Temporal\Api\Update\V1\WaitPolicy $wait_policy + * Describes when this request should return - basically whether the + * update is synchronous, asynchronous, or somewhere in between. + * @type \Temporal\Api\Update\V1\Request $request + * The request information that will be delivered all the way down to the + * workflow execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * The namespace name of the target workflow + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The namespace name of the target workflow + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The target workflow id and (optionally) a specific run thereof + * (-- api-linter: core::0203::optional=disabled + * aip.dev/not-precedent: false positive triggered by the word "optional" --) + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @return \Temporal\Api\Common\V1\WorkflowExecution|null + */ + public function getWorkflowExecution() + { + return $this->workflow_execution; + } + + public function hasWorkflowExecution() + { + return isset($this->workflow_execution); + } + + public function clearWorkflowExecution() + { + unset($this->workflow_execution); + } + + /** + * The target workflow id and (optionally) a specific run thereof + * (-- api-linter: core::0203::optional=disabled + * aip.dev/not-precedent: false positive triggered by the word "optional" --) + * + * Generated from protobuf field .temporal.api.common.v1.WorkflowExecution workflow_execution = 2; + * @param \Temporal\Api\Common\V1\WorkflowExecution $var + * @return $this + */ + public function setWorkflowExecution($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class); + $this->workflow_execution = $var; + + return $this; + } + + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not + * part of the same execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 3; + * @return string + */ + public function getFirstExecutionRunId() + { + return $this->first_execution_run_id; + } + + /** + * If set, this call will error if the most recent (if no run id is set on + * `workflow_execution`), or specified (if it is) workflow execution is not + * part of the same execution chain as this id. + * + * Generated from protobuf field string first_execution_run_id = 3; + * @param string $var + * @return $this + */ + public function setFirstExecutionRunId($var) + { + GPBUtil::checkString($var, True); + $this->first_execution_run_id = $var; + + return $this; + } + + /** + * Describes when this request should return - basically whether the + * update is synchronous, asynchronous, or somewhere in between. + * + * Generated from protobuf field .temporal.api.update.v1.WaitPolicy wait_policy = 4; + * @return \Temporal\Api\Update\V1\WaitPolicy|null + */ + public function getWaitPolicy() + { + return $this->wait_policy; + } + + public function hasWaitPolicy() + { + return isset($this->wait_policy); + } + + public function clearWaitPolicy() + { + unset($this->wait_policy); + } + + /** + * Describes when this request should return - basically whether the + * update is synchronous, asynchronous, or somewhere in between. + * + * Generated from protobuf field .temporal.api.update.v1.WaitPolicy wait_policy = 4; + * @param \Temporal\Api\Update\V1\WaitPolicy $var + * @return $this + */ + public function setWaitPolicy($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\WaitPolicy::class); + $this->wait_policy = $var; + + return $this; + } + + /** + * The request information that will be delivered all the way down to the + * workflow execution. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 5; + * @return \Temporal\Api\Update\V1\Request|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The request information that will be delivered all the way down to the + * workflow execution. + * + * Generated from protobuf field .temporal.api.update.v1.Request request = 5; + * @param \Temporal\Api\Update\V1\Request $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class); + $this->request = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkflowExecutionResponse.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkflowExecutionResponse.php new file mode 100644 index 0000000..d92ac2c --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/UpdateWorkflowExecutionResponse.php @@ -0,0 +1,198 @@ +temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse + */ +class UpdateWorkflowExecutionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Enough information for subsequent poll calls if needed. Never null. + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 1; + */ + protected $update_ref = null; + /** + * The outcome of the update if and only if the workflow execution update + * has completed. If this response is being returned before the update has + * completed then this field will not be set. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + */ + protected $outcome = null; + /** + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 3; + */ + protected $stage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Temporal\Api\Update\V1\UpdateRef $update_ref + * Enough information for subsequent poll calls if needed. Never null. + * @type \Temporal\Api\Update\V1\Outcome $outcome + * The outcome of the update if and only if the workflow execution update + * has completed. If this response is being returned before the update has + * completed then this field will not be set. + * @type int $stage + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce(); + parent::__construct($data); + } + + /** + * Enough information for subsequent poll calls if needed. Never null. + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 1; + * @return \Temporal\Api\Update\V1\UpdateRef|null + */ + public function getUpdateRef() + { + return $this->update_ref; + } + + public function hasUpdateRef() + { + return isset($this->update_ref); + } + + public function clearUpdateRef() + { + unset($this->update_ref); + } + + /** + * Enough information for subsequent poll calls if needed. Never null. + * + * Generated from protobuf field .temporal.api.update.v1.UpdateRef update_ref = 1; + * @param \Temporal\Api\Update\V1\UpdateRef $var + * @return $this + */ + public function setUpdateRef($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\UpdateRef::class); + $this->update_ref = $var; + + return $this; + } + + /** + * The outcome of the update if and only if the workflow execution update + * has completed. If this response is being returned before the update has + * completed then this field will not be set. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + * @return \Temporal\Api\Update\V1\Outcome|null + */ + public function getOutcome() + { + return $this->outcome; + } + + public function hasOutcome() + { + return isset($this->outcome); + } + + public function clearOutcome() + { + unset($this->outcome); + } + + /** + * The outcome of the update if and only if the workflow execution update + * has completed. If this response is being returned before the update has + * completed then this field will not be set. + * + * Generated from protobuf field .temporal.api.update.v1.Outcome outcome = 2; + * @param \Temporal\Api\Update\V1\Outcome $var + * @return $this + */ + public function setOutcome($var) + { + GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Outcome::class); + $this->outcome = $var; + + return $this; + } + + /** + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 3; + * @return int + */ + public function getStage() + { + return $this->stage; + } + + /** + * The most advanced lifecycle stage that the Update is known to have + * reached, where lifecycle stages are ordered + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < + * UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. + * UNSPECIFIED will be returned if and only if the server's maximum wait + * time was reached before the Update reached the stage specified in the + * request WaitPolicy, and before the context deadline expired; clients may + * may then retry the call as needed. + * + * Generated from protobuf field .temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 3; + * @param int $var + * @return $this + */ + public function setStage($var) + { + GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\UpdateWorkflowExecutionLifecycleStage::class); + $this->stage = $var; + + return $this; + } + +} + diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/WorkflowServiceClient.php b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/WorkflowServiceClient.php new file mode 100644 index 0000000..120c5fa --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/generated/Temporal/Api/Workflowservice/V1/WorkflowServiceClient.php @@ -0,0 +1,1229 @@ +_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RegisterNamespace', + $argument, + ['\Temporal\Api\Workflowservice\V1\RegisterNamespaceResponse', 'decode'], + $metadata, $options); + } + + /** + * DescribeNamespace returns the information and configuration for a registered namespace. + * @param \Temporal\Api\Workflowservice\V1\DescribeNamespaceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DescribeNamespace(\Temporal\Api\Workflowservice\V1\DescribeNamespaceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DescribeNamespace', + $argument, + ['\Temporal\Api\Workflowservice\V1\DescribeNamespaceResponse', 'decode'], + $metadata, $options); + } + + /** + * ListNamespaces returns the information and configuration for all namespaces. + * @param \Temporal\Api\Workflowservice\V1\ListNamespacesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNamespaces(\Temporal\Api\Workflowservice\V1\ListNamespacesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListNamespaces', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListNamespacesResponse', 'decode'], + $metadata, $options); + } + + /** + * UpdateNamespace is used to update the information and configuration of a registered + * namespace. + * @param \Temporal\Api\Workflowservice\V1\UpdateNamespaceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateNamespace(\Temporal\Api\Workflowservice\V1\UpdateNamespaceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/UpdateNamespace', + $argument, + ['\Temporal\Api\Workflowservice\V1\UpdateNamespaceResponse', 'decode'], + $metadata, $options); + } + + /** + * DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED. + * + * Once the namespace is deprecated it cannot be used to start new workflow executions. Existing + * workflow executions will continue to run on deprecated namespaces. + * Deprecated. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: Deprecated --) + * @param \Temporal\Api\Workflowservice\V1\DeprecateNamespaceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeprecateNamespace(\Temporal\Api\Workflowservice\V1\DeprecateNamespaceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DeprecateNamespace', + $argument, + ['\Temporal\Api\Workflowservice\V1\DeprecateNamespaceResponse', 'decode'], + $metadata, $options); + } + + /** + * StartWorkflowExecution starts a new workflow execution. + * + * It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and + * also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an + * instance already exists with same workflow id. + * @param \Temporal\Api\Workflowservice\V1\StartWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StartWorkflowExecution(\Temporal\Api\Workflowservice\V1\StartWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/StartWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\StartWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * ExecuteMultiOperation executes multiple operations within a single workflow. + * + * Operations are started atomically, meaning if *any* operation fails to be started, none are, + * and the request fails. Upon start, the API returns only when *all* operations have a response. + * + * Upon failure, it returns `MultiOperationExecutionFailure` where the status code + * equals the status code of the *first* operation that failed to be started. + * + * NOTE: Experimental API. + * @param \Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ExecuteMultiOperation(\Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ExecuteMultiOperation', + $argument, + ['\Temporal\Api\Workflowservice\V1\ExecuteMultiOperationResponse', 'decode'], + $metadata, $options); + } + + /** + * GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with + * `NotFound` if the specified workflow execution is unknown to the service. + * @param \Temporal\Api\Workflowservice\V1\GetWorkflowExecutionHistoryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWorkflowExecutionHistory(\Temporal\Api\Workflowservice\V1\GetWorkflowExecutionHistoryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetWorkflowExecutionHistory', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetWorkflowExecutionHistoryResponse', 'decode'], + $metadata, $options); + } + + /** + * GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse + * order (starting from last event). Fails with`NotFound` if the specified workflow execution is + * unknown to the service. + * @param \Temporal\Api\Workflowservice\V1\GetWorkflowExecutionHistoryReverseRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWorkflowExecutionHistoryReverse(\Temporal\Api\Workflowservice\V1\GetWorkflowExecutionHistoryReverseRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetWorkflowExecutionHistoryReverse', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetWorkflowExecutionHistoryReverseResponse', 'decode'], + $metadata, $options); + } + + /** + * PollWorkflowTaskQueue is called by workers to make progress on workflows. + * + * A WorkflowTask is dispatched to callers for active workflow executions with pending workflow + * tasks. The worker is expected to call `RespondWorkflowTaskCompleted` when it is done + * processing the task. The service will create a `WorkflowTaskStarted` event in the history for + * this task before handing it to the worker. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PollWorkflowTaskQueue(\Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/PollWorkflowTaskQueue', + $argument, + ['\Temporal\Api\Workflowservice\V1\PollWorkflowTaskQueueResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks + * they received from `PollWorkflowTaskQueue`. + * + * Completing a WorkflowTask will write a `WORKFLOW_TASK_COMPLETED` event to the workflow's + * history, along with events corresponding to whatever commands the SDK generated while + * executing the task (ex timer started, activity task scheduled, etc). + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\RespondWorkflowTaskCompletedRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondWorkflowTaskCompleted(\Temporal\Api\Workflowservice\V1\RespondWorkflowTaskCompletedRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondWorkflowTaskCompleted', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondWorkflowTaskCompletedResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task + * failed. + * + * This results in a `WORKFLOW_TASK_FAILED` event written to the history, and a new workflow + * task will be scheduled. This API can be used to report unhandled failures resulting from + * applying the workflow task. + * + * Temporal will only append first WorkflowTaskFailed event to the history of workflow execution + * for consecutive failures. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\RespondWorkflowTaskFailedRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondWorkflowTaskFailed(\Temporal\Api\Workflowservice\V1\RespondWorkflowTaskFailedRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondWorkflowTaskFailed', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondWorkflowTaskFailedResponse', 'decode'], + $metadata, $options); + } + + /** + * PollActivityTaskQueue is called by workers to process activity tasks from a specific task + * queue. + * + * The worker is expected to call one of the `RespondActivityTaskXXX` methods when it is done + * processing the task. + * + * An activity task is dispatched whenever a `SCHEDULE_ACTIVITY_TASK` command is produced during + * workflow execution. An in memory `ACTIVITY_TASK_STARTED` event is written to mutable state + * before the task is dispatched to the worker. The started event, and the final event + * (`ACTIVITY_TASK_COMPLETED` / `ACTIVITY_TASK_FAILED` / `ACTIVITY_TASK_TIMED_OUT`) will both be + * written permanently to Workflow execution history when Activity is finished. This is done to + * avoid writing many events in the case of a failure/retry loop. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\PollActivityTaskQueueRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PollActivityTaskQueue(\Temporal\Api\Workflowservice\V1\PollActivityTaskQueueRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/PollActivityTaskQueue', + $argument, + ['\Temporal\Api\Workflowservice\V1\PollActivityTaskQueueResponse', 'decode'], + $metadata, $options); + } + + /** + * RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. + * + * If worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, + * then it will be marked as timed out and an `ACTIVITY_TASK_TIMED_OUT` event will be written to + * the workflow history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in + * such situations, in that event, the SDK should request cancellation of the activity. + * @param \Temporal\Api\Workflowservice\V1\RecordActivityTaskHeartbeatRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RecordActivityTaskHeartbeat(\Temporal\Api\Workflowservice\V1\RecordActivityTaskHeartbeatRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RecordActivityTaskHeartbeat', + $argument, + ['\Temporal\Api\Workflowservice\V1\RecordActivityTaskHeartbeatResponse', 'decode'], + $metadata, $options); + } + + /** + * See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by + * namespace/workflow id/activity id instead of task token. + * + * (-- api-linter: core::0136::prepositions=disabled + * aip.dev/not-precedent: "By" is used to indicate request type. --) + * @param \Temporal\Api\Workflowservice\V1\RecordActivityTaskHeartbeatByIdRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RecordActivityTaskHeartbeatById(\Temporal\Api\Workflowservice\V1\RecordActivityTaskHeartbeatByIdRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RecordActivityTaskHeartbeatById', + $argument, + ['\Temporal\Api\Workflowservice\V1\RecordActivityTaskHeartbeatByIdResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondActivityTaskCompleted is called by workers when they successfully complete an activity + * task. + * + * This results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history + * and a new workflow task created for the workflow. Fails with `NotFound` if the task token is + * no longer valid due to activity timeout, already being completed, or never having existed. + * @param \Temporal\Api\Workflowservice\V1\RespondActivityTaskCompletedRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondActivityTaskCompleted(\Temporal\Api\Workflowservice\V1\RespondActivityTaskCompletedRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondActivityTaskCompleted', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondActivityTaskCompletedResponse', 'decode'], + $metadata, $options); + } + + /** + * See `RecordActivityTaskCompleted`. This version allows clients to record completions by + * namespace/workflow id/activity id instead of task token. + * + * (-- api-linter: core::0136::prepositions=disabled + * aip.dev/not-precedent: "By" is used to indicate request type. --) + * @param \Temporal\Api\Workflowservice\V1\RespondActivityTaskCompletedByIdRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondActivityTaskCompletedById(\Temporal\Api\Workflowservice\V1\RespondActivityTaskCompletedByIdRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondActivityTaskCompletedById', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondActivityTaskCompletedByIdResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondActivityTaskFailed is called by workers when processing an activity task fails. + * + * This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and + * a new workflow task created for the workflow. Fails with `NotFound` if the task token is no + * longer valid due to activity timeout, already being completed, or never having existed. + * @param \Temporal\Api\Workflowservice\V1\RespondActivityTaskFailedRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondActivityTaskFailed(\Temporal\Api\Workflowservice\V1\RespondActivityTaskFailedRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondActivityTaskFailed', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondActivityTaskFailedResponse', 'decode'], + $metadata, $options); + } + + /** + * See `RecordActivityTaskFailed`. This version allows clients to record failures by + * namespace/workflow id/activity id instead of task token. + * + * (-- api-linter: core::0136::prepositions=disabled + * aip.dev/not-precedent: "By" is used to indicate request type. --) + * @param \Temporal\Api\Workflowservice\V1\RespondActivityTaskFailedByIdRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondActivityTaskFailedById(\Temporal\Api\Workflowservice\V1\RespondActivityTaskFailedByIdRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondActivityTaskFailedById', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondActivityTaskFailedByIdResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondActivityTaskFailed is called by workers when processing an activity task fails. + * + * This results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history + * and a new workflow task created for the workflow. Fails with `NotFound` if the task token is + * no longer valid due to activity timeout, already being completed, or never having existed. + * @param \Temporal\Api\Workflowservice\V1\RespondActivityTaskCanceledRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondActivityTaskCanceled(\Temporal\Api\Workflowservice\V1\RespondActivityTaskCanceledRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondActivityTaskCanceled', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondActivityTaskCanceledResponse', 'decode'], + $metadata, $options); + } + + /** + * See `RecordActivityTaskCanceled`. This version allows clients to record failures by + * namespace/workflow id/activity id instead of task token. + * + * (-- api-linter: core::0136::prepositions=disabled + * aip.dev/not-precedent: "By" is used to indicate request type. --) + * @param \Temporal\Api\Workflowservice\V1\RespondActivityTaskCanceledByIdRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondActivityTaskCanceledById(\Temporal\Api\Workflowservice\V1\RespondActivityTaskCanceledByIdRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondActivityTaskCanceledById', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondActivityTaskCanceledByIdResponse', 'decode'], + $metadata, $options); + } + + /** + * RequestCancelWorkflowExecution is called by workers when they want to request cancellation of + * a workflow execution. + * + * This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the + * workflow history and a new workflow task created for the workflow. It returns success if the requested + * workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. + * @param \Temporal\Api\Workflowservice\V1\RequestCancelWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RequestCancelWorkflowExecution(\Temporal\Api\Workflowservice\V1\RequestCancelWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RequestCancelWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\RequestCancelWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * SignalWorkflowExecution is used to send a signal to a running workflow execution. + * + * This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow + * task being created for the execution. + * @param \Temporal\Api\Workflowservice\V1\SignalWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SignalWorkflowExecution(\Temporal\Api\Workflowservice\V1\SignalWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/SignalWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\SignalWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if + * it isn't yet started. + * + * If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history + * and a workflow task is generated. + * + * If the workflow is not running or not found, then the workflow is created with + * `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a + * workflow task is generated. + * + * (-- api-linter: core::0136::prepositions=disabled + * aip.dev/not-precedent: "With" is used to indicate combined operation. --) + * @param \Temporal\Api\Workflowservice\V1\SignalWithStartWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SignalWithStartWorkflowExecution(\Temporal\Api\Workflowservice\V1\SignalWithStartWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/SignalWithStartWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\SignalWithStartWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * ResetWorkflowExecution will reset an existing workflow execution to a specified + * `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current + * execution instance. + * TODO: Does exclusive here mean *just* the completed event, or also WFT started? Otherwise the task is doomed to time out? + * @param \Temporal\Api\Workflowservice\V1\ResetWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResetWorkflowExecution(\Temporal\Api\Workflowservice\V1\ResetWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ResetWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\ResetWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * TerminateWorkflowExecution terminates an existing workflow execution by recording a + * `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the + * execution instance. + * @param \Temporal\Api\Workflowservice\V1\TerminateWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TerminateWorkflowExecution(\Temporal\Api\Workflowservice\V1\TerminateWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/TerminateWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\TerminateWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when + * WorkflowExecution.run_id is provided) or the latest Workflow Execution (when + * WorkflowExecution.run_id is not provided). If the Workflow Execution is Running, it will be + * terminated before deletion. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --) + * @param \Temporal\Api\Workflowservice\V1\DeleteWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteWorkflowExecution(\Temporal\Api\Workflowservice\V1\DeleteWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DeleteWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\DeleteWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) + * @param \Temporal\Api\Workflowservice\V1\ListOpenWorkflowExecutionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListOpenWorkflowExecutions(\Temporal\Api\Workflowservice\V1\ListOpenWorkflowExecutionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListOpenWorkflowExecutions', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListOpenWorkflowExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) + * @param \Temporal\Api\Workflowservice\V1\ListClosedWorkflowExecutionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListClosedWorkflowExecutions(\Temporal\Api\Workflowservice\V1\ListClosedWorkflowExecutionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListClosedWorkflowExecutions', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListClosedWorkflowExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace. + * @param \Temporal\Api\Workflowservice\V1\ListWorkflowExecutionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListWorkflowExecutions(\Temporal\Api\Workflowservice\V1\ListWorkflowExecutionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListWorkflowExecutions', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListWorkflowExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace. + * @param \Temporal\Api\Workflowservice\V1\ListArchivedWorkflowExecutionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListArchivedWorkflowExecutions(\Temporal\Api\Workflowservice\V1\ListArchivedWorkflowExecutionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListArchivedWorkflowExecutions', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListArchivedWorkflowExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific namespace without order. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) + * @param \Temporal\Api\Workflowservice\V1\ScanWorkflowExecutionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ScanWorkflowExecutions(\Temporal\Api\Workflowservice\V1\ScanWorkflowExecutionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ScanWorkflowExecutions', + $argument, + ['\Temporal\Api\Workflowservice\V1\ScanWorkflowExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace. + * @param \Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CountWorkflowExecutions(\Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/CountWorkflowExecutions', + $argument, + ['\Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --) + * @param \Temporal\Api\Workflowservice\V1\GetSearchAttributesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetSearchAttributes(\Temporal\Api\Workflowservice\V1\GetSearchAttributesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetSearchAttributes', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetSearchAttributesResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondQueryTaskCompleted is called by workers to complete queries which were delivered on + * the `query` (not `queries`) field of a `PollWorkflowTaskQueueResponse`. + * + * Completing the query will unblock the corresponding client call to `QueryWorkflow` and return + * the query result a response. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\RespondQueryTaskCompletedRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondQueryTaskCompleted(\Temporal\Api\Workflowservice\V1\RespondQueryTaskCompletedRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondQueryTaskCompleted', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondQueryTaskCompletedResponse', 'decode'], + $metadata, $options); + } + + /** + * ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of + * a given workflow. This is prudent for workers to perform if a workflow has been paged out of + * their cache. + * + * Things cleared are: + * 1. StickyTaskQueue + * 2. StickyScheduleToStartTimeout + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\ResetStickyTaskQueueRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResetStickyTaskQueue(\Temporal\Api\Workflowservice\V1\ResetStickyTaskQueueRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ResetStickyTaskQueue', + $argument, + ['\Temporal\Api\Workflowservice\V1\ResetStickyTaskQueueResponse', 'decode'], + $metadata, $options); + } + + /** + * QueryWorkflow requests a query be executed for a specified workflow execution. + * @param \Temporal\Api\Workflowservice\V1\QueryWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function QueryWorkflow(\Temporal\Api\Workflowservice\V1\QueryWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/QueryWorkflow', + $argument, + ['\Temporal\Api\Workflowservice\V1\QueryWorkflowResponse', 'decode'], + $metadata, $options); + } + + /** + * DescribeWorkflowExecution returns information about the specified workflow execution. + * @param \Temporal\Api\Workflowservice\V1\DescribeWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DescribeWorkflowExecution(\Temporal\Api\Workflowservice\V1\DescribeWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DescribeWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\DescribeWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID: + * - List of pollers + * - Workflow Reachability status + * - Backlog info for Workflow and/or Activity tasks + * @param \Temporal\Api\Workflowservice\V1\DescribeTaskQueueRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DescribeTaskQueue(\Temporal\Api\Workflowservice\V1\DescribeTaskQueueRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DescribeTaskQueue', + $argument, + ['\Temporal\Api\Workflowservice\V1\DescribeTaskQueueResponse', 'decode'], + $metadata, $options); + } + + /** + * GetClusterInfo returns information about temporal cluster + * @param \Temporal\Api\Workflowservice\V1\GetClusterInfoRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetClusterInfo(\Temporal\Api\Workflowservice\V1\GetClusterInfoRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetClusterInfo', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetClusterInfoResponse', 'decode'], + $metadata, $options); + } + + /** + * GetSystemInfo returns information about the system. + * @param \Temporal\Api\Workflowservice\V1\GetSystemInfoRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetSystemInfo(\Temporal\Api\Workflowservice\V1\GetSystemInfoRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetSystemInfo', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetSystemInfoResponse', 'decode'], + $metadata, $options); + } + + /** + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose this low-level API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\ListTaskQueuePartitionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListTaskQueuePartitions(\Temporal\Api\Workflowservice\V1\ListTaskQueuePartitionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListTaskQueuePartitions', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListTaskQueuePartitionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a new schedule. + * @param \Temporal\Api\Workflowservice\V1\CreateScheduleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateSchedule(\Temporal\Api\Workflowservice\V1\CreateScheduleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/CreateSchedule', + $argument, + ['\Temporal\Api\Workflowservice\V1\CreateScheduleResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the schedule description and current state of an existing schedule. + * @param \Temporal\Api\Workflowservice\V1\DescribeScheduleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DescribeSchedule(\Temporal\Api\Workflowservice\V1\DescribeScheduleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DescribeSchedule', + $argument, + ['\Temporal\Api\Workflowservice\V1\DescribeScheduleResponse', 'decode'], + $metadata, $options); + } + + /** + * Changes the configuration or state of an existing schedule. + * @param \Temporal\Api\Workflowservice\V1\UpdateScheduleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSchedule(\Temporal\Api\Workflowservice\V1\UpdateScheduleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/UpdateSchedule', + $argument, + ['\Temporal\Api\Workflowservice\V1\UpdateScheduleResponse', 'decode'], + $metadata, $options); + } + + /** + * Makes a specific change to a schedule or triggers an immediate action. + * @param \Temporal\Api\Workflowservice\V1\PatchScheduleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PatchSchedule(\Temporal\Api\Workflowservice\V1\PatchScheduleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/PatchSchedule', + $argument, + ['\Temporal\Api\Workflowservice\V1\PatchScheduleResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists matching times within a range. + * @param \Temporal\Api\Workflowservice\V1\ListScheduleMatchingTimesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListScheduleMatchingTimes(\Temporal\Api\Workflowservice\V1\ListScheduleMatchingTimesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListScheduleMatchingTimes', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListScheduleMatchingTimesResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes a schedule, removing it from the system. + * @param \Temporal\Api\Workflowservice\V1\DeleteScheduleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteSchedule(\Temporal\Api\Workflowservice\V1\DeleteScheduleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DeleteSchedule', + $argument, + ['\Temporal\Api\Workflowservice\V1\DeleteScheduleResponse', 'decode'], + $metadata, $options); + } + + /** + * List all schedules in a namespace. + * @param \Temporal\Api\Workflowservice\V1\ListSchedulesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListSchedules(\Temporal\Api\Workflowservice\V1\ListSchedulesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListSchedules', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListSchedulesResponse', 'decode'], + $metadata, $options); + } + + /** + * Deprecated. Use `UpdateWorkerVersioningRules`. + * + * Allows users to specify sets of worker build id versions on a per task queue basis. Versions + * are ordered, and may be either compatible with some extant version, or a new incompatible + * version, forming sets of ids which are incompatible with each other, but whose contained + * members are compatible with one another. + * + * A single build id may be mapped to multiple task queues using this API for cases where a single process hosts + * multiple workers. + * + * To query which workers can be retired, use the `GetWorkerTaskReachability` API. + * + * NOTE: The number of task queues mapped to a single build id is limited by the `limit.taskQueuesPerBuildId` + * (default is 20), if this limit is exceeded this API will error with a FailedPrecondition. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateWorkerBuildIdCompatibility(\Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerBuildIdCompatibility', + $argument, + ['\Temporal\Api\Workflowservice\V1\UpdateWorkerBuildIdCompatibilityResponse', 'decode'], + $metadata, $options); + } + + /** + * Deprecated. Use `GetWorkerVersioningRules`. + * Fetches the worker build id versioning sets for a task queue. + * @param \Temporal\Api\Workflowservice\V1\GetWorkerBuildIdCompatibilityRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWorkerBuildIdCompatibility(\Temporal\Api\Workflowservice\V1\GetWorkerBuildIdCompatibilityRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetWorkerBuildIdCompatibility', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetWorkerBuildIdCompatibilityResponse', 'decode'], + $metadata, $options); + } + + /** + * Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of + * rules: Build ID Assignment rules and Compatible Build ID Redirect rules. + * + * Assignment rules determine how to assign new executions to a Build IDs. Their primary + * use case is to specify the latest Build ID but they have powerful features for gradual rollout + * of a new Build ID. + * + * Once a workflow execution is assigned to a Build ID and it completes its first Workflow Task, + * the workflow stays on the assigned Build ID regardless of changes in assignment rules. This + * eliminates the need for compatibility between versions when you only care about using the new + * version for new workflows and let existing workflows finish in their own version. + * + * Activities, Child Workflows and Continue-as-New executions have the option to inherit the + * Build ID of their parent/previous workflow or use the latest assignment rules to independently + * select a Build ID. + * + * Redirect rules should only be used when you want to move workflows and activities assigned to + * one Build ID (source) to another compatible Build ID (target). You are responsible to make sure + * the target Build ID of a redirect rule is able to process event histories made by the source + * Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. + * + * WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateWorkerVersioningRules(\Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerVersioningRules', + $argument, + ['\Temporal\Api\Workflowservice\V1\UpdateWorkerVersioningRulesResponse', 'decode'], + $metadata, $options); + } + + /** + * Fetches the Build ID assignment and redirect rules for a Task Queue. + * WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + * @param \Temporal\Api\Workflowservice\V1\GetWorkerVersioningRulesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWorkerVersioningRules(\Temporal\Api\Workflowservice\V1\GetWorkerVersioningRulesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetWorkerVersioningRules', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetWorkerVersioningRulesResponse', 'decode'], + $metadata, $options); + } + + /** + * Deprecated. Use `DescribeTaskQueue`. + * + * Fetches task reachability to determine whether a worker may be retired. + * The request may specify task queues to query for or let the server fetch all task queues mapped to the given + * build IDs. + * + * When requesting a large number of task queues or all task queues associated with the given build ids in a + * namespace, all task queues will be listed in the response but some of them may not contain reachability + * information due to a server enforced limit. When reaching the limit, task queues that reachability information + * could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue + * another call to get the reachability for those task queues. + * + * Open source users can adjust this limit by setting the server's dynamic config value for + * `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. + * @param \Temporal\Api\Workflowservice\V1\GetWorkerTaskReachabilityRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWorkerTaskReachability(\Temporal\Api\Workflowservice\V1\GetWorkerTaskReachabilityRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/GetWorkerTaskReachability', + $argument, + ['\Temporal\Api\Workflowservice\V1\GetWorkerTaskReachabilityResponse', 'decode'], + $metadata, $options); + } + + /** + * Invokes the specified update function on user workflow code. + * @param \Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateWorkflowExecution(\Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkflowExecution', + $argument, + ['\Temporal\Api\Workflowservice\V1\UpdateWorkflowExecutionResponse', 'decode'], + $metadata, $options); + } + + /** + * Polls a workflow execution for the outcome of a workflow execution update + * previously issued through the UpdateWorkflowExecution RPC. The effective + * timeout on this call will be shorter of the the caller-supplied gRPC + * timeout and the server's configured long-poll timeout. + * + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --) + * @param \Temporal\Api\Workflowservice\V1\PollWorkflowExecutionUpdateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PollWorkflowExecutionUpdate(\Temporal\Api\Workflowservice\V1\PollWorkflowExecutionUpdateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/PollWorkflowExecutionUpdate', + $argument, + ['\Temporal\Api\Workflowservice\V1\PollWorkflowExecutionUpdateResponse', 'decode'], + $metadata, $options); + } + + /** + * StartBatchOperation starts a new batch operation + * @param \Temporal\Api\Workflowservice\V1\StartBatchOperationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StartBatchOperation(\Temporal\Api\Workflowservice\V1\StartBatchOperationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/StartBatchOperation', + $argument, + ['\Temporal\Api\Workflowservice\V1\StartBatchOperationResponse', 'decode'], + $metadata, $options); + } + + /** + * StopBatchOperation stops a batch operation + * @param \Temporal\Api\Workflowservice\V1\StopBatchOperationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StopBatchOperation(\Temporal\Api\Workflowservice\V1\StopBatchOperationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/StopBatchOperation', + $argument, + ['\Temporal\Api\Workflowservice\V1\StopBatchOperationResponse', 'decode'], + $metadata, $options); + } + + /** + * DescribeBatchOperation returns the information about a batch operation + * @param \Temporal\Api\Workflowservice\V1\DescribeBatchOperationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DescribeBatchOperation(\Temporal\Api\Workflowservice\V1\DescribeBatchOperationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/DescribeBatchOperation', + $argument, + ['\Temporal\Api\Workflowservice\V1\DescribeBatchOperationResponse', 'decode'], + $metadata, $options); + } + + /** + * ListBatchOperations returns a list of batch operations + * @param \Temporal\Api\Workflowservice\V1\ListBatchOperationsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListBatchOperations(\Temporal\Api\Workflowservice\V1\ListBatchOperationsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/ListBatchOperations', + $argument, + ['\Temporal\Api\Workflowservice\V1\ListBatchOperationsResponse', 'decode'], + $metadata, $options); + } + + /** + * PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks. + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\PollNexusTaskQueueRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PollNexusTaskQueue(\Temporal\Api\Workflowservice\V1\PollNexusTaskQueueRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/PollNexusTaskQueue', + $argument, + ['\Temporal\Api\Workflowservice\V1\PollNexusTaskQueueResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue. + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\RespondNexusTaskCompletedRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondNexusTaskCompleted(\Temporal\Api\Workflowservice\V1\RespondNexusTaskCompletedRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondNexusTaskCompleted', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondNexusTaskCompletedResponse', 'decode'], + $metadata, $options); + } + + /** + * RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. + * (-- api-linter: core::0127::http-annotation=disabled + * aip.dev/not-precedent: We do not expose worker API to HTTP. --) + * @param \Temporal\Api\Workflowservice\V1\RespondNexusTaskFailedRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RespondNexusTaskFailed(\Temporal\Api\Workflowservice\V1\RespondNexusTaskFailedRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/RespondNexusTaskFailed', + $argument, + ['\Temporal\Api\Workflowservice\V1\RespondNexusTaskFailedResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/proto/dependencies/gogoproto/gogo.proto b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/proto/dependencies/gogoproto/gogo.proto new file mode 100644 index 0000000..936b025 --- /dev/null +++ b/tests/php_test_files/vendor/roadrunner-php/roadrunner-api-dto/proto/dependencies/gogoproto/gogo.proto @@ -0,0 +1,144 @@ +// This code extracted from https://github.com/temporalio/api/blob/v1.25.0/dependencies/gogoproto/gogo.proto +// and will be removed in the next major release. +// +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/temporalio/gogo-protobuf +// +// 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. +// +// 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 +// OWNER 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. + +syntax = "proto3"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/gogo/protobuf/gogoproto"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; + + optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; +} diff --git a/tests/php_test_files/vendor/spiral/core/LICENSE b/tests/php_test_files/vendor/spiral/core/LICENSE new file mode 100644 index 0000000..80ffcbe --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Spiral Scout + +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. \ No newline at end of file diff --git a/tests/php_test_files/vendor/spiral/core/README.md b/tests/php_test_files/vendor/spiral/core/README.md new file mode 100644 index 0000000..99e63fc --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/README.md @@ -0,0 +1,17 @@ +# Spiral Core: Container, IoC scopes and InjectableConfigs + +[![PHP Version Require](https://poser.pugx.org/spiral/core/require/php)](https://packagist.org/packages/spiral/core) +[![Latest Stable Version](https://poser.pugx.org/spiral/core/v/stable)](https://packagist.org/packages/spiral/core) +[![phpunit](https://github.com/spiral/core/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/core/actions) +[![psalm](https://github.com/spiral/core/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/core/actions) +[![Codecov](https://codecov.io/gh/spiral/core/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral/core/) +[![Total Downloads](https://poser.pugx.org/spiral/core/downloads)](https://packagist.org/packages/spiral/core) +[![type-coverage](https://shepherd.dev/github/spiral/core/coverage.svg)](https://shepherd.dev/github/spiral/core) +[![psalm-level](https://shepherd.dev/github/spiral/core/level.svg)](https://shepherd.dev/github/spiral/core) + + +[Documentation](https://spiral.dev/docs/framework-container) | [Framework Bundle](https://github.com/spiral/framework) + +## License: + +MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/core/composer.json b/tests/php_test_files/vendor/spiral/core/composer.json new file mode 100644 index 0000000..be5f3c1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/composer.json @@ -0,0 +1,61 @@ +{ + "name": "spiral/core", + "type": "library", + "description": "IoC container, IoC scopes, factory, memory, configuration interfaces", + "license": "MIT", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/core" + }, + "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" + } + ], + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "^5.9" + }, + "autoload": { + "psr-4": { + "Spiral\\Core\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\Tests\\Core\\": "tests" + } + }, + "provide": { + "psr/container-implementation": "^1.1|^2.0" + }, + "extra": { + "branch-alias": { + "dev-master": "3.13.x-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/core/psalm.xml b/tests/php_test_files/vendor/spiral/core/psalm.xml new file mode 100644 index 0000000..7a1e487 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/psalm.xml @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/core/src/Attribute/Finalize.php b/tests/php_test_files/vendor/spiral/core/src/Attribute/Finalize.php new file mode 100644 index 0000000..ad4825b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Attribute/Finalize.php @@ -0,0 +1,21 @@ +name = \is_object($name) ? (string) $name->value : $name; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Attribute/Singleton.php b/tests/php_test_files/vendor/spiral/core/src/Attribute/Singleton.php new file mode 100644 index 0000000..fd9c04c --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Attribute/Singleton.php @@ -0,0 +1,13 @@ + $class + * @param class-string> $injector + */ + public function bindInjector(string $class, string $injector): void; + + /** + * @param class-string $class + */ + public function removeInjector(string $class): void; + + /** + * Check if class points to injector. + * + * @param class-string $class + */ + public function hasInjector(string $class): bool; +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config.php b/tests/php_test_files/vendor/spiral/core/src/Config.php new file mode 100644 index 0000000..61f7ac9 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config.php @@ -0,0 +1,83 @@ +|class-string|class-string|class-string|class-string|class-string|class-string|class-string + * > + */ +class Config implements IteratorAggregate +{ + /** @var class-string */ + public readonly string $scope; + public readonly Internal\Config\StateStorage $scopedBindings; + private bool $rootLocked = true; + + /** + * @param class-string $state + * @param class-string $resolver + * @param class-string $factory + * @param class-string $container + * @param class-string $binder + * @param class-string $invoker + * @param class-string $tracer + */ + public function __construct( + public readonly string $state = State::class, + public readonly string $resolver = Resolver::class, + public readonly string $factory = Factory::class, + public readonly string $container = Container::class, + public readonly string $binder = Binder::class, + public readonly string $invoker = Invoker::class, + public readonly string $tracer = Tracer::class, + ) { + $this->scope = Scope::class; + $this->scopedBindings = new Internal\Config\StateStorage(); + } + + public function getIterator(): Traversable + { + yield 'state' => $this->state; + yield 'resolver' => $this->resolver; + yield 'factory' => $this->factory; + yield 'container' => $this->container; + yield 'binder' => $this->binder; + yield 'invoker' => $this->invoker; + yield 'tracer' => $this->tracer; + yield 'scope' => $this->scope; + } + + /** + * Mutex lock for root container. + * First run of the method will return {@see true}, all subsequent calls will return {@see false}. + * The parent container must call the method once and before any child container. + */ + public function lockRoot(): bool + { + try { + return $this->rootLocked; + } finally { + $this->rootLocked = false; + } + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Alias.php b/tests/php_test_files/vendor/spiral/core/src/Config/Alias.php new file mode 100644 index 0000000..2ba80ba --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Alias.php @@ -0,0 +1,22 @@ +alias); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Autowire.php b/tests/php_test_files/vendor/spiral/core/src/Config/Autowire.php new file mode 100644 index 0000000..93fea24 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Autowire.php @@ -0,0 +1,24 @@ +%s()", + \is_string($this->factory[0]) ? $this->factory[0] : \get_debug_type($this->factory[0]), + $this->factory[1], + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/DeprecationProxy.php b/tests/php_test_files/vendor/spiral/core/src/Config/DeprecationProxy.php new file mode 100644 index 0000000..fa63fd8 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/DeprecationProxy.php @@ -0,0 +1,45 @@ +message ?? \sprintf( + 'Using `%s` outside of the `%s` scope is deprecated and will be impossible in version %s.', + $this->interface, + $this->scope, + $this->version + ); + + @trigger_error($message, \E_USER_DEPRECATED); + + return parent::getInterface(); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Factory.php b/tests/php_test_files/vendor/spiral/core/src/Config/Factory.php new file mode 100644 index 0000000..5fb90a2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Factory.php @@ -0,0 +1,51 @@ +factory = $callable(...); + $this->parametersCount = (new \ReflectionFunction($this->factory))->getNumberOfParameters(); + /** @psalm-suppress TypeDoesNotContainType */ + $this->definition = match (true) { + \is_string($callable) => $callable, + \is_array($callable) => \sprintf( + '%s::%s()', + \is_object($callable[0]) ? $callable[0]::class : $callable[0], + $callable[1], + ), + \is_object($callable) && $callable::class !== \Closure::class => 'object ' . $callable::class, + default => null, + }; + } + + public function __toString(): string + { + $this->definition ??= $this->renderClosureSignature(new \ReflectionFunction($this->factory)); + + return \sprintf( + 'Factory from %s', + $this->definition, + ); + } + + public function getParametersCount(): int + { + return $this->parametersCount; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Inflector.php b/tests/php_test_files/vendor/spiral/core/src/Config/Inflector.php new file mode 100644 index 0000000..d2ccd44 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Inflector.php @@ -0,0 +1,34 @@ +parametersCount = (new \ReflectionFunction($inflector))->getNumberOfParameters(); + } + + public function __toString(): string + { + return 'Inflector'; + } + + public function getParametersCount(): int + { + return $this->parametersCount; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Injectable.php b/tests/php_test_files/vendor/spiral/core/src/Config/Injectable.php new file mode 100644 index 0000000..c8d8278 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Injectable.php @@ -0,0 +1,28 @@ +injector) ? $this->injector : $this->injector::class); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Proxy.php b/tests/php_test_files/vendor/spiral/core/src/Config/Proxy.php new file mode 100644 index 0000000..940b1f2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Proxy.php @@ -0,0 +1,33 @@ +interface); + } + + /** + * @return class-string + */ + public function getInterface(): string + { + return $this->interface; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Scalar.php b/tests/php_test_files/vendor/spiral/core/src/Config/Scalar.php new file mode 100644 index 0000000..fef33ec --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Scalar.php @@ -0,0 +1,18 @@ +value), \var_export($this->value, true)); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/Shared.php b/tests/php_test_files/vendor/spiral/core/src/Config/Shared.php new file mode 100644 index 0000000..4000aac --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/Shared.php @@ -0,0 +1,21 @@ +value::class; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Config/WeakReference.php b/tests/php_test_files/vendor/spiral/core/src/Config/WeakReference.php new file mode 100644 index 0000000..bd8832e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Config/WeakReference.php @@ -0,0 +1,21 @@ + + */ +interface ConfigsInterface extends InjectorInterface +{ + /** + * Return config for one specified section. Config has to be returned in component specific + * array. + * + * @throws ConfiguratorException + */ + public function getConfig(string $section = null): array; +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Container.php b/tests/php_test_files/vendor/spiral/core/src/Container.php new file mode 100644 index 0000000..9ab13a1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Container.php @@ -0,0 +1,412 @@ +value; + } + + $this->initServices($this, $scopeName); + + /** @psalm-suppress RedundantPropertyInitializationCheck */ + \assert(isset($this->state)); + + // Bind himself + $shared = new Alias(self::class); + $this->state->bindings = \array_merge($this->state->bindings, [ + self::class => new WeakReference(\WeakReference::create($this)), + ContainerInterface::class => $shared, + BinderInterface::class => $shared, + FactoryInterface::class => $shared, + ScopeInterface::class => $shared, + ResolverInterface::class => $shared, + InvokerInterface::class => $shared, + ]); + } + + public function __destruct() + { + $this->closeScope(); + } + + /** + * Container can not be cloned. + */ + public function __clone() + { + throw new LogicException('Container is not cloneable.'); + } + + public function resolveArguments( + ContextFunction $reflection, + array $parameters = [], + bool $validate = true, + ): array { + return $this->resolver->resolveArguments($reflection, $parameters, $validate); + } + + public function validateArguments(ContextFunction $reflection, array $arguments = []): void + { + $this->resolver->validateArguments($reflection, $arguments); + } + + /** + * @param \Stringable|string|null $context Related to parameter caused injection if any. + * + * @throws ContainerException + * @throws \Throwable + * @psalm-suppress TooManyArguments + */ + public function make(string $alias, array $parameters = [], \Stringable|string|null $context = null): mixed + { + return ContainerScope::getContainer() === $this + ? $this->factory->make($alias, $parameters, $context) + : ContainerScope::runScope($this, fn () => $this->factory->make($alias, $parameters, $context)); + } + + /** + * Context parameter will be passed to class injectors, which makes possible to use this method + * as: + * + * $this->container->get(DatabaseInterface::class, 'default'); + * + * Attention, context ignored when outer container has instance by alias. + * + * @template T + * + * @param class-string|string|Autowire $id + * @param \Stringable|string|null $context Call context. + * + * @return ($id is class-string ? T : mixed) + * + * @throws ContainerException + * @throws \Throwable + * @psalm-suppress TooManyArguments + */ + public function get(string|Autowire $id, \Stringable|string|null $context = null): mixed + { + return ContainerScope::getContainer() === $this + ? $this->container->get($id, $context) + : ContainerScope::runScope($this, fn () => $this->container->get($id, $context)); + } + + public function has(string $id): bool + { + return $this->container->has($id); + } + + /** + * Make a Binder proxy to configure bindings for a specific scope. + * + * @param null|\BackedEnum|string $scope Scope name. + * If {@see null}, binder for the current working scope will be returned. + * If {@see string}, the default binder for the given scope will be returned. Default bindings won't affect + * already created Container instances except the case with the root one. + */ + public function getBinder(string|\BackedEnum|null $scope = null): BinderInterface + { + $scope = \is_object($scope) ? (string) $scope->value : $scope; + + return $scope === null + ? $this->binder + : new StateBinder($this->config->scopedBindings->getState($scope)); + } + + /** + * @throws \Throwable + */ + public function runScope(Scope|array $bindings, callable $scope): mixed + { + if (!\is_array($bindings)) { + return $this->runIsolatedScope($bindings, $scope); + } + + $binds = &$this->state->bindings; + $singletons = &$this->state->singletons; + $cleanup = $previous = $prevSin = []; + foreach ($bindings as $alias => $resolver) { + // Store previous bindings + if (isset($binds[$alias])) { + $previous[$alias] = $binds[$alias]; + } else { + // Store bindings to be removed + $cleanup[] = $alias; + } + // Store previous singletons + if (isset($singletons[$alias])) { + $prevSin[$alias] = $singletons[$alias]; + unset($singletons[$alias]); + } + + $this->binder->bind($alias, $resolver); + } + + try { + return ContainerScope::getContainer() !== $this + ? ContainerScope::runScope($this, $scope) + : $scope($this); + } finally { + // Remove new bindings + foreach ($cleanup as $alias) { + unset($binds[$alias], $singletons[$alias]); + } + // Restore previous bindings + foreach ($previous as $alias => $resolver) { + $binds[$alias] = $resolver; + } + // Restore singletons + foreach ($prevSin as $alias => $instance) { + $singletons[$alias] = $instance; + } + } + } + + /** + * Invoke given closure or function withing specific IoC scope. + * + * @template TReturn + * + * @param callable(mixed ...$params): TReturn $closure + * @param array $bindings Custom bindings for the new scope. + * @param null|string $name Scope name. Named scopes can have individual bindings and constrains. + * @param bool $autowire If {@see false}, closure will be invoked with just only the passed Container as an + * argument. Otherwise, {@see InvokerInterface::invoke()} will be used to invoke the closure. + * + * @return TReturn + * @throws \Throwable + * + * @deprecated Use {@see runScope()} with the {@see Scope} as the first argument. + * @internal Used in tests only + */ + public function runScoped(callable $closure, array $bindings = [], ?string $name = null, bool $autowire = true): mixed + { + return $this->runIsolatedScope(new Scope($name, $bindings, $autowire), $closure); + } + + /** + * Bind value resolver to container alias. Resolver can be class name (will be constructed + * for each method call), function array or Closure (executed every call). Only object resolvers + * supported by this method. + */ + public function bind(string $alias, mixed $resolver): void + { + $this->binder->bind($alias, $resolver); + } + + /** + * Bind value resolver to container alias to be executed as cached. Resolver can be class name + * (will be constructed only once), function array or Closure (executed only once call). + * + * @psalm-param TResolver $resolver + * @param bool $force If the value is false, an exception will be thrown when attempting + * to bind an already constructed singleton. + */ + public function bindSingleton(string $alias, string|array|callable|object $resolver, bool $force = true): void + { + if ($force) { + $this->binder->removeBinding($alias); + } + + $this->binder->bindSingleton($alias, $resolver); + } + + /** + * Check if alias points to constructed instance (singleton). + */ + public function hasInstance(string $alias): bool + { + return $this->binder->hasInstance($alias); + } + + public function removeBinding(string $alias): void + { + $this->binder->removeBinding($alias); + } + + /** + * @psalm-param TInvokable $target + */ + public function invoke(mixed $target, array $parameters = []): mixed + { + return ContainerScope::getContainer() === $this + ? $this->invoker->invoke($target, $parameters) + : ContainerScope::runScope($this, fn () => $this->invoker->invoke($target, $parameters)); + } + + /** + * Bind class or class interface to the injector source (InjectorInterface). + */ + public function bindInjector(string $class, string $injector): void + { + $this->binder->bindInjector($class, $injector); + } + + public function removeInjector(string $class): void + { + $this->binder->removeInjector($class); + } + + public function hasInjector(string $class): bool + { + return $this->binder->hasInjector($class); + } + + /** + * Init internal container services. + */ + private function initServices( + self $container, + ?string $scopeName, + ): void { + $isRoot = $container->config->lockRoot(); + + // Get named scope or create anonymous one + $state = match (true) { + $scopeName === null => new Internal\State(), + // Only root container can make default bindings directly + $isRoot => $container->config->scopedBindings->getState($scopeName), + default => clone $container->config->scopedBindings->getState($scopeName), + }; + + $constructor = new Internal\Common\Registry($container->config, [ + 'state' => $state, + 'scope' => new Internal\Scope($scopeName), + ], $this->options); + + // Create container services + foreach ($container->config as $property => $class) { + if (\property_exists($container, $property)) { + $container->$property = $constructor->get($property, $class); + } + } + } + + /** + * Execute finalizers and destruct the container. + * + * @throws FinalizersException + */ + private function closeScope(): void + { + /** @psalm-suppress RedundantPropertyInitializationCheck */ + if (!isset($this->scope)) { + $this->destruct(); + return; + } + + $scopeName = $this->scope->getScopeName(); + + // Run finalizers + $errors = []; + foreach ($this->state->finalizers as $finalizer) { + try { + $this->invoker->invoke($finalizer); + } catch (\Throwable $e) { + $errors[] = $e; + } + } + + // Destroy the container + $this->destruct(); + + // Throw collected errors + if ($errors !== []) { + throw new FinalizersException($scopeName, $errors); + } + } + + /** + * @template TReturn + * + * @param callable(mixed ...$params): TReturn $closure + * + * @return TReturn + * @throws \Throwable + */ + private function runIsolatedScope(Scope $config, callable $closure): mixed + { + // Open scope + $container = new self($this->config, $config->name, $this->options); + + // Configure scope + $container->scope->setParent($this, $this->scope, $this->factory); + + // Add specific bindings + foreach ($config->bindings as $alias => $resolver) { + $container->binder->bind($alias, $resolver); + } + + return ContainerScope::runScope( + $container, + static function (self $container) use ($config, $closure): mixed { + try { + return $config->autowire + ? $container->invoke($closure) + : $closure($container); + } finally { + $container->closeScope(); + } + } + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Container/Autowire.php b/tests/php_test_files/vendor/spiral/core/src/Container/Autowire.php new file mode 100644 index 0000000..aa8fd9a --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Container/Autowire.php @@ -0,0 +1,79 @@ + $alias + */ + public function __construct( + private readonly string $alias, + private readonly array $parameters = [] + ) { + } + + public static function __set_state(array $anArray): static + { + return new self($anArray['alias'], $anArray['parameters']); + } + + /** + * Init the autowire based on string or array definition. + * + * @throws AutowireException + */ + public static function wire(mixed $definition): Autowire + { + if ($definition instanceof self) { + return $definition; + } + + if (\is_string($definition)) { + return new self($definition); + } + + if (\is_array($definition) && isset($definition['class'])) { + return new self( + $definition['class'], + $definition['options'] ?? $definition['params'] ?? [] + ); + } + + if (\is_object($definition)) { + $autowire = new self($definition::class, []); + $autowire->target = $definition; + return $autowire; + } + + throw new AutowireException('Invalid autowire definition.'); + } + + /** + * @param array $parameters Context specific parameters (always prior to declared ones). + * @return TObject + * + * @throws AutowireException No entry was found for this identifier. + * @throws ContainerException Error while retrieving the entry. + */ + public function resolve(FactoryInterface $factory, array $parameters = []): object + { + return $this->target ?? $factory->make($this->alias, \array_merge($this->parameters, $parameters)); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Container/InjectableInterface.php b/tests/php_test_files/vendor/spiral/core/src/Container/InjectableInterface.php new file mode 100644 index 0000000..9aa520d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Container/InjectableInterface.php @@ -0,0 +1,15 @@ + $class Request class type. + * @param string|null $context Parameter or alias name. + * + * @return TClass + * + * @throws ContainerException + */ + public function createInjection(\ReflectionClass $class, ?string $context = null): object; +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Container/SingletonInterface.php b/tests/php_test_files/vendor/spiral/core/src/Container/SingletonInterface.php new file mode 100644 index 0000000..d7f2ef7 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Container/SingletonInterface.php @@ -0,0 +1,15 @@ + $scope(self::$container)); + $value = $fiber->start(); + while (!$fiber->isTerminated()) { + self::$container = $previous; + try { + $resume = Fiber::suspend($value); + } catch (Throwable $e) { + self::$container = $container; + $value = $fiber->throw($e); + continue; + } + + self::$container = $container; + $value = $fiber->resume($resume); + } + return $fiber->getReturn(); + } finally { + self::$container = $previous; + } + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Binder/SingletonOverloadException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Binder/SingletonOverloadException.php new file mode 100644 index 0000000..6ae8896 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Binder/SingletonOverloadException.php @@ -0,0 +1,19 @@ +getName(); + if ($context instanceof \ReflectionMethod) { + $name = $context->class . '::' . $name; + } + + parent::__construct(\sprintf("Unable to resolve '%s' argument in '%s'", $parameter->name, $name)); + } + + public function getParameter(): \ReflectionParameter + { + return $this->parameter; + } + + public function getContext(): \ReflectionFunctionAbstract + { + return $this->context; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Container/AutowireException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Container/AutowireException.php new file mode 100644 index 0000000..de3775d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Container/AutowireException.php @@ -0,0 +1,12 @@ +renderFunctionAndParameter($reflection, $pattern)); + } + + public function getParameter(): string + { + return $this->parameter; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/InvalidArgumentException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/InvalidArgumentException.php new file mode 100644 index 0000000..b052f03 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/InvalidArgumentException.php @@ -0,0 +1,25 @@ +renderFunctionAndParameter($reflection, $pattern)); + } + + public function getParameter(): string + { + return $this->parameter; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/MissingRequiredArgumentException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/MissingRequiredArgumentException.php new file mode 100644 index 0000000..d82d9ab --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/MissingRequiredArgumentException.php @@ -0,0 +1,25 @@ +renderFunctionAndParameter($reflection, $pattern)); + } + + public function getParameter(): string + { + return $this->parameter; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/PositionalArgumentException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/PositionalArgumentException.php new file mode 100644 index 0000000..3e5f0b5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/PositionalArgumentException.php @@ -0,0 +1,25 @@ +renderFunctionAndParameter($reflection, $pattern)); + } + + public function getParameter(): string + { + return '#' . $this->position; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/ResolvingException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/ResolvingException.php new file mode 100644 index 0000000..f947a9d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/ResolvingException.php @@ -0,0 +1,11 @@ +renderFunctionAndParameter($reflection, $pattern)); + } + + public function getParameter(): string + { + return $this->parameter; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/UnsupportedTypeException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/UnsupportedTypeException.php new file mode 100644 index 0000000..feeee59 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/UnsupportedTypeException.php @@ -0,0 +1,18 @@ +renderFunctionAndParameter($reflection, $pattern)); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/ValidationException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/ValidationException.php new file mode 100644 index 0000000..3a3b7fb --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Resolver/ValidationException.php @@ -0,0 +1,10 @@ +getMessage(), + $error->getCode(), + $error + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/RuntimeException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/RuntimeException.php new file mode 100644 index 0000000..dc8290e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/RuntimeException.php @@ -0,0 +1,12 @@ + \sprintf( + "# %s\n%s", + $e::class, + $e->getMessage(), + ), + $exceptions, + )), + ), + ); + } + + /** + * @return Throwable[] + */ + public function getExceptions(): array + { + return $this->exceptions; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Scope/NamedScopeDuplicationException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Scope/NamedScopeDuplicationException.php new file mode 100644 index 0000000..06f1610 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Scope/NamedScopeDuplicationException.php @@ -0,0 +1,20 @@ +, string|null> $parents + */ + public function __construct( + ?string $scope, + array $parents, + ) { + $scopes = \implode('->', \array_map( + static fn (?string $scope): string => $scope === null ? 'null' : "\"$scope\"", + [...\array_reverse($parents), $scope], + )); + parent::__construct( + $scope, + \sprintf('Scoped container has been leaked. Scope: %s.', $scopes), + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/Scope/ScopeException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/Scope/ScopeException.php new file mode 100644 index 0000000..ecfdf7d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/Scope/ScopeException.php @@ -0,0 +1,31 @@ +scope; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Exception/ScopeException.php b/tests/php_test_files/vendor/spiral/core/src/Exception/ScopeException.php new file mode 100644 index 0000000..2d61662 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Exception/ScopeException.php @@ -0,0 +1,15 @@ +getName(); + /** @var class-string|null $class */ + $class = $reflection->class ?? null; + + $method = match (true) { + $class !== null => "{$class}::{$function}", + $reflection->isClosure() => $this->renderClosureSignature($reflection), + default => $function, + }; + + $fileName = $reflection->getFileName(); + $line = $reflection->getStartLine(); + + $fileAndLine = ''; + if (!empty($fileName)) { + $fileAndLine = "in \"$fileName\" at line $line"; + } + + return \sprintf($pattern, $method, $fileAndLine); + } + + private function renderClosureSignature(\ReflectionFunctionAbstract $reflection): string + { + $closureParameters = []; + + foreach ($reflection->getParameters() as $parameter) { + /** @var ReflectionNamedType|ReflectionUnionType|null $type */ + $type = $parameter->getType(); + $parameterString = \sprintf( + '%s %s%s$%s', + // type + (string) $type, + // reference + $parameter->isPassedByReference() ? '&' : '', + // variadic + $parameter->isVariadic() ? '...' : '', + $parameter->getName(), + ); + if ($parameter->isDefaultValueAvailable()) { + $default = $parameter->getDefaultValue(); + $parameterString .= ' = ' . match (true) { + \is_object($default) => 'new ' . $default::class . '(...)', + $parameter->isDefaultValueConstant() => $parameter->getDefaultValueConstantName(), + default => \var_export($default, true), + }; + } + $closureParameters[] = \ltrim($parameterString); + } + $static = $reflection->isStatic() ? 'static ' : ''; + return "{$static}function (" . \implode(', ', $closureParameters) . ')'; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/FactoryInterface.php b/tests/php_test_files/vendor/spiral/core/src/FactoryInterface.php new file mode 100644 index 0000000..50d602a --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/FactoryInterface.php @@ -0,0 +1,32 @@ +|string $alias + * @param array $parameters Parameters to construct new class. + * @psalm \Stringable|string|null $context Related to parameter caused injection if any. + * Will be added in the signature {@since 4.0.0} + * + * @return T + * @psalm-return ($alias is class-string ? T : mixed) + * + * @throws AutowireException + */ + public function make(string $alias, array $parameters = []): mixed; +} diff --git a/tests/php_test_files/vendor/spiral/core/src/InjectableConfig.php b/tests/php_test_files/vendor/spiral/core/src/InjectableConfig.php new file mode 100644 index 0000000..357b793 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/InjectableConfig.php @@ -0,0 +1,85 @@ + + * @implements \ArrayAccess + */ +abstract class InjectableConfig implements InjectableInterface, \IteratorAggregate, \ArrayAccess +{ + /** + * @var class-string + */ + public const INJECTOR = ConfigsInterface::class; + + protected array $config = []; + + /** + * At this moment on array based configs can be supported. + * @param array $config Configuration data + */ + public function __construct(array $config = []) + { + $this->config = $config + $this->config; + } + + /** + * Restoring state. + */ + public static function __set_state(array $anArray): static + { + return new static($anArray['config']); + } + + public function toArray(): array + { + return $this->config; + } + + public function offsetExists(mixed $offset): bool + { + return \array_key_exists($offset, $this->config); + } + + public function offsetGet(mixed $offset): mixed + { + if (!$this->offsetExists($offset)) { + throw new ConfigException(\sprintf("Undefined configuration key '%s'", $offset)); + } + + return $this->config[$offset]; + } + + /** + * @throws ConfigException + */ + public function offsetSet(mixed $offset, mixed $value): never + { + throw new ConfigException( + 'Unable to change configuration data, configs are treated as immutable by default' + ); + } + + /** + * @throws ConfigException + */ + public function offsetUnset(mixed $offset): never + { + throw new ConfigException( + 'Unable to change configuration data, configs are treated as immutable by default' + ); + } + + public function getIterator(): \Traversable + { + return new \ArrayIterator($this->config); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Binder.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Binder.php new file mode 100644 index 0000000..48bf816 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Binder.php @@ -0,0 +1,50 @@ +set('binder', $this); + + $this->container = $constructor->get('container', ContainerInterface::class); + $this->scope = $constructor->get('scope', Scope::class); + + parent::__construct($constructor->get('state', State::class)); + } + + public function hasInstance(string $alias): bool + { + $parent = $this->scope->getParent(); + if ($parent !== null && $parent->hasInstance($alias)) { + return true; + } + + if (!$this->container->has($alias)) { + return false; + } + + return parent::hasInstance($alias); + } + + public function destruct(): void + { + unset($this->container); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Common/DestructorTrait.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Common/DestructorTrait.php new file mode 100644 index 0000000..3c009c1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Common/DestructorTrait.php @@ -0,0 +1,27 @@ +getProperties() as $property) { + $name = $property->getName(); + if (!isset($this->$name)) { + continue; + } + $value = $this->$name; + unset($this->$name); + if (\is_object($value) && \method_exists($value, 'destruct')) { + $value->destruct(); + } + } + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Common/Registry.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Common/Registry.php new file mode 100644 index 0000000..e24e60b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Common/Registry.php @@ -0,0 +1,49 @@ + $objects + */ + public function __construct( + private Config $config, + private array $objects = [], + private Options $options = new Options(), + ) { + } + + public function set(string $name, object $value): void + { + $this->objects[$name] = $value; + } + + /** + * @template T + * + * @param class-string $interface + * + * @return T + */ + public function get(string $name, string $interface): object + { + $className = $this->config->$name; + $result = $this->objects[$name] ?? new $className($this); + \assert($result instanceof $interface); + return $result; + } + + public function getOptions(): Options + { + return $this->options; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Config/StateBinder.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Config/StateBinder.php new file mode 100644 index 0000000..9b0a2ba --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Config/StateBinder.php @@ -0,0 +1,200 @@ +state->inflectors[$alias][] = $resolver; + return; + } + + try { + $config = $this->makeConfig($resolver, false); + } catch (\Throwable $e) { + throw $this->invalidBindingException($alias, $e); + } + + $this->setBinding($alias, $config); + } + + /** + * @param TResolver|object $resolver + */ + public function bindSingleton(string $alias, mixed $resolver): void + { + try { + $config = $this->makeConfig($resolver, true); + } catch (\Throwable $e) { + throw $this->invalidBindingException($alias, $e); + } + + $this->setBinding($alias, $config); + } + + public function hasInstance(string $alias): bool + { + $bindings = &$this->state->bindings; + + $flags = []; + while ($binding = $bindings[$alias] ?? null and $binding::class === Alias::class) { + //Checking alias tree + if ($flags[$binding->alias] ?? false) { + return $binding->alias === $alias ?: throw new Exception('Circular alias detected'); + } + + if (\array_key_exists($alias, $this->state->singletons)) { + return true; + } + + $flags[$binding->alias] = true; + $alias = $binding->alias; + } + + return \array_key_exists($alias, $this->state->singletons) or isset($bindings[$alias]); + } + + public function removeBinding(string $alias): void + { + unset($this->state->bindings[$alias], $this->state->singletons[$alias]); + } + + public function bindInjector(string $class, string $injector): void + { + $this->state->bindings[$class] = new Injectable($injector); + $this->state->injectors[$class] = $injector; + } + + public function removeInjector(string $class): void + { + unset($this->state->injectors[$class]); + if (!isset($this->state->bindings[$class]) || $this->state->bindings[$class]::class !== Injectable::class) { + return; + } + unset($this->state->bindings[$class]); + } + + public function hasInjector(string $class): bool + { + if (\array_key_exists($class, $this->state->injectors)) { + return true; + } + + try { + $reflection = new \ReflectionClass($class); + } catch (\ReflectionException $e) { + throw new ContainerException($e->getMessage(), $e->getCode(), $e); + } + + if ( + $reflection->implementsInterface(InjectableInterface::class) + && $reflection->hasConstant('INJECTOR') + ) { + $const = $reflection->getConstant('INJECTOR'); + $this->bindInjector($class, $const); + + return true; + } + + // check interfaces + foreach ($this->state->injectors as $target => $injector) { + if ( + (\class_exists($target, true) && $reflection->isSubclassOf($target)) + || + (\interface_exists($target, true) && $reflection->implementsInterface($target)) + ) { + $this->state->bindings[$class] = new Injectable($injector); + + return true; + } + } + + return false; + } + + private function makeConfig(mixed $resolver, bool $singleton): Binding + { + return match (true) { + $resolver instanceof Binding => $resolver, + $resolver instanceof \Closure => new Factory($resolver, $singleton), + $resolver instanceof Autowire => new \Spiral\Core\Config\Autowire($resolver, $singleton), + $resolver instanceof WeakReference => new \Spiral\Core\Config\WeakReference($resolver), + \is_string($resolver) => new Alias($resolver, $singleton), + \is_scalar($resolver) => new Scalar($resolver), + \is_object($resolver) => new Shared($resolver), + \is_array($resolver) => $this->makeConfigFromArray($resolver, $singleton), + default => throw new InvalidArgumentException('Unknown resolver type.'), + }; + } + + private function makeConfigFromArray(array $resolver, bool $singleton): Binding + { + if (\is_callable($resolver)) { + return new Factory($resolver, $singleton); + } + + // Validate lazy invokable array + if (!isset($resolver[0]) || !isset($resolver[1]) || !\is_string($resolver[1]) || $resolver[1] === '') { + throw new InvalidArgumentException('Incompatible array declaration for resolver.'); + } + if ((!\is_string($resolver[0]) && !\is_object($resolver[0])) || $resolver[0] === '') { + throw new InvalidArgumentException('Incompatible array declaration for resolver.'); + } + + return new DeferredFactory($resolver, $singleton); + } + + private function invalidBindingException(string $alias, Throwable $previous): Throwable + { + return new ConfiguratorException(\sprintf( + 'Invalid binding for `%s`. %s', + $alias, + $previous->getMessage(), + ), previous: $previous); + } + + private function setBinding(string $alias, Binding $config): void + { + if (isset($this->state->singletons[$alias])) { + throw new SingletonOverloadException($alias); + } + + $this->state->bindings[$alias] = $config; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Config/StateStorage.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Config/StateStorage.php new file mode 100644 index 0000000..e9065a2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Config/StateStorage.php @@ -0,0 +1,21 @@ + */ + private array $states = []; + + /** + * Get bindings for the given scope. + */ + public function getState(string $scope): State + { + return $this->states[$scope] ??= new State(); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Container.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Container.php new file mode 100644 index 0000000..d50930e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Container.php @@ -0,0 +1,72 @@ +set('container', $this); + + $this->state = $constructor->get('state', State::class); + $this->factory = $constructor->get('factory', FactoryInterface::class); + $this->scope = $constructor->get('scope', Scope::class); + } + + /** + * Context parameter will be passed to class injectors, which makes possible to use this method + * as: + * + * $this->container->get(DatabaseInterface::class, 'default'); + * + * Attention, context ignored when outer container has instance by alias. + * + * @template T + * + * @param class-string|string|Autowire $id + * @param string|null $context Call context. + * + * @return ($id is class-string ? T : mixed) + * + * @throws ContainerException + * @throws \Throwable + */ + public function get(string|Autowire $id, \Stringable|string|null $context = null): mixed + { + if ($id instanceof Autowire) { + return $id->resolve($this->factory); + } + + /** @psalm-suppress TooManyArguments */ + return $this->factory->make($id, [], $context); + } + + public function has(string $id): bool + { + if (\array_key_exists($id, $this->state->bindings) || \array_key_exists($id, $this->state->singletons)) { + return true; + } + + $parent = $this->scope->getParent(); + + return $parent !== null && $parent->has($id); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Factory.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Factory.php new file mode 100644 index 0000000..eac3f5f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Factory.php @@ -0,0 +1,577 @@ +set('factory', $this); + + $this->state = $constructor->get('state', State::class); + $this->binder = $constructor->get('binder', BinderInterface::class); + $this->invoker = $constructor->get('invoker', InvokerInterface::class); + $this->container = $constructor->get('container', ContainerInterface::class); + $this->resolver = $constructor->get('resolver', ResolverInterface::class); + $this->tracer = $constructor->get('tracer', Tracer::class); + $this->scope = $constructor->get('scope', Scope::class); + $this->options = $constructor->getOptions(); + } + + /** + * @param Stringable|string|null $context Related to parameter caused injection if any. + * + * @throws \Throwable + */ + public function make(string $alias, array $parameters = [], Stringable|string|null $context = null): mixed + { + if ($parameters === [] && \array_key_exists($alias, $this->state->singletons)) { + return $this->state->singletons[$alias]; + } + + $binding = $this->state->bindings[$alias] ?? null; + + if ($binding === null) { + return $this->resolveWithoutBinding($alias, $parameters, $context); + } + + try { + $this->tracer->push( + false, + action: 'resolve from binding', + alias: $alias, + scope: $this->scope->getScopeName(), + context: $context, + binding: $binding, + ); + $this->tracer->push(true); + + unset($this->state->bindings[$alias]); + return match ($binding::class) { + Config\Alias::class => $this->resolveAlias($binding, $alias, $context, $parameters), + Config\Proxy::class, + Config\DeprecationProxy::class => $this->resolveProxy($binding, $alias, $context), + Config\Autowire::class => $this->resolveAutowire($binding, $alias, $context, $parameters), + Config\DeferredFactory::class, + Config\Factory::class => $this->resolveFactory($binding, $alias, $context, $parameters), + Config\Shared::class => $this->resolveShared($binding, $alias, $context, $parameters), + Config\Injectable::class => $this->resolveInjector( + $binding, + new Ctx(alias: $alias, class: $alias, context: $context), + $parameters, + ), + Config\Scalar::class => $binding->value, + Config\WeakReference::class => $this + ->resolveWeakReference($binding, $alias, $context, $parameters), + default => $binding, + }; + } finally { + $this->state->bindings[$alias] ??= $binding; + $this->tracer->pop(true); + $this->tracer->pop(false); + } + } + + /** + * @psalm-suppress UnusedParam + * todo wat should we do with $arguments? + */ + private function resolveInjector(Config\Injectable $binding, Ctx $ctx, array $arguments) + { + $context = $ctx->context; + try { + $reflection = $ctx->reflection ??= new \ReflectionClass($ctx->class); + } catch (\ReflectionException $e) { + throw new ContainerException($e->getMessage(), $e->getCode(), $e); + } + + $injector = $binding->injector; + + try { + $injectorInstance = \is_object($injector) ? $injector : $this->container->get($injector); + + if (!$injectorInstance instanceof InjectorInterface) { + throw new InjectionException( + \sprintf( + "Class '%s' must be an instance of InjectorInterface for '%s'.", + $injectorInstance::class, + $reflection->getName() + ) + ); + } + + /** @var array, \ReflectionMethod|false> $cache reflection for extended injectors */ + static $cache = []; + $extended = $cache[$injectorInstance::class] ??= ( + static fn (\ReflectionType $type): bool => + $type::class === \ReflectionUnionType::class || (string)$type === 'mixed' + )( + ($refMethod = new \ReflectionMethod($injectorInstance, 'createInjection')) + ->getParameters()[1]->getType() + ) ? $refMethod : false; + + $asIs = $extended && (\is_string($context) || $this->validateArguments($extended, [$reflection, $context])); + $instance = $injectorInstance->createInjection($reflection, match (true) { + $asIs => $context, + $context instanceof ReflectionParameter => $context->getName(), + default => (string)$context, + }); + + if (!$reflection->isInstance($instance)) { + throw new InjectionException( + \sprintf( + "Invalid injection response for '%s'.", + $reflection->getName() + ) + ); + } + + return $instance; + } finally { + $this->state->bindings[$ctx->class] ??= $binding; + } + } + + private function resolveAlias( + Config\Alias $binding, + string $alias, + Stringable|string|null $context, + array $arguments, + ): mixed { + $result = $binding->alias === $alias + ? $this->autowire( + new Ctx(alias: $alias, class: $binding->alias, context: $context, singleton: $binding->singleton), + $arguments, + ) + //Binding is pointing to something else + : $this->make($binding->alias, $arguments, $context); + + if ($binding->singleton && $arguments === []) { + $this->state->singletons[$alias] = $result; + } + + return $result; + } + + private function resolveProxy(Config\Proxy $binding, string $alias, Stringable|string|null $context): mixed + { + $result = Proxy::create(new \ReflectionClass($binding->getInterface()), $context, new Attribute\Proxy()); + + if ($binding->singleton) { + $this->state->singletons[$alias] = $result; + } + + return $result; + } + + private function resolveShared( + Config\Shared $binding, + string $alias, + Stringable|string|null $context, + array $arguments, + ): object { + $avoidCache = $arguments !== []; + return $avoidCache + ? $this->createInstance( + new Ctx(alias: $alias, class: $binding->value::class, context: $context), + $arguments, + ) + : $binding->value; + } + + private function resolveAutowire( + Config\Autowire $binding, + string $alias, + Stringable|string|null $context, + array $arguments, + ): mixed { + $instance = $binding->autowire->resolve($this, $arguments); + + $ctx = new Ctx(alias: $alias, class: $alias, context: $context, singleton: $binding->singleton); + return $this->validateNewInstance($instance, $ctx, $arguments); + } + + private function resolveFactory( + Config\Factory|Config\DeferredFactory $binding, + string $alias, + Stringable|string|null $context, + array $arguments, + ): mixed { + $ctx = new Ctx(alias: $alias, class: $alias, context: $context, singleton: $binding->singleton); + try { + $instance = $binding::class === Config\Factory::class && $binding->getParametersCount() === 0 + ? ($binding->factory)() + : $this->invoker->invoke($binding->factory, $arguments); + } catch (NotCallableException $e) { + throw new ContainerException( + $this->tracer->combineTraceMessage(\sprintf('Invalid binding for `%s`.', $ctx->alias)), + $e->getCode(), + $e, + ); + } + + return \is_object($instance) ? $this->validateNewInstance($instance, $ctx, $arguments) : $instance; + } + + private function resolveWeakReference( + Config\WeakReference $binding, + string $alias, + Stringable|string|null $context, + array $arguments, + ): ?object { + $avoidCache = $arguments !== []; + + if (($avoidCache || $binding->reference->get() === null) && \class_exists($alias)) { + try { + $this->tracer->push(false, alias: $alias, source: WeakReference::class, context: $context); + + $object = $this->createInstance( + new Ctx(alias: $alias, class: $alias, context: $context), + $arguments, + ); + if ($avoidCache) { + return $object; + } + $binding->reference = WeakReference::create($object); + } catch (\Throwable) { + throw new ContainerException( + $this->tracer->combineTraceMessage( + \sprintf( + 'Can\'t resolve `%s`: can\'t instantiate `%s` from WeakReference binding.', + $this->tracer->getRootAlias(), + $alias, + ) + ) + ); + } finally { + $this->tracer->pop(); + } + } + + return $binding->reference->get(); + } + + private function resolveWithoutBinding( + string $alias, + array $parameters = [], + Stringable|string|null $context = null + ): mixed { + $parent = $this->scope->getParentFactory(); + + if ($parent !== null) { + try { + $this->tracer->push(false, ...[ + 'current scope' => $this->scope->getScopeName(), + 'jump to parent scope' => $this->scope->getParentScope()->getScopeName(), + ]); + /** @psalm-suppress TooManyArguments */ + return $parent->make($alias, $parameters, $context); + } catch (BadScopeException $e) { + if ($this->scope->getScopeName() !== $e->getScope()) { + throw $e; + } + } catch (ContainerExceptionInterface $e) { + $className = match (true) { + $e instanceof NotFoundException => NotFoundException::class, + default => ContainerException::class, + }; + throw new $className($this->tracer->combineTraceMessage(\sprintf( + 'Can\'t resolve `%s`.', + $alias, + )), previous: $e); + } finally { + $this->tracer->pop(false); + } + } + + $this->tracer->push(false, action: 'autowire', alias: $alias, context: $context); + try { + //No direct instructions how to construct class, make is automatically + return $this->autowire( + new Ctx(alias: $alias, class: $alias, context: $context), + $parameters, + ); + } finally { + $this->tracer->pop(false); + } + } + + /** + * Automatically create class. + * Object will be cached if the $arguments list is empty. + * + * @psalm-assert class-string $class + * + * @throws AutowireException + * @throws \Throwable + */ + private function autowire(Ctx $ctx, array $arguments): object + { + if (!(\class_exists($ctx->class) || ( + \interface_exists($ctx->class) + && + (isset($this->state->injectors[$ctx->class]) || $this->binder->hasInjector($ctx->class)) + )) + ) { + throw new NotFoundException($this->tracer->combineTraceMessage(\sprintf( + 'Can\'t resolve `%s`: undefined class or binding `%s`.', + $this->tracer->getRootAlias(), + $ctx->class, + ))); + } + + // automatically create instance + $instance = $this->createInstance($ctx, $arguments); + + // apply registration functions to created instance + return $arguments === [] + ? $this->registerInstance($ctx, $instance) + : $instance; + } + + /** + * @throws BadScopeException + * @throws \Throwable + */ + private function validateNewInstance( + object $instance, + Ctx $ctx, + array $arguments, + ): object { + if ($this->options->checkScope) { + // Check scope name + $ctx->reflection = new \ReflectionClass($instance); + $scopeName = ($ctx->reflection->getAttributes(Attribute\Scope::class)[0] ?? null)?->newInstance()->name; + if ($scopeName !== null) { + $scope = $this->scope; + while ($scope->getScopeName() !== $scopeName) { + $scope = $scope->getParentScope() ?? throw new BadScopeException($scopeName, $instance::class); + } + } + } + + return $arguments === [] + ? $this->registerInstance($ctx, $instance) + : $instance; + } + + /** + * Create instance of desired class. + * + * @template TObject of object + * + * @param Ctx $ctx + * @param array $arguments Constructor arguments. + * + * @return TObject + * + * @throws ContainerException + * @throws \Throwable + */ + private function createInstance( + Ctx $ctx, + array $arguments, + ): object { + $class = $ctx->class; + try { + $ctx->reflection = $reflection = new \ReflectionClass($class); + } catch (\ReflectionException $e) { + throw new ContainerException($e->getMessage(), $e->getCode(), $e); + } + + // Check scope name + if ($this->options->checkScope) { + $scope = ($reflection->getAttributes(Attribute\Scope::class)[0] ?? null)?->newInstance()->name; + if ($scope !== null && $scope !== $this->scope->getScopeName()) { + throw new BadScopeException($scope, $class); + } + } + + // We have to construct class using external injector when we know the exact context + if ($arguments === [] && $this->binder->hasInjector($class)) { + return $this->resolveInjector($this->state->bindings[$ctx->class], $ctx, $arguments); + } + + if (!$reflection->isInstantiable()) { + $itIs = match (true) { + $reflection->isEnum() => 'Enum', + $reflection->isAbstract() => 'Abstract class', + default => 'Class', + }; + throw new ContainerException( + $this->tracer->combineTraceMessage(\sprintf('%s `%s` can not be constructed.', $itIs, $class)), + ); + } + + $constructor = $reflection->getConstructor(); + + if ($constructor !== null) { + try { + $this->tracer->push(false, action: 'resolve arguments', signature: $constructor); + $this->tracer->push(true); + $args = $this->resolver->resolveArguments($constructor, $arguments, $this->options->validateArguments); + } catch (ValidationException $e) { + throw new ContainerException( + $this->tracer->combineTraceMessage( + \sprintf( + 'Can\'t resolve `%s`. %s', + $this->tracer->getRootAlias(), + $e->getMessage() + ) + ), + ); + } finally { + $this->tracer->pop(true); + $this->tracer->pop(false); + } + try { + // Using constructor with resolved arguments + $this->tracer->push(false, call: "$class::__construct", arguments: $args); + $this->tracer->push(true); + $instance = new $class(...$args); + } catch (\TypeError $e) { + throw new WrongTypeException($constructor, $e); + } finally { + $this->tracer->pop(true); + $this->tracer->pop(false); + } + } else { + // No constructor specified + $instance = $reflection->newInstance(); + } + + return $instance; + } + + /** + * Register instance in container, might perform methods like auto-singletons, log populations, etc. + */ + private function registerInstance(Ctx $ctx, object $instance): object + { + $ctx->reflection ??= new \ReflectionClass($instance); + + $instance = $this->runInflector($instance); + + //Declarative singletons + if ($this->isSingleton($ctx)) { + $this->state->singletons[$ctx->alias] = $instance; + } + + // Register finalizer + $finalizer = $this->getFinalizer($ctx, $instance); + if ($finalizer !== null) { + $this->state->finalizers[] = $finalizer; + } + + return $instance; + } + + /** + * Check the class was configured as a singleton. + */ + private function isSingleton(Ctx $ctx): bool + { + if ($ctx->singleton === true) { + return true; + } + + /** @psalm-suppress RedundantCondition https://github.com/vimeo/psalm/issues/9489 */ + if ($ctx->reflection->implementsInterface(SingletonInterface::class)) { + return true; + } + + return $ctx->reflection->getAttributes(Attribute\Singleton::class) !== []; + } + + private function getFinalizer(Ctx $ctx, object $instance): ?callable + { + /** + * @psalm-suppress UnnecessaryVarAnnotation + * @var Attribute\Finalize|null $attribute + */ + $attribute = ($ctx->reflection->getAttributes(Attribute\Finalize::class)[0] ?? null)?->newInstance(); + if ($attribute === null) { + return null; + } + + return [$instance, $attribute->method]; + } + + /** + * Find and run inflector + */ + private function runInflector(object $instance): object + { + $scope = $this->scope; + + while ($scope !== null) { + foreach ($this->state->inflectors as $class => $inflectors) { + if ($instance instanceof $class) { + foreach ($inflectors as $inflector) { + $instance = $inflector->getParametersCount() > 1 + ? $this->invoker->invoke($inflector->inflector, [$instance]) + : ($inflector->inflector)($instance); + } + } + } + + $scope = $scope->getParentScope(); + } + + return $instance; + } + + private function validateArguments(ContextFunction $reflection, array $arguments = []): bool + { + try { + $this->resolver->validateArguments($reflection, $arguments); + } catch (\Throwable) { + return false; + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Factory/Ctx.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Factory/Ctx.php new file mode 100644 index 0000000..6fbb887 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Factory/Ctx.php @@ -0,0 +1,25 @@ + $class + * @param null|\ReflectionClass $reflection + */ + public function __construct( + public readonly string $alias, + public string $class, + public \Stringable|string|null $context = null, + public ?bool $singleton = null, + public ?\ReflectionClass $reflection = null, + ) { + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Introspector.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Introspector.php new file mode 100644 index 0000000..595beb9 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Introspector.php @@ -0,0 +1,56 @@ +scope->getScopeName(); + } + + /** + * Returns list of scope names starting from the current scope to the root scope. + * + * @return list + */ + public static function scopeNames(?ContainerInterface $container = null): array + { + $scope = self::getAccessor($container)->scope; + $result = []; + do { + $result[] = $scope->getScopeName(); + $scope = $scope->getParentScope(); + } while ($scope !== null); + + return $result; + } + + /** + * @psalm-assert Container|null $container + */ + public static function getAccessor(?ContainerInterface $container = null): Accessor + { + if ($container !== null && !$container instanceof Container) { + throw new \InvalidArgumentException('Container must be an instance of ' . Container::class); + } + + $container ??= ContainerScope::getContainer(); + + if (!$container instanceof Container) { + throw new \RuntimeException('Container is not available.'); + } + + return new Accessor($container); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Introspector/Accessor.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Introspector/Accessor.php new file mode 100644 index 0000000..4d39313 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Introspector/Accessor.php @@ -0,0 +1,41 @@ + $c->$name)->call($this->publicContainer, $this->publicContainer); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Invoker.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Invoker.php new file mode 100644 index 0000000..288e5df --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Invoker.php @@ -0,0 +1,84 @@ +set('invoker', $this); + + $this->container = $constructor->get('container', ContainerInterface::class); + $this->resolver = $constructor->get('resolver', ResolverInterface::class); + $this->options = $constructor->getOptions(); + } + + /** + * @psalm-param TResolver $target + */ + public function invoke(mixed $target, array $parameters = []): mixed + { + if (\is_array($target) && isset($target[1])) { + // In a form of resolver and method + [$resolver, $method] = $target; + + // Resolver instance (i.e. [ClassName::class, 'method']) + if (\is_string($resolver)) { + $resolver = $this->container->get($resolver); + } + + try { + $method = new \ReflectionMethod($resolver, $method); + } catch (\ReflectionException $e) { + throw new ContainerException($e->getMessage(), $e->getCode(), $e); + } + + // Invoking factory method with resolved arguments + return $method->invokeArgs( + $resolver, + $this->resolver->resolveArguments($method, $parameters), + ); + } + + if (\is_string($target) && \is_callable($target)) { + $target = $target(...); + } + + if ($target instanceof \Closure) { + try { + $reflection = new \ReflectionFunction($target); + } catch (\ReflectionException $e) { + throw new ContainerException($e->getMessage(), $e->getCode(), $e); + } + + // Invoking Closure with resolved arguments + return $reflection->invokeArgs( + $this->resolver->resolveArguments($reflection, $parameters, $this->options->validateArguments), + ); + } + + throw new NotCallableException('Unsupported callable.'); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy.php new file mode 100644 index 0000000..0605c31 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy.php @@ -0,0 +1,89 @@ + */ + private static array $classes = []; + + /** + * @template TClass of object + * @param \ReflectionClass $type + * @return TClass + */ + public static function create( + \ReflectionClass $type, + \Stringable|string|null $context, + \Spiral\Core\Attribute\Proxy $attribute, + ): object { + $interface = $type->getName(); + + // Use the container where the proxy was created + $attachContainer = $attribute->attachContainer; + + $cacheKey = \sprintf( + '%s%s%s', + $interface, + $attachContainer ? '[attached]' : '', + $attribute->proxyOverloads ? '[magic-calls]' : '', + ); + + if (!\array_key_exists($cacheKey, self::$classes)) { + $n = 0; + do { + $className = \sprintf( + '%s\%sย SCOPEDย PROXY%s', + $type->getNamespaceName(), + $type->getShortName(), + $n++ > 0 ? "ย {$n}" : '' + ); + } while (\class_exists($className)); + + /** @var class-string $className */ + try { + $classString = ProxyClassRenderer::renderClass( + $type, + $className, + $attribute->proxyOverloads, + $attachContainer, + ); + + eval($classString); + } catch (\Throwable $e) { + throw new \Error("Unable to create proxy for `{$interface}`: {$e->getMessage()}", 0, $e); + } + + $instance = new $className(); + (static fn () => $instance::$__container_proxy_alias = $interface)->bindTo(null, $instance::class)(); + + // Store in cache without context + self::$classes[$cacheKey] = $className; + } else { + /** @var TClass $instance */ + $instance = new (self::$classes[$cacheKey])(); + } + + if ($context !== null || $attachContainer) { + (static function () use ($instance, $context, $attachContainer): void { + // Set the Current Context + /** @see \Spiral\Core\Internal\Proxy\ProxyTrait::$__container_proxy_context */ + $context === null or $instance->__container_proxy_context = $context; + + // Set the Current Scope Container + /** @see \Spiral\Core\Internal\Proxy\ProxyTrait::__container_proxy_container */ + $attachContainer and $instance->__container_proxy_container = ContainerScope::getContainer(); + })->bindTo(null, $instance::class)(); + } + + return $instance; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/MagicCallTrait.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/MagicCallTrait.php new file mode 100644 index 0000000..4dd1aad --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/MagicCallTrait.php @@ -0,0 +1,23 @@ +__container_proxy_context) + ->$name(...$arguments); + } + + public static function __callStatic(string $name, array $arguments) + { + return Resolver::resolve(static::$__container_proxy_alias) + ->$name(...$arguments); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/ProxyClassRenderer.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/ProxyClassRenderer.php new file mode 100644 index 0000000..0a1307c --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/ProxyClassRenderer.php @@ -0,0 +1,207 @@ +getName(); + $classBody = []; + foreach ($type->getMethods() as $method) { + if ($method->isConstructor()) { + throw new \LogicException('Constructor is not allowed in a proxy.'); + } + + if ($method->isDestructor()) { + $classBody[] = self::renderMethod($method); + continue; + } + + $hasRefs = false; + $return = $method->hasReturnType() && (string)$method->getReturnType() === 'void' ? '' : 'return '; + $call = ($method->isStatic() ? '::' : '->') . $method->getName(); + $context = $method->isStatic() ? 'null' : '$this->__container_proxy_context'; + $containerStr = match (false) { + $attachContainer => 'null', + /** @see \Spiral\Core\Internal\Proxy\ProxyTrait::__container_proxy_container */ + $method->isStatic() => '$this->__container_proxy_container', + default => \sprintf( + 'throw new \Spiral\Core\Exception\Container\ContainerException(\'%s\')', + 'Static method call is not allowed on a Proxy that was created without dynamic scope.', + ), + }; + $resolveStr = <<getParameters() as $param) { + $hasRefs = $hasRefs || $param->isPassedByReference(); + $args[] = ($param->isVariadic() ? '...' : '') . '$' . $param->getName(); + } + + if (!$hasRefs && !$method->isVariadic()) { + $classBody[] = self::renderMethod( + $method, + <<isVariadic()) { + $classBody[] = self::renderMethod( + $method, + <<getNumberOfParameters(); + $classBody[] = self::renderMethod( + $method, + << 'use \\' . \ltrim($trait, '\\') . ';', $traits) + ); + return <<isStatic() ? ' static' : '', + $m->returnsReference() ? '&' : '', + $m->getName(), + \implode(', ', \array_map([self::class, 'renderParameter'], $m->getParameters())), + $m->hasReturnType() + ? ': ' . self::renderParameterTypes($m->getReturnType(), $m->getDeclaringClass()) + : '', + $body, + ); + } + + public static function renderParameter(\ReflectionParameter $param): string + { + return \ltrim( + \sprintf( + '%s %s%s%s%s', + $param->hasType() ? 'mixed' : '', + $param->isPassedByReference() ? '&' : '', + $param->isVariadic() ? '...' : '', + '$' . $param->getName(), + $param->isOptional() && !$param->isVariadic() ? ' = ' . self::renderDefaultValue($param) : '', + ), + ' ' + ); + } + + public static function renderParameterTypes(\ReflectionType $types, \ReflectionClass $class): string + { + if ($types instanceof \ReflectionNamedType) { + return ($types->allowsNull() && $types->getName() !== 'mixed' ? '?' : '') . ($types->isBuiltin() + ? $types->getName() + : self::normalizeClassType($types, $class)); + } + + [$separator, $types] = match (true) { + $types instanceof \ReflectionUnionType => ['|', $types->getTypes()], + $types instanceof \ReflectionIntersectionType => ['&', $types->getTypes()], + default => throw new \Exception('Unknown type.'), + }; + + $result = []; + foreach ($types as $type) { + $result[] = $type->isBuiltin() + ? $type->getName() + : self::normalizeClassType($type, $class); + } + + return \implode($separator, $result); + } + + public static function renderDefaultValue(\ReflectionParameter $param): string + { + if ($param->isDefaultValueConstant()) { + $result = $param->getDefaultValueConstantName(); + + return \explode('::', $result)[0] === 'self' + ? $result + : '\\' . $result; + } + + $cut = self::cutDefaultValue($param); + + return \str_starts_with($cut, 'new ') + ? $cut + : \var_export($param->getDefaultValue(), true); + } + + public static function normalizeClassType(\ReflectionNamedType $type, \ReflectionClass $class): string + { + return '\\' . ($type->getName() === 'self' ? $class->getName() : $type->getName()); + } + + private static function cutDefaultValue(\ReflectionParameter $param): string + { + $string = (string)$param; + + return \trim(\substr($string, \strpos($string, '=') + 1, -1)); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/ProxyTrait.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/ProxyTrait.php new file mode 100644 index 0000000..41e31ca --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Proxy/ProxyTrait.php @@ -0,0 +1,17 @@ +get($alias, $context) ?? throw new ContainerException( + 'Resolved `null` from the container.', + ); + } catch (\Throwable $e) { + throw new ContainerException( + \sprintf('Unable to resolve `%s` in a Proxy.', $alias), + previous: $e, + ); + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Resolver.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Resolver.php new file mode 100644 index 0000000..d3aae0d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Resolver.php @@ -0,0 +1,315 @@ +set('resolver', $this); + + $this->factory = $constructor->get('factory', FactoryInterface::class); + $this->container = $constructor->get('container', ContainerInterface::class); + } + + public function resolveArguments( + ContextFunction $reflection, + array $parameters = [], + bool $validate = true, + ): array { + $state = new ResolvingState($reflection, $parameters); + + foreach ($reflection->getParameters() as $parameter) { + $this->resolveParameter($parameter, $state, $validate) + or + throw new ArgumentResolvingException($reflection, $parameter->getName()); + } + + return $state->getResolvedValues(); + } + + public function validateArguments(ContextFunction $reflection, array $arguments = []): void + { + $positional = true; + $variadic = false; + $parameters = $reflection->getParameters(); + if (\count($parameters) === 0) { + return; + } + + $parameter = null; + while (\count($parameters) > 0 || \count($arguments) > 0) { + // get related argument value + $key = \key($arguments); + + // For a variadic parameter it's no sense - named or positional argument will be sent + // But you can't send positional argument after named in any case + if (\is_int($key) && !$positional) { + throw new PositionalArgumentException($reflection, $key); + } + + $positional = $positional && \is_int($key); + + if (!$variadic) { + $parameter = \array_shift($parameters); + $variadic = $parameter?->isVariadic() ?? false; + } + + if ($parameter === null) { + throw new UnknownParameterException($reflection, $key); + } + $name = $parameter->getName(); + + if (($positional || $variadic) && $key !== null) { + /** @psalm-suppress ReferenceReusedFromConfusingScope */ + $value = \array_shift($arguments); + } elseif ($key === null || !\array_key_exists($name, $arguments)) { + if ($parameter->isOptional()) { + continue; + } + throw new MissingRequiredArgumentException($reflection, $name); + } else { + $value = &$arguments[$name]; + unset($arguments[$name]); + } + + if (!$this->validateValueToParameter($parameter, $value)) { + throw new InvalidArgumentException($reflection, $name); + } + } + } + + private function validateValueToParameter(ReflectionParameter $parameter, mixed $value): bool + { + if (!$parameter->hasType() || ($parameter->allowsNull() && $value === null)) { + return true; + } + $type = $parameter->getType(); + + [$or, $types] = match (true) { + $type instanceof ReflectionNamedType => [true, [$type]], + $type instanceof ReflectionUnionType => [true, $type->getTypes()], + $type instanceof ReflectionIntersectionType => [false, $type->getTypes()], + }; + + foreach ($types as $t) { + \assert($t instanceof ReflectionNamedType); + if (!$this->validateValueNamedType($t, $value)) { + // If it is TypeIntersection + if ($or) { + continue; + } + return false; + } + // If it is not type intersection then we can skip that value after first successful check + if ($or) { + return true; + } + } + return !$or; + } + + /** + * Validate the value have the same type that in the $type. + * This method doesn't resolve cases with nullable type and {@see null} value. + */ + private function validateValueNamedType(ReflectionNamedType $type, mixed $value): bool + { + $name = $type->getName(); + + if ($type->isBuiltin()) { + return match ($name) { + 'mixed' => true, + 'string' => \is_string($value), + 'int' => \is_int($value), + 'bool' => \is_bool($value), + 'array' => \is_array($value), + 'callable' => \is_callable($value), + 'iterable' => \is_iterable($value), + 'float' => \is_float($value), + 'object' => \is_object($value), + 'true' => $value === true, + 'false' => $value === false, + default => false, + }; + } + + return $value instanceof $name; + } + + /** + * Returns {@see true} if argument was resolved. + * + * @throws ResolvingException + * @throws NotFoundExceptionInterface|ContainerExceptionInterface + */ + private function resolveParameter(ReflectionParameter $param, ResolvingState $state, bool $validate): bool + { + $isVariadic = $param->isVariadic(); + $hasType = $param->hasType(); + + // Try to resolve parameter by name + $res = $state->resolveParameterByNameOrPosition($param, $isVariadic); + if ($res !== [] || $isVariadic) { + // validate + if ($isVariadic) { + foreach ($res as $k => &$v) { + $this->processArgument($state, $v, validateWith: $validate ? $param : null, key: $k); + } + } else { + $this->processArgument($state, $res[0], validateWith: $validate ? $param : null); + } + + return true; + } + + $error = null; + while ($hasType) { + /** @var ReflectionIntersectionType|ReflectionUnionType|ReflectionNamedType $refType */ + $refType = $param->getType(); + + if ($refType::class === ReflectionNamedType::class) { + if ($refType->isBuiltin()) { + break; + } + + if (\interface_exists($refType->getName()) && !empty( + $attrs = $param->getAttributes(ProxyAttribute::class) + )) { + $proxy = Proxy::create( + new \ReflectionClass($refType->getName()), + $param, + $attrs[0]->newInstance() + ); + $this->processArgument($state, $proxy); + return true; + } + + try { + if ($this->resolveObject($state, $refType, $param, $validate)) { + return true; + } + } catch (Throwable $e) { + $error = $e; + } + break; + } + + if ($refType::class === ReflectionUnionType::class) { + foreach ($refType->getTypes() as $namedType) { + try { + if (!$namedType->isBuiltin() && $this->resolveObject($state, $namedType, $param, $validate)) { + return true; + } + } catch (Throwable $e) { + $error = $e; + } + } + break; + } + + throw new UnsupportedTypeException($param->getDeclaringFunction(), $param->getName()); + } + + if ($param->isDefaultValueAvailable()) { + $argument = $param->getDefaultValue(); + $this->processArgument($state, $argument); + return true; + } + + if ($hasType && $param->allowsNull()) { + $argument = null; + $this->processArgument($state, $argument); + return true; + } + + if ($error === null) { + return false; + } + + // Throw NotFoundExceptionInterface + throw $error; + } + + /** + * Resolve argument by class name and context. Returns {@see true} if argument resolved. + * + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + private function resolveObject( + ResolvingState $state, + ReflectionNamedType $type, + ReflectionParameter $parameter, + bool $validateWith = false, + ): bool { + /** @psalm-suppress TooManyArguments */ + $argument = $this->container->get($type->getName(), $parameter); + $this->processArgument($state, $argument, $validateWith ? $parameter : null); + return true; + } + + /** + * Arguments processing. {@see Autowire} object will be resolved. + * + * @param mixed $value Resolved value. + * @param ReflectionParameter|null $validateWith Should be passed when the value should be validated. + * Must be set for when value is user's argument. + * @param int|string|null $key Only {@see string} values will be preserved. + */ + private function processArgument( + ResolvingState $state, + mixed &$value, + ReflectionParameter $validateWith = null, + int|string $key = null + ): void { + // Resolve Autowire objects + if ($value instanceof Autowire) { + $value = $value->resolve($this->factory); + } + + // Validation + if ($validateWith !== null && !$this->validateValueToParameter($validateWith, $value)) { + throw new InvalidArgumentException( + $validateWith->getDeclaringFunction(), + $validateWith->getName() + ); + } + + $state->addResolvedValue($value, \is_string($key) ? $key : null); + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Resolver/ResolvingState.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Resolver/ResolvingState.php new file mode 100644 index 0000000..ac0a881 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Resolver/ResolvingState.php @@ -0,0 +1,97 @@ + + */ + private array $resolvedValues = []; + + public function __construct( + public readonly ReflectionFunctionAbstract $reflection, + private array $arguments, + ) { + $this->modeNamed = $this->isNamedMode(); + } + + public function addResolvedValue(mixed &$value, string $key = null): void + { + if ($key === null) { + $this->resolvedValues[] = &$value; + } else { + $this->resolvedValues[$key] = &$value; + } + } + + public function resolveParameterByNameOrPosition(ReflectionParameter $parameter, bool $variadic): array + { + $key = $this->modeNamed + ? $parameter->getName() + : $parameter->getPosition(); + + if (!\array_key_exists($key, $this->arguments)) { + return []; + } + $_val = &$this->arguments[$key]; + + if ($variadic && \is_array($_val)) { + // Save keys is possible + $positional = true; + $result = []; + foreach ($_val as $key => &$item) { + if (!$positional && \is_int($key)) { + throw new ResolvingException( + 'Cannot use positional argument after named argument during unpacking named variadic argument.' + ); + } + $positional = $positional && \is_int($key); + if ($positional) { + $result[] = &$item; + } else { + $result[$key] = &$item; + } + } + return $result; + } + return [&$_val]; + } + + public function getResolvedValues(): array + { + return $this->resolvedValues; + } + + private function isNamedMode(): bool + { + $nums = 0; + $strings = 0; + foreach ($this->arguments as $key => $_) { + if (\is_int($key)) { + ++$nums; + } else { + ++$strings; + } + } + + return match (true) { + $nums === 0 => true, + $strings === 0 => false, + default => throw new ResolvingException( + 'You can not use both numeric and string keys for predefined arguments.' + ) + }; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Scope.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Scope.php new file mode 100644 index 0000000..10dce61 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Scope.php @@ -0,0 +1,89 @@ +scopeName; + } + + /** + * Link the current scope with its parent scope and container. + * + * @throws NamedScopeDuplicationException + */ + public function setParent(\Spiral\Core\Container $parent, self $parentScope, FactoryInterface $factory): void + { + $this->parent = $parent; + $this->parentScope = $parentScope; + $this->parentFactory = $factory; + + // Check a scope with the same name is not already registered + if ($this->scopeName !== null) { + $tmp = $this; + while ($tmp->parentScope !== null) { + $tmp = $tmp->parentScope; + $tmp->scopeName !== $this->scopeName ?: throw new NamedScopeDuplicationException($this->scopeName); + } + } + } + + public function getParent(): ?\Spiral\Core\Container + { + return $this->parent; + } + + public function getParentFactory(): ?FactoryInterface + { + return $this->parentFactory; + } + + /** + * Return list of parent scope names. + * The first element is the current scope name, and the next is the closest parent scope name... + * + * @return array, string|null> + */ + public function getParentScopeNames(): array + { + $result = [$this->scopeName]; + + $parent = $this; + while ($parent->parentScope !== null) { + $parent = $parent->parentScope; + $result[] = $parent->scopeName; + } + + return $result; + } + + public function getParentScope(): ?self + { + return $this->parentScope; + } + + public function destruct(): void + { + $this->parent = null; + $this->parentScope = null; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/State.php b/tests/php_test_files/vendor/spiral/core/src/Internal/State.php new file mode 100644 index 0000000..7aee6b2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/State.php @@ -0,0 +1,51 @@ + + */ + public array $bindings = []; + + /** + * @var array Cache for singletons + */ + public array $singletons = []; + + /** + * @var array + */ + public array $injectors = []; + + /** + * @var array + */ + public array $inflectors = []; + + /** + * List of finalizers to be called on container scope destruction. + * @var callable[] + */ + public array $finalizers = []; + + public function destruct(): void + { + $this->singletons = []; + $this->injectors = []; + $this->bindings = []; + $this->finalizers = []; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Tracer.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Tracer.php new file mode 100644 index 0000000..4216316 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Tracer.php @@ -0,0 +1,95 @@ +traces === [] ? '' : "Container trace list:\n" . $this->renderTraceList($this->traces); + } + + /** + * @param string $header Message before stack list + */ + public function combineTraceMessage(string $header): string + { + return "$header\n$this"; + } + + public function push(bool $nextLevel, mixed ...$details): void + { + $trace = $details === [] ? null : new Trace($details); + if ($nextLevel || $this->traces === []) { + $this->traces[] = $trace === null ? [] : [$trace]; + } elseif ($trace !== null) { + $this->traces[\array_key_last($this->traces)][] = $trace; + } + } + + public function pop(bool $previousLevel = false): void + { + if ($this->traces === []) { + return; + } + if ($previousLevel) { + \array_pop($this->traces); + return; + } + $key = \array_key_last($this->traces); + $list = &$this->traces[$key]; + \array_pop($list); + } + + public function getRootAlias(): string + { + return $this->traces[0][0]->alias ?? ''; + } + + /** + * @param Trace[][] $blocks + */ + private function renderTraceList(array $blocks): string + { + $result = []; + $i = 0; + foreach ($blocks as $block) { + \array_push($result, ...$this->blockToStringList($block, $i++)); + } + return \implode("\n", $result); + } + + /** + * @param Trace[] $items + * @param int<0, max> $level + * + * @return string[] + */ + private function blockToStringList(array $items, int $level = 0): array + { + $result = []; + $padding = \str_repeat(' ', $level); + $firstPrefix = "$padding- "; + // Separator + $s = "\n"; + $nexPrefix = "$s$padding "; + foreach ($items as $item) { + $result[] = $firstPrefix . \str_replace($s, $nexPrefix, (string)$item); + } + return $result; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Internal/Tracer/Trace.php b/tests/php_test_files/vendor/spiral/core/src/Internal/Tracer/Trace.php new file mode 100644 index 0000000..ddde06d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Internal/Tracer/Trace.php @@ -0,0 +1,71 @@ +alias = $info['alias'] ?? null; + } + + public function __toString(): string + { + $info = []; + foreach ($this->info as $key => $item) { + $info[] = "$key: {$this->stringifyValue($item)}"; + } + return \implode("\n", $info); + } + + private function stringifyValue(mixed $item): string + { + return match (true) { + \is_string($item) => "'$item'", + \is_scalar($item) => \var_export($item, true), + $item instanceof \Closure => $this->renderClosureSignature(new \ReflectionFunction($item)), + $item instanceof \ReflectionFunctionAbstract => $this->renderClosureSignature($item), + $item instanceof \UnitEnum => $item::class . "::$item->name", + \is_object($item) => $item instanceof \Stringable ? (string) $item : 'instance of ' . $item::class, + \is_array($item) => $this->renderArray($item), + default => \get_debug_type($item), + }; + } + + private function renderArray(array $array, int $level = 0): string + { + if ($array === []) { + return '[]'; + } + if ($level >= self::ARRAY_MAX_LEVEL) { + return 'array'; + } + $result = []; + foreach ($array as $key => $value) { + $result[] = \sprintf( + '%s: %s', + $key, + \is_array($value) + ? $this->renderArray($value, $level + 1) + : $this->stringifyValue($value), + ); + } + + $pad = \str_repeat(' ', $level); + return "[\n $pad" . \implode(",\n $pad", $result) . "\n$pad]"; + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/InvokerInterface.php b/tests/php_test_files/vendor/spiral/core/src/InvokerInterface.php new file mode 100644 index 0000000..54dd915 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/InvokerInterface.php @@ -0,0 +1,27 @@ + $bindings Custom bindings for the new scope. + * @param bool $autowire If {@see false}, closure will be invoked with just only the passed Container + * as the first argument. Otherwise, {@see InvokerInterface::invoke()} will be used to invoke the closure. + */ + public function __construct( + public readonly string|\BackedEnum|null $name = null, + public readonly array $bindings = [], + public readonly bool $autowire = true, + ) { + } +} diff --git a/tests/php_test_files/vendor/spiral/core/src/ScopeInterface.php b/tests/php_test_files/vendor/spiral/core/src/ScopeInterface.php new file mode 100644 index 0000000..1ba3361 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/ScopeInterface.php @@ -0,0 +1,52 @@ +runScope(['actor' => new Actor()], function() use($container) { + * dump($container->get('actor')); + * }); + * ``` + * + * 2. Extended mode. Activated when passing {@see Scope} as the first parameter. + * Before launching the closure, a new container is created, which is embedded in the scope hierarchy. + * The scope can be named or unnamed. What's important is that each separated container has + * its own set of bindings, its own cache, and when the associated scope is destroyed, + * the entire container cache will be cleared, and the container will be destroyed. + * This mode is safe when working in an asynchronous application. + * + * ```php + * $container->runScope( + * new Scope(bindings: ['actor' => new Actor()]), + * function(ContainerInterface $container) { + * dump($container->get('actor')); + * } + * ); + * ``` + * + * @throws \Throwable + */ + public function runScope(array $bindings, callable $scope): mixed; +} diff --git a/tests/php_test_files/vendor/spiral/core/src/Traits/Config/AliasTrait.php b/tests/php_test_files/vendor/spiral/core/src/Traits/Config/AliasTrait.php new file mode 100644 index 0000000..6604434 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/core/src/Traits/Config/AliasTrait.php @@ -0,0 +1,30 @@ +config, $this->config['aliases'][$alias]) && \is_string($alias)) { + if (\in_array($alias, $antiCircleReference, true)) { + throw new ContainerException(\sprintf('Circle reference detected for alias `%s`.', $alias)); + } + $antiCircleReference[] = $alias; + + $alias = $this->config['aliases'][$alias]; + } + + return $alias; + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/CHANGELOG.md b/tests/php_test_files/vendor/spiral/goridge/CHANGELOG.md new file mode 100644 index 0000000..f254125 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/CHANGELOG.md @@ -0,0 +1,126 @@ +CHANGELOG +========= + +## v3.2.0 (22.03.2022) +- Support for streamed output by @roxblnfk (#13) + +## v3.1.2 (13.01.2022) +- Update .gitattributes (exclude psalm config & examples from export) by @tarampampam (#8) +- Update tests by @roxblnfk (#9) + * add mutation testing + * fix Psalm issues + * update dependencies + +## v3.1.1 (10.06.2021) +- Fix `.phpstorm.meta.php` autocompletion + +## v3.1.0 (10.06.2021) +- Added optional `RPC::call()` 3rd `options` argument. +- Added protobuf codec. +- Added simple autocomplete. + +## v3.0.1 (11.03.2021) +- Fix lowercase formatting in unix socket (#3, #4) + +## v3.0.0 (18.01.2021) +- Full rewamp of protocol, added support for arbitrary options +- Reduced number of syscalls +- Added support for multi-codec RPC +- Support for binary RPC calls +- 25% performance increase +- PHP code split from the main Golang repository + +## v2.4.2 (19.05.2020) +- Add phpstan analyzer +- Fix code warnings from phpstan +- Improve Relay factory and SocketRelay +- Improve test coverage +- Performance improvements +- See the full milestone here: [link](https://github.com/spiral/goridge/milestone/5?closed=1) + +## v2.4.0 (05.05.2020) +- More tests for PHP (@vvval) +- Upgrade PHP version to the 7.2 (currently minimum supported) +- Add new RelayInterface [link](https://github.com/spiral/goridge/pull/56/files#diff-85a3f483116946b4093f21ad855af4a8) (@vvval) +- See the full milestone here: [link](https://github.com/spiral/goridge/issues?q=is%3Aclosed+milestone%3A2.4.0) + +## v2.3.1 (21.04.2020) +- Syscall usage optimized. Now the data is packing and sending via 1 (or 2 in some cases) send_socket calls, instead of 2-3 (by @vvval) +- Unix sockets supported on windows (AF_UNIX) starting from OS Build 17056. +- Added the ability to define own relay with a codec (by @Reasno) + +## v2.3.0 (23.03.2020) +- Replaced std encoding/json package with the https://github.com/json-iterator/go +- Added BORS and GHA support +- golang modules updated to v2 + +## v2.2.1 (30.11.2019) +- Fixed too strict StreamRelay check by @tarampampam + +## v2.2.0 (29.11.2019) +- Updated travis to support go 1.13 +- Updated tests (errors handling, simplify) +- Add go modules support +- Optimize pack function + +by @ValeryPiashchynski + +## v2.1.4 (01.04.2019) +- minor performance improvements by @zloyuser +- removed nighly from travis + +## v2.1.3 (30.09.2018) +- improved performance (reduced number of syscalls required for Send command) + +## v2.1.2 (07.06.2018) +- added 8 more bytes to the payload +- added error detection mechanism over binary masks +- added panic handler for pipe relay + +## v2.1.0 (03.06.2018) +- added golang ClientCodec implementation +- additional error detections +- added sequence support +- more tests + +## v2.0.5 (03.04.2018) +- handled possible panic on reading from broken connection in socket relay + +## v2.0.4 (23.03.2018) +- minor performance improvement in memory allocation for buffer by @243083df + +## v2.0.3 (20.02.2018) +- fixed unix socket support on MacOS by @bgetsug + +## v2.0.2 (29.01.2018) +- typo in SOCK_TPC constant + +## v2.0.1 (23.01.2018) +- support sending empty string payloads without PAYLOAD_NONE flag + +## v2.0.0 (17.11.2017) +- ext-sockets is not required anymore +- Connection renamed to Relay +- JsonRPC renamed to RPC +- Performance optimizations (+20% speed improvement) +- Added relay over standard streams and pipes +- Added ability to invoke PHP from Go +- Added control headers to manage execution flow +- CLOSE_CONNECTION and KEEP_CONNECTION constants are removed +- \*\_BODY constants renamed to PAYLOAD\_\* to comply with .go code +- Protocol is extracted from Codec as independent abstraction +- Simplified RPC Codec implementation +- Code is formatted to comply to Golint +- More tests +- More documentation +- More error checks in PHP code +- License holder moved from Spiral Framework to SpiralScout + +## v1.0.4 +- library dependency downgraded to support PHP7.0 by @thePanz + +## v1.0.1 (14.08.2017) +- service level exception for invalid json payloads + +## v1.0.0 (14.08.2017) +- public Goridge release diff --git a/tests/php_test_files/vendor/spiral/goridge/LICENSE b/tests/php_test_files/vendor/spiral/goridge/LICENSE new file mode 100644 index 0000000..0a5958e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 SpiralScout + +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/spiral/goridge/README.md b/tests/php_test_files/vendor/spiral/goridge/README.md new file mode 100644 index 0000000..6ce36ca --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/README.md @@ -0,0 +1,70 @@ + + + + + + + +# High-performance PHP-to-Golang IPC bridge + +[![Latest Stable Version](https://poser.pugx.org/spiral/goridge/v/stable)](https://packagist.org/packages/spiral/goridge) +[![CI](https://github.com/spiral/goridge-php/workflows/CI/badge.svg)](https://github.com/spiral/goridge-php/actions) +[![Codecov](https://codecov.io/gh/roadrunner-php/goridge/branch/master/graph/badge.svg)](https://codecov.io/gh/roadrunner-php/goridge/) +[![Chat](https://img.shields.io/badge/discord-chat-magenta.svg)](https://discord.gg/TFeEmCs) + +PHPClasses Innovation Award + +Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package. The library allows you to call Go service methods from PHP with minimal footprint, structures and `[]byte` support. +Golang source code can be found in this repository: [goridge](https://github.com/roadrunner-server/goridge) + +
    +See https://github.com/spiral/roadrunner - High-performance PHP application server, load-balancer and process manager written in Golang +
    + +## Features + + - no external dependencies or services, drop-in (64bit PHP version required) + - sockets over TCP or Unix (ext-sockets is required), standard pipes + - very fast (300k calls per second on Ryzen 1700X over 20 threads) + - native `net/rpc` integration, ability to connect to existed application(s) + - standalone protocol usage + - structured data transfer using json or msgpack + - `[]byte` transfer, including big payloads + - service, message and transport level error handling + - hackable + - works on Windows + - unix sockets powered (also on Windows) + +## Installation + +``` +composer require spiral/goridge +``` + +## Example + +```php +call("App.Hi", "Antony"); +``` + +> Factory applies the next format: `://:` + +More examples can be found in [this directory](./examples). + +License +------- +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. diff --git a/tests/php_test_files/vendor/spiral/goridge/composer.json b/tests/php_test_files/vendor/spiral/goridge/composer.json new file mode 100644 index 0000000..66e609a --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/composer.json @@ -0,0 +1,89 @@ +{ + "name": "spiral/goridge", + "type": "goridge", + "description": "High-performance PHP-to-Golang RPC bridge", + "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" + } + ], + "homepage": "https://spiral.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "require": { + "php": ">=8.1", + "ext-json": "*", + "ext-sockets": "*", + "spiral/roadrunner": "^2023 || ^2024.1" + }, + "require-dev": { + "vimeo/psalm": "^5.9", + "google/protobuf": "^3.22", + "rybakit/msgpack": "^0.7", + "phpunit/phpunit": "^10.0", + "jetbrains/phpstorm-attributes": "^1.0", + "infection/infection": "^0.26.1" + }, + "autoload": { + "psr-4": { + "Spiral\\Goridge\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\Goridge\\Tests\\": "tests/Goridge" + } + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "suggest": { + "ext-msgpack": "MessagePack codec support", + "ext-protobuf": "Protobuf codec support", + "rybakit/msgpack": "(^0.7) MessagePack codec support", + "google/protobuf": "(^3.0) Protobuf codec support" + }, + "scripts": { + "test": "phpunit --no-coverage --colors=always", + "test-cover": "phpunit --coverage-clover=coverage.xml", + "test-static": "psalm --no-cache", + "test-mutations": "infection" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "config": { + "allow-plugins": { + "infection/extension-installer": true, + "composer/package-versions-deprecated": true + } + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/resources/.phpstorm.meta.php b/tests/php_test_files/vendor/spiral/goridge/resources/.phpstorm.meta.php new file mode 100644 index 0000000..b391dca --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/resources/.phpstorm.meta.php @@ -0,0 +1,61 @@ + '@'])); + override(\Spiral\Goridge\RPC\RPC::call(), map(['' => '@'])); + + // + // RPC Methods + // + + registerArgumentsSet('goridge_rpc_methods_informer', + 'informer.Workers', + 'informer.List', + ); + + expectedArguments(\Spiral\Goridge\RPC\RPCInterface::call(), 0, + argumentsSet('goridge_rpc_methods_informer')); + expectedArguments(\Spiral\Goridge\RPC\RPC::call(), 0, + argumentsSet('goridge_rpc_methods_informer')); +} diff --git a/tests/php_test_files/vendor/spiral/goridge/resources/stubs/msgpack.phpstub b/tests/php_test_files/vendor/spiral/goridge/resources/stubs/msgpack.phpstub new file mode 100644 index 0000000..47c34ab --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/resources/stubs/msgpack.phpstub @@ -0,0 +1,14 @@ + + * @psalm-type FrameByte10 = Frame::BYTE10_* + * @psalm-type FrameByte10Value = int-mask-of + * @psalm-type HeaderList = array{0: int, 1: int, 2: int<0, max>, 3: FrameByte10Value, 4: int} + */ +final class Frame +{ + /** + * Current protocol version. + */ + public const VERSION = 0x01; + + /** + * Control frame type + */ + public const CONTROL = 0x01; + + /** + * Error frame type + */ + public const ERROR = 0x40; + + /**#@+ + * BYTE flags, it means, that we can set multiply flags from this group + * using bitwise OR. + */ + public const CODEC_RAW = 0x04; + public const CODEC_JSON = 0x08; + public const CODEC_MSGPACK = 0x10; + public const CODEC_GOB = 0x20; + public const CODEC_PROTO = 0x80; + /**#@-*/ + + /**#@+ + * BYTE10 flags, it means, that we can set multiply flags from this group + * using bitwise OR. + * + * @var positive-int Flags for {@see $byte10} + */ + public const BYTE10_STREAM = 0x01; + public const BYTE10_STOP = 0x02; + public const BYTE10_PING = 0x04; + public const BYTE10_PONG = 0x08; + + /** + * @psalm-var FrameByte10Value + */ + public int $byte10 = 0; + + public int $byte11 = 0; + + /** + * @param array $options + */ + public function __construct( + public ?string $payload, + public array $options = [], + public int $flags = 0, + ) { + } + + public function setFlag(int ...$flag): void + { + foreach ($flag as $f) { + if ($f > 255) { + throw new InvalidArgumentException('Flags can be byte only'); + } + + $this->flags |= $f; + } + } + + public function hasFlag(int $flag): bool + { + if ($flag > 255) { + throw new InvalidArgumentException('Flags can be byte only'); + } + + return ($this->flags & $flag) !== 0; + } + + public function setOptions(int ...$options): void + { + $this->options = $options; + } + + /** + * @return non-empty-string + * @internal + */ + public static function packFrame(Frame $frame): string + { + /** @var non-empty-string $header */ + $header = \pack( + 'CCL', + self::VERSION << 4 | (\count($frame->options) + 3), + $frame->flags, + \strlen((string)$frame->payload) + ); + + if ($frame->options !== []) { + $header .= \pack('LCCL*', \crc32($header), $frame->byte10, $frame->byte11, ...$frame->options); + } else { + $header .= \pack('LCC', \crc32($header), $frame->byte10, $frame->byte11); + } + + return $header . (string)$frame->payload; + } + + /** + * Parse header and return [flags, num options, payload length, stream byte10, byte11]. + * + * @param string $header 8 bytes. + * @return HeaderList + * @internal + * + * @psalm-suppress LessSpecificReturnStatement, MoreSpecificReturnType + */ + public static function readHeader(string $header): array + { + return [ + \ord($header[1]), + (\ord($header[0]) & 0x0F) - 3, + \ord($header[2]) | \ord($header[3]) << 8 | \ord($header[4]) << 16 | \ord($header[5]) << 24, + \ord($header[10]), + \ord($header[11]), + ]; + } + + /** + * @param HeaderList $header + * + * @see self::readHeader() + * @internal + */ + public static function initFrame(array $header, string $body): Frame + { + /** + * optimize? + * @var array $options + */ + $options = \array_values(\unpack('L*', \substr($body, 0, $header[1] * 4))); + + $frame = new self(\substr($body, $header[1] * 4), $options, $header[0]); + $frame->byte10 = $header[3] ?? 0; + $frame->byte11 = $header[4] ?? 0; + + return $frame; + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/MultiRelayHelper.php b/tests/php_test_files/vendor/spiral/goridge/src/MultiRelayHelper.php new file mode 100644 index 0000000..1ef040d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/MultiRelayHelper.php @@ -0,0 +1,115 @@ + $relays + * @return array-key[]|false + * @internal + * Returns either + * - an array of array keys, even if only one + * - or false if none + */ + public static function findRelayWithMessage(array $relays, int $timeoutInMicroseconds = 0): array|false + { + if (count($relays) === 0) { + return false; + } + + if ($relays[array_key_first($relays)] instanceof SocketRelay) { + $sockets = []; + $socketIdToRelayIndexMap = []; + foreach ($relays as $relayIndex => $relay) { + assert($relay instanceof SocketRelay); + + // Enforce connection + if ($relay->socket === null) { + // Important: Do not force reconnect here as it would otherwise completely ruin further handling + continue; + } + + $sockets[] = $relay->socket; + $socketIdToRelayIndexMap[spl_object_id($relay->socket)] = $relayIndex; + } + + if (count($sockets) === 0) { + return false; + } + + $writes = null; + $except = null; + $changes = socket_select($sockets, $writes, $except, 0, $timeoutInMicroseconds); + + if ($changes > 0) { + $indexes = []; + foreach ($sockets as $socket) { + $indexes[] = $socketIdToRelayIndexMap[spl_object_id($socket)] ?? throw new RPCException("Invalid socket??"); + } + + return $indexes; + } else { + return false; + } + } + + if ($relays[array_key_first($relays)] instanceof StreamRelay) { + $streams = []; + $streamNameToRelayIndexMap = []; + foreach ($relays as $relayIndex => $relay) { + assert($relay instanceof StreamRelay); + + $streams[] = $relay->in; + $streamNameToRelayIndexMap[(string)$relay->in] = $relayIndex; + } + + $writes = null; + $except = null; + $changes = stream_select($streams, $writes, $except, 0, $timeoutInMicroseconds); + + if ($changes > 0) { + $indexes = []; + foreach ($streams as $stream) { + $indexes[] = $streamNameToRelayIndexMap[(string)$stream] ?? throw new RPCException("Invalid stream??"); + } + + return $indexes; + } else { + return false; + } + } + + return false; + } + + /** + * @param array $relays + * @return array-key[]|false + * @internal + * Returns either + * - an array of array keys, even if only one + * - or false if none + */ + public static function checkConnected(array $relays): array|false + { + if (count($relays) === 0) { + return false; + } + + $keysNotConnected = []; + foreach ($relays as $key => $relay) { + if ($relay instanceof ConnectedRelayInterface && !$relay->isConnected()) { + $relay->connect(); + $keysNotConnected[] = $key; + } + } + + return $keysNotConnected; + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/AbstractRPC.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/AbstractRPC.php new file mode 100644 index 0000000..ab4e593 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/AbstractRPC.php @@ -0,0 +1,90 @@ +service = $service; + + return $rpc; + } + + /** + * @psalm-pure + */ + public function withCodec(CodecInterface $codec): self + { + /** @psalm-suppress ImpureVariable */ + $rpc = clone $this; + $rpc->codec = $codec; + + return $rpc; + } + + /** + * @throws Exception\ServiceException + */ + protected function decodeResponse(Frame $frame, RelayInterface $relay, mixed $options = null): mixed + { + // exclude method name + $body = substr((string)$frame->payload, $frame->options[1]); + + if ($frame->hasFlag(Frame::ERROR)) { + $name = $relay instanceof Stringable + ? (string)$relay + : $relay::class; + + throw new ServiceException(sprintf("Error '%s' on %s", $body, $name)); + } + + return $this->codec->decode($body, $options); + } + + /** + * @param non-empty-string $method + */ + protected function packFrame(string $method, mixed $payload): Frame + { + if ($this->service !== null) { + $method = $this->service . '.' . ucfirst($method); + } + + $body = $method . $this->codec->encode($payload); + return new Frame($body, [self::$seq, strlen($method)], $this->codec->getIndex()); + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/AsyncRPCInterface.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/AsyncRPCInterface.php new file mode 100644 index 0000000..ac0959c --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/AsyncRPCInterface.php @@ -0,0 +1,69 @@ + Response. + * @throws RelayException + * @throws ServiceException + * @throws RPCException + * + * @param array $seqs + * @return iterable + * + */ + public function getResponses(array $seqs, mixed $options = null): iterable; +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/JsonCodec.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/JsonCodec.php new file mode 100644 index 0000000..3bb651b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/JsonCodec.php @@ -0,0 +1,37 @@ +getMessage()), $e->getCode(), $e); + } + + return $result; + } + + public function decode(string $payload, mixed $options = null): mixed + { + try { + return \json_decode($payload, true, 512, \JSON_THROW_ON_ERROR | (\is_int($options) ? $options : 0)); + } catch (\JsonException $e) { + throw new CodecException(\sprintf('Json decode: %s', $e->getMessage()), $e->getCode(), $e); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/MsgpackCodec.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/MsgpackCodec.php new file mode 100644 index 0000000..2952fc2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/MsgpackCodec.php @@ -0,0 +1,83 @@ +initPacker(); + } + + public function getIndex(): int + { + return Frame::CODEC_MSGPACK; + } + + public function encode(mixed $payload): string + { + return ($this->pack)($payload); + } + + public function decode(string $payload, mixed $options = null): mixed + { + return ($this->unpack)($payload, $options); + } + + /** + * Init pack and unpack functions. + * + * @psalm-suppress MixedArgument + */ + private function initPacker(): void + { + // Is native extension supported + if (\function_exists('msgpack_pack') && \function_exists('msgpack_unpack')) { + $this->pack = static fn($payload): string => msgpack_pack($payload); + + $this->unpack = static function (string $payload, $options = null) { + if ($options !== null) { + return msgpack_unpack($payload, $options); + } + + return msgpack_unpack($payload); + }; + + return; + } + + // Is composer's library supported + if (\class_exists(MessagePack::class)) { + $this->pack = static fn($payload): string => MessagePack::pack($payload); + + $this->unpack = static fn(string $payload, $options = null) => MessagePack::unpack($payload, $options); + } + + throw new \LogicException('Could not initialize codec, please install msgpack extension or library'); + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/ProtobufCodec.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/ProtobufCodec.php new file mode 100644 index 0000000..855c77d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/ProtobufCodec.php @@ -0,0 +1,72 @@ +assertAvailable(); + } + + private function assertAvailable(): void + { + if (!\class_exists(Message::class)) { + throw new \LogicException(self::ERROR_DEPENDENCY); + } + } + + public function getIndex(): int + { + return Frame::CODEC_PROTO; + } + + /** + * @psalm-suppress MixedInferredReturnType + * @psalm-suppress MixedReturnStatement + */ + public function encode(mixed $payload): string + { + if ($payload instanceof Message) { + return $payload->serializeToString(); + } + + return $payload; + } + + /** + * @psalm-suppress UnsafeInstantiation + * + * @param class-string $class + */ + protected function create(string $class): Message + { + return new $class(); + } + + public function decode(string $payload, mixed $options = null): mixed + { + if (\is_string($options) && \is_subclass_of($options, Message::class, true)) { + $options = $this->create($options); + } + + if ($options instanceof Message) { + $options->mergeFromString($payload); + + return $options; + } + + return $payload; + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/RawCodec.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/RawCodec.php new file mode 100644 index 0000000..a8da073 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/Codec/RawCodec.php @@ -0,0 +1,33 @@ + + */ + private static array $freeRelays = []; + + /** + * Occupied Relays is a map of seq to relay to make removal easier once a response is received. + * @var array + */ + private static array $occupiedRelays = []; + + /** + * A map of seq to relay to use for decodeResponse(). + * Technically the relay there is only needed in case of an error. + * + * @var array + */ + private static array $seqToRelayMap = []; + + /** + * Map of seq to response Frame + * Should only really need to be used in cases of high amounts of traffic + * + * @var array + */ + private static array $asyncResponseBuffer = []; + + /** + * The threshold after which the asyncResponseBuffer is flushed of all entries. + */ + private int $asyncBufferThreshold = self::DEFAULT_BUFFER_THRESHOLD; + + /** + * @param array $relays + */ + public function __construct( + array $relays, + int $asyncBufferThreshold = self::DEFAULT_BUFFER_THRESHOLD, + CodecInterface $codec = new JsonCodec() + ) { + // Check if we have at least one either existing or new relay here + if (count($relays) === 0 && count(self::$freeRelays) === 0 && count(self::$occupiedRelays) === 0) { + throw new RPCException("MultiRPC needs at least one relay. Zero provided."); + } + + if (count($relays) > 0) { + // Check if all new relays are of the same type + if (count(array_unique(array_map(static fn(RelayInterface $relay) => $relay::class, $relays))) > 1) { + throw new RPCException("MultiRPC can only be used with all relays of the same type, such as a " . SocketRelay::class); + } + + // Check if the existing relays (if any) and the new relays are of the same type. + if (count(self::$freeRelays) > 0) { + $existingRelay = self::$freeRelays[0]; + } elseif (count(self::$occupiedRelays) > 0) { + $existingRelay = self::$occupiedRelays[array_key_first(self::$occupiedRelays)]; + } else { + $existingRelay = null; + } + + if ($existingRelay !== null && $existingRelay::class !== $relays[0]::class) { + throw new RPCException("MultiRPC can only be used with all relays of the same type, such as a " . SocketRelay::class); + } + } + + // The relays (and related arrays) are static to support cloning this class. + // Basically the following problem exists: + // - If we make these arrays instance variables, then we need to recreate the relays on clone, otherwise we'd run into data issues. + // When we do that, the number of relays in existence can increase quite dramatically, resulting in balooning memory usage for socket buffers. + // - If we make these arrays static variables, then we need to make certain that they stay the same across all instances + // of this class. As a result the arrays are basically only appended on, and never deleted or modified. + // In the end that *can* mean that if someone were to repeatedly call `new MultiRPC([a bunch of relays])` that we'd + // tack all those relays into this array resulting in the same problem. + // It also means that different services can cannibalize the number of relays available to them, + // for example a Metrics service and a KV (Cache) service. + // IMHO(L3tum) a balooning memory usage that occurs unexpectly is way worse, than any of the other problems. In the end + // one can work against cannibalized relays by simply upping the number of relays at any point. + self::$freeRelays = [...self::$freeRelays, ...$relays]; + $this->asyncBufferThreshold = $asyncBufferThreshold; + parent::__construct($codec); + } + + /** + * @param non-empty-string $connection + * @param positive-int $count + */ + public static function create( + string $connection, + int $count = 50, + int $asyncBufferThreshold = self::DEFAULT_BUFFER_THRESHOLD, + CodecInterface $codec = new JsonCodec() + ): self { + assert($count > 0); + $count = $count - count(self::$freeRelays) - count(self::$occupiedRelays); + $relays = []; + + for ($i = 0; $i < $count; $i++) { + $relay = Relay::create($connection); + $relays[] = $relay; + } + + return new self($relays, $asyncBufferThreshold, $codec); + } + + /** + * Force-connects all relays. + * @throws RelayException + */ + public function preConnectRelays(): void + { + foreach (self::$freeRelays as $relay) { + if ($relay instanceof ConnectedRelayInterface) { + // Force connect + $relay->connect(); + } + } + } + + public function call(string $method, mixed $payload, mixed $options = null): mixed + { + $relayIndex = $this->ensureFreeRelayAvailable(); + $relay = self::$freeRelays[$relayIndex]; + + $relay->send($this->packFrame($method, $payload)); + + // wait for the frame confirmation + $frame = $this->getResponseFromRelay($relay, self::$seq, true); + + self::$seq++; + + return $this->decodeResponse($frame, $relay, $options); + } + + public function callIgnoreResponse(string $method, mixed $payload): void + { + $relayIndex = $this->ensureFreeRelayAvailable(); + $relay = self::$freeRelays[$relayIndex]; + + $relay->send($this->packFrame($method, $payload)); + + $seq = self::$seq; + self::$seq++; + self::$occupiedRelays[$seq] = $relay; + // Last index so no need for array_pop or stuff + unset(self::$freeRelays[$relayIndex]); + } + + public function callAsync(string $method, mixed $payload): int + { + // Flush buffer if someone doesn't call getResponse + if (count(self::$asyncResponseBuffer) > $this->asyncBufferThreshold) { + // We don't need to clean up occupiedRelays here since the buffer is solely for responses already + // fetched from relays, and those relays are put back to freeRelays in getNextFreeRelay() + self::$seqToRelayMap = array_diff_key(self::$seqToRelayMap, self::$asyncResponseBuffer); + self::$asyncResponseBuffer = []; + } + + $relayIndex = $this->ensureFreeRelayAvailable(); + $relay = self::$freeRelays[$relayIndex]; + + $relay->send($this->packFrame($method, $payload)); + + $seq = self::$seq; + self::$seq++; + self::$occupiedRelays[$seq] = $relay; + self::$seqToRelayMap[$seq] = $relay; + // Last index so no need for array_pop or stuff + unset(self::$freeRelays[$relayIndex]); + + return $seq; + } + + public function hasResponse(int $seq): bool + { + // Check if we have the response buffered previously due to congestion + if (isset(self::$asyncResponseBuffer[$seq])) { + return true; + } + + // Else check if the relay has the response in its buffer + if (self::$seqToRelayMap[$seq]->hasFrame()) { + return true; + } + + return false; + } + + public function hasResponses(array $seqs): array + { + $relays = []; + /** @var array $relayIndexToSeq */ + $relayIndexToSeq = []; + $seqsWithResponse = []; + + // The behaviour is essentially the same as self::hasResponse, just mapped to multiple $seqs aka $relays. + // In order to use MultiRelayHelper we create a map of index => seq to map it back after checking for messages. + foreach ($seqs as $seq) { + if (isset(self::$asyncResponseBuffer[$seq])) { + $seqsWithResponse[] = $seq; + } elseif (isset(self::$seqToRelayMap[$seq])) { + $relayIndexToSeq[count($relays)] = $seq; + $relays[] = self::$seqToRelayMap[$seq]; + } + } + + /** @var int[]|false $index */ + $index = MultiRelayHelper::findRelayWithMessage($relays); + + if ($index === false) { + return $seqsWithResponse; + } + + foreach ($index as $relayIndex) { + $seqsWithResponse[] = $relayIndexToSeq[$relayIndex]; + } + + return $seqsWithResponse; + } + + public function getResponse(int $seq, mixed $options = null): mixed + { + $relay = self::$seqToRelayMap[$seq] ?? throw new RPCException(self::ERR_INVALID_SEQ_NUMBER); + unset(self::$seqToRelayMap[$seq]); + + if (($frame = $this->getResponseFromBuffer($seq)) !== null) { + /** + * We can assume through @see MultiRPC::ensureFreeRelayAvailable() that a relay whose response is already + * in this buffer has also been added to freeRelays (or is otherwise occupied). + * Thus we only re-add (and do so without searching for it first) if we don't have the response yet. + */ + } else { + self::$freeRelays[] = self::$occupiedRelays[$seq]; + unset(self::$occupiedRelays[$seq]); + + $frame = $this->getResponseFromRelay($relay, $seq, true); + } + + return $this->decodeResponse($frame, $relay, $options); + } + + public function getResponses(array $seqs, mixed $options = null): iterable + { + // Quick return + if (count($seqs) === 0) { + return; + } + + // Flip the array to use the $seqs for key indexing + $seqsKeyed = []; + + foreach ($seqs as $seq) { + if (isset(self::$asyncResponseBuffer[$seq])) { + // We can use getResponse() here since it's doing basically what we want to do here anyway + yield $seq => $this->getResponse($seq, $options); + } else { + $seqsKeyed[$seq] = true; + } + } + + // Fetch all relays that are still occupied and which we need responses from + $seqsToRelays = array_intersect_key(self::$occupiedRelays, $seqsKeyed); + + // Make sure we have relays for all $seqs, otherwise something went wrong + if (count($seqsToRelays) !== count($seqsKeyed)) { + throw new RPCException(self::ERR_INVALID_SEQ_NUMBER); + } + + $timeoutInMicroseconds = 0; + while (count($seqsToRelays) > 0) { + // Do a first pass without a timeout. Maybe there's already most responses which would make a timeout unnecessary. + /** @var positive-int[]|false $seqsReceivedResponse */ + $seqsReceivedResponse = MultiRelayHelper::findRelayWithMessage($seqsToRelays, $timeoutInMicroseconds); + $timeoutInMicroseconds = 500; + + if ($seqsReceivedResponse === false) { + if ($this->checkAllOccupiedRelaysStillConnected()) { + // Check if we've lost a relay we were waiting on, if so we need to quit since something is wrong. + if (count(array_diff_key($seqsToRelays, self::$occupiedRelays)) > 0) { + throw new RPCException(self::ERR_INVALID_SEQ_NUMBER); + } + } + continue; + } + + foreach ($seqsReceivedResponse as $seq) { + // Add the previously occupied relay to freeRelays here so that we don't lose it in case of an error + $relay = $seqsToRelays[$seq]; + self::$freeRelays[] = $relay; + unset(self::$occupiedRelays[$seq]); + + // Yield the response + $frame = $this->getResponseFromRelay($relay, $seq, true); + yield $seq => $this->decodeResponse($frame, $relay, $options); + + // Unset tracking map + unset($seqsToRelays[$seq], self::$seqToRelayMap[$seq]); + } + } + } + + /** + * Returns array-key of free relay + * @throws RPCException + */ + private function ensureFreeRelayAvailable(): int + { + if (count(self::$freeRelays) > 0) { + // Return the last entry on self::$freeRelays so that further code can use unset() instead of array_splice (index handling) + /** @psalm-return int */ + return array_key_last(self::$freeRelays); + } + + if (count(self::$occupiedRelays) === 0) { + // If we have neither freeRelays nor occupiedRelays then someone either initialized this with 0 relays + // or something went terribly wrong. Either way we need to quit. + throw new RPCException("No relays available at all"); + } + + while (count(self::$freeRelays) === 0) { + /** @var positive-int[]|false $index */ + $index = MultiRelayHelper::findRelayWithMessage(self::$occupiedRelays); + + if ($index === false) { + // Check if all currently occupied relays are even still connected. Do another loop if they aren't. + if ($this->checkAllOccupiedRelaysStillConnected()) { + continue; + } else { + // Just choose the first occupiedRelay to wait on since instead we may busyloop here + // checking relay status and not giving RR the chance to actually answer (in a single core env for example). + $index = [array_key_first(self::$occupiedRelays)]; + } + } + + // Flush as many relays as we can up until a limit (arbitrarily 10?) + for ($i = 0, $max = min(10, count($index)); $i < $max; $i++) { + /** @var positive-int $seq */ + $seq = $index[$i]; + // Move relay from occupiedRelays into freeRelays before trying to get the response from it + // in case something happens, so we don't lose it. + $relay = self::$occupiedRelays[$seq]; + self::$freeRelays[] = $relay; + unset(self::$occupiedRelays[$seq]); + // Save response if in seqToRelayMap (aka a response is expected) + // only save response in case of mismatched seq = response not in seqToRelayMap + try { + $this->getResponseFromRelay($relay, $seq, !isset(self::$seqToRelayMap[$seq])); + } catch (RelayException|RPCException) { + // Intentionally left blank + } + } + } + + // Sometimes check if all occupied relays are even still connected + $this->checkAllOccupiedRelaysStillConnected(); + + // Return the last entry on self::$freeRelays so that further code can use unset() instead of array_splice (index handling) + return array_key_last(self::$freeRelays); + } + + /** + * Gets a response from the relay, blocking for it if necessary, with some error handling in regards to mismatched seq + * + * @param positive-int $expectedSeq + */ + private function getResponseFromRelay(RelayInterface $relay, int $expectedSeq, bool $onlySaveResponseInCaseOfMismatchedSeq = false): Frame + { + if ($relay instanceof ConnectedRelayInterface && !$relay->isConnected()) { + throw new TransportException("Unable to read payload from the stream"); + } + + $frame = $relay->waitFrame(); + + if (count($frame->options) !== 2) { + // Expect at least a few options + throw new RPCException('Invalid RPC frame, options missing'); + } + + if ($frame->options[0] !== $expectedSeq) { + // Save response since $seq was invalid but the response may not + /** @var positive-int $responseSeq */ + $responseSeq = $frame->options[0]; + self::$asyncResponseBuffer[$responseSeq] = $frame; + + throw new RPCException('Invalid RPC frame, sequence mismatch'); + } + + if (!$onlySaveResponseInCaseOfMismatchedSeq) { + // If we want to save the response, regardless of whether the $seq was a match or not, + // we'll need to add it to the buffer. + // This is used in e.g. flushing a relay in ensureFreeRelay() + // so that we can at least *try* to get the resonse back to the user. + self::$asyncResponseBuffer[$expectedSeq] = $frame; + } + + return $frame; + } + + /** + * Tries to get a response (Frame) from the buffer and unsets the entry if it finds the response. + * + * @param positive-int $seq + * @return Frame|null + */ + private function getResponseFromBuffer(int $seq): ?Frame + { + if (($frame = self::$asyncResponseBuffer[$seq] ?? null) !== null) { + unset(self::$asyncResponseBuffer[$seq]); + } + + return $frame; + } + + private function checkAllOccupiedRelaysStillConnected(): bool + { + if (($relaysNotConnected = MultiRelayHelper::checkConnected(self::$occupiedRelays)) !== false) { + /** @var positive-int $seq */ + foreach ($relaysNotConnected as $seq) { + self::$freeRelays[] = self::$occupiedRelays[$seq]; + unset(self::$seqToRelayMap[$seq], self::$occupiedRelays[$seq]); + } + + return true; + } + + return false; + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/RPC.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/RPC.php new file mode 100644 index 0000000..28979dc --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/RPC.php @@ -0,0 +1,53 @@ +relay->send($this->packFrame($method, $payload)); + + // wait for the frame confirmation + $frame = $this->relay->waitFrame(); + + if (count($frame->options) !== 2) { + throw new RPCException('Invalid RPC frame, options missing'); + } + + if ($frame->options[0] !== self::$seq) { + throw new RPCException('Invalid RPC frame, sequence mismatch'); + } + + self::$seq++; + + return $this->decodeResponse($frame, $this->relay, $options); + } + + /** + * @param non-empty-string $connection + */ + public static function create(string $connection, CodecInterface $codec = new JsonCodec()): RPCInterface + { + $relay = Relay::create($connection); + + return new self($relay, $codec); + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RPC/RPCInterface.php b/tests/php_test_files/vendor/spiral/goridge/src/RPC/RPCInterface.php new file mode 100644 index 0000000..3472eb6 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RPC/RPCInterface.php @@ -0,0 +1,38 @@ +[^:\/]+):\/\/(?P[^:]+)(:(?P[^:]+))?/'; + + /** + * Create relay using string address. + * + * Example: + * + * Relay::create("pipes"); + * Relay::create("tpc://localhost:6001"); + * + * + * @param non-empty-string $connection + */ + public static function create(string $connection): RelayInterface + { + if ($connection === self::PIPES) { + return new StreamRelay(STDIN, STDOUT); + } + + if (!\preg_match(self::CONNECTION_EXP, $connection, $match)) { + throw new Exception\RelayFactoryException('unsupported connection format'); + } + + /** @var array{protocol: non-empty-string, arg1: non-empty-string, arg2: non-empty-string} $match */ + $protocol = \strtolower($match['protocol']); + + switch ($protocol) { + case self::TCP_SOCKET: + //fall through + case self::UNIX_SOCKET: + $socketType = $protocol === self::TCP_SOCKET + ? SocketType::TCP + : SocketType::UNIX; + + $port = isset($match['arg2']) + ? (int)$match['arg2'] + : null; + + /** @psalm-suppress ArgumentTypeCoercion Reason: Checked in the SocketRelay constructor */ + return new SocketRelay($match['arg1'], $port, $socketType); + + case self::PIPES: + if (!isset($match['arg2'])) { + throw new RelayFactoryException('Unsupported stream connection format'); + } + + return new StreamRelay(self::openIn($match['arg1']), self::openOut($match['arg2'])); + + default: + throw new Exception\RelayFactoryException('unknown connection protocol'); + } + } + + /** + * @param non-empty-string $input + * @return resource + */ + private static function openIn(string $input) + { + $resource = @\fopen("php://$input", 'rb'); + + if ($resource === false) { + throw new RelayFactoryException('Could not initiate input stream resource'); + } + + return $resource; + } + + /** + * @param non-empty-string $output + * @return resource + */ + private static function openOut(string $output) + { + $resource = @\fopen("php://$output", 'wb'); + + if ($resource === false) { + throw new RelayFactoryException('could not initiate output stream resource'); + } + + return $resource; + } + + public function hasFrame(): bool + { + return false; + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/RelayInterface.php b/tests/php_test_files/vendor/spiral/goridge/src/RelayInterface.php new file mode 100644 index 0000000..bc1a90a --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/RelayInterface.php @@ -0,0 +1,22 @@ +|null + * + * @psalm-suppress DeprecatedInterface + */ +class SocketRelay extends Relay implements Stringable, ConnectedRelayInterface +{ + final public const RECONNECT_RETRIES = 10; + final public const RECONNECT_TIMEOUT = 100; + + /** + * 1) Pathname to "sock" file in case of UNIX socket + * 2) URI string in case of TCP socket + */ + private readonly string $address; + + /** @var PortType */ + private readonly ?int $port; + private readonly SocketType $type; + /** + * @internal + * This isn't really ideal but there's no easy way since we need access to the underlying socket + * to do a socket_select across multiple SocketRelays. + */ + public ?Socket $socket = null; + + /** + * Example: + * + * + * $relay = new SocketRelay("localhost", 7000); + * $relay = new SocketRelay("/tmp/rpc.sock", null, SocketType::UNIX); + * + * + * @param non-empty-string $address Localhost, ip address or hostname. + * @param PortType $port Ignored for UNIX sockets. + * + * @throws InvalidArgumentException + */ + public function __construct( + string $address, + ?int $port = null, + SocketType $type = SocketType::TCP, + ) { + // Guaranteed at the level of composer's json config + \assert(\extension_loaded('sockets')); + + switch ($type) { + case SocketType::TCP: + // TCP address should always be in lowercase + $address = \strtolower($address); + + if ($port === null) { + throw new InvalidArgumentException(\sprintf("ะขo port given for TPC socket on '%s'", $address)); + } + + if ($port < 0 || $port > 65535) { + throw new InvalidArgumentException(\sprintf("Invalid port given for TPC socket on '%s'", $address)); + } + + break; + + case SocketType::UNIX: + $port = null; + break; + } + + $this->address = $address; + $this->port = $port; + $this->type = $type; + } + + /** + * Destruct connection and disconnect. + */ + public function __destruct() + { + if ($this->isConnected()) { + $this->close(); + } + } + + public function __toString(): string + { + if ($this->type === SocketType::TCP) { + return "tcp://{$this->address}:{$this->port}"; + } + + return "unix://{$this->address}"; + } + + public function __clone() + { + // Remove reference to socket on clone + $this->socket = null; + } + + public function getAddress(): string + { + return $this->address; + } + + /** + * @return PortType + */ + public function getPort(): ?int + { + return $this->port; + } + + public function getType(): SocketType + { + return $this->type; + } + + /** + * @psalm-assert-if-true Socket $this->socket + * @psalm-assert-if-false null $this->socket + */ + public function isConnected(): bool + { + return $this->socket !== null; + } + + /** + * @throws RelayException + * @psalm-suppress PossiblyNullArgument Reason: Using the "connect()" method guarantees + * the existence of the socket. + */ + public function waitFrame(): Frame + { + $this->connect(); + + $header = ''; + $headerLength = \socket_recv($this->socket, $header, 12, \MSG_WAITALL); + + if ($headerLength !== 12) { + $error = \socket_strerror(\socket_last_error($this->socket)); + throw new HeaderException(\sprintf('Unable to read frame header: %s', $error)); + } + + $parts = Frame::readHeader($header); + + // total payload length + $payload = ''; + $length = $parts[1] * 4 + $parts[2]; + + while ($length > 0) { + $bufferLength = \socket_recv($this->socket, $buffer, $length, \MSG_WAITALL); + + /** + * Suppress "buffer === null" assertion, because buffer can contain + * NULL in case of socket_recv function error. + * + * @psalm-suppress TypeDoesNotContainNull + */ + if ($bufferLength === false || $buffer === null) { + $message = \socket_strerror(\socket_last_error($this->socket)); + throw new HeaderException(\sprintf('Unable to read payload from socket: %s', $message)); + } + + $payload .= $buffer; + $length -= $bufferLength; + } + + return Frame::initFrame($parts, $payload); + } + + /** + * @psalm-suppress PossiblyNullArgument Reason: Using the "connect()" method guarantees + * the existence of the socket. + */ + public function send(Frame $frame): void + { + $this->connect(); + + $body = Frame::packFrame($frame); + + if (\socket_send($this->socket, $body, \strlen($body), 0) === false) { + throw new TransportException('Unable to write payload to the stream'); + } + } + + public function hasFrame(): bool + { + if (!$this->isConnected()) { + return false; + } + + $read = [$this->socket]; + $write = null; + $except = null; + + $is = \socket_select($read, $write, $except, 0); + + return $is > 0; + } + + /** + * Ensure socket connection. Returns true if socket successfully connected + * or have already been connected. + * + * @param int<0, max> $retries Count of connection tries. + * @param int<0, max> $timeout Timeout between reconnections in microseconds. + * + * @throws RelayException + */ + public function connect(int $retries = self::RECONNECT_RETRIES, int $timeout = self::RECONNECT_TIMEOUT): bool + { + \assert($retries >= 1); + \assert($timeout > 0); + + if ($this->isConnected()) { + return true; + } + + $socket = $this->createSocket(); + + if ($socket === false) { + throw new RelayException("Unable to create socket {$this}"); + } + + try { + $status = false; + + for ($attempt = 0; $attempt <= $retries; ++$attempt) { + if ($status = @\socket_connect($socket, $this->address, $this->port ?? 0)) { + break; + } + + \usleep(\max(0, $timeout)); + } + + if ($status === false) { + throw new RelayException(\socket_strerror(\socket_last_error($socket))); + } + } catch (\Throwable $e) { + throw new RelayException("Unable to establish connection {$this}", 0, $e); + } + + $this->socket = $socket; + + return true; + } + + /** + * Close connection. + * + * @throws RelayException + */ + public function close(): void + { + if (!$this->isConnected()) { + throw new RelayException("Unable to close socket '{$this}', socket already closed"); + } + + \socket_close($this->socket); + $this->socket = null; + } + + private function createSocket(): Socket|false + { + if ($this->type === SocketType::UNIX) { + return \socket_create(\AF_UNIX, \SOCK_STREAM, 0); + } + + return \socket_create(\AF_INET, \SOCK_STREAM, \SOL_TCP); + } +} diff --git a/tests/php_test_files/vendor/spiral/goridge/src/SocketType.php b/tests/php_test_files/vendor/spiral/goridge/src/SocketType.php new file mode 100644 index 0000000..687f27b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/goridge/src/SocketType.php @@ -0,0 +1,11 @@ +assertReadable($in)) { + throw new InvalidArgumentException('Input resource stream must be readable'); + } + + if (!is_resource($out) || get_resource_type($out) !== 'stream') { + throw new InvalidArgumentException('Expected a valid output resource stream'); + } + + if (!$this->assertWritable($out)) { + throw new Exception\InvalidArgumentException('Output resource stream must be writable'); + } + + $this->in = $in; + $this->out = $out; + } + + /** + * @throws RelayException + */ + public function waitFrame(): Frame + { + \error_clear_last(); + $header = @\fread($this->in, 12); + + if ($header === false) { + throw new HeaderException('Unable to read frame header: ' . $this->getLastErrorMessage()); + } + + if (\strlen($header) !== 12) { + throw new HeaderException('Unable to read frame header: Incorrect header size'); + } + + $parts = Frame::readHeader($header); + + // total payload length + $payload = ''; + $length = $parts[1] * 4 + $parts[2]; + + while ($length > 0) { + \error_clear_last(); + $buffer = @\fread($this->in, $length); + + if ($buffer === false) { + $message = \vsprintf('An error occurred while reading payload from the stream: %s', [ + $this->getLastErrorMessage(), + ]); + + throw new TransportException($message); + } + + $payload .= $buffer; + $length -= \strlen($buffer); + } + + return Frame::initFrame($parts, $payload); + } + + private function getLastErrorMessage(): string + { + $last = (array)\error_get_last(); + + return $last['message'] ?? 'Unknown Error'; + } + + public function send(Frame $frame): void + { + $body = Frame::packFrame($frame); + + \error_clear_last(); + if (@\fwrite($this->out, $body, \strlen($body)) === false) { + $message = \vsprintf('An error occurred while write payload to the stream: %s', [ + $this->getLastErrorMessage(), + ]); + + throw new TransportException($message); + } + } + + public function hasFrame(): bool + { + $read = [$this->in]; + $write = null; + $except = null; + + $is = \stream_select($read, $write, $except, 0); + + return $is > 0; + } + + /** + * Checks if stream is readable. + * + * @param resource $stream + */ + private function assertReadable($stream): bool + { + $meta = \stream_get_meta_data($stream); + + $available = ['r', 'rb', 'r+', 'rb+', 'w+', 'wb+', 'w+b', 'a+', 'ab+', 'x+', 'c+', 'cb+']; + + return \in_array($meta['mode'], $available, true); + } + + /** + * Checks if stream is writable. + * + * @param resource $stream + */ + private function assertWritable($stream): bool + { + $meta = \stream_get_meta_data($stream); + + return !\in_array($meta['mode'], ['r', 'rb'], true); + } +} diff --git a/tests/php_test_files/vendor/spiral/logger/LICENSE b/tests/php_test_files/vendor/spiral/logger/LICENSE new file mode 100644 index 0000000..80ffcbe --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Spiral Scout + +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. \ No newline at end of file diff --git a/tests/php_test_files/vendor/spiral/logger/README.md b/tests/php_test_files/vendor/spiral/logger/README.md new file mode 100644 index 0000000..dc44d36 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/README.md @@ -0,0 +1,17 @@ +# LogFactory and global log listeners + +[![PHP Version Require](https://poser.pugx.org/spiral/logger/require/php)](https://packagist.org/packages/spiral/logger) +[![Latest Stable Version](https://poser.pugx.org/spiral/logger/v/stable)](https://packagist.org/packages/spiral/logger) +[![phpunit](https://github.com/spiral/logger/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/logger/actions) +[![psalm](https://github.com/spiral/logger/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/logger/actions) +[![Codecov](https://codecov.io/gh/spiral/logger/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral/logger/) +[![Total Downloads](https://poser.pugx.org/spiral/logger/downloads)](https://packagist.org/packages/spiral/logger) +[![type-coverage](https://shepherd.dev/github/spiral/logger/coverage.svg)](https://shepherd.dev/github/spiral/logger) +[![psalm-level](https://shepherd.dev/github/spiral/logger/level.svg)](https://shepherd.dev/github/spiral/logger) + + +[Documentation](https://spiral.dev/docs) | [Framework Bundle](https://github.com/spiral/framework) + +## License: + +MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/logger/composer.json b/tests/php_test_files/vendor/spiral/logger/composer.json new file mode 100644 index 0000000..58eb94b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/composer.json @@ -0,0 +1,59 @@ +{ + "name": "spiral/logger", + "type": "library", + "description": "LogFactory and global log listeners", + "license": "MIT", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/logger" + }, + "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" + } + ], + "require": { + "php": ">=8.1", + "psr/log": "1 - 3", + "spiral/core": "^3.13" + }, + "require-dev": { + "phpunit/phpunit": "^10.1", + "mockery/mockery": "^1.5", + "vimeo/psalm": "^5.9" + }, + "autoload": { + "psr-4": { + "Spiral\\Logger\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\Tests\\Logger\\": "tests" + } + }, + "extra": { + "branch-alias": { + "dev-master": "3.13.x-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/logger/psalm.xml b/tests/php_test_files/vendor/spiral/logger/psalm.xml new file mode 100644 index 0000000..3f2636b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/psalm.xml @@ -0,0 +1,20 @@ + + + + + + diff --git a/tests/php_test_files/vendor/spiral/logger/src/Attribute/LoggerChannel.php b/tests/php_test_files/vendor/spiral/logger/src/Attribute/LoggerChannel.php new file mode 100644 index 0000000..9e6feff --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/src/Attribute/LoggerChannel.php @@ -0,0 +1,23 @@ + LogFactory::class, + ]; + + public function init(Container $container): void + { + $container->bindInjector(LoggerInterface::class, LoggerInjector::class); + } +} diff --git a/tests/php_test_files/vendor/spiral/logger/src/Event/LogEvent.php b/tests/php_test_files/vendor/spiral/logger/src/Event/LogEvent.php new file mode 100644 index 0000000..26af5a0 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/src/Event/LogEvent.php @@ -0,0 +1,42 @@ +time; + } + + public function getChannel(): string + { + return $this->channel; + } + + public function getLevel(): string + { + return $this->level; + } + + public function getMessage(): string + { + return $this->message; + } + + public function getContext(): array + { + return $this->context; + } +} diff --git a/tests/php_test_files/vendor/spiral/logger/src/ListenerRegistry.php b/tests/php_test_files/vendor/spiral/logger/src/ListenerRegistry.php new file mode 100644 index 0000000..60ff9d6 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/src/ListenerRegistry.php @@ -0,0 +1,39 @@ +listeners, true)) { + $this->listeners[] = $listener; + } + + return $this; + } + + public function removeListener(callable $listener): void + { + $key = \array_search($listener, $this->listeners, true); + if ($key !== null) { + unset($this->listeners[$key]); + } + } + + /** + * @return callable[] + */ + public function getListeners(): array + { + return $this->listeners; + } +} diff --git a/tests/php_test_files/vendor/spiral/logger/src/ListenerRegistryInterface.php b/tests/php_test_files/vendor/spiral/logger/src/ListenerRegistryInterface.php new file mode 100644 index 0000000..673ee03 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/src/ListenerRegistryInterface.php @@ -0,0 +1,23 @@ +listenedRegistry->getListeners() as $listener) { + \call_user_func($listener, $e); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/logger/src/LoggerInjector.php b/tests/php_test_files/vendor/spiral/logger/src/LoggerInjector.php new file mode 100644 index 0000000..ee05228 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/src/LoggerInjector.php @@ -0,0 +1,59 @@ + + */ +final class LoggerInjector implements InjectorInterface +{ + public const DEFAULT_CHANNEL = 'default'; + + public function __construct( + private readonly LogsInterface $factory, + ) { + } + + /** + * @param \ReflectionParameter|string|null $context may use extended context if possible. + */ + public function createInjection( + \ReflectionClass $class, + \ReflectionParameter|null|string $context = null, + ): LoggerInterface { + $channel = \is_object($context) ? $this->extractChannelAttribute($context) : null; + + if ($channel === null) { + /** + * Array of flags to check if the logger allows null argument + * + * @var array, bool> $cache + */ + static $cache = []; + + $cache[$this->factory::class] = (new \ReflectionMethod($this->factory, 'getLogger')) + ->getParameters()[0]->allowsNull(); + + $channel = $cache[$this->factory::class] ? null : self::DEFAULT_CHANNEL; + } + + return $this->factory->getLogger($channel); + } + + /** + * @return non-empty-string|null + */ + private function extractChannelAttribute(\ReflectionParameter $parameter): ?string + { + return ($parameter->getAttributes(LoggerChannel::class)[0] ?? null)?->newInstance()->name; + } +} diff --git a/tests/php_test_files/vendor/spiral/logger/src/LogsInterface.php b/tests/php_test_files/vendor/spiral/logger/src/LogsInterface.php new file mode 100644 index 0000000..8693e9b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/src/LogsInterface.php @@ -0,0 +1,18 @@ +receptor = $receptor(...); + } + + public function log(mixed $level, $message, array $context = []): void + { + \call_user_func($this->receptor, $this->channel, $level, $message, $context); + } +} diff --git a/tests/php_test_files/vendor/spiral/logger/src/Traits/LoggerTrait.php b/tests/php_test_files/vendor/spiral/logger/src/Traits/LoggerTrait.php new file mode 100644 index 0000000..55e4caf --- /dev/null +++ b/tests/php_test_files/vendor/spiral/logger/src/Traits/LoggerTrait.php @@ -0,0 +1,58 @@ +logger = $logger; + } + + /** + * Get associated or create new instance of LoggerInterface. + */ + protected function getLogger(string $channel = null): LoggerInterface + { + if ($channel !== null) { + return $this->allocateLogger($channel); + } + + if ($this->logger !== null) { + return $this->logger; + } + + //We are using class name as log channel (name) by default + return $this->logger = $this->allocateLogger(static::class); + } + + /** + * Create new instance of associated logger (on demand creation). + */ + private function allocateLogger(string $channel): LoggerInterface + { + $container = ContainerScope::getContainer(); + if (empty($container) || !$container->has(LogsInterface::class)) { + return $this->logger ?? new NullLogger(); + } + + //We are using class name as log channel (name) by default + return $container->get(LogsInterface::class)->getLogger($channel); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.editorconfig b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.editorconfig new file mode 100644 index 0000000..f02a64b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.yml] +indent_style = space +indent_size = 2 + +[*.json] +indent_style = space +indent_size = 4 diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.gitattributes b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.gitattributes new file mode 100644 index 0000000..c8b78cd --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.gitattributes @@ -0,0 +1,2 @@ +/tests export-ignore +/example export-ignore diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/CODE_OF_CONDUCT.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..5d589cb --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,12 @@ +# Code of Conduct + +The Spiral code of conduct is derived from the Ruby code of conduct. +Any violations of the code of conduct may be reported by email `wolfy-j[at]spiralscout.com`. + +- Participants will be tolerant of opposing views. + +- Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. + +- When interpreting the words and actions of others, participants should always assume good intentions. + +- Behavior which can be reasonably considered harassment will not be tolerated. diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/CONTRIBUTING.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/CONTRIBUTING.md new file mode 100644 index 0000000..90e5310 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/CONTRIBUTING.md @@ -0,0 +1,6 @@ +# Contributing + +Feel free to contribute to the development of the Framework or its components. + +For more information on contributing rules you can find on the documentation +page at https://spiral.dev/docs/about-contributing diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/FUNDING.yml b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/FUNDING.yml new file mode 100644 index 0000000..38798a2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: roadrunner-server diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/1_Bug_report.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/1_Bug_report.md new file mode 100644 index 0000000..5ea3ac3 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/1_Bug_report.md @@ -0,0 +1,23 @@ +--- +name: ๐Ÿ› Bug Report +about: Report errors and problems +labels: Bug + +--- +### Description + + + +### How To Reproduce + + + +### Additional Info + +| Q | A +|------------------| --- +| Package Version | x.y.z +| PHP version | x.y.z +| Operating system | Linux + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/2_Feature_request.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/2_Feature_request.md new file mode 100644 index 0000000..4a14c3d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/2_Feature_request.md @@ -0,0 +1,14 @@ +--- +name: ๐Ÿš€ Feature Request +about: RFC and ideas for new features and improvements +labels: Feature + +--- +## Description + + + +## Example + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/3_Support_question.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/3_Support_question.md new file mode 100644 index 0000000..7d0ecb4 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/ISSUE_TEMPLATE/3_Support_question.md @@ -0,0 +1,15 @@ +--- +name: โ“ Question +about: Use if you have problems and don't know how to formulate them +labels: Question + +--- + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/PULL_REQUEST_TEMPLATE.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8c0643a --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +| Q | A +| ------------- | --- +| Bugfix? | โœ”๏ธ/โŒ +| Breaks BC? | โœ”๏ธ/โŒ +| New feature? | โœ”๏ธ/โŒ +| Issues | #... +| Docs PR | spiral/docs#... + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/SECURITY.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/SECURITY.md new file mode 100644 index 0000000..259a7a0 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/SECURITY.md @@ -0,0 +1,11 @@ +Security Policy +=============== + +If you found something which shouldn't be there or a bug which opens a security +hole, please let me know immediately by email `wolfy-j[at]spiralscout.com`. + +DO NOT PUBLISH SECURITY REPORTS PUBLICLY. + +The full [Security Policy][1] is described in the official documentation. + + [1]: https://spiral.dev/docs/about-contributing#critical-security-issues diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/workflows/phpunit.yml b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/workflows/phpunit.yml new file mode 100644 index 0000000..af84cc7 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/workflows/phpunit.yml @@ -0,0 +1,16 @@ +on: + push: + branches: + - '*.*' + pull_request: null + +name: phpunit + +jobs: + phpunit: + uses: spiral/gh-actions/.github/workflows/phpunit.yml@master + with: + os: >- + ['ubuntu-latest'] + stability: >- + ['prefer-stable'] diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/workflows/psalm.yml b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/workflows/psalm.yml new file mode 100644 index 0000000..adf59f0 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.github/workflows/psalm.yml @@ -0,0 +1,14 @@ +on: + push: + branches: + - '*.*' + pull_request: null + +name: static analysis + +jobs: + psalm: + uses: spiral/gh-actions/.github/workflows/psalm.yml@master + with: + os: >- + ['ubuntu-latest'] diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/.gitignore b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.gitignore new file mode 100644 index 0000000..f82a4a5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/.gitignore @@ -0,0 +1,11 @@ +.idea/ +.env +composer.lock +vendor/ +*.db +clover.xml +example/vendor/ +go.sum +builds/ +.phpunit.result.cache +.phpunit.cache/ diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/LICENSE b/tests/php_test_files/vendor/spiral/roadrunner-grpc/LICENSE new file mode 100644 index 0000000..f218000 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Spiral Scout + +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/spiral/roadrunner-grpc/README.md b/tests/php_test_files/vendor/spiral/roadrunner-grpc/README.md new file mode 100644 index 0000000..c85faa9 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/README.md @@ -0,0 +1,47 @@ + + + + + + + +# RoadRunner GRPC Plugin + +[![Latest Stable Version](https://poser.pugx.org/spiral/roadrunner-grpc/version)](https://packagist.org/packages/spiral/roadrunner-grpc) +[![Codecov](https://codecov.io/gh/roadrunner-php/grpc/branch/3.x/graph/badge.svg)](https://codecov.io/gh/roadrunner-php/grpc/) + +RoadRunner GRPC is an open-source (MIT) high-performance PHP [GRPC](https://grpc.io/) server build on top +of [RoadRunner](https://github.com/roadrunner-server/roadrunner). Server support both PHP and Golang services running within one +application. + +## Features + +- native Golang GRPC implementation compliant +- minimal configuration, plug-and-play model +- very fast, low footprint proxy +- simple TLS configuration +- debug tools included +- Prometheus metrics +- middleware and server customization support +- code generation using `protoc` plugin (Plugin can be downloaded from the + roadrunner [releases page](https://github.com/roadrunner-server/roadrunner/releases)) +- transport, message, worker error management +- response error codes over php exceptions +- works on Windows + +## Documentation + +You can find more information about RoadRunner GRPC plugin in the [official documentation](https://docs.roadrunner.dev/plugins/grpc). + +## Example + +You can find example of GRPC application in [example](./example/echo) directory. + + +try Spiral Framework + + +License: +-------- +MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained +by [SpiralScout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/codecov.yml b/tests/php_test_files/vendor/spiral/roadrunner-grpc/codecov.yml new file mode 100644 index 0000000..672717e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/codecov.yml @@ -0,0 +1,12 @@ +coverage: + status: + project: + default: + target: auto + threshold: 0% + informational: true + patch: + default: + target: auto + threshold: 0% + informational: true diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-grpc/composer.json new file mode 100644 index 0000000..90d85b9 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/composer.json @@ -0,0 +1,77 @@ +{ + "name": "spiral/roadrunner-grpc", + "type": "library", + "description": "High-Performance GRPC server for PHP applications", + "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" + } + ], + "homepage": "https://roadrunner.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": ">=8.1", + "ext-json": "*", + "google/common-protos": "^3.1|^4.0", + "google/protobuf": "^3.7 || ^4.0", + "spiral/roadrunner-worker": "^3.0", + "spiral/goridge": "^4.0", + "spiral/roadrunner": "^2023.1 || ^2024.1" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "mockery/mockery": "^1.4", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": ">=5.8" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\GRPC\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "GPBMetadata\\": "tests/generated/GPBMetadata", + "Service\\": "tests/generated/Service", + "Spiral\\RoadRunner\\GRPC\\Tests\\": "tests" + } + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm --no-cache" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/phpunit.xml b/tests/php_test_files/vendor/spiral/roadrunner-grpc/phpunit.xml new file mode 100644 index 0000000..c41f6b5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/phpunit.xml @@ -0,0 +1,22 @@ + + + + + src + + + + + tests + tests/generated + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/psalm.xml b/tests/php_test_files/vendor/spiral/roadrunner-grpc/psalm.xml new file mode 100644 index 0000000..c5abbaa --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/psalm.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/resources/.phpstorm.meta.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/resources/.phpstorm.meta.php new file mode 100644 index 0000000..935a406 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/resources/.phpstorm.meta.php @@ -0,0 +1,144 @@ + + * @implements \ArrayAccess + */ +final class Context implements ContextInterface, \IteratorAggregate, \Countable, \ArrayAccess +{ + /** + * @param TValues $values + */ + public function __construct( + private array $values, + ) { + } + + public function withValue(string $key, mixed $value): ContextInterface + { + $ctx = clone $this; + $ctx->values[$key] = $value; + + return $ctx; + } + + public function getValue(string $key, mixed $default = null): mixed + { + return $this->values[$key] ?? $default; + } + + public function getValues(): array + { + return $this->values; + } + + public function offsetExists(mixed $offset): bool + { + \assert(\is_string($offset), 'Offset argument must be a type of string'); + + /** + * Note: PHP Opcode optimisation + * @see https://www.php.net/manual/pt_BR/internals2.opcodes.isset-isempty-var.php + * + * Priority use `ZEND_ISSET_ISEMPTY_VAR !0` opcode instead of `DO_FCALL 'array_key_exists'`. + */ + return isset($this->values[$offset]) || \array_key_exists($offset, $this->values); + } + + public function offsetGet(mixed $offset): mixed + { + \assert(\is_string($offset), 'Offset argument must be a type of string'); + + return $this->values[$offset] ?? null; + } + + public function offsetSet(mixed $offset, mixed $value): void + { + \assert(\is_string($offset), 'Offset argument must be a type of string'); + + $this->values[$offset] = $value; + } + + public function offsetUnset(mixed $offset): void + { + \assert(\is_string($offset), 'Offset argument must be a type of string'); + + unset($this->values[$offset]); + } + + public function getIterator(): \Traversable + { + return new \ArrayIterator($this->values); + } + + public function count(): int + { + return \count($this->values); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ContextInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ContextInterface.php new file mode 100644 index 0000000..eda2684 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ContextInterface.php @@ -0,0 +1,35 @@ + + */ +interface ContextInterface +{ + /** + * Create context with new value. + * + * @param non-empty-string $key + * @return $this + */ + public function withValue(string $key, mixed $value): self; + + /** + * Get context value or return null. + * + * @param non-empty-string $key + */ + public function getValue(string $key): mixed; + + /** + * Return all context values. + * + * @return TValues + */ + public function getValues(): array; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Exception/GRPCException.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Exception/GRPCException.php new file mode 100644 index 0000000..3f53f18 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Exception/GRPCException.php @@ -0,0 +1,73 @@ +details; + } + + /** + * @param Message[] $details + */ + public function setDetails(array $details): void + { + $this->details = $details; + } + + public function addDetails(Message $message): void + { + $this->details[] = $message; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Exception/GRPCExceptionInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Exception/GRPCExceptionInterface.php new file mode 100644 index 0000000..4ece7a4 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Exception/GRPCExceptionInterface.php @@ -0,0 +1,30 @@ +name]; + + $input = $input instanceof Message ? $input : $this->makeInput($method, $input); + + /** @var Message $message */ + $message = $callable($ctx, $input); + + \assert($this->assertResultType($method, $message)); + + try { + return $message->serializeToString(); + } catch (\Throwable $e) { + throw InvokeException::create($e->getMessage(), StatusCode::INTERNAL, $e); + } + } + + /** + * Checks that the result from the GRPC service method returns the Message object. + * + * @throws \BadFunctionCallException + */ + private function assertResultType(Method $method, mixed $result): bool + { + if (!$result instanceof Message) { + $type = \get_debug_type($result); + + throw new \BadFunctionCallException( + \sprintf(self::ERROR_METHOD_RETURN, $method->name, Message::class, $type), + ); + } + + return true; + } + + /** + * Converts the input from the GRPC service method to the Message object. + * @throws InvokeException + */ + private function makeInput(Method $method, ?string $body): Message + { + try { + $class = $method->inputType; + \assert($this->assertInputType($method, $class)); + + /** @psalm-suppress UnsafeInstantiation */ + $in = new $class(); + + if ($body !== null) { + $in->mergeFromString($body); + } + + return $in; + } catch (\Throwable $e) { + throw InvokeException::create($e->getMessage(), StatusCode::INTERNAL, $e); + } + } + + /** + * Checks that the input of the GRPC service method contains the + * Message object. + * + * @param class-string $class + * @throws \InvalidArgumentException + */ + private function assertInputType(Method $method, string $class): bool + { + if (!\is_subclass_of($class, Message::class)) { + throw new \InvalidArgumentException( + \sprintf(self::ERROR_METHOD_IN_TYPE, $method->name, Message::class, $class), + ); + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/InvokerInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/InvokerInterface.php new file mode 100644 index 0000000..a303458 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/InvokerInterface.php @@ -0,0 +1,20 @@ + $inputType + * @param class-string $outputType + */ + private function __construct( + public readonly string $name, + public readonly string $inputType, + public readonly string $outputType, + ) { + } + + /** + * @deprecated Use {Method->name} property instead. + * @return non-empty-string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @deprecated Use {Method->inputType} property instead. + * @return class-string + */ + public function getInputType(): string + { + return $this->inputType; + } + + /** + * @deprecated Use {Method->outputType} property instead. + * @return class-string + */ + public function getOutputType(): string + { + return $this->outputType; + } + + /** + * Returns true if method signature matches. + */ + public static function match(\ReflectionMethod $method): bool + { + try { + self::assertMethodSignature($method); + } catch (\Throwable) { + return false; + } + + return true; + } + + /** + * @throws \ReflectionException + */ + private static function assertContextParameter(\ReflectionMethod $method, \ReflectionParameter $context): void + { + $type = $context->getType(); + + // When the type is not specified, it means that it is declared as + // a "mixed" type, which is a valid case + if ($type !== null) { + if (!$type instanceof \ReflectionNamedType) { + $message = \sprintf(self::ERROR_PARAM_UNION_TYPE, $context->getName(), $method->getName()); + throw new \DomainException($message, 0x02); + } + + // If the type is not declared as a generic "mixed" or "object", + // then it can only be a type that implements ContextInterface. + if (!\in_array($type->getName(), ['mixed', 'object'], true)) { + /** @psalm-suppress ArgumentTypeCoercion */ + $isContextImplementedType = !$type->isBuiltin() + && (new \ReflectionClass($type->getName()))->implementsInterface(ContextInterface::class); + + // Checking that the signature can accept the context. + // + // TODO If the type is any other implementation of the + // Spiral\RoadRunner\GRPC\ContextInterface other than + // class Spiral\RoadRunner\GRPC\Context, it may cause an error. + // It might make sense to check for such cases? + if (!$isContextImplementedType) { + $message = \vsprintf(self::ERROR_PARAM_CONTEXT_TYPE, [ + $context->getName(), + $method->getName(), + ContextInterface::class, + ]); + + throw new \DomainException($message, 0x03); + } + } + } + } + + /** + * @throws \ReflectionException + */ + private static function assertInputParameter(\ReflectionMethod $method, \ReflectionParameter $input): void + { + $type = $input->getType(); + + // Parameter type cannot be omitted ("mixed") + if ($type === null) { + $message = \vsprintf(self::ERROR_PARAM_INPUT_TYPE, [ + $input->getName(), + $method->getName(), + Message::class, + 'mixed', + ]); + + throw new \DomainException($message, 0x04); + } + + // Parameter type cannot be declared as singular non-named type + if (!$type instanceof \ReflectionNamedType) { + $message = \sprintf(self::ERROR_PARAM_UNION_TYPE, $input->getName(), $method->getName()); + throw new \DomainException($message, 0x05); + } + + /** @psalm-suppress ArgumentTypeCoercion */ + $isProtobufMessageType = !$type->isBuiltin() + && (new \ReflectionClass($type->getName())) + ->isSubclassOf(Message::class); + + if (!$isProtobufMessageType) { + $message = \vsprintf(self::ERROR_PARAM_INPUT_TYPE, [ + $input->getName(), + $method->getName(), + Message::class, + $type->getName(), + ]); + throw new \DomainException($message, 0x06); + } + } + + /** + * @throws \ReflectionException + */ + private static function assertOutputReturnType(\ReflectionMethod $method): void + { + $type = $method->getReturnType(); + + // Return type cannot be omitted ("mixed") + if ($type === null) { + $message = \sprintf(self::ERROR_RETURN_TYPE, $method->getName(), Message::class, 'mixed'); + throw new \DomainException($message, 0x07); + } + + // Return type cannot be declared as singular non-named type + if (!$type instanceof \ReflectionNamedType) { + $message = \sprintf(self::ERROR_RETURN_UNION_TYPE, $method->getName()); + throw new \DomainException($message, 0x08); + } + + /** @psalm-suppress ArgumentTypeCoercion */ + $isProtobufMessageType = !$type->isBuiltin() + && (new \ReflectionClass($type->getName()))->isSubclassOf(Message::class); + + if (!$isProtobufMessageType) { + $message = \sprintf(self::ERROR_RETURN_TYPE, $method->getName(), Message::class, $type->getName()); + throw new \DomainException($message, 0x09); + } + } + + /** + * @throws \ReflectionException + * @throws \DomainException + */ + private static function assertMethodSignature(\ReflectionMethod $method): void + { + // Check that there are only two parameters + if ($method->getNumberOfParameters() !== 2) { + $message = \sprintf(self::ERROR_PARAMS_COUNT, $method->getName(), $method->getNumberOfParameters()); + throw new \DomainException($message, 0x01); + } + + /** + * @var array{ + * 0: \ReflectionParameter, + * 1: \ReflectionParameter + * } $params + */ + $params = $method->getParameters(); + + [$context, $input] = $params; + + // The first parameter can only take a context object + self::assertContextParameter($method, $context); + + // The second argument can only be a subtype of the Google\Protobuf\Internal\Message class + self::assertInputParameter($method, $input); + + // The return type must be declared as a Google\Protobuf\Internal\Message class + self::assertOutputReturnType($method); + } + + /** + * Creates a new {@see Method} object from a {@see \ReflectionMethod} object. + */ + public static function parse(\ReflectionMethod $method): Method + { + try { + self::assertMethodSignature($method); + } catch (\Throwable $e) { + $message = \sprintf(self::ERROR_INVALID_GRPC_METHOD, $method->getName()); + throw GRPCException::create($message, StatusCode::INTERNAL, $e); + } + + [, $input] = $method->getParameters(); + + /** @var \ReflectionNamedType $inputType */ + $inputType = $input->getType(); + + /** @var \ReflectionNamedType $returnType */ + $returnType = $method->getReturnType(); + + /** @psalm-suppress ArgumentTypeCoercion */ + return new self($method->getName(), $inputType->getName(), $returnType->getName()); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ResponseHeaders.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ResponseHeaders.php new file mode 100644 index 0000000..a7586d5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ResponseHeaders.php @@ -0,0 +1,73 @@ + + */ +final class ResponseHeaders implements \IteratorAggregate, \Countable +{ + /** + * @var array + */ + private array $headers = []; + + /** + * @param iterable $headers + */ + public function __construct(iterable $headers = []) + { + foreach ($headers as $key => $value) { + $this->set($key, $value); + } + } + + /** + * @param THeaderKey $key + * @param THeaderValue $value + */ + public function set(string $key, string $value): void + { + $this->headers[$key] = $value; + } + + /** + * @param THeaderKey $key + * @param string|null $default + * @return THeaderValue|null + */ + public function get(string $key, string $default = null): ?string + { + return $this->headers[$key] ?? $default; + } + + public function getIterator(): \Traversable + { + return new \ArrayIterator($this->headers); + } + + public function count(): int + { + return \count($this->headers); + } + + /** + * @throws \JsonException + */ + public function packHeaders(): string + { + // If an empty array is serialized, it is cast to the string "[]" + // instead of object string "{}" + if ($this->headers === []) { + return '{}'; + } + + return Json::encode($this->headers); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Server.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Server.php new file mode 100644 index 0000000..fe2c37c --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/Server.php @@ -0,0 +1,187 @@ +, + * method: non-empty-string, + * context: array> + * } + */ +final class Server +{ + /** @var ServiceWrapper[] */ + private array $services = []; + + /** + * @param ServerOptions $options + */ + public function __construct( + private readonly InvokerInterface $invoker = new Invoker(), + private readonly array $options = [], + ) { + } + + /** + * Register new GRPC service. + * + * For example: + * + * $server->registerService(EchoServiceInterface::class, new EchoService()); + * + * + * @template T of ServiceInterface + * + * @param class-string $interface Generated service interface. + * @param T $service Must implement interface. + * @throws ServiceException + */ + public function registerService(string $interface, ServiceInterface $service): void + { + $service = new ServiceWrapper($this->invoker, $interface, $service); + + $this->services[$service->getName()] = $service; + } + + /** + * @param ContextResponse $data + * @return array{0: string, 1: string} + * @throws \JsonException + * @throws \Throwable + */ + private function tick(string $body, array $data): array + { + $context = (new Context($data['context'])) + ->withValue(ResponseHeaders::class, new ResponseHeaders()); + + $response = $this->invoke($data['service'], $data['method'], $context, $body); + + /** @var ResponseHeaders|null $responseHeaders */ + $responseHeaders = $context->getValue(ResponseHeaders::class); + $responseHeadersString = $responseHeaders ? $responseHeaders->packHeaders() : '{}'; + + return [$response, $responseHeadersString]; + } + + /** + * @psalm-suppress InaccessibleMethod + */ + private function workerSend(WorkerInterface $worker, string $body, string $headers): void + { + $worker->respond(new Payload($body, $headers)); + } + + private function workerError(WorkerInterface $worker, string $message): void + { + $worker->error($message); + } + + /** + * Serve GRPC over given RoadRunner worker. + */ + public function serve(WorkerInterface $worker = null, callable $finalize = null): void + { + $worker ??= Worker::create(); + + while (true) { + $e = null; + $request = $worker->waitPayload(); + + if ($request === null) { + return; + } + + try { + /** @var ContextResponse $context */ + $context = Json::decode($request->header); + + [$answerBody, $answerHeaders] = $this->tick($request->body, $context); + + $this->workerSend($worker, $answerBody, $answerHeaders); + } catch (GRPCExceptionInterface $e) { + $this->workerGrpcError($worker, $e); + } catch (\Throwable $e) { + $this->workerError($worker, $this->isDebugMode() ? (string)$e : $e->getMessage()); + } finally { + if ($finalize !== null) { + isset($e) ? $finalize($e) : $finalize(); + } + } + } + } + + /** + * Invoke service method with binary payload and return the response. + * + * @param class-string $service + * @param non-empty-string $method + * @throws GRPCException + */ + protected function invoke(string $service, string $method, ContextInterface $context, string $body): string + { + if (!isset($this->services[$service])) { + throw NotFoundException::create("Service `{$service}` not found.", StatusCode::NOT_FOUND); + } + + return $this->services[$service]->invoke($method, $context, $body); + } + + private function workerGrpcError(WorkerInterface $worker, GRPCExceptionInterface $e): void + { + $status = new Status([ + 'code' => $e->getCode(), + 'message' => $e->getMessage(), + 'details' => \array_map( + static function ($detail) { + $message = new Any(); + $message->pack($detail); + + return $message; + }, + $e->getDetails(), + ), + ]); + + $this->workerSend( + $worker, + '', + Json::encode([ + 'error' => \base64_encode($status->serializeToString()), + ]), + ); + } + + /** + * Checks if debug mode is enabled. + */ + private function isDebugMode(): bool + { + $debug = false; + + if (isset($this->options['debug'])) { + $debug = \filter_var($this->options['debug'], \FILTER_VALIDATE_BOOLEAN); + } + + return $debug; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ServiceInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ServiceInterface.php new file mode 100644 index 0000000..bd3a623 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/ServiceInterface.php @@ -0,0 +1,12 @@ + */ + private array $methods; + + /** + * @template T of ServiceInterface + * + * @param class-string $interface Generated service interface. + * @param T $service Must implement interface. + */ + public function __construct( + private readonly InvokerInterface $invoker, + string $interface, + ServiceInterface $service, + ) { + $this->configure($interface, $service); + } + + /** + * Get service name from class const `NAME` + * @return non-empty-string + */ + public function getName(): string + { + return $this->name; + } + + public function getService(): ServiceInterface + { + return $this->service; + } + + /** + * Get available service methods. + * + * @return Method[] + */ + public function getMethods(): array + { + return \array_values($this->methods); + } + + /** + * Invoke given service method. + * + * @throws NotFoundException + * @throws InvokeException + */ + public function invoke(string $method, ContextInterface $context, ?string $input): string + { + if (! isset($this->methods[$method])) { + throw NotFoundException::create("Method `{$method}` not found in service `{$this->name}`."); + } + + return $this->invoker->invoke($this->service, $this->methods[$method], $context, $input); + } + + /** + * Configure service name and methods. + * + * @template T of ServiceInterface + * + * @param class-string $interface Generated service interface. + * @param T $service Must implement interface. + * + * @throws ServiceException + */ + protected function configure(string $interface, ServiceInterface $service): void + { + try { + $reflection = new \ReflectionClass($interface); + + if (! $reflection->hasConstant('NAME')) { + $message = "Invalid service interface `{$interface}`, constant `NAME` not found."; + throw ServiceException::create($message); + } + + /** @var non-empty-string $name */ + $name = $reflection->getConstant('NAME'); + + if (! \is_string($name)) { + $message = "Constant `NAME` of service interface `{$interface}` must be a type of string"; + throw ServiceException::create($message); + } + + $this->name = $name; + } catch (\ReflectionException $e) { + $message = "Invalid service interface `{$interface}`."; + throw ServiceException::create($message, StatusCode::INTERNAL, $e); + } + + if (! $service instanceof $interface) { + throw ServiceException::create("Service handler does not implement `{$interface}`."); + } + + $this->service = $service; + + // list of all available methods and their object types + $this->methods = $this->fetchMethods($service); + } + + /** + * @return array + */ + protected function fetchMethods(ServiceInterface $service): array + { + $reflection = new \ReflectionObject($service); + + $methods = []; + foreach ($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { + if (Method::match($method)) { + $methods[$method->getName()] = Method::parse($method); + } + } + + return $methods; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/StatusCode.php b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/StatusCode.php new file mode 100644 index 0000000..f99e1d4 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-grpc/src/StatusCode.php @@ -0,0 +1,210 @@ + + + + + + +

    + + + + + + + +

    + +RoadRunner is an open-source (MIT licensed) high-performance PHP application server, load balancer, and process manager. +It supports running as a service with the ability to extend its functionality on a per-project basis. + +RoadRunner includes PSR-7/PSR-17 compatible HTTP and HTTP/2 server and can be used to replace classic Nginx+FPM setup +with much greater performance and flexibility. + +

    + Official Website | + Documentation +

    + + +## Repository: + +This repository contains the codebase PSR-7 PHP workers. +Check [spiral/roadrunner](https://github.com/spiral/roadrunner) to get application server. + +## Requirements: + +Ensure that your server is configured with the following PHP versions and extensions: + +- PHP >=8.1 +- ext-protobuf: This extension is optional but **highly recommended for installation**. + Without it, performance may be up to 50% lower. +- RoadRunner ^2023.3 + +## Installation: + +To install application server and HTTP codebase: + +```bash +composer require spiral/roadrunner-http nyholm/psr7 +``` + +You can use the convenient installer to download the latest available compatible version of RoadRunner assembly: + +```bash +composer require spiral/roadrunner-cli --dev +``` + +To download latest version of application server: + +```bash +vendor/bin/rr get +``` + +> You can use any [PSR-17 compatible implementation](https://packagist.org/providers/psr/http-factory-implementation). + + +## Example: + +To init abstract RoadRunner worker: + +```php +waitRequest(); + } catch (\Throwable $e) { + // Although the PSR-17 specification clearly states that there can be + // no exceptions when creating a request, however, some implementations + // may violate this rule. Therefore, it is recommended to process the + // incoming request for errors. + // + // Send "Bad Request" response. + $psr7->respond(new Response(400)); + continue; + } + + try { + // Here is where the call to your application code will be located. + // For example: + // + // $response = $app->send($request); + // + // Reply by the 200 OK response + $psr7->respond(new Response(200, [], 'Hello RoadRunner!')); + } catch (\Throwable $e) { + // In case of any exceptions in the application code, you should handle + // them and inform the client about the presence of a server error. + // + // Reply by the 500 Internal Server Error response + $psr7->respond(new Response(500, [], 'Something Went Wrong!')); + + // Additionally, we can inform the RoadRunner that the processing + // of the request failed. + $worker->error((string)$e); + } +} +``` + +### Stream response + +To send a response in a stream, set the `$chunkSize` property in `PSR7Worker`: + +```php +$psr7 = new PSR7Worker($worker, $factory, $factory, $factory); +$psr7->chunkSize = 512 * 1024; // 512KB +``` + +Now PSR7Worker will cut the response into chunks of 512KB and send them to the stream. + +### Early hints + +To send multiple responses you may use the `\Spiral\RoadRunner\Http\HttpWorker::respond()` method with +the `endOfStream` parameter set to `false`. This will send the response to the client and allow you to send +additional responses. + +```php +/** @var \Spiral\RoadRunner\Http\PSR7Worker $psr7 */ +$httpWorker = $psr7->getHttpWorker() + ->respond(103, header: ['Link' => ['; rel=preload; as=style']], endOfStream: false); + +// End of stream will be sent automatically after PSR7Worker::respond() call +$psr7->respond(new Response(200, [], 'Hello RoadRunner!')); +``` + + +[![try Spiral Framework](https://user-images.githubusercontent.com/773481/220979012-e67b74b5-3db1-41b7-bdb0-8a042587dedc.jpg)](https://spiral.dev/) + +## Testing: + +This codebase is automatically tested via host repository - [spiral/roadrunner](https://github.com/roadrunner-server/roadrunner). + + +## License: + +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained +by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/roadrunner-http/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-http/composer.json new file mode 100644 index 0000000..a77e46a --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-http/composer.json @@ -0,0 +1,84 @@ +{ + "name": "spiral/roadrunner-http", + "type": "library", + "description": "RoadRunner: HTTP and PSR-7 worker", + "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" + } + ], + "homepage": "https://spiral.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "require": { + "php": ">=8.1", + "ext-json": "*", + "psr/http-factory": "^1.0.1", + "psr/http-message": "^1.0.1 || ^2.0", + "spiral/roadrunner": "^2023.3 || ^2024.1", + "spiral/roadrunner-worker": "^3.5", + "roadrunner-php/roadrunner-api-dto": "^1.6", + "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" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Http\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\RoadRunner\\Tests\\Http\\": "tests" + } + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "scripts": { + "analyze": "psalm" + }, + "suggest": { + "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools", + "ext-protobuf": "Provides Protocol Buffers support. Without it, performance will be lower." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-http/src/Exception/StreamStoppedException.php b/tests/php_test_files/vendor/spiral/roadrunner-http/src/Exception/StreamStoppedException.php new file mode 100644 index 0000000..48c76de --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-http/src/Exception/StreamStoppedException.php @@ -0,0 +1,13 @@ +worker; + } + + /** + * @throws \JsonException + */ + public function waitRequest(): ?Request + { + $payload = $this->worker->waitPayload(); + + // Termination request + if ($payload === null || (!$payload->body && !$payload->header)) { + return null; + } + + if (static::$codec === null) { + static::$codec = \json_validate($payload->header) ? Frame::CODEC_JSON : Frame::CODEC_PROTO; + } + + if (static::$codec === Frame::CODEC_PROTO) { + $message = new RequestProto(); + $message->mergeFromString($payload->header); + + return $this->requestFromProto($payload->body, $message); + } + + /** @var RequestContext $context */ + $context = \json_decode($payload->header, true, 512, \JSON_THROW_ON_ERROR); + + return $this->arrayToRequest($payload->body, $context); + } + + /** + * @param array> $headers + * @throws \JsonException + */ + public function respond(int $status, string|Generator $body = '', array $headers = [], bool $endOfStream = true): void + { + if ($status < 200 && $status >= 100 && $body !== '') { + throw new \InvalidArgumentException('Unable to send a body with informational status code.'); + } + + if ($body instanceof Generator) { + $this->respondStream($status, $body, $headers, $endOfStream); + return; + } + + /** @psalm-suppress TooManyArguments */ + $this->worker->respond($this->createRespondPayload($status, $body, $headers, $endOfStream), static::$codec); + } + + /** + * @param array> $headers + */ + private function respondStream(int $status, Generator $body, array $headers = [], bool $endOfStream = true): void + { + $worker = $this->worker instanceof StreamWorkerInterface + ? $this->worker->withStreamMode() + : $this->worker; + + do { + if (!$body->valid()) { + // End of generator + $content = (string)$body->getReturn(); + if ($endOfStream === false && $content === '') { + // We don't need to send an empty frame if the stream is not ended + return; + } + /** @psalm-suppress TooManyArguments */ + $worker->respond( + $this->createRespondPayload($status, $content, $headers, $endOfStream), + static::$codec + ); + break; + } + + $content = (string)$body->current(); + if ($worker->getPayload(StreamStop::class) !== null) { + $body->throw(new StreamStoppedException()); + + // RoadRunner is waiting for a Stream Stop Frame to confirm that the stream is closed + // and the worker doesn't hang + $worker->respond(new Payload('')); + return; + } + + /** + * Send a chunk of data + * @psalm-suppress TooManyArguments + */ + $worker->respond($this->createRespondPayload($status, $content, $headers, false), static::$codec); + + try { + $body->next(); + } catch (\Throwable) { + // Stop the stream if an exception is thrown from the generator + $worker->respond(new Payload('')); + return; + } + } while (true); + } + + /** + * @param RequestContext $context + */ + private function arrayToRequest(string $body, array $context): Request + { + \parse_str($context['rawQuery'], $query); + return new Request( + remoteAddr: $context['remoteAddr'], + protocol: $context['protocol'], + method: $context['method'], + uri: $context['uri'], + headers: $this->filterHeaders((array)($context['headers'] ?? [])), + cookies: (array)($context['cookies'] ?? []), + uploads: (array)($context['uploads'] ?? []), + attributes: [ + Request::PARSED_BODY_ATTRIBUTE_NAME => $context['parsed'], + ] + (array)($context['attributes'] ?? []), + query: $query, + body: $body, + parsed: $context['parsed'], + ); + } + + private function requestFromProto(string $body, RequestProto $message): Request + { + /** @var UploadedFilesList $uploads */ + $uploads = \json_decode($message->getUploads(), true) ?? []; + $headers = $this->headerValueToArray($message->getHeader()); + + \parse_str($message->getRawQuery(), $query); + /** @psalm-suppress ArgumentTypeCoercion, MixedArgumentTypeCoercion */ + return new Request( + remoteAddr: $message->getRemoteAddr(), + protocol: $message->getProtocol(), + method: $message->getMethod(), + uri: $message->getUri(), + headers: $this->filterHeaders($headers), + cookies: \array_map( + static fn(array $values) => \implode(',', $values), + $this->headerValueToArray($message->getCookies()), + ), + uploads: $uploads, + attributes: [ + Request::PARSED_BODY_ATTRIBUTE_NAME => $message->getParsed(), + ] + \array_map( + static fn(array $values) => \array_shift($values), + $this->headerValueToArray($message->getAttributes()), + ), + query: $query, + body: $message->getParsed() && $body === '' ? '{}' : $body, + parsed: $message->getParsed(), + ); + } + + /** + * Remove all non-string and empty-string keys + * + * @param array> $headers + * @return HeadersList + */ + private function filterHeaders(array $headers): array + { + foreach ($headers as $key => $_) { + if (!\is_string($key) || $key === '') { + // ignore invalid header names or values (otherwise, the worker might be crashed) + // @see: + unset($headers[$key]); + } + } + + /** @var HeadersList $headers */ + return $headers; + } + + /** + * @param \Traversable $message + */ + private function headerValueToArray(\Traversable $message): array + { + $result = []; + /** + * @var non-empty-string $key + * @var HeaderValue $value + */ + foreach ($message as $key => $value) { + $result[$key] = \iterator_to_array($value->getValue()); + } + + return $result; + } + + /** + * @param array> $headers + * @return array + */ + private function arrayToHeaderValue(array $headers = []): array + { + $result = []; + /** + * @var non-empty-string $key + * @var array $value + */ + foreach ($headers as $key => $value) { + /** @psalm-suppress DocblockTypeContradiction */ + $value = \array_filter(\is_array($value) ? $value : [$value], static fn (mixed $v): bool => \is_string($v)); + if ($value !== []) { + $result[$key] = new HeaderValue(['value' => $value]); + } + } + + return $result; + } + + /** + * @param array> $headers + */ + private function createRespondPayload(int $status, string $body, array $headers = [], bool $eos = true): Payload + { + $head = static::$codec === Frame::CODEC_PROTO + ? (new Response(['status' => $status, 'headers' => $this->arrayToHeaderValue($headers)])) + ->serializeToString() + : \json_encode(['status' => $status, 'headers' => $headers ?: (object)[]], \JSON_THROW_ON_ERROR); + + return new Payload(body: $body, header: $head, eos: $eos); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-http/src/HttpWorkerInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-http/src/HttpWorkerInterface.php new file mode 100644 index 0000000..8643e77 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-http/src/HttpWorkerInterface.php @@ -0,0 +1,34 @@ +|string $body Body of response. + * If the body is a generator, then each yielded value will be sent as a separated stream chunk. + * Returned value will be sent as a last stream package. + * Note: Stream response is supported by RoadRunner since version 2023.3 + * @param HeadersList|array> $headers $headers An associative array of the + * message's headers. Each key MUST be a header name, and each value MUST be an array of strings for + * that header. + */ + public function respond(int $status, string|Generator $body, array $headers = []): void; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-http/src/PSR7Worker.php b/tests/php_test_files/vendor/spiral/roadrunner-http/src/PSR7Worker.php new file mode 100644 index 0000000..209beea --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-http/src/PSR7Worker.php @@ -0,0 +1,250 @@ +httpWorker = new HttpWorker($worker); + $this->originalServer = $_SERVER; + } + + public function getWorker(): WorkerInterface + { + return $this->httpWorker->getWorker(); + } + + public function getHttpWorker(): HttpWorker + { + return $this->httpWorker; + } + + /** + * @throws \JsonException + */ + public function waitRequest(): ?ServerRequestInterface + { + $httpRequest = $this->httpWorker->waitRequest(); + if ($httpRequest === null) { + return null; + } + + $_SERVER = $this->configureServer($httpRequest); + + return $this->mapRequest($httpRequest, $_SERVER); + } + + /** + * Send response to the application server. + * + * @throws \JsonException + */ + public function respond(ResponseInterface $response): void + { + $this->httpWorker->respond( + $response->getStatusCode(), + $this->chunkSize > 0 + ? $this->streamToGenerator($response->getBody()) + : (string)$response->getBody(), + $response->getHeaders() + ); + } + + /** + * @return Generator Compatible + * with {@see \Spiral\RoadRunner\Http\HttpWorker::respondStream()}. + */ + private function streamToGenerator(StreamInterface $stream): Generator + { + $stream->rewind(); + $size = $stream->getSize(); + if ($size !== null && $size < $this->chunkSize) { + return (string)$stream; + } + $sum = 0; + while (!$stream->eof()) { + if ($size === null) { + $chunk = $stream->read($this->chunkSize); + } else { + $left = $size - $sum; + $chunk = $stream->read(\min($this->chunkSize, $left)); + if ($left <= $this->chunkSize && \strlen($chunk) === $left) { + return $chunk; + } + } + $sum += \strlen($chunk); + yield $chunk; + } + } + + /** + * Returns altered copy of _SERVER variable. Sets ip-address, + * request-time and other values. + * + * @return non-empty-array + */ + protected function configureServer(Request $request): array + { + $server = $this->originalServer; + + $server['REQUEST_URI'] = $request->uri; + $server['REQUEST_TIME'] = $this->timeInt(); + $server['REQUEST_TIME_FLOAT'] = $this->timeFloat(); + $server['REMOTE_ADDR'] = $request->getRemoteAddr(); + $server['REQUEST_METHOD'] = $request->method; + + $server['HTTP_USER_AGENT'] = ''; + foreach ($request->headers as $key => $value) { + $key = \strtoupper(\str_replace('-', '_', $key)); + if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) { + $server[$key] = \implode(', ', $value); + } else { + $server['HTTP_' . $key] = \implode(', ', $value); + } + } + + return $server; + } + + protected function timeInt(): int + { + return \time(); + } + + protected function timeFloat(): float + { + return \microtime(true); + } + + /** + * @throws \JsonException + */ + protected function mapRequest(Request $httpRequest, array $server): ServerRequestInterface + { + $request = $this->requestFactory->createServerRequest( + $httpRequest->method, + $httpRequest->uri, + $server + ); + + $request = $request + ->withProtocolVersion(static::fetchProtocolVersion($httpRequest->protocol)) + ->withCookieParams($httpRequest->cookies) + ->withQueryParams($httpRequest->query) + ->withUploadedFiles($this->wrapUploads($httpRequest->uploads)) + ; + + /** @psalm-suppress MixedAssignment */ + foreach ($httpRequest->attributes as $name => $value) { + $request = $request->withAttribute($name, $value); + } + + foreach ($httpRequest->headers as $name => $value) { + $request = $request->withHeader($name, $value); + } + + if ($httpRequest->parsed) { + $request = $request->withParsedBody($httpRequest->getParsedBody()); + } + + if ($httpRequest->body !== '') { + return $request->withBody($this->streamFactory->createStream($httpRequest->body)); + } + + return $request; + } + + /** + * Wraps all uploaded files with UploadedFile. + * + * @param UploadedFilesList $files + * @return UploadedFileInterface[]|mixed[] + */ + protected function wrapUploads(array $files): array + { + $result = []; + + foreach ($files as $index => $file) { + if (! isset($file['name'])) { + /** @psalm-var UploadedFilesList $file */ + $result[$index] = $this->wrapUploads($file); + continue; + } + + if (\UPLOAD_ERR_OK === $file['error']) { + $stream = $this->streamFactory->createStreamFromFile($file['tmpName']); + } else { + $stream = $this->streamFactory->createStream(); + } + + $result[$index] = $this->uploadsFactory->createUploadedFile( + $stream, + $file['size'], + $file['error'], + $file['name'], + $file['mime'] + ); + } + + return $result; + } + + /** + * Normalize HTTP protocol version to valid values + */ + private static function fetchProtocolVersion(string $version): string + { + $v = \substr($version, 5); + + if ($v === '2.0') { + return '2'; + } + + // Fallback for values outside of valid protocol versions + if (! \in_array($v, static::$allowedVersions, true)) { + return '1.1'; + } + + return $v; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-http/src/PSR7WorkerInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-http/src/PSR7WorkerInterface.php new file mode 100644 index 0000000..becbfb2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-http/src/PSR7WorkerInterface.php @@ -0,0 +1,19 @@ +, + * tmpName: non-empty-string, + * size: int<0, max>, + * mime: string + * } + * + * @psalm-type HeadersList = array> + * @psalm-type AttributesList = array + * @psalm-type QueryArgumentsList = array + * @psalm-type CookiesList = array + * @psalm-type UploadedFilesList = array + * + * @psalm-immutable + */ +#[Immutable] +final class Request +{ + public const PARSED_BODY_ATTRIBUTE_NAME = 'rr_parsed_body'; + + /** + * @param HeadersList $headers + * @param CookiesList $cookies + * @param UploadedFilesList $uploads + * @param AttributesList $attributes + * @param QueryArgumentsList $query + */ + public function __construct( + public readonly string $remoteAddr = '127.0.0.1', + public readonly string $protocol = 'HTTP/1.0', + public readonly string $method = 'GET', + public readonly string $uri = 'http://localhost', + public readonly array $headers = [], + public readonly array $cookies = [], + public readonly array $uploads = [], + public readonly array $attributes = [], + public readonly array $query = [], + public readonly string $body = '', + public readonly bool $parsed = false, + ) { + } + + public function getRemoteAddr(): string + { + return (string)($this->attributes['ipAddress'] ?? $this->remoteAddr); + } + + /** + * @throws \JsonException + */ + public function getParsedBody(): ?array + { + if ($this->parsed) { + return (array)\json_decode($this->body, true, 512, \JSON_THROW_ON_ERROR); + } + + return null; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/.styleci.yml b/tests/php_test_files/vendor/spiral/roadrunner-jobs/.styleci.yml new file mode 100644 index 0000000..044e610 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/.styleci.yml @@ -0,0 +1,20 @@ +risky: false +version: 8.1 +preset: psr12 +enabled: + # Risky Fixers + # - declare_strict_types + # - void_return + - ordered_class_elements + - linebreak_after_opening_tag + - single_quote + - no_blank_lines_after_phpdoc + - unary_operator_spaces + - no_useless_else + - no_useless_return + - trailing_comma_in_multiline_array +disabled: + - ternary_operator_spaces +finder: + exclude: + - "tests" diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/LICENSE b/tests/php_test_files/vendor/spiral/roadrunner-jobs/LICENSE new file mode 100644 index 0000000..f218000 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Spiral Scout + +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/spiral/roadrunner-jobs/README.md b/tests/php_test_files/vendor/spiral/roadrunner-jobs/README.md new file mode 100644 index 0000000..0958525 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/README.md @@ -0,0 +1,159 @@ + + + + + + + +# RoadRunner Jobs Plugin + +[![PHP Version Require](https://poser.pugx.org/spiral/roadrunner-jobs/require/php)](https://packagist.org/packages/spiral/roadrunner-jobs) +[![Latest Stable Version](https://poser.pugx.org/spiral/roadrunner-jobs/v/stable)](https://packagist.org/packages/spiral/roadrunner-jobs) +[![phpunit](https://github.com/spiral/roadrunner-jobs/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/roadrunner-jobs/actions) +[![psalm](https://github.com/spiral/roadrunner-jobs/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/roadrunner-jobs/actions) +[![Codecov](https://codecov.io/gh/roadrunner-php/jobs/branch/4.x/graph/badge.svg)](https://codecov.io/gh/roadrunner-php/jobs/) +[![Total Downloads](https://poser.pugx.org/spiral/roadrunner-jobs/downloads)](https://packagist.org/packages/spiral/roadrunner-jobs) +[![StyleCI](https://github.styleci.io/repos/388772135/shield?branch=master)](https://github.styleci.io/repos/388772135?branch=master) + + +This repository contains the codebase PHP bridge using RoadRunner Jobs plugin. + +## Installation + +To install application server and Jobs codebase + +```bash +composer require spiral/roadrunner-jobs +``` + +You can use the convenient installer to download the latest available compatible version of RoadRunner assembly: + +```bash +composer require spiral/roadrunner-cli --dev +vendor/bin/rr get +``` + +## Configuration + +First you need to add at least one jobs adapter to your RoadRunner configuration. For example, such a configuration would be quite feasible to run: + +```yaml +rpc: + listen: tcp://127.0.0.1:6001 + +server: + command: php consumer.php + relay: pipes + +jobs: + consume: [ "local" ] + pipelines: + local: + driver: memory + config: + priority: 10 + prefetch: 10000 +``` + +> **Note** +> Read more about all available drivers on the [documentation](https://docs.roadrunner.dev/queues-and-jobs/overview-queues) page. + +After starting the server with this configuration, one driver named `local` will be available to you. + +## Usage + +### Producer + +The following code will allow writing and reading an arbitrary value from the RoadRunner server. + +```php +connect('local'); + +// Create task prototype with default headers +$task = $queue->create('ping', '{"site": "https://example.com"}') // Create task with "echo" name + ->withHeader('attempts', 4) // Number of attempts to execute the task + ->withHeader('retry-delay', 10); // Delay between attempts + +// Push "echo" task to the queue +$task = $queue->dispatch($task); + +var_dump($task->getId() . ' has been queued'); +``` + +### Consumer + +The Consumer processes tasks from RoadRunner server and responds based on the processing outcome: + +- `ack` - is used for positive acknowledgements. +- `nack` - is used for negative acknowledgements. +- `requeue` - is used for requeuing the task. + +The behavior of the `nack` method depends on its implementation by the queue driver. It can accept an additional +parameter **redelivery**; if it is passed and set to **true**, the task will be requeued. However, not all drivers +support this functionality. If the redelivery parameter is not passed, set to **false**, or the queue driver's +implementation does not support it, the task will not be requeued. + +```php +$task->nack(message: $reason, redelivery: true); +``` + +The `requeue` method is implemented by RoadRunner and does not depend on the queue driver. It allows you to resend +the task to **the end of the queue** and add additional headers to the task. + +```php +$task->withHeader('attempts', (string) ($attempts + 1))->requeue($exception); +``` + +The `nack` and `requeue` methods have the ability to specify a **delay** for requeuing the task. To do this, call +the `withDelay` method and pass the desired value before invoking the `nack` or `requeue` methods. + +```php +$task->withDelay(10)->requeue($exception); +``` + +```php +waitTask()) { + try { + $name = $task->getName(); // "ping" + $queue = $task->getQueue(); // "local" + $driver = $task->getDriver(); // "memory" + $payload = $task->getPayload(); // {"site": "https://example.com"} + + // Process task + + $task->ack(); + } catch (\Throwable $e) { + $task->requeue($e); + } +} +``` + + +try Spiral Framework + + +## License + +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained +by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/codecov.yml b/tests/php_test_files/vendor/spiral/roadrunner-jobs/codecov.yml new file mode 100644 index 0000000..672717e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/codecov.yml @@ -0,0 +1,12 @@ +coverage: + status: + project: + default: + target: auto + threshold: 0% + informational: true + patch: + default: + target: auto + threshold: 0% + informational: true diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-jobs/composer.json new file mode 100644 index 0000000..f49a15f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/composer.json @@ -0,0 +1,79 @@ +{ + "name": "spiral/roadrunner-jobs", + "type": "library", + "description": "RoadRunner Queues (Jobs) plugin API library", + "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" + } + ], + "homepage": "https://roadrunner.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": ">=8.1", + "ext-json": "*", + "google/protobuf": "^v3.17", + "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" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Jobs\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\RoadRunner\\Jobs\\Tests\\": "tests" + } + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm --no-cache" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/psalm.xml b/tests/php_test_files/vendor/spiral/roadrunner-jobs/psalm.xml new file mode 100644 index 0000000..7229fa8 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/psalm.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Consumer.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Consumer.php new file mode 100644 index 0000000..647acd9 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Consumer.php @@ -0,0 +1,63 @@ + + * use Spiral\RoadRunner\Environment; + * use Spiral\RoadRunner\Environment\Mode; + * + * $env = Environment::fromGlobals(); + * if ($env->getMode() !== Mode::MODE_JOBS) { + * throw new RuntimeException('Can not create Jobs Consumer'); + * } + * + * $consumer = new Consumer(...); + * + */ +final class Consumer implements ConsumerInterface +{ + private readonly WorkerInterface $worker; + private readonly ReceivedTaskFactoryInterface $receivedTaskFactory; + + public function __construct( + WorkerInterface $worker = null, + ReceivedTaskFactoryInterface $receivedTaskFactory = null, + ) { + $this->worker = $worker ?? Worker::create(); + $this->receivedTaskFactory = $receivedTaskFactory ?? new ReceivedTaskFactory($this->worker); + } + + /** + * @throws ReceivedTaskException + * @throws SerializationException + * @psalm-suppress ArgumentTypeCoercion + */ + public function waitTask(): ?ReceivedTaskInterface + { + $payload = $this->worker->waitPayload(); + + if ($payload === null) { + return null; + } + + return $this->receivedTaskFactory->create($payload); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/ConsumerInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/ConsumerInterface.php new file mode 100644 index 0000000..b1a3f3d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/ConsumerInterface.php @@ -0,0 +1,27 @@ + + * while($task = $consumer->waitTask()) { + * // Do something with received $task + * var_dump($task); + * } + * + */ + public function waitTask(): ?ReceivedTaskInterface; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Exception/JobsException.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Exception/JobsException.php new file mode 100644 index 0000000..0ec0483 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Exception/JobsException.php @@ -0,0 +1,9 @@ +rpc = $rpc->withCodec(new ProtobufCodec()); + } + + public function create(CreateInfoInterface $info, ?OptionsInterface $options = null): QueueInterface + { + try { + $this->rpc->call( + 'jobs.Declare', + new DeclareRequest([ + 'pipeline' => $this->toStringOfStringMap($info->toArray()), + ]), + ); + + return $this->connect($info->getName(), $options ?? OptionsFactory::create($info->getDriver())); + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + /** + * @param non-empty-string $queue + */ + public function connect(string $queue, ?OptionsInterface $options = null): QueueInterface + { + \assert($queue !== '', 'Precondition [queue !== ""] failed'); + + return new Queue($queue, $this->rpc, $options); + } + + public function pause(string|QueueInterface $queue, string|QueueInterface ...$queues): void + { + try { + $this->rpc->call( + 'jobs.Pause', + new Pipelines([ + 'pipelines' => $this->names($queue, ...$queues), + ]), + ); + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + public function resume(QueueInterface|string $queue, QueueInterface|string ...$queues): void + { + try { + $this->rpc->call( + 'jobs.Resume', + new Pipelines([ + 'pipelines' => $this->names($queue, ...$queues), + ]), + ); + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + /** + * @return int<0, max> + * @throws JobsException + */ + public function count(): int + { + return \iterator_count($this->getIterator()); + } + + /** + * @return \Traversable + * @throws JobsException + */ + public function getIterator(): \Traversable + { + try { + /** @var Pipelines $result */ + $result = $this->rpc->call('jobs.List', '', Pipelines::class); + + /** @psalm-var non-empty-string $queue */ + foreach ($result->getPipelines() as $queue) { + yield $queue => $this->connect($queue); + } + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + /** + * @param CreateInfoArrayType $map + * @return string[] + * @throws \Throwable + * @psalm-suppress MixedAssignment + */ + private function toStringOfStringMap(array $map): array + { + $marshalled = []; + + foreach ($map as $key => $value) { + $marshalled[$key] = match (true) { + \is_int($value) => (string)$value, + \is_object($value) && \method_exists($value, '__toString') => (string)$value->__toString(), + $value instanceof \Stringable => $value->__toString(), + \is_string($value) => $value, + \is_bool($value) => $value ? 'true' : 'false', + $value instanceof \JsonSerializable, + \is_array($value) => \json_encode($value, \JSON_THROW_ON_ERROR), + default => throw new \InvalidArgumentException( + \sprintf('Can not cast to string unrecognized value of type %s', \get_debug_type($value)), + ), + }; + } + + return $marshalled; + } + + /** + * @param QueueInterface|non-empty-string ...$queues + * @return array + */ + private function names(QueueInterface|string ...$queues): array + { + $names = []; + + foreach ($queues as $queue) { + if ($queue instanceof QueueInterface) { + $queue = $queue->getName(); + } + + $names[] = $queue; + } + + return $names; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/JobsInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/JobsInterface.php new file mode 100644 index 0000000..8ba2e1d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/JobsInterface.php @@ -0,0 +1,52 @@ + + */ +interface JobsInterface extends \IteratorAggregate, \Countable +{ + /** + * A method that returns the selected queue. As the first argument, you + * need to pass the name of a specific queue. + * + * @param non-empty-string $queue + */ + public function connect(string $queue): QueueInterface; + + /** + * A method that creates an arbitrary queue. The first argument should be + * information about the queue being created. + * + * @throws JobsException + */ + public function create(CreateInfoInterface $info): QueueInterface; + + /** + * A method that pauses an arbitrary number of queues whose names must be + * specified as method arguments. + * + * @param QueueInterface|non-empty-string $queue + * @param QueueInterface|non-empty-string ...$queues + * @throws JobsException + */ + public function pause(QueueInterface|string $queue, QueueInterface|string ...$queues): void; + + /** + * A method that resumes (unpauses) an arbitrary number of queues whose + * names must be specified as method arguments. + * + * @param QueueInterface|non-empty-string $queue + * @param QueueInterface|non-empty-string ...$queues + * @throws JobsException + */ + public function resume(QueueInterface|string $queue, QueueInterface|string ...$queues): void; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/KafkaOptions.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/KafkaOptions.php new file mode 100644 index 0000000..2ed62d4 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/KafkaOptions.php @@ -0,0 +1,166 @@ + $delay + * @param int<0, max> $priority + * @param int<0, max> $offset + * @param int<0, max> $partition + */ + public function __construct( + public string $topic, + int $delay = self::DEFAULT_DELAY, + int $priority = self::DEFAULT_PRIORITY, + bool $autoAck = self::DEFAULT_AUTO_ACK, + public string $metadata = self::DEFAULT_METADATA, + public int $offset = self::DEFAULT_OFFSET, + public int $partition = self::DEFAULT_PARTITION, + ) { + parent::__construct($delay, $priority, $autoAck); + + \assert($this->topic !== '', 'Precondition [topic !== ""] failed'); + \assert($this->partition >= 0, 'Precondition [partition >= 0] failed'); + \assert($this->offset >= 0, 'Precondition [offset >= 0] failed'); + } + + /** + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public static function from(OptionsInterface $options): self + { + $self = new self('default', $options->getDelay(), $options->getPriority(), $options->getAutoAck()); + + if ($options instanceof KafkaOptionsInterface) { + return $self + ->withTopic($options->getTopic()) + ->withMetadata($options->getMetadata()) + ->withOffset($options->getOffset()) + ->withPartition($options->getPartition()); + } + + return $self; + } + + /** + * @psalm-immutable + * @param int<0, max> $partition + * @return $this + */ + public function withPartition(int $partition): self + { + \assert($partition >= 0, 'Precondition [partition >= 0] failed'); + + $self = clone $this; + $self->partition = $partition; + + return $self; + } + + /** + * @psalm-immutable + * @param int<0, max> $offset + * @return $this + */ + public function withOffset(int $offset): self + { + \assert($offset >= 0, 'Precondition [partition >= 0] failed'); + + $self = clone $this; + $self->offset = $offset; + + return $self; + } + + /** + * @psalm-immutable + * @return $this + */ + public function withMetadata(string $metadata): self + { + $self = clone $this; + $self->metadata = $metadata; + + return $self; + } + + /** + * @psalm-immutable + * @param non-empty-string $topic + * @return $this + */ + public function withTopic(string $topic): self + { + \assert($topic !== '', 'Precondition [topic !== ""] failed'); + + $self = clone $this; + $self->topic = $topic; + + return $self; + } + + /** + * @return non-empty-string + */ + public function getTopic(): string + { + \assert($this->topic !== '', 'Precondition [topic !== ""] failed'); + + return $this->topic; + } + + public function getMetadata(): string + { + return $this->metadata; + } + + public function getOffset(): int + { + return $this->offset; + } + + public function getPartition(): int + { + return $this->partition; + } + + public function merge(OptionsInterface $options): OptionsInterface + { + /** @var KafkaOptions $self */ + $self = parent::merge($options); + + if ($options instanceof KafkaOptionsInterface) { + $self->topic = $options->getTopic(); + + if (($metadata = $options->getMetadata()) !== self::DEFAULT_METADATA) { + $self->metadata = $metadata; + } + + if (($offset = $options->getOffset()) !== self::DEFAULT_OFFSET) { + $self->offset = $offset; + } + + if (($partition = $options->getPartition()) !== self::DEFAULT_PARTITION) { + $self->partition = $partition; + } + } + + return $self; + } + + public function toArray(): array + { + return \array_merge(parent::toArray(), [ + 'topic' => $this->topic, + 'metadata' => $this->metadata, + 'offset' => $this->offset, + 'partition' => $this->partition, + ]); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/KafkaOptionsInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/KafkaOptionsInterface.php new file mode 100644 index 0000000..4bab0cc --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/KafkaOptionsInterface.php @@ -0,0 +1,35 @@ + + */ + public function getOffset(): int; + + /** + * @psalm-immutable + * @return int<0, max> + */ + public function getPartition(): int; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Options.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Options.php new file mode 100644 index 0000000..bffad70 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Options.php @@ -0,0 +1,154 @@ +delay >= 0, 'Precondition [delay >= 0] failed'); + \assert($this->priority >= 0, 'Precondition [priority >= 0] failed'); + } + + public static function from(OptionsInterface $options): self + { + return new self( + $options->getDelay(), + $options->getPriority(), + $options->getAutoAck() + ); + } + + /** + * @psalm-immutable + * @return positive-int|0 + */ + public function getDelay(): int + { + \assert($this->delay >= 0, 'Invariant [delay >= 0] failed'); + + return $this->delay; + } + + /** + * @psalm-immutable + * @return positive-int|0 + */ + public function getPriority(): int + { + \assert($this->priority >= 0, 'Invariant [priority >= 0] failed'); + + return $this->priority; + } + + /** + * @psalm-immutable + */ + public function getAutoAck(): bool + { + return $this->autoAck; + } + + /** + * @psalm-immutable + * @param positive-int|0 $delay + * @return $this + */ + public function withDelay(int $delay): self + { + \assert($delay >= 0, 'Precondition [delay >= 0] failed'); + + $self = clone $this; + $self->delay = $delay; + + return $self; + } + + /** + * @psalm-immutable + * @param positive-int|0 $priority + * @return $this + */ + public function withPriority(int $priority): self + { + \assert($priority >= 0, 'Precondition [priority >= 0] failed'); + + $self = clone $this; + $self->priority = $priority; + + return $self; + } + + /** + * @psalm-immutable + * @return $this + */ + public function withAutoAck(bool $autoAck): self + { + $self = clone $this; + $self->autoAck = $autoAck; + + return $self; + } + + public function mergeOptional(?OptionsInterface $options): OptionsInterface + { + if ($options === null) { + return $this; + } + + return $this->merge($options); + } + + public function merge(OptionsInterface $options): OptionsInterface + { + $self = clone $this; + + if (($delay = $options->getDelay()) !== self::DEFAULT_DELAY) { + $self->delay = $delay; + } + + if (($priority = $options->getPriority()) !== self::DEFAULT_PRIORITY) { + $self->priority = $priority; + } + + if (($autoAck = $options->getAutoAck()) !== self::DEFAULT_AUTO_ACK) { + $self->autoAck = $autoAck; + } + + if ($options instanceof ProvidesHeadersInterface && ($headers = $options->getHeaders()) !== []) { + $self->headers = $headers; + } + + return $self; + } + + public function jsonSerialize(): array + { + return $this->toArray(); + } + + public function toArray(): array + { + return [ + 'priority' => $this->getPriority(), + 'delay' => $this->getDelay(), + 'auto_ack' => $this->getAutoAck(), + ]; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/OptionsAwareInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/OptionsAwareInterface.php new file mode 100644 index 0000000..a378f1e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/OptionsAwareInterface.php @@ -0,0 +1,25 @@ + new KafkaOptions('default'), + default => new Options(), + }; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/OptionsInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/OptionsInterface.php new file mode 100644 index 0000000..550c04d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/OptionsInterface.php @@ -0,0 +1,29 @@ + + */ + public function getDelay(): int; + + /** + * @psalm-immutable + * @return int<0, max> + */ + public function getPriority(): int; + + /** + * @psalm-immutable + */ + public function getAutoAck(): bool; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue.php new file mode 100644 index 0000000..100559d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue.php @@ -0,0 +1,174 @@ +rpc = $rpc->withCodec(new ProtobufCodec()); + $this->pipeline = new Pipeline($this->getName(), $this->rpc); + $this->options = $options ?? new Options(); + } + + public function __clone() + { + $this->options = clone $this->options; + } + + public function getDefaultOptions(): OptionsInterface + { + return $this->options; + } + + /** + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function withDefaultOptions(?OptionsInterface $options = null): self + { + $self = clone $this; + /** @psalm-suppress PropertyTypeCoercion */ + $self->options = $options ?? new Options(); + + return $self; + } + + /** + * Creates a new task and push it into specified queue. + * + * This method exists for compatibility with version RoadRunner 1.x. + * + * @param non-empty-string $name + * @param OptionsInterface|null $options + * @throws JobsException + */ + public function push( + string $name, + string|\Stringable $payload, + OptionsInterface $options = null, + ): QueuedTaskInterface { + return $this->dispatch( + $this->create($name, $payload, $options), + ); + } + + public function dispatch(PreparedTaskInterface $task): QueuedTaskInterface + { + return $this->pipeline->send($task); + } + + public function create( + string $name, + string|\Stringable $payload, + OptionsInterface $options = null, + ): PreparedTaskInterface { + if ($this->options !== null && \method_exists($this->options, 'mergeOptional')) { + /** @var OptionsInterface $options */ + $options = $this->options->mergeOptional($options); + } + + return new PreparedTask( + $name, + $payload, + $options, + $options instanceof ProvidesHeadersInterface ? $options->getHeaders() : [] + ); + } + + public function dispatchMany(PreparedTaskInterface ...$tasks): iterable + { + return $this->pipeline->sendMany($tasks); + } + + public function pause(): void + { + try { + $this->rpc->call( + 'jobs.Pause', + new Pipelines([ + 'pipelines' => [$this->getName()], + ]), + ); + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + /** + * @return non-empty-string + */ + public function getName(): string + { + return $this->name; + } + + public function resume(): void + { + try { + $this->rpc->call( + 'jobs.Resume', + new Pipelines([ + 'pipelines' => [$this->getName()], + ]), + ); + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + public function isPaused(): bool + { + $stat = $this->getPipelineStat(); + + return $stat !== null && !$stat->getReady(); + } + + /** + * @throws JobsException + */ + public function getPipelineStat(): ?Stat + { + try { + /** @var Stats $stats */ + $stats = $this->rpc->call('jobs.Stat', '', Stats::class); + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + + /** @var Stat $stat */ + foreach ($stats->getStats() as $stat) { + if ($stat->getPipeline() === $this->name) { + return $stat; + } + } + + return null; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/AMQP/ExchangeType.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/AMQP/ExchangeType.php new file mode 100644 index 0000000..53d02ef --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/AMQP/ExchangeType.php @@ -0,0 +1,39 @@ + $queueHeaders + * @param positive-int $redialTimeout + * @param non-empty-string|null $consumerId + */ + public function __construct( + string $name, + int $priority = self::PRIORITY_DEFAULT_VALUE, + public readonly int $prefetch = self::PREFETCH_DEFAULT_VALUE, + public readonly string $queue = self::QUEUE_DEFAULT_VALUE, + public readonly string $exchange = self::EXCHANGE_DEFAULT_VALUE, + public readonly ExchangeType $exchangeType = ExchangeType::Direct, + public readonly string $routingKey = self::ROUTING_KEY_DEFAULT_VALUE, + public readonly bool $exclusive = self::EXCLUSIVE_DEFAULT_VALUE, + public readonly bool $multipleAck = self::MULTIPLE_ACK_DEFAULT_VALUE, + public readonly bool $requeueOnFail = self::REQUEUE_ON_FAIL_DEFAULT_VALUE, + public readonly bool $durable = self::DURABLE_DEFAULT_VALUE, + public readonly bool $exchangeDurable = self::EXCHANGE_DURABLE_DEFAULT_VALUE, + public readonly bool $consumeAll = self::CONSUME_ALL_DEFAULT_VALUE, + public readonly array $queueHeaders = self::QUEUE_HEADERS_DEFAULT_VALUE, + public readonly bool $deleteQueueOnStop = self::DELETE_QUEUE_ON_STOP_DEFAULT_VALUE, + public readonly int $redialTimeout = self::REDIAL_TIMEOUT_DEFAULT_VALUE, + public readonly bool $exchangeAutoDelete = self::EXCHANGE_AUTO_DELETE_DEFAULT_VALUE, + public readonly bool $queueAutoDelete = self::QUEUE_AUTO_DELETE_DEFAULT_VALUE, + public readonly ?string $consumerId = self::CONSUMER_ID_DEFAULT_VALUE, + ) { + parent::__construct(Driver::AMQP, $name, $priority); + + \assert($this->prefetch >= 1, 'Precondition [prefetch >= 1] failed'); + \assert($this->redialTimeout >= 1, 'Precondition [redialTimeout >= 1] failed'); + \assert($this->exchange !== '', 'Precondition [exchange !== ""] failed'); + + if ($this->consumerId !== null) { + \assert($this->consumerId !== '', 'Precondition [consumerId !== ""] failed'); + } + } + + public function toArray(): array + { + $result = \array_merge(parent::toArray(), [ + 'prefetch' => $this->prefetch, + 'queue' => $this->queue, + 'queue_auto_delete' => $this->queueAutoDelete, + 'exchange' => $this->exchange, + 'exchange_durable' => $this->exchangeDurable, + 'exchange_type' => $this->exchangeType->value, + 'exchange_auto_delete' => $this->exchangeAutoDelete, + 'routing_key' => $this->routingKey, + 'exclusive' => $this->exclusive, + 'multiple_ack' => $this->multipleAck, + 'requeue_on_fail' => $this->requeueOnFail, + 'durable' => $this->durable, + 'consume_all' => $this->consumeAll, + 'delete_queue_on_stop' => $this->deleteQueueOnStop, + 'redial_timeout' => $this->redialTimeout, + ]); + + if ($this->consumerId !== null && $this->consumerId !== '') { + $result['consumer_id'] = $this->consumerId; + } + + if ($this->queueHeaders !== []) { + $result['queue_headers'] = $this->queueHeaders; + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/BeanstalkCreateInfo.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/BeanstalkCreateInfo.php new file mode 100644 index 0000000..bb31282 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/BeanstalkCreateInfo.php @@ -0,0 +1,49 @@ +tubePriority >= 1, 'Precondition [tubePriority >= 1] failed'); + \assert($this->tube !== '', 'Precondition [tube !== ""] failed'); + \assert($this->reserveTimeout >= 0, 'Precondition [reserveTimeout >= 0] failed'); + } + + public function toArray(): array + { + return \array_merge(parent::toArray(), [ + 'tube_priority' => $this->tubePriority, + 'tube' => $this->tube, + 'reserve_timeout' => $this->reserveTimeout, + 'consume_all' => $this->consumeAll, + ]); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/BoltdbCreateInfo.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/BoltdbCreateInfo.php new file mode 100644 index 0000000..686e838 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/BoltdbCreateInfo.php @@ -0,0 +1,43 @@ += 1, 'Precondition [prefetch >= 1] failed'); + \assert($file !== '', 'Precondition [file !== ""] failed'); + } + + public function toArray(): array + { + return \array_merge(parent::toArray(), [ + 'prefetch' => $this->prefetch, + 'file' => $this->file, + 'permissions' => $this->permissions, + ]); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/CreateInfo.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/CreateInfo.php new file mode 100644 index 0000000..caa1829 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/CreateInfo.php @@ -0,0 +1,51 @@ +name !== '', 'Precondition [name !== ""] failed'); + \assert($this->priority >= 1, 'Precondition [priority >= 1] failed'); + } + + public function getName(): string + { + return $this->name; + } + + public function getDriver(): Driver + { + return $this->driver; + } + + public function jsonSerialize(): array + { + return $this->toArray(); + } + + public function toArray(): array + { + return [ + 'name' => $this->name, + 'driver' => $this->driver->value, + 'priority' => $this->priority, + ]; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/CreateInfoInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/CreateInfoInterface.php new file mode 100644 index 0000000..b43fa07 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/CreateInfoInterface.php @@ -0,0 +1,38 @@ +, + * priority: positive-int, + * ... + * } + */ +interface CreateInfoInterface extends \JsonSerializable +{ + /** + * @return non-empty-string + */ + public function getName(): string; + + public function getDriver(): Driver; + + /** + * When transferring to the internal RPC method of creating queues, the data + * must be represented in the form of a Map type, which can + * be represented as PHP array. + * + * This method returns all available settings in the queues in the specified + * format. + * + * @return CreateInfoArrayType + */ + public function toArray(): array; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Driver.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Driver.php new file mode 100644 index 0000000..bdf25a9 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Driver.php @@ -0,0 +1,47 @@ + $partition + */ + public function __construct( + public readonly string $topic, + public readonly int $partition, + public readonly ConsumerOffset $offset, + ) { + \assert($this->topic !== '', 'Precondition [topic !== \'\'] failed'); + \assert($this->partition >= 0, 'Precondition [partition >= 0] failed'); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerGroupOptions.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerGroupOptions.php new file mode 100644 index 0000000..608724f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerGroupOptions.php @@ -0,0 +1,28 @@ + $this->groupId, + 'block_rebalance_on_poll' => $this->blockRebalanceOnPoll, + ]; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerOffset.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerOffset.php new file mode 100644 index 0000000..8881266 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerOffset.php @@ -0,0 +1,30 @@ +|null $value + */ + public function __construct( + public readonly OffsetType $type, + public readonly ?int $value = null, + ) { + } + + public function jsonSerialize(): array + { + $data = [ + 'type' => $this->type->value, + ]; + + if ($this->value !== null) { + $data['value'] = $this->value; + } + + return $data; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerOptions.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerOptions.php new file mode 100644 index 0000000..5aaf6d8 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/ConsumerOptions.php @@ -0,0 +1,70 @@ +topics === []) { + \assert($this->consumePartitions !== [], 'Precondition [consumePartitions !== []] failed'); + } elseif ($this->consumePartitions === []) { + \assert($this->topics !== [], 'Precondition [topics !== []] failed'); + } + + \assert($this->maxFetchMessageSize > 0, 'Precondition [maxFetchMessageSize > 0] failed'); + \assert($this->minFetchMessageSize > 0, 'Precondition [minFetchMessageSize > 0] failed'); + } + + public function jsonSerialize(): array + { + $data = [ + 'topics' => $this->topics, + 'consume_regexp' => $this->consumeRegexp, + 'max_fetch_message_size' => $this->maxFetchMessageSize, + 'min_fetch_message_size' => $this->minFetchMessageSize, + 'consumer_offset' => $this->consumerOffset, + ]; + + foreach ($this->consumePartitions as $partition) { + $data['consume_partitions'][$partition->topic][$partition->partition] = $partition->offset; + } + + return $data; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/OffsetType.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/OffsetType.php new file mode 100644 index 0000000..7291161 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Kafka/OffsetType.php @@ -0,0 +1,15 @@ + $this->disableIdempotent, + 'max_message_bytes' => $this->maxMessageBytes, + ]; + + if ($this->requestTimeout !== null) { + $data['request_timeout'] = $this->convertDateIntervalToString($this->requestTimeout); + } + + if ($this->deliveryTimeout !== null) { + $data['delivery_timeout'] = $this->convertDateIntervalToString($this->deliveryTimeout); + } + + if ($this->transactionTimeout !== null) { + $data['transaction_timeout'] = $this->convertDateIntervalToString($this->transactionTimeout); + } + + if ($this->requiredAcks !== null) { + $data['required_acks'] = $this->requiredAcks->value; + } + + if ($this->compressionCodec !== null) { + $data['compression_codec'] = $this->compressionCodec->value; + } + + return $data; + } + + private function convertDateIntervalToString(DateInterval $interval): string + { + return $interval->format('%s') . 's'; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/KafkaCreateInfo.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/KafkaCreateInfo.php new file mode 100644 index 0000000..58ff5d8 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/KafkaCreateInfo.php @@ -0,0 +1,59 @@ + $this->autoCreateTopicsEnable, + ]; + + if ($this->producerOptions !== null) { + $info['producer_options'] = $this->producerOptions; + } + + if ($this->consumerOptions !== null) { + $info['consumer_options'] = $this->consumerOptions; + } + + if ($this->groupOptions !== null) { + $info['group_options'] = $this->groupOptions; + } + + return \array_merge(parent::toArray(), $info); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/MemoryCreateInfo.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/MemoryCreateInfo.php new file mode 100644 index 0000000..ea00bdc --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/MemoryCreateInfo.php @@ -0,0 +1,35 @@ +prefetch >= 1, 'Precondition [prefetch >= 1] failed'); + } + + public function toArray(): array + { + return \array_merge(parent::toArray(), [ + 'prefetch' => $this->prefetch, + ]); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/NatsCreateInfo.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/NatsCreateInfo.php new file mode 100644 index 0000000..015018f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/NatsCreateInfo.php @@ -0,0 +1,58 @@ += 1, 'Precondition [prefetch >= 1] failed'); + \assert($rateLimit >= 1, 'Precondition [rateLimit >= 1] failed'); + \assert($subject !== '', 'Precondition [subject !== ""] failed'); + \assert($stream !== '', 'Precondition [stream !== ""] failed'); + } + + public function toArray(): array + { + return \array_merge(parent::toArray(), [ + 'prefetch' => $this->prefetch, + 'subject' => $this->subject, + 'deliver_new' => $this->deliverNew, + 'rate_limit' => $this->rateLimit, + 'stream' => $this->stream, + 'delete_stream_on_stop' => $this->deleteStreamOnStop, + 'delete_after_ack' => $this->deleteAfterAck, + ]); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Pipeline.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Pipeline.php new file mode 100644 index 0000000..a8a69db --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/Pipeline.php @@ -0,0 +1,158 @@ +taskToProto($task, $task); + $this->rpc->call('jobs.Push', new PushRequest(['job' => $job])); + } catch (JobsException $e) { + throw $e; + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + + return $this->createQueuedTask($job, $task); + } + + /** + * @param PreparedTaskInterface[] $tasks + * @return QueuedTaskInterface[] + * @throws JobsException + */ + public function sendMany(array $tasks): array + { + try { + $result = $jobs = []; + + foreach ($tasks as $task) { + $job = $jobs[] = $this->taskToProto($task, $task); + $result[] = $this->createQueuedTask($job, $task); + } + + $this->rpc->call( + 'jobs.PushBatch', + new PushBatchRequest([ + 'jobs' => $jobs, + ]), + ); + } catch (JobsException $e) { + throw $e; + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + + return $result; + } + + private function taskToProto(TaskInterface $task, OptionsInterface $options): Job + { + return new Job([ + 'job' => $task->getName(), + 'id' => $this->createTaskId(), + 'payload' => $task->getPayload(), + 'headers' => $this->headersToProtoData($task), + 'options' => $this->optionsToProto($options), + ]); + } + + /** + * @return non-empty-string + */ + private function createTaskId(): string + { + return (string)$this->uuid->uuid4(); + } + + /** + * @return array + */ + private function headersToProtoData(TaskInterface $task): array + { + $result = []; + + foreach ($task->getHeaders() as $name => $values) { + if (\count($values) === 0) { + continue; + } + + $result[$name] = new HeaderValue([ + 'value' => $values, + ]); + } + + return $result; + } + + private function optionsToProto(OptionsInterface $options): OptionsMessage + { + if ($options instanceof OptionsAwareInterface) { + $options = $options->getOptions(); + } + + if (\method_exists($options, 'toArray')) { + /** @var array $data */ + $data = $options->toArray(); + } else { + $data = [ + 'priority' => $options->getPriority(), + 'delay' => $options->getDelay(), + 'auto_ack' => $options->getAutoAck(), + ]; + } + + + return new OptionsMessage( + \array_merge($data, ['pipeline' => $this->name]) + ); + } + + /** + * @psalm-suppress ArgumentTypeCoercion Protobuf Job ID can not be empty + */ + private function createQueuedTask(Job $job, TaskInterface $task): QueuedTask + { + return new QueuedTask( + $job->getId(), + $this->name, + $task->getName(), + $task->getPayload(), + $task->getHeaders() + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/SQSCreateInfo.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/SQSCreateInfo.php new file mode 100644 index 0000000..2f891f6 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Queue/SQSCreateInfo.php @@ -0,0 +1,94 @@ +, + * MaximumMessageSize?: int<0,max>, + * MessageRetentionPeriod?: int<0,max>, + * Policy?: mixed, + * ReceiveMessageWaitTimeSeconds?: int<0,max>, + * RedrivePolicy?: array { + * deadLetterTargetArn?: mixed, + * maxReceiveCount: int<0,max>, + * }, + * VisibilityTimeout?: int<0,max>, + * KmsMasterKeyId?: string, + * KmsDataKeyReusePeriodSeconds?: int<0,max>, + * ContentBasedDeduplication?: mixed, + * DeduplicationScope?: mixed, + * FifoThroughputLimit?: mixed, + * } + */ +final class SQSCreateInfo extends CreateInfo +{ + public const PREFETCH_DEFAULT_VALUE = 10; + public const VISIBILITY_TIMEOUT_DEFAULT_VALUE = 0; + public const WAIT_TIME_SECONDS_DEFAULT_VALUE = 0; + public const ATTRIBUTES_DEFAULT_VALUE = []; + public const TAGS_DEFAULT_VALUE = []; + public const QUEUE_DEFAULT_VALUE = 'default'; + public const MESSAGE_GROUP_ID_DEFAULT_VALUE = null; + public const SKIP_QUEUE_DECLARATION_DEFAULT_VALUE = false; + + /** + * @param non-empty-string $name + * @param positive-int $priority + * @param positive-int $prefetch + * @param int<0, max> $visibilityTimeout + * @param int<0, max> $waitTimeSeconds + * @param non-empty-string $queue + * @param array|SQSAttributesMap $attributes + * @param array $tags + * @param non-empty-string|null $messageGroupId + */ + public function __construct( + string $name, + int $priority = self::PRIORITY_DEFAULT_VALUE, + public readonly int $prefetch = self::PREFETCH_DEFAULT_VALUE, + public readonly int $visibilityTimeout = self::VISIBILITY_TIMEOUT_DEFAULT_VALUE, + public readonly int $waitTimeSeconds = self::WAIT_TIME_SECONDS_DEFAULT_VALUE, + public readonly string $queue = self::QUEUE_DEFAULT_VALUE, + public readonly array $attributes = self::ATTRIBUTES_DEFAULT_VALUE, + public readonly array $tags = self::TAGS_DEFAULT_VALUE, + public readonly ?string $messageGroupId = self::MESSAGE_GROUP_ID_DEFAULT_VALUE, + public readonly bool $skipQueueDeclaration = self::SKIP_QUEUE_DECLARATION_DEFAULT_VALUE, + ) { + parent::__construct(Driver::SQS, $name, $priority); + + \assert($this->prefetch >= 1, 'Precondition [prefetch >= 1] failed'); + \assert($this->visibilityTimeout >= 0, 'Precondition [visibilityTimeout >= 0] failed'); + \assert($this->waitTimeSeconds >= 0, 'Precondition [waitTimeSeconds >= 0] failed'); + \assert($this->queue !== '', 'Precondition [queue !== ""] failed'); + if ($this->messageGroupId !== null) { + \assert($this->messageGroupId !== '', 'Precondition [messageGroupId !== ""] failed'); + } + } + + public function toArray(): array + { + $result = \array_merge(parent::toArray(), [ + 'prefetch' => $this->prefetch, + 'visibility_timeout' => $this->visibilityTimeout, + 'wait_time' => $this->waitTimeSeconds, + 'queue' => $this->queue, + 'skip_queue_declaration' => $this->skipQueueDeclaration, + ]); + if ($this->attributes !== []) { + $result['attributes'] = $this->attributes; + } + if ($this->tags !== []) { + $result['tags'] = $this->tags; + } + if ($this->messageGroupId !== null && $this->messageGroupId !== '') { + $result['message_group_id'] = $this->messageGroupId; + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/QueueInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/QueueInterface.php new file mode 100644 index 0000000..723ecc8 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/QueueInterface.php @@ -0,0 +1,81 @@ + + * @throws JobsException + */ + public function dispatchMany(PreparedTaskInterface ...$tasks): iterable; + + /** + * @throws JobsException + */ + public function pause(): void; + + /** + * @throws JobsException + */ + public function resume(): void; + + /** + * @throws JobsException + */ + public function isPaused(): bool; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/Factory/ReceivedTaskFactory.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/Factory/ReceivedTaskFactory.php new file mode 100644 index 0000000..25f2839 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/Factory/ReceivedTaskFactory.php @@ -0,0 +1,97 @@ +>|null, + * timeout: positive-int, + * pipeline: non-empty-string, + * driver?: non-empty-string, + * queue: non-empty-string, + * partition: int<0, max>, + * offset: int<0, max>, + * } + */ +final class ReceivedTaskFactory implements ReceivedTaskFactoryInterface +{ + public function __construct( + private readonly WorkerInterface $worker, + ) { + } + + /** + * @throws SerializationException + * @throws ReceivedTaskException + * @psalm-suppress ArgumentTypeCoercion + */ + public function create(Payload $payload): ReceivedTaskInterface + { + $header = $this->getHeader($payload); + $headers = (array) $header['headers']; + + $id = $header['id']; + $job = $header['job']; + $driver = Driver::tryFrom($header['driver'] ?? 'unknown') ?? Driver::Unknown; + $queue = $header['queue'] ?? 'unknown'; + $pipeline = $header['pipeline'] ?? 'unknown'; + + return match ($driver) { + Driver::Kafka => new KafkaReceivedTask( + $this->worker, + $id, + $pipeline, + $job, + $queue, // Kafka topic name + (int)$header['partition'] ?? 0, + (int)$header['offset'] ?? 0, + $payload->body, + $headers + ), + default => new ReceivedTask( + $this->worker, + $id, + $driver, + $pipeline, + $job, + $queue, // Queue broker queue name + $payload->body, + $headers + ), + }; + } + + /** + * @psalm-suppress MixedReturnTypeCoercion + * + * @return HeaderPayload + * @throws SerializationException + * @throws ReceivedTaskException + */ + private function getHeader(Payload $payload): array + { + if (empty($payload->header)) { + throw new ReceivedTaskException('Task payload does not have a valid header.'); + } + + try { + return (array)\json_decode($payload->header, true, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw new SerializationException($e->getMessage(), $e->getCode(), $e); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/Factory/ReceivedTaskFactoryInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/Factory/ReceivedTaskFactoryInterface.php new file mode 100644 index 0000000..e972630 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/Factory/ReceivedTaskFactoryInterface.php @@ -0,0 +1,13 @@ +> + */ + protected array $headers = []; + + /** + * @return array> + */ + public function getHeaders(): array + { + return $this->headers; + } + + /** + * @param non-empty-string $name Header field name. + */ + public function hasHeader(string $name): bool + { + return isset($this->headers[$name]) && \count($this->headers[$name]) > 0; + } + + /** + * @param non-empty-string $name + */ + public function getHeaderLine(string $name): string + { + return \implode(',', $this->getHeader($name)); + } + + /** + * @param non-empty-string $name + * @return array + */ + public function getHeader(string $name): array + { + return $this->headers[$name] ?? []; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/KafkaReceivedTask.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/KafkaReceivedTask.php new file mode 100644 index 0000000..1239446 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/KafkaReceivedTask.php @@ -0,0 +1,53 @@ + $partition + * @param int<0, max> $offset + * @param array> $headers + */ + public function __construct( + WorkerInterface $worker, + string $id, + string $pipeline, + string $job, + string $topic, + private readonly int $partition, + private readonly int $offset, + string $payload = '', + array $headers = [], + ) { + parent::__construct($worker, $id, Driver::Kafka, $pipeline, $job, $topic, $payload, $headers); + } + + /** + * @return positive-int|0 + */ + public function getPartition(): int + { + return $this->partition; + } + + /** + * @return int<0, max> + */ + public function getOffset(): int + { + return $this->offset; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/MutatesDelayInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/MutatesDelayInterface.php new file mode 100644 index 0000000..b9b5ec5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/MutatesDelayInterface.php @@ -0,0 +1,23 @@ + $seconds + * @return static + */ + public function withDelay(int $seconds): self; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/PreparedTask.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/PreparedTask.php new file mode 100644 index 0000000..a826da1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/PreparedTask.php @@ -0,0 +1,119 @@ +> $headers + */ + public function __construct( + string $name, + string|\Stringable $payload, + OptionsInterface $options = null, + array $headers = [], + ) { + $this->options = $options ?? new Options(); + + parent::__construct($name, $payload, $headers); + } + + public function __clone() + { + $this->options = clone $this->options; + } + + public function getOptions(): OptionsInterface + { + return $this->options; + } + + public function getDelay(): int + { + return $this->options->getDelay(); + } + + /** + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function withDelay(int $seconds): self + { + \assert($seconds >= 0, 'Precondition [seconds >= 0] failed'); + + if (!\method_exists($this->options, 'withDelay')) { + return $this; + } + + $self = clone $this; + /** @psalm-suppress MixedAssignment */ + $self->options = $this->options->withDelay($seconds); + + return $self; + } + + public function getPriority(): int + { + return $this->options->getPriority(); + } + + /** + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function withPriority(int $priority): self + { + assert($priority >= 0, 'Precondition [priority >= 0] failed'); + + if (!\method_exists($this->options, 'withPriority')) { + return $this; + } + + $self = clone $this; + /** @psalm-suppress MixedAssignment */ + $self->options = $this->options->withPriority($priority); + + return $self; + } + + public function getAutoAck(): bool + { + return $this->options->getAutoAck(); + } + + public function withAutoAck(bool $autoAck): self + { + if (!\method_exists($this->options, 'withAutoAck')) { + return $this; + } + + $self = clone $this; + /** @psalm-suppress MixedAssignment */ + $self->options = $this->options->withAutoAck($autoAck); + + return $self; + } + + public function withOptions(OptionsInterface $options): OptionsAwareInterface + { + $self = clone $this; + $self->options = $options; + + return $self; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/PreparedTaskInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/PreparedTaskInterface.php new file mode 100644 index 0000000..c10a06e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/PreparedTaskInterface.php @@ -0,0 +1,15 @@ + + * foreach ($task->getHeaders() as $name => $values) { + * echo $name . ': ' . implode(', ', $values) . "\n"; + * } + * + * + * + * // Example with output of all headers + * foreach ($task->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * echo $name . ': ' . $value . "\n"; + * } + * } + * + * + * @psalm-mutation-free + * @return array> + */ + public function getHeaders(): array; + + /** + * Checks if a header exists by the given name. + * + * @psalm-mutation-free + * @param non-empty-string $name Header field name. + * @return bool Returns {@see true} if any header names match the given + * header name by string comparison. Returns {@see false} if + * no matching header name is found in the message. + */ + public function hasHeader(string $name): bool; + + /** + * Retrieves the task's header value by the given name. + * + * This method returns an array of all the header values of the given + * header name. + * + * If the header does not appear in the task, this method MUST return an + * empty array. + * + * @psalm-mutation-free + * @param non-empty-string $name + * @return array + */ + public function getHeader(string $name): array; + + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all the header values of the given header name as a + * string concatenated together using a comma (","). + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use {@see getHeader()} instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @psalm-mutation-free + * @param non-empty-string $name + */ + public function getHeaderLine(string $name): string; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/QueuedTask.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/QueuedTask.php new file mode 100644 index 0000000..775b242 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/QueuedTask.php @@ -0,0 +1,44 @@ +> $headers + */ + public function __construct( + protected readonly string $id, + protected readonly string $pipeline, + string $name, + string $payload, + array $headers = [], + ) { + parent::__construct($name, $payload, $headers); + } + + /** + * @return non-empty-string + */ + public function getId(): string + { + return $this->id; + } + + /** + * @return non-empty-string + */ + public function getPipeline(): string + { + return $this->pipeline; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/QueuedTaskInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/QueuedTaskInterface.php new file mode 100644 index 0000000..b84601e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/QueuedTaskInterface.php @@ -0,0 +1,28 @@ + + */ + private int $delay = 0; + + /** + * @param non-empty-string $id + * @param non-empty-string $pipeline + * @param non-empty-string $job + * @param non-empty-string $queue + * @param array> $headers + */ + public function __construct( + private readonly WorkerInterface $worker, + string $id, + private readonly Driver $driver, + string $pipeline, + string $job, + private readonly string $queue, + string $payload, + array $headers = [], + ) { + parent::__construct($id, $pipeline, $job, $payload, $headers); + } + + public function getDriver(): Driver + { + return $this->driver; + } + + public function getQueue(): string + { + return $this->queue; + } + + /** + * @deprecated Since v4.5.0, use {@see ack()} instead. + */ + public function complete(): void + { + /** @psalm-suppress DeprecatedConstant */ + $this->respond(Type::SUCCESS); + } + + /** + * @deprecated Since v4.5.0, use {@see nack()} or {@see requeue()} instead. + */ + public function fail(string|\Stringable|\Throwable $error, bool $requeue = false): void + { + $data = [ + 'message' => (string)$error, + 'requeue' => $requeue, + 'delay_seconds' => $this->delay, + ]; + + if (!empty($this->headers)) { + $data['headers'] = $this->headers; + } + + /** @psalm-suppress DeprecatedConstant */ + $this->respond(Type::ERROR, $data); + } + + public function ack(): void + { + $this->respond(Type::ACK); + } + + /** + * The behavior of this method depends on its implementation by the queue driver. + */ + public function nack(string|\Stringable|\Throwable $message, bool $redelivery = false): void + { + $this->respond(Type::NACK, [ + 'message' => (string) $message, + 'redelivery' => $redelivery, + 'delay_seconds' => $this->delay, + ]); + } + + public function requeue(string|\Stringable|\Throwable $message): void + { + $data = [ + 'message' => (string) $message, + 'delay_seconds' => $this->delay, + ]; + + if (!empty($this->headers)) { + $data['headers'] = $this->headers; + } + + $this->respond(Type::REQUEUE, $data); + } + + public function isCompleted(): bool + { + return $this->completed !== null; + } + + public function isSuccessful(): bool + { + /** @psalm-suppress DeprecatedConstant */ + return $this->completed === Type::SUCCESS || $this->completed === Type::ACK; + } + + public function isFails(): bool + { + /** @psalm-suppress DeprecatedConstant */ + return $this->completed === Type::ERROR || + $this->completed === Type::NACK || + $this->completed === Type::REQUEUE; + } + + /** + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function withDelay(int $seconds): self + { + \assert($seconds >= 0, 'Precondition [seconds >= 0] failed'); + + $self = clone $this; + $self->delay = $seconds; + + return $self; + } + + /** + * @param TypeEnum $type + * @param SuccessData|ErrorData $data + * @throws JobsException + */ + private function respond(int $type, array $data = []): void + { + if ($this->completed === null) { + try { + $body = \json_encode(['type' => $type, 'data' => $data], JSON_THROW_ON_ERROR); + + $this->worker->respond(new Payload($body)); + } catch (\JsonException $e) { + throw new SerializationException($e->getMessage(), $e->getCode(), $e); + } catch (\Throwable $e) { + throw new JobsException($e->getMessage(), (int)$e->getCode(), $e); + } + + $this->completed = $type; + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/ReceivedTaskInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/ReceivedTaskInterface.php new file mode 100644 index 0000000..b21dbc0 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/ReceivedTaskInterface.php @@ -0,0 +1,76 @@ +> $headers + */ + public function __construct( + protected readonly string $name, + protected readonly string|\Stringable $payload, + array $headers = [], + ) { + \assert($this->name !== '', 'Precondition [job !== ""] failed'); + + $this->headers = $headers; + } + + /** + * @return non-empty-string + */ + public function getName(): string + { + return $this->name; + } + + public function getPayload(): string + { + return (string)$this->payload; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/TaskInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/TaskInterface.php new file mode 100644 index 0000000..512ae8c --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/TaskInterface.php @@ -0,0 +1,23 @@ + $value Header value(s). + * @return static + */ + public function withHeader(string $name, string|iterable $value): self; + + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * See also {@see getHeaders()}, {@see getHeader()} or {@see hasHeader()} + * to retrieve information about the current value. + * + * @psalm-mutation-free + * @param non-empty-string $name Header field name to add. + * @param non-empty-string|iterable $value Header value(s). + * @return static + */ + public function withAddedHeader(string $name, string|iterable $value): self; + + /** + * Return an instance without the specified header. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * See also {@see getHeaders()}, {@see getHeader()} or {@see hasHeader()} + * to retrieve information about the current value. + * + * @psalm-mutation-free + * @param non-empty-string $name Header field name to remove. + * @return static + */ + public function withoutHeader(string $name): self; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/WritableHeadersTrait.php b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/WritableHeadersTrait.php new file mode 100644 index 0000000..968ce89 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-jobs/src/Task/WritableHeadersTrait.php @@ -0,0 +1,81 @@ + $value + * @return static + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function withAddedHeader(string $name, string|iterable $value): self + { + \assert($name !== '', 'Precondition [name !== ""] failed'); + + /** @var iterable $value */ + $value = \is_iterable($value) ? $value : [$value]; + + /** @var array $headers */ + $headers = $this->headers[$name] ?? []; + + foreach ($value as $item) { + $headers[] = $item; + } + + return $this->withHeader($name, $headers); + } + + /** + * @param non-empty-string $name + * @param non-empty-string|iterable $value + * @return static + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function withHeader(string $name, string|iterable $value): self + { + \assert($name !== '', 'Precondition [name !== ""] failed'); + + $value = \is_iterable($value) ? $value : [$value]; + + $self = clone $this; + $self->headers[$name] = []; + + foreach ($value as $item) { + $self->headers[$name][] = (string)$item; + } + + return $self; + } + + /** + * @param non-empty-string $name + * @return static + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function withoutHeader(string $name): self + { + \assert($name !== '', 'Precondition [name !== ""] failed'); + + if (!isset($this->headers[$name])) { + return $this; + } + + $self = clone $this; + unset($self->headers[$name]); + return $self; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/LICENSE b/tests/php_test_files/vendor/spiral/roadrunner-kv/LICENSE new file mode 100644 index 0000000..f218000 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Spiral Scout + +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/spiral/roadrunner-kv/README.md b/tests/php_test_files/vendor/spiral/roadrunner-kv/README.md new file mode 100644 index 0000000..423d6d2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/README.md @@ -0,0 +1,87 @@ + + + + + + + +# RoadRunner KV Plugin Bridge + +[![PHP Version Require](https://poser.pugx.org/spiral/roadrunner-kv/require/php)](https://packagist.org/packages/spiral/roadrunner-kv) +[![Latest Stable Version](https://poser.pugx.org/spiral/roadrunner-kv/v/stable)](https://packagist.org/packages/spiral/roadrunner-kv) +[![phpunit](https://github.com/spiral/roadrunner-kv/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/roadrunner-kv/actions) +[![psalm](https://github.com/spiral/roadrunner-kv/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/roadrunner-kv/actions) +[![Total Downloads](https://poser.pugx.org/spiral/roadrunner-kv/downloads)](https://packagist.org/packages/spiral/roadrunner-kv) + +[Documentation](https://docs.roadrunner.dev/key-value/overview-kv) | [Framework Bundle](https://github.com/spiral/framework) + +This repository contains the codebase PSR-16 PHP cache bridge using kv RoadRunner plugin. + +## Installation + +To install application server and KV codebase + +```bash +composer require spiral/roadrunner-kv +``` + +You can use the convenient installer to download the latest available compatible +version of RoadRunner server: + +```bash +composer require spiral/roadrunner-cli --dev +vendor/bin/rr get +``` + +## Usage + +First you need to add at least one kv plugin to your roadrunner configuration. +For example, such a configuration would be quite feasible to run: + +```yaml +rpc: + listen: tcp://127.0.0.1:6001 + +kv: + test: + driver: memory + config: + interval: 10 +``` + +> **Note** +> Read more about all available drivers on the +> [documentation](https://docs.roadrunner.dev) page. + +After starting the server with this configuration, one driver named "`test`" +will be available to you. + +The following code will allow writing and reading an arbitrary value from the +RoadRunner server. + +```php +select('test'); + +// After that you can write and read arbitrary values: + +$cache->set('key', 'value'); + +echo $cache->get('key'); // string(5) "value" +``` + + +try Spiral Framework + + +## License: + +MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-kv/composer.json new file mode 100644 index 0000000..a0a895d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/composer.json @@ -0,0 +1,82 @@ +{ + "name": "spiral/roadrunner-kv", + "type": "library", + "description": "RoadRunner kv plugin bridge", + "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" + } + ], + "homepage": "https://roadrunner.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": ">=8.1", + "ext-json": "*", + "psr/simple-cache": "2 - 3", + "roadrunner-php/roadrunner-api-dto": "^1.0", + "spiral/goridge": "^4.2", + "spiral/roadrunner": "^2023.1 || ^2024.1" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\KeyValue\\": "src" + } + }, + "require-dev": { + "phpunit/phpunit": "^10.0", + "roave/security-advisories": "dev-master", + "vimeo/psalm": ">=5.8" + }, + "autoload-dev": { + "psr-4": { + "Spiral\\RoadRunner\\KeyValue\\Tests\\": "tests" + } + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm --no-cache" + }, + "suggest": { + "ext-igbinary": "(>3.1.6) Igbinary serailizer support", + "ext-sodium": "Sodium serailizer support" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/psalm.xml b/tests/php_test_files/vendor/spiral/roadrunner-kv/psalm.xml new file mode 100644 index 0000000..23c5bbc --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/psalm.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/resources/.phpstorm.meta.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/resources/.phpstorm.meta.php new file mode 100644 index 0000000..9ee684c --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/resources/.phpstorm.meta.php @@ -0,0 +1,23 @@ + + * @version 1.0.0 + * @package igbinary + */ + +namespace { + + /** + * Generates a storable representation of a value. + * This is useful for storing or passing PHP values around without losing + * their type and structure. To make the serialized string into a PHP value + * again, use {@see igbinary_unserialize}. + * + * {@see igbinary_serialize()} handles all types, except the resource-type. + * You can even {@see serialize()} arrays that contain references to itself. + * Circular references inside the array/object you are {@see serialize()} + * will also be stored. + * + * If object implements {@link \Serializable} interface, PHP will call the + * member function serialize to get serialized representation of object. + * + * When serializing objects, PHP will attempt to call the member function + * {@see object::__sleep} prior to serialization. This is to allow the + * object to do any last minute clean-up, etc. prior to being serialized. + * Likewise, when the object is restored using {@see unserialize()} the + * {@see object::__wakeup} member function is called. + * + * @param mixed $value The value to be serialized. + * + * @return string Returns a string containing a binary representation of + * value that can be stored anywhere. + * + * @link http://www.php.net/serialize PHP's default serialize + */ + function igbinary_serialize($value): string {} + + /** + * Creates a PHP value from a stored representation. + * {@see igbinary_unserialize()} takes a single serialized variable and + * converts it back into a PHP value. + * + * If the variable being unserialized is an object, then after successfully + * reconstructing the object, PHP will automatically call the + * {@see object::__wakeup()} member function (if it exists). + * + * If the passed in string could not be unserialized, then {@see NULL} is + * returned and an {@see \E_WARNING} is issued. + * + * @param string $string The serialized string. + * + * @return mixed The unserialized value is returned. It can be a boolean, + * integer, float, string, array, object or null. + * + * @link http://www.php.net/manual/en/function.unserialize.php PHP's default unserialize + * @link https://secure.php.net/serializable Serializable interface + */ + function igbinary_unserialize(string $string) {} + +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/AsyncCache.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/AsyncCache.php new file mode 100644 index 0000000..dc4d559 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/AsyncCache.php @@ -0,0 +1,128 @@ +deleteMultipleAsync([$key]); + } + + /** + * Note: The current PSR-16 implementation always returns true or + * exception on error. + * + * @param iterable $keys + * + * @throws KeyValueException + * @throws RPCException + */ + public function deleteMultipleAsync(iterable $keys): bool + { + // Handle someone never calling commitAsync() + if (\count($this->callsInFlight) > 1000) { + $this->commitAsync(); + } + + $this->callsInFlight[] = $this->rpc->callAsync('kv.Delete', $this->requestKeys($keys)); + + return true; + } + + /** + * @param positive-int|\DateInterval|null $ttl + * @psalm-suppress MoreSpecificImplementedParamType + * + * @throws KeyValueException + * @throws RPCException + */ + public function setAsync(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool + { + return $this->setMultipleAsync([$key => $value], $ttl); + } + + /** + * @param iterable $values + * @param positive-int|\DateInterval|null $ttl + * @psalm-suppress MoreSpecificImplementedParamType + * + * @throws KeyValueException + * @throws RPCException + */ + public function setMultipleAsync(iterable $values, null|int|\DateInterval $ttl = null): bool + { + // Handle someone never calling commitAsync() + if (\count($this->callsInFlight) > 1000) { + $this->commitAsync(); + } + + $this->callsInFlight[] = $this->rpc->callAsync( + 'kv.Set', + $this->requestValues($values, $this->ttlToRfc3339String($ttl)) + ); + + return true; + } + + /** + * @throws KeyValueException + * @throws RPCException + */ + public function commitAsync(): bool + { + try { + $this->rpc->getResponses($this->callsInFlight, Response::class); + } catch (ServiceException $e) { + $message = \str_replace(["\t", "\n"], ' ', $e->getMessage()); + + if (\str_contains($message, 'no such storage')) { + throw new StorageException(\sprintf(self::ERROR_INVALID_STORAGE, $this->name)); + } + + throw new KeyValueException($message, $e->getCode(), $e); + } finally { + $this->callsInFlight = []; + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/AsyncStorageInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/AsyncStorageInterface.php new file mode 100644 index 0000000..3c8dfb2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/AsyncStorageInterface.php @@ -0,0 +1,74 @@ + value pairs in the cache, with an optional TTL. + * + * @param iterable $values A list of key => value pairs for a multiple-set operation. + * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $values is neither an array nor a Traversable, + * or if any of the $values are not a legal value. + */ + public function setMultipleAsync(iterable $values, null|int|\DateInterval $ttl = null): bool; + + /** + * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. + * + * @param string $key The key of the item to store. + * @param mixed $value The value of the item to store, must be serializable. + * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function setAsync(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + + /** + * Delete an item from the cache by its unique key. + * + * @param string $key The unique cache key of the item to delete. + * + * @return bool True if the item was successfully removed. False if there was an error. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function deleteAsync(string $key): bool; + + /** + * Deletes multiple cache items in a single operation. + * + * @param iterable $keys A list of string-based keys to be deleted. + * + * @return bool True if the items were successfully removed. False if there was an error. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function deleteMultipleAsync(iterable $keys): bool; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Cache.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Cache.php new file mode 100644 index 0000000..63bea97 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Cache.php @@ -0,0 +1,381 @@ +rpc = $rpc->withCodec(new ProtobufCodec()); + $this->zone = new \DateTimeZone('UTC'); + + $this->setSerializer($serializer); + } + + public function getName(): string + { + return $this->name; + } + + /** + * @throws KeyValueException + */ + public function getTtl(string $key): ?\DateTimeInterface + { + foreach ($this->getMultipleTtl([$key]) as $ttl) { + assert($ttl instanceof \DateTimeInterface || $ttl === null); + + return $ttl; + } + + // @codeCoverageIgnoreStart + // This stmt MUST NOT be executed and is present in the code + // only for static analysis. + return null; + // @codeCoverageIgnoreEnd + } + + /** + * @throws KeyValueException + */ + public function getMultipleTtl(iterable $keys = []): iterable + { + try { + $response = $this->createIndex( + $this->call('kv.TTL', $this->requestKeys($keys)) + ); + } catch (KeyValueException $e) { + if (\str_contains($e->getMessage(), '_plugin_ttl')) { + $message = \sprintf(self::ERROR_TTL_NOT_AVAILABLE, $this->name); + throw new NotImplementedException($message, $e->getCode(), $e); + } + + throw $e; + } + + foreach ($keys as $key) { + yield $key => isset($response[$key]) && $response[$key]->getTimeout() !== '' + ? $this->dateFromRfc3339String($response[$key]->getTimeout()) + : null; + } + } + + /** + * @return array + */ + protected function createIndex(Response $response): array + { + $result = []; + + /** @var Item $item */ + foreach ($response->getItems() as $item) { + $result[$item->getKey()] = $item; + } + + return $result; + } + + /** + * @param non-empty-string $method + * @psalm-suppress MixedReturnStatement + * @psalm-suppress MixedInferredReturnType + * + * @throws KeyValueException + */ + private function call(string $method, Request $request): Response + { + try { + return $this->rpc->call($method, $request, Response::class); + } catch (ServiceException $e) { + $message = \str_replace(["\t", "\n"], ' ', $e->getMessage()); + + if (\str_contains($message, 'no such storage')) { + throw new StorageException(\sprintf(self::ERROR_INVALID_STORAGE, $this->name)); + } + + throw new KeyValueException($message, $e->getCode(), $e); + } + } + + /** + * @param iterable $keys + * @throws InvalidArgumentException + */ + protected function requestKeys(iterable $keys): Request + { + $items = []; + + foreach ($keys as $key) { + $this->assertValidKey($key); + $items[] = new Item(['key' => $key]); + } + + return $this->request($items); + } + + /** + * @param array $items + */ + private function request(array $items): Request + { + return new Request([ + 'storage' => $this->name, + 'items' => $items, + ]); + } + + /** + * @psalm-suppress InvalidFalsableReturnType + * @psalm-suppress FalsableReturnStatement + */ + private function dateFromRfc3339String(string $time): \DateTimeImmutable + { + return \DateTimeImmutable::createFromFormat(\DateTimeInterface::RFC3339, $time, $this->zone); + } + + /** + * @throws KeyValueException + */ + public function get(string $key, mixed $default = null): mixed + { + /** @psalm-suppress MixedAssignment */ + foreach ($this->getMultiple([$key], $default) as $value) { + return $value; + } + + // @codeCoverageIgnoreStart + // This stmt MUST NOT be executed and is present in the code + // only for static analysis. + return $default; + // @codeCoverageIgnoreEnd + } + + /** + * @psalm-param iterable $keys + * @return iterable + * @throws KeyValueException + */ + public function getMultiple(iterable $keys, mixed $default = null): iterable + { + /** @psalm-suppress MixedArgumentTypeCoercion */ + $items = $this->createIndex( + $this->call('kv.MGet', $this->requestKeys($keys)) + ); + + $serializer = $this->getSerializer(); + + foreach ($keys as $key) { + if (isset($items[$key])) { + yield $key => $serializer->unserialize($items[$key]->getValue()); + + continue; + } + + yield $key => $default; + } + } + + /** + * @psalm-param positive-int|\DateInterval|null $ttl + * @psalm-suppress MoreSpecificImplementedParamType + * @throws KeyValueException + */ + public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool + { + return $this->setMultiple([$key => $value], $ttl); + } + + /** + * @param mixed|string $key + * @throws InvalidArgumentException + */ + private function assertValidKey(mixed $key): void + { + if (! \is_string($key)) { + throw new InvalidArgumentException(\sprintf(self::ERROR_INVALID_KEY, \get_debug_type($key))); + } + } + + /** + * @psalm-param iterable $values + * @psalm-param positive-int|\DateInterval|null $ttl + * @psalm-suppress MoreSpecificImplementedParamType + * @throws KeyValueException + */ + public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool + { + $this->call('kv.Set', $this->requestValues($values, $this->ttlToRfc3339String($ttl))); + + return true; + } + + /** + * @param iterable $values + * @throws SerializationException + * @throws InvalidArgumentException + */ + protected function requestValues(iterable $values, string $ttl): Request + { + $items = []; + $serializer = $this->getSerializer(); + + /** @psalm-suppress MixedAssignment */ + foreach ($values as $key => $value) { + $this->assertValidKey($key); + + $items[] = new Item([ + 'key' => $key, + 'value' => $serializer->serialize($value), + 'timeout' => $ttl, + ]); + } + + return $this->request($items); + } + + /** + * @throws InvalidArgumentException + * @throws \Exception + */ + protected function ttlToRfc3339String(null|int|\DateInterval $ttl): string + { + if ($ttl === null) { + return ''; + } + + if ($ttl instanceof \DateInterval) { + return $this->now() + ->add($ttl) + ->format(\DateTimeInterface::RFC3339); + } + + $now = $this->now(); + + return $now->setTimestamp($ttl + $now->getTimestamp())->format(\DateTimeInterface::RFC3339); + } + + /** + * Please note that this interface currently emulates the behavior of the + * PSR-20 implementation and may be replaced by the `psr/clock` + * implementation in future versions. + * + * Returns the current time as a DateTimeImmutable instance. + * + * @codeCoverageIgnore Ignore time-aware-mutable value. + * Must be covered with a stub. + * @throws \Exception + */ + protected function now(): \DateTimeImmutable + { + return new \DateTimeImmutable('NOW', $this->zone); + } + + /** + * Note: The current PSR-16 implementation always returns true or + * exception on error. + * + * @throws KeyValueException + */ + public function delete(string $key): bool + { + return $this->deleteMultiple([$key]); + } + + /** + * Note: The current PSR-16 implementation always returns true or + * exception on error. + * + * {@inheritDoc} + * + * @psalm-param iterable $keys + * + * @throws KeyValueException + */ + public function deleteMultiple(iterable $keys): bool + { + $this->call('kv.Delete', $this->requestKeys($keys)); + + return true; + } + + /** + * @throws KeyValueException + */ + public function clear(): bool + { + try { + $this->call('kv.Clear', $this->request([])); + } catch (KeyValueException $e) { + if (\str_contains($e->getMessage(), 'can\'t find method kv.Clear')) { + throw new KeyValueException(self::ERROR_CLEAR_NOT_AVAILABLE, $e->getCode(), $e); + } + + throw $e; + } + + return true; + } + + /** + * @throws KeyValueException + */ + public function has(string $key): bool + { + /** @var array $items */ + $items = $this->call('kv.Has', $this->requestKeys([$key])) + ->getItems(); + + foreach ($items as $item) { + if ($item->getKey() === $key) { + return true; + } + } + + return false; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Exception/InvalidArgumentException.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..3da58e6 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Exception/InvalidArgumentException.php @@ -0,0 +1,11 @@ +setSerializer($serializer); + } + + public function select(string $name): StorageInterface + { + if ($this->rpc instanceof AsyncRPCInterface) { + return new AsyncCache($this->rpc, $name, $this->getSerializer()); + } + + return new Cache($this->rpc, $name, $this->getSerializer()); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/FactoryInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/FactoryInterface.php new file mode 100644 index 0000000..273b9ed --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/FactoryInterface.php @@ -0,0 +1,17 @@ + true, + ]); + + if (($err = \error_get_last()) !== null) { + $exception = new \ErrorException($err['message'], 0, $err['type'], $err['file'], $err['line']); + throw new SerializationException($err['message'], $err['type'], $exception); + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/IgbinarySerializer.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/IgbinarySerializer.php new file mode 100644 index 0000000..cc05551 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/IgbinarySerializer.php @@ -0,0 +1,50 @@ +assertAvailable(); + } + + /** + * @codeCoverageIgnore Reason: Ignore environment-aware assertions + */ + private function assertAvailable(): void + { + if (! \extension_loaded('igbinary')) { + throw new \LogicException(self::ERROR_NOT_AVAILABLE); + } + + if (\version_compare(self::SUPPORTED_VERSION_MIN, \phpversion('igbinary'), '>')) { + throw new \LogicException(\sprintf(self::ERROR_NON_COMPATIBLE, \phpversion('igbinary'))); + } + } + + public function serialize(mixed $value): string + { + return \igbinary_serialize($value); + } + + public function unserialize(string $value): mixed + { + return \igbinary_unserialize($value); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/SerializerAwareInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/SerializerAwareInterface.php new file mode 100644 index 0000000..0aabf4b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/SerializerAwareInterface.php @@ -0,0 +1,15 @@ +serializer = $serializer; + } + + /** + * @return $this + */ + public function withSerializer(SerializerInterface $serializer): self + { + $self = clone $this; + $self->setSerializer($serializer); + + return $self; + } + + public function getSerializer(): SerializerInterface + { + return $this->serializer; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/SerializerInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/SerializerInterface.php new file mode 100644 index 0000000..b195978 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/Serializer/SerializerInterface.php @@ -0,0 +1,20 @@ +assertAvailable(); + } + + /** + * @codeCoverageIgnore Reason: Ignore environment-aware assertions + */ + private function assertAvailable(): void + { + if (! \function_exists('\\sodium_crypto_box_seal')) { + throw new \LogicException('The "ext-sodium" PHP extension is not available'); + } + } + + public function serialize(mixed $value): string + { + try { + return \sodium_crypto_box_seal( + $this->serializer->serialize($value), + \sodium_crypto_box_publickey($this->key) + ); + } catch (\SodiumException $e) { + throw new SerializationException($e->getMessage(), $e->getCode(), $e); + } + } + + public function unserialize(string $value): mixed + { + try { + $result = \sodium_crypto_box_seal_open($value, $this->key); + + if ($result === false) { + throw new SerializationException( + 'Can not decode the received data. Please make sure '. + 'the encryption key matches the one used to encrypt this data' + ); + } + + return $this->serializer->unserialize($result); + } catch (\SodiumException $e) { + throw new SerializationException($e->getMessage(), $e->getCode(), $e); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-kv/src/StorageInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/StorageInterface.php new file mode 100644 index 0000000..d6664ef --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-kv/src/StorageInterface.php @@ -0,0 +1,17 @@ + $keys + * @return iterable + * + * @throws InvalidArgumentException + */ + public function getMultipleTtl(iterable $keys = []): iterable; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/.styleci.yml b/tests/php_test_files/vendor/spiral/roadrunner-metrics/.styleci.yml new file mode 100644 index 0000000..044e610 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/.styleci.yml @@ -0,0 +1,20 @@ +risky: false +version: 8.1 +preset: psr12 +enabled: + # Risky Fixers + # - declare_strict_types + # - void_return + - ordered_class_elements + - linebreak_after_opening_tag + - single_quote + - no_blank_lines_after_phpdoc + - unary_operator_spaces + - no_useless_else + - no_useless_return + - trailing_comma_in_multiline_array +disabled: + - ternary_operator_spaces +finder: + exclude: + - "tests" diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/LICENSE b/tests/php_test_files/vendor/spiral/roadrunner-metrics/LICENSE new file mode 100644 index 0000000..f218000 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Spiral Scout + +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/spiral/roadrunner-metrics/README.md b/tests/php_test_files/vendor/spiral/roadrunner-metrics/README.md new file mode 100644 index 0000000..bd0346e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/README.md @@ -0,0 +1,111 @@ + + + + + + + +# RoadRunner Metrics Plugin + +[![PHP Version Require](https://poser.pugx.org/spiral/roadrunner-metrics/require/php)](https://packagist.org/packages/spiral/roadrunner-metrics) +[![Latest Stable Version](https://poser.pugx.org/spiral/roadrunner-metrics/version)](https://packagist.org/packages/spiral/roadrunner-metrics) +[![phpunit](https://github.com/spiral/roadrunner-metrics/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/roadrunner-metrics/actions) +[![psalm](https://github.com/spiral/roadrunner-metrics/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/roadrunner-metrics/actions) +[![Total Downloads](https://poser.pugx.org/spiral/roadrunner-metrics/downloads)](https://packagist.org/packages/spiral/roadrunner-metrics) + +This repository contains the codebase PHP bridge using RoadRunner Metrics plugin. + +## Installation: + +To install RoadRunner extension: + +```bash +composer require spiral/roadrunner-metrics +``` + +You can use the convenient installer to download the latest available compatible version of RoadRunner assembly: + +```bash +composer require spiral/roadrunner-cli --dev +vendor/bin/rr get +``` + +## Configuration + +Enable metrics service in your `.rr.yaml` file: + +```yaml +rpc: + listen: tcp://127.0.0.1:6001 + +server: + command: "php worker.php" + +http: + address: "0.0.0.0:8080" + +metrics: + address: "0.0.0.0:2112" +``` + +## Usage + +To publish metrics from your application worker: + +```php +getRPCAddress()) +); + +# Declare counter +$metrics->declare( + 'http_requests', + RoadRunner\Metrics\Collector::counter() + ->withHelp('Collected HTTP requests.') + ->withLabels('status', 'method'), +); + +while ($req = $worker->waitRequest()) { + try { + $response = new \Nyholm\Psr7\Response(); + $response->getBody()->write("hello world"); + + # Publish metrics for each request with labels (status, method) + $metrics->add('http_requests', 1, [ + $response->getStatusCode(), + $req->getMethod(), + ]); + + $worker->respond($rsp); + } catch (\Throwable $e) { + $worker->getWorker()->error((string)$e); + + $metrics->add('http_requests', 1, [503,$req->getMethod(),]); + } +} +``` + + +try Spiral Framework + + +## License: + +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained +by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/codecov.yml b/tests/php_test_files/vendor/spiral/roadrunner-metrics/codecov.yml new file mode 100644 index 0000000..672717e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/codecov.yml @@ -0,0 +1,12 @@ +coverage: + status: + project: + default: + target: auto + threshold: 0% + informational: true + patch: + default: + target: auto + threshold: 0% + informational: true diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-metrics/composer.json new file mode 100644 index 0000000..23817d1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/composer.json @@ -0,0 +1,78 @@ +{ + "name": "spiral/roadrunner-metrics", + "type": "library", + "description": "RoadRunner: Prometheus metrics RPC", + "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" + } + ], + "homepage": "https://roadrunner.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": ">=8.1", + "psr/log": ">=2.0", + "spiral/goridge": "^4.0", + "spiral/roadrunner": "^2023.1 || ^2024.1" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Metrics\\": "src" + } + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": ">=5.8" + }, + "autoload-dev": { + "psr-4": { + "Spiral\\RoadRunner\\Metrics\\Tests\\": "tests" + } + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm --no-cache" + }, + "suggest": { + "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/psalm.xml b/tests/php_test_files/vendor/spiral/roadrunner-metrics/psalm.xml new file mode 100644 index 0000000..522307f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/psalm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/Collector.php b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/Collector.php new file mode 100644 index 0000000..e99cfe5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/Collector.php @@ -0,0 +1,118 @@ +namespace = $namespace; + + return $self; + } + + #[Pure] + public function withSubsystem(string $subsystem): self + { + $self = clone $this; + $self->subsystem = $subsystem; + + return $self; + } + + #[Pure] + public function withHelp(string $help): self + { + $self = clone $this; + $self->help = $help; + + return $self; + } + + #[Pure] + public function withLabels(string ...$label): self + { + $self = clone $this; + $self->labels = $label; + + return $self; + } + + #[Pure] + public function toArray(): array + { + return [ + 'namespace' => $this->namespace, + 'subsystem' => $this->subsystem, + 'type' => $this->type->value, + 'help' => $this->help, + 'labels' => $this->labels, + 'buckets' => $this->buckets, + ]; + } + + /** + * @return ArrayFormatType + */ + public function jsonSerialize(): array + { + return $this->toArray(); + } + + /** + * New histogram metric. + */ + public static function histogram(float ...$bucket): self + { + $self = new self(CollectorType::Histogram); + /** @psalm-suppress ImpurePropertyAssignment */ + $self->buckets = $bucket; + + return $self; + } + + /** + * New gauge metric. + */ + public static function gauge(): self + { + return new self(CollectorType::Gauge); + } + + /** + * New counter metric. + */ + public static function counter(): self + { + return new self(CollectorType::Counter); + } + + /** + * New summary metric. + */ + public static function summary(): self + { + return new self(CollectorType::Summary); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/CollectorInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/CollectorInterface.php new file mode 100644 index 0000000..ddffc6f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/CollectorInterface.php @@ -0,0 +1,50 @@ +, + * buckets: array + * } + */ +interface CollectorInterface +{ + /** + * @param non-empty-string $namespace + */ + #[Pure] + public function withNamespace(string $namespace): self; + + /** + * @param non-empty-string $subsystem + */ + #[Pure] + public function withSubsystem(string $subsystem): self; + + /** + * @param non-empty-string $help + */ + #[Pure] + public function withHelp(string $help): self; + + /** + * @param non-empty-string ...$label + */ + #[Pure] + public function withLabels(string ...$label): self; + + /** + * @return ArrayFormatType + */ + #[Pure] + public function toArray(): array; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/CollectorType.php b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/CollectorType.php new file mode 100644 index 0000000..71de029 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/CollectorType.php @@ -0,0 +1,13 @@ +rpc = $rpc->withServicePrefix(self::SERVICE_NAME); + } + + public function add(string $name, float $value, array $labels = []): void + { + try { + $this->rpc->call('Add', \compact('name', 'value', 'labels')); + } catch (ServiceException $e) { + throw new MetricsException($e->getMessage(), $e->getCode(), $e); + } + } + + public function sub(string $name, float $value, array $labels = []): void + { + try { + $this->rpc->call('Sub', \compact('name', 'value', 'labels')); + } catch (ServiceException $e) { + throw new MetricsException($e->getMessage(), $e->getCode(), $e); + } + } + + public function observe(string $name, float $value, array $labels = []): void + { + try { + $this->rpc->call('Observe', \compact('name', 'value', 'labels')); + } catch (ServiceException $e) { + throw new MetricsException($e->getMessage(), $e->getCode(), $e); + } + } + + public function set(string $name, float $value, array $labels = []): void + { + try { + $this->rpc->call('Set', \compact('name', 'value', 'labels')); + } catch (ServiceException $e) { + throw new MetricsException($e->getMessage(), $e->getCode(), $e); + } + } + + public function declare(string $name, CollectorInterface $collector): void + { + try { + $this->rpc->call('Declare', [ + 'name' => $name, + 'collector' => $collector->toArray(), + ]); + } catch (ServiceException $e) { + if (\str_contains($e->getMessage(), 'tried to register existing collector')) { + // suppress duplicate metric error + return; + } + + throw new MetricsException($e->getMessage(), $e->getCode(), $e); + } + } + + public function unregister(string $name): void + { + try { + $this->rpc->call('Unregister', $name); + } catch (ServiceException $e) { + throw new MetricsException($e->getMessage(), $e->getCode(), $e); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/MetricsFactory.php b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/MetricsFactory.php new file mode 100644 index 0000000..17ccbca --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/MetricsFactory.php @@ -0,0 +1,30 @@ +retryAttempts, + $options->retrySleepMicroseconds, + ); + + if ($options->suppressExceptions) { + $metrics = new SuppressExceptionsMetrics($metrics, $this->logger); + } + + return $metrics; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/MetricsInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/MetricsInterface.php new file mode 100644 index 0000000..2c8dc69 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/MetricsInterface.php @@ -0,0 +1,64 @@ + $retryAttempts + * @param int<0, max> $retrySleepMicroseconds + */ + public function __construct( + public readonly int $retryAttempts = 3, + public readonly int $retrySleepMicroseconds = 50, + public readonly bool $suppressExceptions = false, + ) { + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/RetryMetrics.php b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/RetryMetrics.php new file mode 100644 index 0000000..bdead7f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/RetryMetrics.php @@ -0,0 +1,69 @@ + $retryAttempts + * @param int<0, max> $retrySleepMicroseconds + */ + public function __construct( + private readonly MetricsInterface $metrics, + private readonly int $retryAttempts, + private readonly int $retrySleepMicroseconds, + ) { + } + + public function add(string $name, float $value, array $labels = []): void + { + $this->retry(fn () => $this->metrics->add($name, $value, $labels)); + } + + public function sub(string $name, float $value, array $labels = []): void + { + $this->retry(fn () => $this->metrics->sub($name, $value, $labels)); + } + + public function observe(string $name, float $value, array $labels = []): void + { + $this->retry(fn () => $this->metrics->observe($name, $value, $labels)); + } + + public function set(string $name, float $value, array $labels = []): void + { + $this->retry(fn () => $this->metrics->set($name, $value, $labels)); + } + + public function declare(string $name, CollectorInterface $collector): void + { + $this->retry(fn () => $this->metrics->declare($name, $collector)); + } + + public function unregister(string $name): void + { + $this->retry(fn () => $this->metrics->unregister($name)); + } + + private function retry(callable $request): void + { + // 1 + retryAttempts + $attempts = -1; + + do { + try { + $request(); + + return; + } catch (MetricsException $e) { + if (++$attempts === $this->retryAttempts) { + throw $e; + } + } + + usleep($this->retrySleepMicroseconds); + } while ($attempts < $this->retryAttempts); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/SuppressExceptionsMetrics.php b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/SuppressExceptionsMetrics.php new file mode 100644 index 0000000..4428776 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-metrics/src/SuppressExceptionsMetrics.php @@ -0,0 +1,70 @@ +metrics->add($name, $value, $labels); + } catch (MetricsException $e) { + $this->logger->warning(sprintf('[Metrics] Operation "Add" was failed: %s', $e->getMessage())); + } + } + + public function sub(string $name, float $value, array $labels = []): void + { + try { + $this->metrics->sub($name, $value, $labels); + } catch (MetricsException $e) { + $this->logger->warning(sprintf('[Metrics] Operation "Sub" was failed: %s', $e->getMessage())); + } + } + + public function observe(string $name, float $value, array $labels = []): void + { + try { + $this->metrics->observe($name, $value, $labels); + } catch (MetricsException $e) { + $this->logger->warning(sprintf('[Metrics] Operation "Observe" was failed: %s', $e->getMessage())); + } + } + + public function set(string $name, float $value, array $labels = []): void + { + try { + $this->metrics->set($name, $value, $labels); + } catch (MetricsException $e) { + $this->logger->warning(sprintf('[Metrics] Operation "Set" was failed: %s', $e->getMessage())); + } + } + + public function declare(string $name, CollectorInterface $collector): void + { + try { + $this->metrics->declare($name, $collector); + } catch (MetricsException $e) { + $this->logger->warning(sprintf('[Metrics] Operation "Declare" was failed: %s', $e->getMessage())); + } + } + + public function unregister(string $name): void + { + try { + $this->metrics->unregister($name); + } catch (MetricsException $e) { + $this->logger->warning(sprintf('[Metrics] Operation "Unregister" was failed: %s', $e->getMessage())); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-services/.styleci.yml b/tests/php_test_files/vendor/spiral/roadrunner-services/.styleci.yml new file mode 100644 index 0000000..6fde134 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-services/.styleci.yml @@ -0,0 +1,73 @@ +preset: psr12 +risky: true + +version: 8 + +enabled: + - alpha_ordered_traits + - array_indentation + - array_push + - combine_consecutive_issets + - combine_consecutive_unsets + - combine_nested_dirname + - declare_strict_types + - dir_constant + - fully_qualified_strict_types + - function_to_constant + - is_null + - magic_constant_casing + - magic_method_casing + - method_separation + - modernize_types_casting + - native_function_casing + - native_function_type_declaration_casing + - no_alias_functions + - no_empty_comment + - no_empty_phpdoc + - no_empty_statement + - no_extra_block_blank_lines + - no_short_bool_cast + - no_superfluous_elseif + - no_unneeded_control_parentheses + - no_unneeded_curly_braces + - no_unneeded_final_method + - no_unset_cast + - no_unused_imports + - no_unused_lambda_imports + - no_useless_else + - no_useless_return + - normalize_index_brace + - php_unit_dedicate_assert + - php_unit_dedicate_assert_internal_type + - php_unit_expectation + - php_unit_mock + - php_unit_mock_short_will_return + - php_unit_namespaced + - php_unit_no_expectation_annotation + - phpdoc_no_empty_return + - phpdoc_no_useless_inheritdoc + - phpdoc_order + - phpdoc_property + - phpdoc_scalar + - phpdoc_separation + - phpdoc_singular_inheritdoc + - phpdoc_trim + - phpdoc_trim_consecutive_blank_line_separation + - phpdoc_type_to_var + - phpdoc_types + - phpdoc_types_order + - print_to_echo + - regular_callable_call + - return_assignment + - self_accessor + - self_static_accessor + - set_type_to_cast + - short_array_syntax + - short_list_syntax + - simplified_if_return + - single_quote + - standardize_not_equals + - ternary_to_null_coalescing + - trailing_comma_in_multiline_array + - unalign_double_arrow + - unalign_equals diff --git a/tests/php_test_files/vendor/spiral/roadrunner-services/LICENSE b/tests/php_test_files/vendor/spiral/roadrunner-services/LICENSE new file mode 100644 index 0000000..8a33434 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-services/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Spiral Scout + +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/spiral/roadrunner-services/README.md b/tests/php_test_files/vendor/spiral/roadrunner-services/README.md new file mode 100644 index 0000000..fa220f5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-services/README.md @@ -0,0 +1,156 @@ + + + + + + + +# Roadrunner services manager + +[![PHP Version Require](https://poser.pugx.org/spiral/roadrunner-services/require/php)](https://packagist.org/packages/spiral/roadrunner-services) +[![Latest Stable Version](https://poser.pugx.org/spiral/roadrunner-services/v/stable)](https://packagist.org/packages/spiral/roadrunner-services) +[![phpunit](https://github.com/spiral/roadrunner-services/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/roadrunner-services/actions) +[![psalm](https://github.com/spiral/roadrunner-services/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/roadrunner-services/actions) +[![Total Downloads](https://poser.pugx.org/spiral/roadrunner-services/downloads)](https://packagist.org/packages/spiral/roadrunner-services) + +This package will help you to manage [Roadrunner services](https://docs.roadrunner.dev/plugins/service) + +## Requirements + +Make sure that your server is configured with following PHP version and extensions: + +- PHP 8.1+ + +## Installation + +You can install the package via composer: + +```bash +composer require spiral/roadrunner-services +``` + +## Usage + +Such a configuration would be quite feasible to run: + +```yaml +rpc: + listen: tcp://127.0.0.1:6001 + +service: {} +``` + +Then you need to create an instance of `Spiral\RoadRunner\Services\Manager` + +```php +use Spiral\RoadRunner\Services\Manager; +use Spiral\Goridge\RPC\RPC; + +$rpc = RPC::create('tcp://127.0.0.1:6001')); +$manager = new Manager($rpc); +``` + +### Create a new service + +```php +use Spiral\RoadRunner\Services\Exception\ServiceException; + +try { + $result = $manager->create( + name: 'listen-jobs', + command: 'php app.php queue:listen', + processNum: 3, + execTimeout: 0, + remainAfterExit: false, + env: ['APP_ENV' => 'production'], + restartSec: 30 + ); + + if (!$result) { + throw new ServiceException('Service creation failed.'); + } +} catch (ServiceException $e) { + // handle exception +} +``` + +### Check service status + +```php +use Spiral\RoadRunner\Services\Exception\ServiceException; + +try { + $status = $manager->statuses(name: 'listen-jobs'); + + // Will return an array with statuses of every run process + // [ + // [ + // 'cpu_percent' => 59.5, + // 'pid' => 33, + // 'memory_usage' => 200, + // 'command' => 'foo/bar', + // 'error' => null + // ], + // [ + // 'cpu_percent' => 60.2, + // 'pid' => 34, + // 'memory_usage' => 189, + // 'command' => 'foo/bar' + // 'error' => [ + // 'code' => 1, + // 'message' => 'Process exited with code 1' + // 'details' => [...] // array with details + // ] + // ], + // ] +} catch (ServiceException $e) { + // handle exception +} +``` + +### Restart service + +```php +use Spiral\RoadRunner\Services\Exception\ServiceException; + +try { + $result = $manager->restart(name: 'listen-jobs'); + + if (!$result) { + throw new ServiceException('Service restart failed.'); + } +} catch (ServiceException $e) { + // handle exception +} +``` + +### Terminate service + +```php +use Spiral\RoadRunner\Services\Exception\ServiceException; + +try { + $result = $manager->terminate(name: 'listen-jobs'); + + if (!$result) { + throw new ServiceException('Service termination failed.'); + } +} catch (ServiceException $e) { + // handle exception +} +``` + +### List of all services + +```php +use Spiral\RoadRunner\Services\Exception\ServiceException; + +try { + $services = $manager->list(); + + // Will return an array with services names + // ['listen-jobs', 'websocket-connection'] +} catch (ServiceException $e) { + // handle exception +} +``` diff --git a/tests/php_test_files/vendor/spiral/roadrunner-services/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-services/composer.json new file mode 100644 index 0000000..a35c16a --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-services/composer.json @@ -0,0 +1,68 @@ +{ + "name": "spiral/roadrunner-services", + "type": "library", + "description": "RoadRunner services manager", + "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" + } + ], + "homepage": "https://roadrunner.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": ">=8.1", + "roadrunner-php/roadrunner-api-dto": "^1.4", + "spiral/roadrunner": "^2023.2 || ^2024.1", + "spiral/goridge": "^4.0", + "google/protobuf": "^3.7" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Services\\": "src" + } + }, + "require-dev": { + "mockery/mockery": "^1.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": ">=5.8" + }, + "autoload-dev": { + "psr-4": { + "Spiral\\RoadRunner\\Services\\Tests\\": "tests" + } + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm --no-cache" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-services/psalm.xml b/tests/php_test_files/vendor/spiral/roadrunner-services/psalm.xml new file mode 100644 index 0000000..6e265d0 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-services/psalm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-services/src/Exception/ServiceException.php b/tests/php_test_files/vendor/spiral/roadrunner-services/src/Exception/ServiceException.php new file mode 100644 index 0000000..2f8358b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-services/src/Exception/ServiceException.php @@ -0,0 +1,10 @@ +rpc = $rpc->withCodec(new ProtobufCodec()); + } + + /** + * Get list of all services. + * + * @return string[] Services name. + * @throws Exception\ServiceException + */ + public function list(): array + { + $services = []; + + try { + /** @var PBList $response */ + $response = $this->rpc->call('service.List', new Service(), PBList::class); + + /** @var string $service */ + foreach ($response->getServices() as $service) { + $services[] = $service; + } + } catch (ServiceException $e) { + $this->handleError($e); + } + + return $services; + } + + /** + * Create a new service. + * + * @param non-empty-string $name Service name. + * @param non-empty-string $command Command to execute. There are no limitations on commands here. Here could be + * binary, PHP file, script, etc. + * @param int<1, max> $processNum Number of processes for the command to fire. + * @param int<0, max> $execTimeout Maximum allowed time to run for the process. + * @param bool $remainAfterExit Remain process after exit. + * @param array $env Environment variables to pass to the underlying process from the + * config. + * @param int<1, max> $restartSec Delay between process stop and restart. + * @param bool $serviceNameInLogs Show the name of the service in logs (e.g. service.some_service_1). + * @param int<0, max> $stopTimeout Timeout for the process stop operation. + * @throws Exception\ServiceException + * @see https://docs.roadrunner.dev/plugins/service + */ + public function create( + string $name, + string $command, + int $processNum = 1, + int $execTimeout = 0, + bool $remainAfterExit = false, + array $env = [], + int $restartSec = 30, + bool $serviceNameInLogs = false, + int $stopTimeout = 5 + ): bool { + \assert($processNum > 0, 'Process number must be greater than 0.'); + \assert($execTimeout >= 0, 'Execution timeout must be greater or equal to 0.'); + \assert($restartSec > 0, 'Restart delay must be greater than 0.'); + \assert($stopTimeout >= 0, 'Timeout for the process stop operation must be greater or equal to 0.'); + + $create = (new Create()) + ->setName($name) + ->setCommand($command) + ->setProcessNum($processNum) + ->setExecTimeout($execTimeout) + ->setRemainAfterExit($remainAfterExit) + ->setEnv($env) + ->setRestartSec($restartSec) + ->setServiceNameInLogs($serviceNameInLogs) + ->setTimeoutStopSec($stopTimeout); + + try { + /** @var Response $response */ + $response = $this->rpc->call('service.Create', $create, Response::class); + + return $response->getOk(); + } catch (ServiceException $e) { + $this->handleError($e); + } + + return false; + } + + /** + * Remove a service. + * + * @param non-empty-string $name + * @throws Exception\ServiceException + */ + public function restart(string $name): bool + { + try { + /** @var Response $response */ + $response = $this->rpc->call('service.Restart', new Service(['name' => $name]), Response::class); + + return $response->getOk(); + } catch (ServiceException $e) { + $this->handleError($e); + } + + return false; + } + + /** + * Terminate service. + * + * @param non-empty-string $name Service name. + * @throws Exception\ServiceException + */ + public function terminate(string $name): bool + { + try { + /** @var Response $response */ + $response = $this->rpc->call('service.Terminate', new Service(['name' => $name]), Response::class); + + return $response->getOk(); + } catch (ServiceException $e) { + $this->handleError($e); + } + + return false; + } + + /** + * Get service statuses. + * + * @param non-empty-string $name Service name. + * @return list + * @throws Exception\ServiceException + * @psalm-suppress MoreSpecificReturnType + * @psalm-suppress LessSpecificReturnStatement + */ + public function statuses(string $name): array + { + $result = []; + try { + $response = $this->rpc->call('service.Statuses', new Service(['name' => $name]), Statuses::class); + \assert($response instanceof Statuses); + + foreach ($response->getStatus() as $status) { + \assert($status instanceof Status); + + $error = null; + $statusError = $status->getStatus(); + /** @psalm-suppress RedundantConditionGivenDocblockType */ + if ($statusError !== null) { + $error = [ + 'code' => $statusError->getCode(), + 'message' => $statusError->getMessage(), + 'details' => \array_map(static fn (Any $any) => [ + 'message' => $any->getValue(), + 'type_url' => $any->getTypeUrl(), + ], \iterator_to_array($statusError->getDetails()->getIterator())), + ]; + } + + $result[] = [ + 'cpu_percent' => $status->getCpuPercent(), + 'pid' => $status->getPid(), + 'memory_usage' => $status->getMemoryUsage(), + 'command' => $status->getCommand(), + 'error' => $error, + ]; + } + } catch (ServiceException $e) { + $this->handleError($e); + } + + return $result; + } + + /** + * @throws Exception\ServiceException + */ + private function handleError(ServiceException $e): never + { + $message = \str_replace(["\t", "\n"], ' ', $e->getMessage()); + + throw new Exception\ServiceException($message, $e->getCode(), $e); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-tcp/LICENSE b/tests/php_test_files/vendor/spiral/roadrunner-tcp/LICENSE new file mode 100644 index 0000000..be9e4bf --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-tcp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Spiral Scout + +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/spiral/roadrunner-tcp/README.md b/tests/php_test_files/vendor/spiral/roadrunner-tcp/README.md new file mode 100644 index 0000000..2111e88 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-tcp/README.md @@ -0,0 +1,163 @@ + + + + + + + +# RoadRunner TCP Plugin + +[![PHP Version Require](https://poser.pugx.org/spiral/roadrunner-tcp/require/php)](https://packagist.org/packages/spiral/roadrunner-tcp) +[![Latest Stable Version](https://poser.pugx.org/spiral/roadrunner-tcp/v/stable)](https://packagist.org/packages/spiral/roadrunner-tcp) +[![phpunit](https://github.com/spiral/roadrunner-tcp/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/roadrunner-tcp/actions) +[![psalm](https://github.com/spiral/roadrunner-tcp/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/roadrunner-tcp/actions) +[![Codecov](https://codecov.io/gh/roadrunner-php/tcp/branch/3.x/graph/badge.svg)](https://codecov.io/gh/roadrunner-php/tcp) +[![Total Downloads](https://poser.pugx.org/spiral/roadrunner-tcp/downloads)](https://packagist.org/packages/spiral/roadrunner-tcp) +[![type-coverage](https://shepherd.dev/github/roadrunner-php/tcp/coverage.svg)](https://shepherd.dev/github/spiral/roadrunner-php/tcp) +[![psalm-level](https://shepherd.dev/github/roadrunner-php/tcp/level.svg)](https://shepherd.dev/github/roadrunner-php/tcp) + +RoadRunner is an open-source (MIT licensed) high-performance PHP application server, load balancer, and process manager. +It supports running as a service with the ability to extend its functionality on a per-project basis. + +RoadRunner includes TCP server and can be used to replace classic TCP setup with much greater performance and flexibility. + +

    + Official Website | + Documentation +

    + +This repository contains the codebase TCP PHP workers. Check [spiral/roadrunner](https://github.com/spiral/roadrunner) +to get application server. + +## Installation + +To install application server and TCP codebase: + +```bash +composer require spiral/roadrunner-tcp +``` + +You can use the convenient installer to download the latest available compatible version of RoadRunner assembly: + +```bash +composer require spiral/roadrunner-cli --dev +``` + +To download latest version of application server: + +```bash +vendor/bin/rr get +``` + +## Usage + +For example, such a configuration would be quite feasible to run: + +```yaml +tcp: + servers: + smtp: + addr: tcp://127.0.0.1:1025 + delimiter: "\r\n" # by default + server2: + addr: tcp://127.0.0.1:8889 + + pool: + num_workers: 2 + max_jobs: 0 + allocate_timeout: 60s + destroy_timeout: 60s +``` + +If you have more than 1 worker in your pool TCP server will send received packets to different workers, +and if you need to collect data you have to use storage, that can be accessed by all workers, for example [RoadRunner Key Value](https://github.com/spiral/roadrunner-kv) + +### Example + +To init abstract RoadRunner worker: + +```php +waitRequest()) { + + try { + if ($request->event === TcpEvent::Connected) { + // You can close connection according your restrictions + if ($request->getRemoteAddress() !== '127.0.0.1') { + $tcpWorker->close(); + continue; + } + + // ----------------- + + // Or continue read data from server + // By default, server closes connection if a worker doesn't send CONTINUE response + $tcpWorker->read(); + + // ----------------- + + // Or send response to the TCP connection, for example, to the SMTP client + $tcpWorker->respond("220 mailamie \r\n"); + + } elseif ($request->getEvent() === TcpEvent::Data) { + + $body = $request->getBody(); + + // ... handle request from TCP server [tcp_access_point_1] + if ($request->getServer() === 'tcp_access_point_1') { + + // Send response and close connection + $tcpWorker->respond('Access denied', TcpResponse::RespondClose); + + // ... handle request from TCP server [server2] + } elseif ($request->getServer() === 'server2') { + + // Send response to the TCP connection and wait for the next request + $tcpWorker->respond(\json_encode([ + 'remote_addr' => $request->getRemoteAddress(), + 'server' => $request->getServer(), + 'uuid' => $request->getConnectionUuid(), + 'body' => $request->getBody(), + 'event' => $request->getEvent() + ])); + } + + // Handle closed connection event + } elseif ($request->getEvent() === TcpEvent::Close) { + // Do something ... + + // You don't need to send response on closed connection + } + + } catch (\Throwable $e) { + $tcpWorker->respond("Something went wrong\r\n", TcpResponse::RespondClose); + $worker->error((string)$e); + } +} +``` + + +try Spiral Framework + + +## Testing: + +This codebase is automatically tested via host repository - [spiral/roadrunner](https://github.com/spiral/roadrunner). + +## License: + +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained +by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/roadrunner-tcp/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-tcp/composer.json new file mode 100644 index 0000000..3e28ff1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-tcp/composer.json @@ -0,0 +1,74 @@ +{ + "name": "spiral/roadrunner-tcp", + "type": "library", + "description": "RoadRunner: TCP worker", + "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" + } + ], + "homepage": "https://roadrunner.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "require": { + "php": ">=8.1", + "ext-json": "*", + "spiral/roadrunner": "^2023.1", + "spiral/roadrunner-worker": "^3.0" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Tcp\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\RoadRunner\\Tcp\\Tests\\": "tests" + } + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "phpunit/phpunit": "^10.5", + "vimeo/psalm": ">=5.8" + }, + "scripts": { + "tests": "phpunit", + "psalm": "psalm" + }, + "suggest": { + "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-tcp/psalm.xml b/tests/php_test_files/vendor/spiral/roadrunner-tcp/psalm.xml new file mode 100644 index 0000000..221daa2 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-tcp/psalm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + diff --git a/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/Request.php b/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/Request.php new file mode 100644 index 0000000..2e2e0c0 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/Request.php @@ -0,0 +1,75 @@ +remoteAddr; + } + + /** + * Returns the connection event type (CONNECTED, DATA, CLOSED). + */ + public function getEvent(): TcpEvent + { + return $this->event; + } + + /** + * Returns the received data from the connection. + */ + public function getBody(): string + { + return $this->body; + } + + /** + * Returns the connection UUID. + * + * @return non-empty-string + */ + public function getConnectionUuid(): string + { + return $this->connectionUuid; + } + + /** + * Returns the server name that received the data. + * + * @return non-empty-string + */ + public function getServer(): string + { + return $this->server; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/RequestInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/RequestInterface.php new file mode 100644 index 0000000..7452126 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/RequestInterface.php @@ -0,0 +1,39 @@ + + * } + * + * @see Request + */ +class TcpWorker implements TcpWorkerInterface +{ + public function __construct( + private readonly WorkerInterface $worker, + ) { + } + + public function getWorker(): WorkerInterface + { + return $this->worker; + } + + public function waitRequest(): ?RequestInterface + { + $payload = $this->worker->waitPayload(); + + // Close connection if server received empty payload + if ($payload === null) { + $this->close(); + return null; + } + + /** @var RequestContext $context */ + $context = \json_decode($payload->header, true, 512, \JSON_THROW_ON_ERROR); + + return $this->createRequest($payload->body, $context); + } + + public function respond(string $body, TcpResponse $response = TcpResponse::Respond): void + { + $this->worker->respond( + new Payload($body, $response->value), + ); + } + + public function read(): void + { + $this->respond('', TcpResponse::Read); + } + + public function close(): void + { + $this->respond('', TcpResponse::Close); + } + + /** + * Creates request from received payload. + * + * @param RequestContext $context + * @psalm-suppress InaccessibleProperty + */ + private function createRequest(string $body, array $context): Request + { + return new Request( + remoteAddr: $context['remote_addr'], + event: TcpEvent::tryFrom($context['event'] ?? 'UNKNOWN') ?? TcpEvent::Unknown, + body: $body, + connectionUuid: $context['uuid'], + server: $context['server'], + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/TcpWorkerInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/TcpWorkerInterface.php new file mode 100644 index 0000000..77facd3 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-tcp/src/TcpWorkerInterface.php @@ -0,0 +1,33 @@ + + + + + + +

    + + + + + + + +

    + +RoadRunner is an open-source (MIT licensed) high-performance PHP application server, load balancer, and process manager. +It supports running as a service with the ability to extend its functionality on a per-project basis. + +RoadRunner includes PSR-7/PSR-17 compatible HTTP and HTTP/2 server and can be used to replace classic Nginx+FPM setup with much greater performance and flexibility. + +

    + Official Website | + Documentation +

    + +Repository: +-------- + +This repository contains the common codebase for all binary roadrunner workers. +Check [spiral/roadrunner](https://github.com/spiral/roadrunner) to access application +server and [spiral/roadrunner-http](https://github.com/spiral/roadrunner-http) for PSR-7 compatible worker. + +You can use the convenient installer to download the latest available compatible version of RoadRunner assembly: + +```bash +$ composer require spiral/roadrunner-cli --dev +``` + +To download latest version of application server: + +```bash +$ vendor/bin/rr get +``` + +Example: +------- + +To init abstract RoadRunner worker: + +```php +waitPayload()) { + // Received Payload + var_dump($data); + + // Respond Answer + $worker->respond(new \Spiral\RoadRunner\Payload('DONE')); +} +``` + + +try Spiral Framework + + +Testing: +-------- + +This codebase is automatically tested via host repository - [spiral/roadrunner](https://github.com/spiral/roadrunner). + +License: +-------- + +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/composer.json b/tests/php_test_files/vendor/spiral/roadrunner-worker/composer.json new file mode 100644 index 0000000..d9559a8 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/composer.json @@ -0,0 +1,81 @@ +{ + "name": "spiral/roadrunner-worker", + "type": "library", + "description": "RoadRunner: PHP worker", + "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" + } + ], + "homepage": "https://spiral.dev/", + "support": { + "docs": "https://docs.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "forum": "https://forum.roadrunner.dev/", + "chat": "https://discord.gg/V6EK4he" + }, + "require": { + "php": ">=8.1", + "ext-json": "*", + "ext-sockets": "*", + "psr/log": "^2.0 || ^3.0", + "spiral/goridge": "^4.1.0", + "spiral/roadrunner": "^2023.1 || ^2024.1", + "composer-runtime-api": "^2.0" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": "^5.9", + "symfony/var-dumper": "^6.3 || ^7.0" + }, + "scripts": { + "analyze": "psalm" + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\RoadRunner\\Tests\\Worker\\": "tests" + } + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/roadrunner-server" + } + ], + "suggest": { + "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools" + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Environment.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Environment.php new file mode 100644 index 0000000..1af6963 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Environment.php @@ -0,0 +1,73 @@ + + * @see Mode + */ +class Environment implements EnvironmentInterface +{ + /** + * @param EnvironmentVariables $env + */ + public function __construct( + private array $env = [], + ) { + } + + public function getMode(): string + { + return $this->get('RR_MODE'); + } + + public function getRelayAddress(): string + { + return $this->get('RR_RELAY', 'pipes'); + } + + public function getRPCAddress(): string + { + return $this->get('RR_RPC', 'tcp://127.0.0.1:6001'); + } + + public function getVersion(): string + { + return $this->get('RR_VERSION'); + } + + /** + * @template TDefault of string + * + * @param non-empty-string $name + * @param TDefault $default + * @return string|TDefault + */ + private function get(string $name, string $default = ''): string + { + if (isset($this->env[$name]) || \array_key_exists($name, $this->env)) { + /** @psalm-suppress RedundantCastGivenDocblockType */ + return (string)$this->env[$name]; + } + + return $default; + } + + public static function fromGlobals(): self + { + /** @var array $env */ + $env = [...$_ENV, ...$_SERVER]; + + return new self($env); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Environment/Mode.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Environment/Mode.php new file mode 100644 index 0000000..7b50636 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Environment/Mode.php @@ -0,0 +1,25 @@ + $workers + */ + public function __construct( + private readonly array $workers = [], + ) { + } + + /** + * @return array + */ + public function getWorkers(): array + { + return $this->workers; + } + + public function count(): int + { + return \count($this->workers); + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Internal/StdoutHandler.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Internal/StdoutHandler.php new file mode 100644 index 0000000..f9fcebf --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Internal/StdoutHandler.php @@ -0,0 +1,86 @@ += 0, 'Invalid chunk size argument value'); + + self::restreamOutputBuffer($chunkSize); + self::restreamHeaders(); + + // Vendor packages + self::restreamSymfonyDumper(); + } + + /** + * Intercept all output headers writing. + */ + private static function restreamHeaders(): void + { + \header_register_callback(static function(): void { + $headers = \headers_list(); + + if ($headers !== []) { + \file_put_contents(self::PIPE_OUT, self::ERROR_WRITING_HEADER); + } + }); + } + + /** + * Intercept all output buffer write. + * + * @param int<0, max> $chunkSize + */ + private static function restreamOutputBuffer(int $chunkSize): void + { + \ob_start(static function (string $chunk, int $phase): void { + $isWrite = ($phase & \PHP_OUTPUT_HANDLER_WRITE) === \PHP_OUTPUT_HANDLER_WRITE; + + if ($isWrite && $chunk !== '') { + \file_put_contents(self::PIPE_OUT, $chunk); + } + }, $chunkSize); + } + + private static function restreamSymfonyDumper(): void + { + if (\class_exists(AbstractDumper::class)) { + AbstractDumper::$defaultOutput = self::PIPE_OUT; + CliDumper::$defaultOutput = self::PIPE_OUT; + HtmlDumper::$defaultOutput = self::PIPE_OUT; + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Logger.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Logger.php new file mode 100644 index 0000000..7163e1b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Logger.php @@ -0,0 +1,43 @@ +write($this->format((string)$level, $message, $context)); + } + + protected function write(string $message): void + { + \file_put_contents('php://stderr', $message); + } + + protected function format(string $level, string $message, array $context = []): string + { + return \sprintf('[php %s] %s %s', $level, $message, $this->formatContext($context)); + } + + protected function formatContext(array $context): string + { + try { + return \json_encode($context, \JSON_THROW_ON_ERROR); + } catch (\JsonException) { + return \print_r($context, true); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Message/Command/GetProcessId.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Message/Command/GetProcessId.php new file mode 100644 index 0000000..67c4d8d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/Message/Command/GetProcessId.php @@ -0,0 +1,15 @@ +body = $body ?? ''; + $this->header = $header ?? ''; + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/PayloadFactory.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/PayloadFactory.php new file mode 100644 index 0000000..5046200 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/PayloadFactory.php @@ -0,0 +1,73 @@ +payload ?? ''; + + if ($frame->hasFlag(Frame::CONTROL)) { + return self::makeControl($payload); + } + + if (($frame->byte10 & Frame::BYTE10_STOP) !== 0) { + return new StreamStop($payload); + } + + if (($frame->byte10 & Frame::BYTE10_PONG) !== 0) { + return new Pong($payload); + } + + return new Payload( + \substr($payload, $frame->options[0]), + \substr($payload, 0, $frame->options[0]), + ); + } + + private static function makeControl(string $header): Payload + { + try { + $command = self::decode($header); + } catch (\JsonException $e) { + throw new RoadRunnerException('Invalid task header, JSON payload is expected: ' . $e->getMessage()); + } + + if (!empty($command['stop'])) { + return new WorkerStop(null, $header); + } + + if (!empty($command['pid'])) { + return new GetProcessId(null, $header); + } + + throw new RoadRunnerException('Invalid task header, undefined control package'); + } + + /** + * @throws \JsonException + * @psalm-assert non-empty-string $json + */ + private static function decode(string $json): array + { + $result = \json_decode($json, true, 512, self::JSON_DECODE_FLAGS); + + if (! \is_array($result)) { + throw new \JsonException('Json message must be an array or object'); + } + + return $result; + } +} \ No newline at end of file diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/StreamWorkerInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/StreamWorkerInterface.php new file mode 100644 index 0000000..d213d54 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/StreamWorkerInterface.php @@ -0,0 +1,10 @@ + + * $worker = Worker::create(); + * + * while ($receivedPayload = $worker->waitPayload()) { + * $worker->respond(new Payload("DONE", json_encode($context))); + * } + * + */ +class Worker implements StreamWorkerInterface +{ + private const JSON_ENCODE_FLAGS = \JSON_THROW_ON_ERROR | \JSON_PRESERVE_ZERO_FRACTION; + + /** @var array */ + private array $payloads = []; + + private bool $streamMode = false; + /** @var int<0, max> Count of frames sent in stream mode */ + private int $framesSent = 0; + private bool $shouldPing = false; + private bool $waitingPong = false; + + public function __construct( + private readonly RelayInterface $relay, + bool $interceptSideEffects = true, + private readonly LoggerInterface $logger = new Logger(), + ) { + if ($interceptSideEffects) { + StdoutHandler::register(); + } + } + + public function getLogger(): LoggerInterface + { + return $this->logger; + } + + public function waitPayload(): ?Payload + { + while (true) { + if ($this->payloads !== []) { + $payload = \array_shift($this->payloads); + } else { + $frame = $this->relay->waitFrame(); + $payload = PayloadFactory::fromFrame($frame); + } + + switch (true) { + case $payload::class === Payload::class: + return $payload; + case $payload instanceof WorkerStop: + $this->waitingPong = false; + return null; + case $payload::class === GetProcessId::class: + $this->sendProcessId(); + continue 2; + case $payload instanceof Pong: + $this->waitingPong = false; + continue 2; + case $payload instanceof SkipMessage: + continue 2; + } + } + } + + public function withStreamMode(): static + { + $clone = clone $this; + $clone->streamMode = true; + $clone->framesSent = 0; + $clone->shouldPing = false; + $clone->waitingPong = false; + return $clone; + } + + /** + * @param int|null $codec The codec used for encoding the payload header. + * Can be {@see Frame::CODEC_PROTO} for Protocol Buffers or {@see Frame::CODEC_JSON} for JSON. + * This parameter will be removed in v4.0 and {@see Frame::CODEC_PROTO} will be used by default. + */ + public function respond(Payload $payload, ?int $codec = null): void + { + $this->streamMode and ++$this->framesSent; + $this->send($payload->body, $payload->header, $payload->eos, $codec); + } + + public function error(string $error): void + { + $frame = new Frame($error, [], Frame::ERROR); + + $this->sendFrame($frame); + } + + public function stop(): void + { + $this->send('', $this->encode(['stop' => true])); + } + + public function hasPayload(string $class = null): bool + { + return $this->findPayload($class) !== null; + } + + public function getPayload(string $class = null): ?Payload + { + $pos = $this->findPayload($class); + if ($pos === null) { + return null; + } + $result = $this->payloads[$pos]; + unset($this->payloads[$pos]); + + return $result; + } + + /** + * @param class-string|null $class + * + * @return null|int Index in {@see $this->payloads} or null if not found + */ + private function findPayload(string $class = null): ?int + { + // Find in existing payloads + if ($this->payloads !== []) { + if ($class === null) { + return \array_key_first($this->payloads); + } + + foreach ($this->payloads as $pos => $payload) { + if ($payload::class === $class) { + return $pos; + } + } + } + + do { + if ($class === null && $this->payloads !== []) { + return \array_key_first($this->payloads); + } + + $payload = $this->pullPayload(); + if ($payload === null || $payload instanceof Pong) { + break; + } + + $this->payloads[] = $payload; + if ($class !== null && $payload::class === $class) { + return \array_key_last($this->payloads); + } + } while (true); + + return null; + } + + /** + * Pull {@see Payload} if it is available without blocking. + */ + private function pullPayload(): ?Payload + { + if (!$this->waitingPong && $this->relay instanceof BlockingRelayInterface) { + if (!$this->streamMode) { + return null; + } + + $this->haveToPing(); + return null; + } + + if (!$this->relay->hasFrame()) { + return null; + } + + $frame = $this->relay->waitFrame(); + $payload = PayloadFactory::fromFrame($frame); + + if ($payload instanceof Pong) { + $this->waitingPong = false; + return null; + } + + return $payload; + } + + private function send(string $body = '', string $header = '', bool $eos = true, ?int $codec = null): void + { + $frame = new Frame($header . $body, [\strlen($header)]); + + if (!$eos) { + $frame->byte10 |= Frame::BYTE10_STREAM; + } + + if ($this->shouldPing) { + $frame->byte10 |= Frame::BYTE10_PING; + } + + if ($codec !== null) { + $frame->setFlag($codec); + } + + $this->sendFrame($frame); + } + + private function sendFrame(Frame $frame): void + { + try { + if ($this->streamMode && ($frame->byte10 & Frame::BYTE10_STREAM) && $this->shouldPing) { + $frame->byte10 |= Frame::BYTE10_PING; + $this->shouldPing = false; + $this->waitingPong = true; + } + + $this->relay->send($frame); + } catch (GoridgeException $e) { + throw new TransportException($e->getMessage(), $e->getCode(), $e); + } catch (\Throwable $e) { + throw new RoadRunnerException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + private function encode(array $payload): string + { + return \json_encode($payload, self::JSON_ENCODE_FLAGS); + } + + /** + * Create a new RoadRunner {@see Worker} using global + * environment ({@see Environment}) configuration. + */ + public static function create(bool $interceptSideEffects = true, LoggerInterface $logger = new Logger()): self + { + return static::createFromEnvironment( + env: Environment::fromGlobals(), + interceptSideEffects: $interceptSideEffects, + logger: $logger, + ); + } + + /** + * Create a new RoadRunner {@see Worker} using passed environment + * configuration. + */ + public static function createFromEnvironment( + EnvironmentInterface $env, + bool $interceptSideEffects = true, + LoggerInterface $logger = new Logger(), + ): self { + $address = $env->getRelayAddress(); + \assert($address !== '', 'Relay address must be specified in environment'); + + return new self( + relay: Relay::create($address), + interceptSideEffects: $interceptSideEffects, + logger: $logger + ); + } + + private function sendProcessId(): void + { + $frame = new Frame($this->encode(['pid' => \getmypid()]), [], Frame::CONTROL); + $this->sendFrame($frame); + } + + private function haveToPing(): void + { + if ($this->waitingPong || $this->framesSent === 0) { + return; + } + + if ($this->framesSent % 5 === 0) { + $this->shouldPing = true; + } + } +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/WorkerAwareInterface.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/WorkerAwareInterface.php new file mode 100644 index 0000000..bf2b84e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/WorkerAwareInterface.php @@ -0,0 +1,13 @@ + + * $worker->error('Something Went Wrong'); + * + * + * @throws RoadRunnerException + */ + public function error(string $error): void; + + /** + * Terminate the process. Server must automatically pass task to the next + * available process. Worker will receive stop command after calling this + * method. + * + * Attention, you MUST use continue; after invoking this method to let + * RoadRunner to properly stop worker. + */ + public function stop(): void; + + /** + * @param class-string|null $class + * + * @return bool Returns {@see true} if worker is ready to accept new payload. + */ + public function hasPayload(string $class = null): bool; + + /** + * @param class-string|null $class + * + * @return Payload|null Returns {@see null} if worker is not ready to accept new payload and has no cached payload + * of the given type. + */ + public function getPayload(string $class = null): ?Payload; +} diff --git a/tests/php_test_files/vendor/spiral/roadrunner-worker/src/WorkerPool.php b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/WorkerPool.php new file mode 100644 index 0000000..1d201c8 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/roadrunner-worker/src/WorkerPool.php @@ -0,0 +1,89 @@ +rpc = $rpc->withCodec(new JsonCodec()); + } + + /** + * Add worker to the pool. + * + * @param non-empty-string $plugin + */ + public function addWorker(string $plugin): void + { + $this->rpc->call('informer.AddWorker', $plugin); + } + + /** + * Get the number of workers for the pool. + * + * @param non-empty-string $plugin + */ + public function countWorkers(string $plugin): int + { + return \count($this->getWorkers($plugin)); + } + + /** + * Get the info about running workers for the pool. + * + * @param non-empty-string $plugin + */ + public function getWorkers(string $plugin): Workers + { + /** + * @var array{workers: list} $data + */ + $data = $this->rpc->call('informer.Workers', $plugin); + + return new Workers(\array_map(static function (array $worker): InformerWorker { + return new InformerWorker( + pid: $worker['pid'], + statusCode: $worker['status'], + executions: $worker['numExecs'], + createdAt: $worker['created'], + memoryUsage: $worker['memoryUsage'], + cpuUsage: $worker['CPUPercent'], + command: $worker['command'], + status: $worker['statusStr'], + ); + }, $data['workers'])); + } + + /** + * Remove worker from the pool. + * + * @param non-empty-string $plugin + */ + public function removeWorker(string $plugin): void + { + $this->rpc->call('informer.RemoveWorker', $plugin); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/LICENSE b/tests/php_test_files/vendor/spiral/tokenizer/LICENSE new file mode 100644 index 0000000..80ffcbe --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Spiral Scout + +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. \ No newline at end of file diff --git a/tests/php_test_files/vendor/spiral/tokenizer/README.md b/tests/php_test_files/vendor/spiral/tokenizer/README.md new file mode 100644 index 0000000..51ff6c1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/README.md @@ -0,0 +1,17 @@ +# Static Analysis: Class and Invocation locators + +[![PHP Version Require](https://poser.pugx.org/spiral/tokenizer/require/php)](https://packagist.org/packages/spiral/tokenizer) +[![Latest Stable Version](https://poser.pugx.org/spiral/tokenizer/v/stable)](https://packagist.org/packages/spiral/tokenizer) +[![phpunit](https://github.com/spiral/tokenizer/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/tokenizer/actions) +[![psalm](https://github.com/spiral/tokenizer/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/tokenizer/actions) +[![Codecov](https://codecov.io/gh/spiral/tokenizer/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral/tokenizer/) +[![Total Downloads](https://poser.pugx.org/spiral/tokenizer/downloads)](https://packagist.org/packages/spiral/tokenizer) +[![type-coverage](https://shepherd.dev/github/spiral/tokenizer/coverage.svg)](https://shepherd.dev/github/spiral/tokenizer) +[![psalm-level](https://shepherd.dev/github/spiral/tokenizer/level.svg)](https://shepherd.dev/github/spiral/tokenizer) + + +[Documentation](https://spiral.dev/docs/component-tokenizer) | [Framework Bundle](https://github.com/spiral/framework) + +## License: + +MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). diff --git a/tests/php_test_files/vendor/spiral/tokenizer/composer.json b/tests/php_test_files/vendor/spiral/tokenizer/composer.json new file mode 100644 index 0000000..541fb03 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/composer.json @@ -0,0 +1,64 @@ +{ + "name": "spiral/tokenizer", + "type": "library", + "description": "Static Analysis: Class and Invocation locators", + "license": "MIT", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/tokenizer" + }, + "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" + } + ], + "require": { + "php": ">=8.1", + "ext-tokenizer": "*", + "spiral/core": "^3.13", + "spiral/logger": "^3.13", + "symfony/finder": "^5.3.7 || ^6.0 || ^7.0" + }, + "require-dev": { + "mockery/mockery": "^1.6", + "spiral/attributes": "^2.8|^3.0", + "spiral/boot": "^3.13", + "spiral/files": "^3.13", + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "^5.9" + }, + "autoload": { + "psr-4": { + "Spiral\\Tokenizer\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spiral\\Tests\\Tokenizer\\": "tests" + } + }, + "extra": { + "branch-alias": { + "dev-master": "3.13.x-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/psalm.xml b/tests/php_test_files/vendor/spiral/tokenizer/psalm.xml new file mode 100644 index 0000000..3f2636b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/psalm.xml @@ -0,0 +1,20 @@ + + + + + + diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/AbstractLocator.php b/tests/php_test_files/vendor/spiral/tokenizer/src/AbstractLocator.php new file mode 100644 index 0000000..27b2dbb --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/AbstractLocator.php @@ -0,0 +1,146 @@ + + */ + protected function availableReflections(): \Generator + { + foreach ($this->finder->getIterator() as $file) { + $reflection = new ReflectionFile((string)$file); + + if ($reflection->hasIncludes()) { + // We are not analyzing files which has includes, it's not safe to require such reflections + if ($this->debug) { + $this->getLogger()->warning( + \sprintf('File `%s` has includes and excluded from analysis', (string) $file), + ['file' => $file] + ); + } + + continue; + } + + yield $reflection; + } + } + + /** + * Safely get class reflection, class loading errors will be blocked and reflection will be + * excluded from analysis. + * + * @template T + * @param class-string $class + * @return \ReflectionClass + * + * @throws LocatorException + */ + protected function classReflection(string $class): \ReflectionClass + { + $loader = static function ($class) { + if ($class === LocatorException::class) { + return; + } + + throw new LocatorException(\sprintf("Class '%s' can not be loaded", $class)); + }; + + //To suspend class dependency exception + \spl_autoload_register($loader); + + try { + //In some cases reflection can thrown an exception if class invalid or can not be loaded, + //we are going to handle such exception and convert it soft exception + return new \ReflectionClass($class); + } catch (\Throwable $e) { + if ($e instanceof LocatorException && $e->getPrevious() != null) { + $e = $e->getPrevious(); + } + + if ($this->debug) { + $this->getLogger()->error( + \sprintf('%s: %s in %s:%s', $class, $e->getMessage(), $e->getFile(), $e->getLine()), + ['error' => $e] + ); + } + + throw new LocatorException($e->getMessage(), (int) $e->getCode(), $e); + } finally { + \spl_autoload_unregister($loader); + } + } + + /** + * Safely get enum reflection, class loading errors will be blocked and reflection will be + * excluded from analysis. + * + * @param class-string $enum + * + * @throws LocatorException + */ + protected function enumReflection(string $enum): \ReflectionEnum + { + $loader = static function (string $enum): void { + if ($enum === LocatorException::class) { + return; + } + + throw new LocatorException(\sprintf("Enum '%s' can not be loaded", $enum)); + }; + + //To suspend class dependency exception + \spl_autoload_register($loader); + + try { + //In some enum reflection can thrown an exception if enum invalid or can not be loaded, + //we are going to handle such exception and convert it soft exception + return new \ReflectionEnum($enum); + } catch (\Throwable $e) { + if ($e instanceof LocatorException && $e->getPrevious() != null) { + $e = $e->getPrevious(); + } + + if ($this->debug) { + $this->getLogger()->error( + \sprintf('%s: %s in %s:%s', $enum, $e->getMessage(), $e->getFile(), $e->getLine()), + ['error' => $e] + ); + } + + throw new LocatorException($e->getMessage(), (int) $e->getCode(), $e); + } finally { + \spl_autoload_unregister($loader); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/AbstractTarget.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/AbstractTarget.php new file mode 100644 index 0000000..0863ff5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/AbstractTarget.php @@ -0,0 +1,41 @@ + + */ + abstract public function filter(array $classes): \Iterator; + + /** + * Get scope for class locator. If scope is not set, all classes will be listened. + * @return non-empty-string|null + */ + public function getScope(): ?string + { + return $this->scope; + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/TargetAttribute.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/TargetAttribute.php new file mode 100644 index 0000000..a39e3a6 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/TargetAttribute.php @@ -0,0 +1,133 @@ +attribute); + $attribute = $target->getAttributes(\Attribute::class)[0] ?? null; + + // If annotations are used, we need to use the annotation reader also + // It will slow down the process a bit, but it will allow us to use annotations + /** @psalm-suppress InternalClass */ + $reader = $this->useAnnotations + ? (new Factory())->create() + : new AttributeReader($this->namedArguments ? new NamedArgumentsInstantiator() : null); + + if ($attribute === null) { + return; + } + + $attribute = $attribute->newInstance(); + + foreach ($classes as $class) { + // If attribute is defined on class level and class has target attribute + // then we can add it to the list of classes + if ($attribute->flags & \Attribute::TARGET_CLASS) { + if ($reader->firstClassMetadata($class, $target->getName())) { + yield $class->getName(); + continue; + } + + if ($this->scanParents) { + // Interfaces + foreach ($class->getInterfaces() as $interface) { + if ($reader->firstClassMetadata($interface, $target->getName())) { + yield $class->getName(); + continue 2; + } + } + + // Parents + $parent = $class->getParentClass(); + while ($parent !== false) { + if ($reader->firstClassMetadata($parent, $target->getName())) { + yield $class->getName(); + continue 2; + } + $parent = $parent->getParentClass(); + } + } + } + + // If attribute is defined on method level and class methods has target attribute + // then we can add it to the list of classes + if ($attribute->flags & \Attribute::TARGET_METHOD) { + foreach ($class->getMethods() as $method) { + if ($reader->firstFunctionMetadata($method, $target->getName())) { + yield $class->getName(); + continue 2; + } + } + } + + // If attribute is defined on property level and class properties has target attribute + // then we can add it to the list of classes + if ($attribute->flags & \Attribute::TARGET_PROPERTY) { + foreach ($class->getProperties() as $property) { + if ($reader->firstPropertyMetadata($property, $target->getName())) { + yield $class->getName(); + continue 2; + } + } + } + + + // If attribute is defined on constant level and class constants has target attribute + // then we can add it to the list of classes + if ($attribute->flags & \Attribute::TARGET_CLASS_CONSTANT) { + foreach ($class->getReflectionConstants() as $constant) { + if ($reader->firstConstantMetadata($constant, $target->getName())) { + yield $class->getName(); + continue 2; + } + } + } + + + // If attribute is defined on method parameters level and class method parameter has target attribute + // then we can add it to the list of classes + if ($attribute->flags & \Attribute::TARGET_PARAMETER) { + foreach ($class->getMethods() as $method) { + foreach ($method->getParameters() as $parameter) { + if ($reader->firstParameterMetadata($parameter, $target->getName())) { + yield $class->getName(); + continue 3; + } + } + } + } + } + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/TargetClass.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/TargetClass.php new file mode 100644 index 0000000..4126d17 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Attribute/TargetClass.php @@ -0,0 +1,50 @@ +class); + + foreach ($classes as $class) { + if (!$target->isTrait()) { + if ($class->isSubclassOf($target) || $class->getName() === $target->getName()) { + yield $class->getName(); + } + + continue; + } + + // Checking using traits + if (\in_array($target->getName(), $this->fetchTraits($class->getName()), true)) { + yield $class->getName(); + } + } + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Bootloader/TokenizerBootloader.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Bootloader/TokenizerBootloader.php new file mode 100644 index 0000000..09a362e --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Bootloader/TokenizerBootloader.php @@ -0,0 +1,141 @@ + ScopedClassLocator::class, + ScopedEnumsInterface::class => ScopedEnumLocator::class, + ScopedInterfacesInterface::class => ScopedInterfaceLocator::class, + ClassesInterface::class => ClassLocator::class, + EnumsInterface::class => EnumLocator::class, + InterfacesInterface::class => InterfaceLocator::class, + InvocationsInterface::class => InvocationLocator::class, + ]; + + public function __construct( + private readonly ConfiguratorInterface $config, + ) { + } + + public function init(BinderInterface $binder, DirectoriesInterface $dirs, EnvironmentInterface $env): void + { + $binder->bindInjector(ClassLocator::class, ClassLocatorInjector::class); + $binder->bindInjector(EnumLocator::class, EnumLocatorInjector::class); + $binder->bindInjector(InterfaceLocator::class, InterfaceLocatorInjector::class); + $binder->bindInjector(InvocationLocator::class, InvocationLocatorInjector::class); + + $this->config->setDefaults( + TokenizerConfig::CONFIG, + [ + 'debug' => false, + 'directories' => [$dirs->get('app')], + 'exclude' => [ + $dirs->get('resources'), + $dirs->get('config'), + 'tests', + 'migrations', + ], + 'cache' => [ + 'directory' => $dirs->get('runtime') . 'cache/listeners', + 'enabled' => \filter_var($env->get('TOKENIZER_CACHE_TARGETS', false), \FILTER_VALIDATE_BOOL), + ], + 'load' => [ + 'classes' => \filter_var($env->get('TOKENIZER_LOAD_CLASSES', true), \FILTER_VALIDATE_BOOL), + 'enums' => \filter_var($env->get('TOKENIZER_LOAD_ENUMS', false), \FILTER_VALIDATE_BOOL), + 'interfaces' => \filter_var($env->get('TOKENIZER_LOAD_INTERFACES', false), \FILTER_VALIDATE_BOOL), + ], + ], + ); + } + + /** + * Add directory for indexation. + */ + public function addDirectory(string $directory): void + { + $this->config->modify( + TokenizerConfig::CONFIG, + new Append('directories', null, $directory), + ); + } + + /** + * Add directory for indexation into specific scope. + * @param non-empty-string $scope + * @param non-empty-string $directory + */ + public function addScopedDirectory(string $scope, string $directory): void + { + $this->ensureScopeExists($scope, 'directories'); + + $this->config->modify( + TokenizerConfig::CONFIG, + new Append('scopes.' . $scope . '.directories', null, $directory), + ); + } + + /** + * Exclude directory from indexation in specific scope. + * @param non-empty-string $scope + * @param non-empty-string $directory + */ + public function excludeScopedDirectory(string $scope, string $directory): void + { + $this->ensureScopeExists($scope, 'exclude'); + + $this->config->modify( + TokenizerConfig::CONFIG, + new Append('scopes.' . $scope . '.exclude', null, $directory), + ); + } + + private function ensureScopeExists(string $scope, string $section): void + { + if (!isset($this->config->getConfig(TokenizerConfig::CONFIG)['scopes'])) { + $this->config->modify( + TokenizerConfig::CONFIG, + new Set('scopes', []), + ); + } + + if (!isset($this->config->getConfig(TokenizerConfig::CONFIG)['scopes'][$scope])) { + $this->config->modify( + TokenizerConfig::CONFIG, + new Append('scopes', $scope, [$section => []]), + ); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Bootloader/TokenizerListenerBootloader.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Bootloader/TokenizerListenerBootloader.php new file mode 100644 index 0000000..f59b6c7 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Bootloader/TokenizerListenerBootloader.php @@ -0,0 +1,201 @@ + self::class, + ClassesLoaderInterface::class => [self::class, 'initCachedClassesLoader'], + EnumsLoaderInterface::class => [self::class, 'initCachedEnumsLoader'], + InterfacesLoaderInterface::class => [self::class, 'initCachedInterfacesLoader'], + ]; + + /** @var TokenizationListenerInterface[] */ + private array $listeners = []; + + /** @var array> */ + private array $listenerClasses = []; + + public function addListener(TokenizationListenerInterface $listener): void + { + $this->listeners[] = $listener; + $this->listenerClasses[] = $listener::class; + } + + public function init(AbstractKernel $kernel): void + { + $kernel->booting($this->loadClasses(...)); + $kernel->booting($this->loadEnums(...)); + $kernel->booting($this->loadInterfaces(...)); + $kernel->booting($this->finalizeListeners(...)); + + $kernel->booted($this->loadClasses(...)); + $kernel->booted($this->loadEnums(...)); + $kernel->booted($this->loadInterfaces(...)); + $kernel->booted($this->finalizeListeners(...)); + } + + public function initCachedClassesLoader( + FactoryInterface $factory, + TokenizerConfig $config, + ): ClassesLoaderInterface { + return $this->makeCachedLoader($factory, $config, CachedClassesLoader::class); + } + + public function initCachedEnumsLoader( + FactoryInterface $factory, + TokenizerConfig $config, + ): EnumsLoaderInterface { + return $this->makeCachedLoader($factory, $config, CachedEnumsLoader::class); + } + + public function initCachedInterfacesLoader( + FactoryInterface $factory, + TokenizerConfig $config, + ): InterfacesLoaderInterface { + return $this->makeCachedLoader($factory, $config, CachedInterfacesLoader::class); + } + + /** + * @return array> + */ + public function getListenerClasses(): array + { + return $this->listenerClasses; + } + + /** + * @template T + * + * @param class-string $classLoader + * + * @return T + */ + private function makeCachedLoader( + FactoryInterface $factory, + TokenizerConfig $config, + string $classLoader, + ): mixed { + // We will use a file memory to cache the classes/enums/interfaces. Because it's available in the runtime. + // If you want to disable the read cache, you can use the TOKENIZER_CACHE_TARGETS environment variable. + // In this case the classes/enums/interfaces will be stored in a cache on every bootstrap, + // but not read from there. + return $factory->make($classLoader, [ + 'memory' => $factory->make(Memory::class, [ + 'directory' => $config->getCacheDirectory(), + ]), + 'readCache' => $config->isCacheEnabled(), + ]); + } + + private function loadClasses( + TokenizerConfig $config, + ClassesInterface $classes, + ClassesLoaderInterface $loader, + ListenerInvoker $invoker, + ): void { + if ($config->isLoadClassesEnabled()) { + $this->loadReflections($invoker, $classes->getClasses(...), $loader->loadClasses(...)); + } + } + + private function loadEnums( + TokenizerConfig $config, + EnumsInterface $enums, + EnumsLoaderInterface $loader, + ListenerInvoker $invoker, + ): void { + if ($config->isLoadEnumsEnabled()) { + $this->loadReflections($invoker, $enums->getEnums(...), $loader->loadEnums(...)); + } + } + + private function loadInterfaces( + TokenizerConfig $config, + InterfacesInterface $interfaces, + InterfacesLoaderInterface $loader, + ListenerInvoker $invoker, + ): void { + if ($config->isLoadInterfacesEnabled()) { + $this->loadReflections($invoker, $interfaces->getInterfaces(...), $loader->loadInterfaces(...)); + } + } + + /** + * @param callable(): array $reflections + * @param callable(TokenizationListenerInterface): bool $loader + */ + private function loadReflections( + ListenerInvoker $invoker, + callable $reflections, + callable $loader, + ): void { + $listeners = $this->listeners; + + // First, we check if the listener has been cached. If it has, we will load the classes/enums/interfaces + // from the cache. + foreach ($listeners as $i => $listener) { + if ($loader($listener)) { + unset($listeners[$i]); + } + } + + // If there are no listeners left, we don't need to use static analysis at all and save + // valuable time. + if ($listeners === []) { + return; + } + + // If there are listeners left, we will use static analysis to find the classes/enums/interfaces. + // Please note that this is a very expensive operation and should be avoided if possible. + // Use #[TargetClass] or #[TargetAttribute] attributes in your listeners to cache the classes/enums/interfaces. + $classes = $reflections(); + foreach ($listeners as $listener) { + $invoker->invoke($listener, $classes); + } + } + + private function finalizeListeners(): void + { + foreach ($this->listeners as $listener) { + $listener->finalize(); + } + // We don't need the listeners anymore, so we will clear them from memory. + $this->listeners = []; + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/ClassLocator.php b/tests/php_test_files/vendor/spiral/tokenizer/src/ClassLocator.php new file mode 100644 index 0000000..38bfb48 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/ClassLocator.php @@ -0,0 +1,80 @@ +availableClasses() as $class) { + try { + $reflection = $this->classReflection($class); + } catch (LocatorException $e) { + if ($this->debug) { + throw $e; + } + + //Ignoring + continue; + } + + if (!$this->isTargeted($reflection, $target) || $reflection->isInterface()) { + continue; + } + + $result[$reflection->getName()] = $reflection; + } + + return $result; + } + + /** + * Classes available in finder scope. + * + * @return class-string[] + */ + protected function availableClasses(): array + { + $classes = []; + + foreach ($this->availableReflections() as $reflection) { + $classes = \array_merge($classes, $reflection->getClasses()); + } + + return $classes; + } + + /** + * Check if given class targeted by locator. + * + * @param \ReflectionClass|null $target + */ + protected function isTargeted(\ReflectionClass $class, \ReflectionClass $target = null): bool + { + if (empty($target)) { + return true; + } + + if (!$target->isTrait()) { + //Target is interface or class + return $class->isSubclassOf($target) || $class->getName() === $target->getName(); + } + + // Checking using traits + return \in_array($target->getName(), $this->fetchTraits($class->getName())); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/ClassLocatorInjector.php b/tests/php_test_files/vendor/spiral/tokenizer/src/ClassLocatorInjector.php new file mode 100644 index 0000000..72c3522 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/ClassLocatorInjector.php @@ -0,0 +1,31 @@ + + */ +final class ClassLocatorInjector implements InjectorInterface +{ + public function __construct( + private readonly Tokenizer $tokenizer + ) { + } + + /** + * @throws InjectionException + */ + public function createInjection( + \ReflectionClass $class, + string $context = null + ): ClassesInterface { + return $this->tokenizer->classLocator(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/ClassesInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/ClassesInterface.php new file mode 100644 index 0000000..081beb1 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/ClassesInterface.php @@ -0,0 +1,25 @@ + + */ + public function getClasses(object|string|null $target = null): array; +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Config/TokenizerConfig.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Config/TokenizerConfig.php new file mode 100644 index 0000000..1216064 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Config/TokenizerConfig.php @@ -0,0 +1,122 @@ + + * + * @psalm-type TScope = array{ + * "directories": TDirectories, + * "exclude": TDirectories + * } + */ +final class TokenizerConfig extends InjectableConfig +{ + public const CONFIG = 'tokenizer'; + + /** + * @var array{ + * cache: array{directory: null, enabled: bool}, + * load: array{classes:bool, enums: bool, interfaces: bool}, + * debug: bool, + * directories: TDirectories, + * exclude: TDirectories, + * scopes: array + * } + */ + protected array $config = [ + 'cache' => [ + 'directory' => null, + 'enabled' => false, + ], + 'load' => [ + 'classes' => true, + 'enums' => false, + 'interfaces' => false, + ], + 'debug' => false, + 'directories' => [], + 'exclude' => [], + 'scopes' => [], + ]; + + public function isDebug(): bool + { + return (bool)($this->config['debug'] ?? false); + } + + /** + * @return TDirectories + */ + public function getDirectories(): array + { + return $this->config['directories'] ?? [(string)\getcwd()]; + } + + /** + * @return TDirectories + */ + public function getExcludes(): array + { + return $this->config['exclude'] ?? ['vendor', 'tests']; + } + + /** + * @return TScope + */ + public function getScope(string $scope): array + { + $directories = $this->config['scopes'][$scope]['directories'] ?? $this->getDirectories(); + $excludes = $this->config['scopes'][$scope]['exclude'] ?? $this->getExcludes(); + + return [ + 'directories' => $directories, + 'exclude' => $excludes, + ]; + } + + public function getScopes(): array + { + return $this->config['scopes'] ?? []; + } + + /** + * Check if tokenizer listeners cache is enabled. + */ + public function isCacheEnabled(): bool + { + return (bool)($this->config['cache']['enabled'] ?? false); + } + + /** + * Get tokenizer listeners cache directory. + */ + public function getCacheDirectory(): ?string + { + $dir = $this->config['cache']['directory'] ?? null; + \assert(\is_string($dir) || $dir === null, 'Invalid cache directory.'); + + return $dir; + } + + public function isLoadClassesEnabled(): bool + { + return (bool)($this->config['load']['classes'] ?? true); + } + + public function isLoadEnumsEnabled(): bool + { + return (bool)($this->config['load']['enums'] ?? false); + } + + public function isLoadInterfacesEnabled(): bool + { + return (bool)($this->config['load']['interfaces'] ?? false); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/EnumLocator.php b/tests/php_test_files/vendor/spiral/tokenizer/src/EnumLocator.php new file mode 100644 index 0000000..cae344c --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/EnumLocator.php @@ -0,0 +1,81 @@ +availableEnums() as $enum) { + try { + $reflection = $this->enumReflection($enum); + } catch (LocatorException $e) { + if ($this->debug) { + throw $e; + } + + //Ignoring + continue; + } + + if (!$this->isTargeted($reflection, $target) || $reflection->isInterface()) { + continue; + } + + $result[$reflection->getName()] = $reflection; + } + + return $result; + } + + /** + * Enums available in finder scope. + * + * @return class-string[] + */ + protected function availableEnums(): array + { + $enums = []; + + foreach ($this->availableReflections() as $reflection) { + $enums = \array_merge($enums, $reflection->getEnums()); + } + + return $enums; + } + + /** + * Check if given enum targeted by locator. + * + * @param \ReflectionClass|null $target + */ + protected function isTargeted(\ReflectionEnum $enum, \ReflectionClass $target = null): bool + { + if ($target === null) { + return true; + } + + if (!$target->isTrait()) { + //Target is interface or class + /** @psalm-suppress RedundantCondition https://github.com/vimeo/psalm/issues/9489 */ + return $enum->isSubclassOf($target) || $enum->getName() === $target->getName(); + } + + // Checking using traits + return \in_array($target->getName(), $this->fetchTraits($enum->getName())); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/EnumLocatorInjector.php b/tests/php_test_files/vendor/spiral/tokenizer/src/EnumLocatorInjector.php new file mode 100644 index 0000000..c830014 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/EnumLocatorInjector.php @@ -0,0 +1,31 @@ + + */ +final class EnumLocatorInjector implements InjectorInterface +{ + public function __construct( + private readonly Tokenizer $tokenizer + ) { + } + + /** + * @throws InjectionException + */ + public function createInjection( + \ReflectionClass $class, + string $context = null + ): EnumsInterface { + return $this->tokenizer->enumLocator(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/EnumsInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/EnumsInterface.php new file mode 100644 index 0000000..60b876b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/EnumsInterface.php @@ -0,0 +1,24 @@ + + */ + public function getEnums(object|string|null $target = null): array; +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Exception/LocatorException.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Exception/LocatorException.php new file mode 100644 index 0000000..220b803 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Exception/LocatorException.php @@ -0,0 +1,12 @@ +availableInterfaces() as $interface) { + try { + $reflection = $this->classReflection($interface); + } catch (LocatorException $e) { + if ($this->debug) { + throw $e; + } + + //Ignoring + continue; + } + + if (!$this->isTargeted($reflection, $target)) { + continue; + } + + $result[$reflection->getName()] = $reflection; + } + + return $result; + } + + /** + * Classes available in finder scope. + * + * @return class-string[] + */ + protected function availableInterfaces(): array + { + $interfaces = []; + + foreach ($this->availableReflections() as $reflection) { + $interfaces = \array_merge($interfaces, $reflection->getInterfaces()); + } + + return $interfaces; + } + + /** + * Check if given class targeted by locator. + * + * @param \ReflectionClass|null $target + */ + protected function isTargeted(\ReflectionClass $class, \ReflectionClass $target = null): bool + { + if (empty($target)) { + return true; + } + + return $class->isSubclassOf($target) || $class->getName() === $target->getName(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/InterfaceLocatorInjector.php b/tests/php_test_files/vendor/spiral/tokenizer/src/InterfaceLocatorInjector.php new file mode 100644 index 0000000..f6aa3f7 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/InterfaceLocatorInjector.php @@ -0,0 +1,31 @@ + + */ +final class InterfaceLocatorInjector implements InjectorInterface +{ + public function __construct( + private readonly Tokenizer $tokenizer + ) { + } + + /** + * @throws InjectionException + */ + public function createInjection( + \ReflectionClass $class, + string $context = null + ): InterfacesInterface { + return $this->tokenizer->interfaceLocator(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/InterfacesInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/InterfacesInterface.php new file mode 100644 index 0000000..a010b09 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/InterfacesInterface.php @@ -0,0 +1,25 @@ + + */ + public function getInterfaces(string|null $target = null): array; +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationLocator.php b/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationLocator.php new file mode 100644 index 0000000..b642bb5 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationLocator.php @@ -0,0 +1,84 @@ +availableInvocations($function->getName()) as $invocation) { + if ($this->isTargeted($invocation, $function)) { + $result[] = $invocation; + } + } + + return $result; + } + + /** + * Invocations available in finder scope. + * + * @param string $signature Method or function signature (name), for pre-filtering. + * @return \Generator + */ + protected function availableInvocations(string $signature = ''): \Generator + { + $signature = \strtolower(\trim($signature, '\\')); + foreach ($this->availableReflections() as $reflection) { + foreach ($reflection->getInvocations() as $invocation) { + if ( + !empty($signature) + && \strtolower(\trim($invocation->getName(), '\\')) !== $signature + ) { + continue; + } + + yield $invocation; + } + } + } + + protected function isTargeted(ReflectionInvocation $invocation, \ReflectionFunctionAbstract $function): bool + { + if ($function instanceof \ReflectionFunction) { + return !$invocation->isMethod(); + } + + try { + $reflection = $this->classReflection($invocation->getClass()); + } catch (LocatorException $e) { + if ($this->debug) { + throw $e; + } + + return false; + } + + /** + * @var \ReflectionMethod $function + */ + $target = $function->getDeclaringClass(); + + if ($target->isTrait()) { + //Let's compare traits + return \in_array($target->getName(), $this->fetchTraits($invocation->getClass())); + } + + /** @psalm-suppress RedundantCondition https://github.com/vimeo/psalm/issues/9489 */ + return $reflection->getName() == $target->getName() || $reflection->isSubclassOf($target); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationLocatorInjector.php b/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationLocatorInjector.php new file mode 100644 index 0000000..485fa98 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationLocatorInjector.php @@ -0,0 +1,31 @@ + + */ +final class InvocationLocatorInjector implements InjectorInterface +{ + public function __construct( + private readonly Tokenizer $tokenizer + ) { + } + + /** + * @throws InjectionException + */ + public function createInjection( + \ReflectionClass $class, + string $context = null + ): InvocationsInterface { + return $this->tokenizer->invocationLocator(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationsInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationsInterface.php new file mode 100644 index 0000000..77dee49 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/InvocationsInterface.php @@ -0,0 +1,22 @@ +method, self::method, static::method, or ClassName::method. + */ +interface InvocationsInterface +{ + /** + * Find all possible invocations of given function or method. Make sure you know about location + * limitations. + * + * @return ReflectionInvocation[] + */ + public function getInvocations(\ReflectionFunctionAbstract $function): array; +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/AbstractCachedLoader.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/AbstractCachedLoader.php new file mode 100644 index 0000000..34c225f --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/AbstractCachedLoader.php @@ -0,0 +1,63 @@ +parseAttributes($listener)); + + // If there are no targets, then listener can't be cached. + if ($targets === []) { + return false; + } + + $names = []; + + // We decided to load classes/enums/interfaces for each target separately. + // It allows us to cache classes/enums/interfaces for each target separately and if we reuse the + // same target in multiple listeners, we will not have to load classes/enums/interfaces for the same target. + foreach ($targets as $target) { + $cacheKey = $this->cacheKeyPrefix . $target; + + $classes = $this->readCache ? $this->memory->loadData($cacheKey) : null; + if ($classes === null) { + $this->memory->saveData($cacheKey, $classes = call_user_func($locator, $target)); + } + + $names = \array_merge($names, $classes); + } + + $this->invoker->invoke($listener, \array_map($reflectionBuilder, \array_unique($names))); + + return true; + } + + private function parseAttributes(TokenizationListenerInterface $listener): \Generator + { + $listener = new \ReflectionClass($listener); + + yield from $this->reader->getClassMetadata($listener, AbstractTarget::class); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedClassesLoader.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedClassesLoader.php new file mode 100644 index 0000000..7584d6b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedClassesLoader.php @@ -0,0 +1,31 @@ +doLoad( + $listener, + $this->locator->getClasses(...), + static fn (string $class) => new \ReflectionClass($class), + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedEnumsLoader.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedEnumsLoader.php new file mode 100644 index 0000000..4f92fda --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedEnumsLoader.php @@ -0,0 +1,33 @@ +doLoad( + $listener, + $this->locator->getEnums(...), + static fn (string $enum) => new \ReflectionEnum($enum), + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedInterfacesLoader.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedInterfacesLoader.php new file mode 100644 index 0000000..957b1ec --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/CachedInterfacesLoader.php @@ -0,0 +1,33 @@ +doLoad( + $listener, + $this->locator->getInterfaces(...), + static fn (string $class) => new \ReflectionClass($class), + ); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/ClassLocatorByTarget.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/ClassLocatorByTarget.php new file mode 100644 index 0000000..0987681 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/ClassLocatorByTarget.php @@ -0,0 +1,46 @@ +filter( + $this->findClasses($target), + ), + ); + } + + /** + * @return \ReflectionClass[] + */ + private function findClasses(AbstractTarget $target): array + { + $scope = $target->getScope(); + + // If scope for listener attribute is defined, we should use scoped class locator + return $scope !== null + ? $this->scopedClasses->getScopedClasses($scope) + : $this->classes->getClasses(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/ClassesLoaderInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/ClassesLoaderInterface.php new file mode 100644 index 0000000..200d7d0 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/ClassesLoaderInterface.php @@ -0,0 +1,17 @@ +filter( + $this->findEnums($target), + ), + ); + } + + /** + * @return \ReflectionEnum[] + */ + private function findEnums(AbstractTarget $target): array + { + $scope = $target->getScope(); + + // If scope for listener attribute is defined, we should use scoped class locator + return $scope !== null + ? $this->scopedEnums->getScopedEnums($scope) + : $this->enums->getEnums(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/EnumsLoaderInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/EnumsLoaderInterface.php new file mode 100644 index 0000000..3f1d013 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/EnumsLoaderInterface.php @@ -0,0 +1,17 @@ +filter( + $this->findInterfaces($target), + ), + ); + } + + /** + * @return \ReflectionClass[] + */ + private function findInterfaces(AbstractTarget $target): array + { + $scope = $target->getScope(); + + // If scope for listener attribute is defined, we should use scoped class locator + return $scope !== null + ? $this->scopedInterfaces->getScopedInterfaces($scope) + : $this->interfaces->getInterfaces(); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/InterfacesLoaderInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/InterfacesLoaderInterface.php new file mode 100644 index 0000000..5268939 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Listener/InterfacesLoaderInterface.php @@ -0,0 +1,17 @@ + $classes + */ + public function invoke(TokenizationListenerInterface $listener, iterable $classes): void + { + foreach ($classes as $class) { + $listener->listen($class); + } + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionArgument.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionArgument.php new file mode 100644 index 0000000..e165a96 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionArgument.php @@ -0,0 +1,140 @@ +type; + } + + public function getValue(): string + { + return $this->value; + } + + /** + * Convert argument value into valid string. Can be applied only for STRING type arguments. + * + * @throws ReflectionException When value can not be converted into string. + */ + public function stringValue(): string + { + if ($this->type !== self::STRING) { + throw new ReflectionException( + \sprintf("Unable to represent value as string, value type is '%s'", $this->type) + ); + } + + //The most reliable way + return eval("return {$this->value};"); + } + + /** + * Create Argument reflections based on provided set of tokens (fetched from invoke). + * + * @return self[] + */ + public static function locateArguments(array $tokens): array + { + $definition = null; + $level = 0; + + $result = []; + foreach ($tokens as $token) { + if ($token[ReflectionFile::TOKEN_TYPE] === T_WHITESPACE) { + continue; + } + + if (empty($definition)) { + $definition = ['type' => self::EXPRESSION, 'value' => '', 'tokens' => []]; + } + + if ($token[ReflectionFile::TOKEN_TYPE] === '(' || $token[ReflectionFile::TOKEN_TYPE] === '[') { + ++$level; + $definition['value'] .= $token[ReflectionFile::TOKEN_CODE]; + continue; + } + + if ($token[ReflectionFile::TOKEN_TYPE] === ')' || $token[ReflectionFile::TOKEN_TYPE] === ']') { + --$level; + $definition['value'] .= $token[ReflectionFile::TOKEN_CODE]; + continue; + } + + if ($level) { + $definition['value'] .= $token[ReflectionFile::TOKEN_CODE]; + continue; + } + + if ($token[ReflectionFile::TOKEN_TYPE] === ',') { + $result[] = self::createArgument($definition); + $definition = null; + continue; + } + + $definition['tokens'][] = $token; + $definition['value'] .= $token[ReflectionFile::TOKEN_CODE]; + } + + //Last argument + if (\is_array($definition)) { + $definition = self::createArgument($definition); + if (!empty($definition->getType())) { + $result[] = $definition; + } + } + + return $result; + } + + /** + * Create Argument reflection using token definition. Internal method. + * + * @param array{value: string, tokens: array, type: string} $definition + * @see locateArguments + */ + private static function createArgument(array $definition): ReflectionArgument + { + $result = new static(self::EXPRESSION, $definition['value']); + + if (\count($definition['tokens']) == 1) { + $result->type = match ($definition['tokens'][0][0]) { + T_VARIABLE => self::VARIABLE, + T_LNUMBER, T_DNUMBER => self::CONSTANT, + T_CONSTANT_ENCAPSED_STRING => self::STRING, + default => $result->type + }; + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionFile.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionFile.php new file mode 100644 index 0000000..6d98599 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionFile.php @@ -0,0 +1,722 @@ +tokens = Tokenizer::getTokens($filename); + $this->countTokens = \count($this->tokens); + + //Looking for declarations + $this->locateDeclarations(); + } + + /** + * Filename. + */ + public function getFilename(): string + { + return $this->filename; + } + + /** + * List of declared function names + */ + public function getFunctions(): array + { + return \array_keys($this->functions); + } + + /** + * List of declared class names + */ + public function getClasses(): array + { + if (!isset($this->declarations['T_CLASS'])) { + return []; + } + + return \array_keys($this->declarations['T_CLASS']); + } + + /** + * List of declared enums names + */ + public function getEnums(): array + { + if (!isset($this->declarations['T_ENUM'])) { + return []; + } + + return \array_keys($this->declarations['T_ENUM']); + } + + /** + * List of declared trait names + */ + public function getTraits(): array + { + if (!isset($this->declarations['T_TRAIT'])) { + return []; + } + + return \array_keys($this->declarations['T_TRAIT']); + } + + /** + * List of declared interface names + */ + public function getInterfaces(): array + { + if (!isset($this->declarations['T_INTERFACE'])) { + return []; + } + + return \array_keys($this->declarations['T_INTERFACE']); + } + + /** + * Get list of tokens associated with given file. + */ + public function getTokens(): array + { + return $this->tokens; + } + + /** + * Indication that file contains require/include statements + */ + public function hasIncludes(): bool + { + return $this->hasIncludes; + } + + /** + * Locate and return list of every method or function call in specified file. Only static and + * $this calls will be indexed + * + * @return ReflectionInvocation[] + */ + public function getInvocations(): array + { + if (empty($this->invocations)) { + $this->locateInvocations($this->getTokens()); + } + + return $this->invocations; + } + + /** + * Export found declaration as array for caching purposes. + */ + public function exportSchema(): array + { + return [$this->hasIncludes, $this->declarations, $this->functions, $this->namespaces]; + } + + /** + * Import cached reflection schema. + */ + protected function importSchema(array $cache) + { + [$this->hasIncludes, $this->declarations, $this->functions, $this->namespaces] = $cache; + } + + /** + * Locate every class, interface, trait or function definition. + */ + protected function locateDeclarations() + { + foreach ($this->getTokens() as $tokenID => $token) { + if (!\in_array($token[self::TOKEN_TYPE], self::$processTokens)) { + continue; + } + + switch ($token[self::TOKEN_TYPE]) { + case T_NAMESPACE: + $this->registerNamespace($tokenID); + break; + + case T_USE: + $this->registerUse($tokenID); + break; + + case T_FUNCTION: + $this->registerFunction($tokenID); + break; + + case T_CLASS: + case T_TRAIT: + case T_INTERFACE: + case T_ENUM: + if ($this->isClassNameConst($tokenID)) { + // PHP5.5 ClassName::class constant + continue 2; + } + + if ($this->isAnonymousClass($tokenID)) { + // PHP7.0 Anonymous classes new class ('foo', 'bar') + continue 2; + } + + if (!$this->isCorrectDeclaration($tokenID)) { + // PHP8.0 Named parameters ->foo(class: 'bar') + continue 2; + } + + $this->registerDeclaration($tokenID, $token[self::TOKEN_TYPE]); + break; + + case T_INCLUDE: + case T_INCLUDE_ONCE: + case T_REQUIRE: + case T_REQUIRE_ONCE: + $this->hasIncludes = true; + } + } + + //Dropping empty namespace + if (isset($this->namespaces[''])) { + $this->namespaces['\\'] = $this->namespaces['']; + unset($this->namespaces['']); + } + } + + /** + * Handle namespace declaration. + */ + private function registerNamespace(int $tokenID): void + { + $namespace = ''; + $localID = $tokenID + 1; + + do { + $token = $this->tokens[$localID++]; + if ($token[self::TOKEN_CODE] === '{') { + break; + } + + $namespace .= $token[self::TOKEN_CODE]; + } while ( + isset($this->tokens[$localID]) + && $this->tokens[$localID][self::TOKEN_CODE] !== '{' + && $this->tokens[$localID][self::TOKEN_CODE] !== ';' + ); + + //Whitespaces + $namespace = \trim($namespace); + + $uses = []; + if (isset($this->namespaces[$namespace])) { + $uses = $this->namespaces[$namespace]; + } + + if ($this->tokens[$localID][self::TOKEN_CODE] === ';') { + $endingID = \count($this->tokens) - 1; + } else { + $endingID = $this->endingToken($tokenID); + } + + $this->namespaces[$namespace] = [ + self::O_TOKEN => $tokenID, + self::C_TOKEN => $endingID, + self::N_USES => $uses, + ]; + } + + /** + * Handle use (import class from another namespace). + */ + private function registerUse(int $tokenID): void + { + $namespace = \rtrim($this->activeNamespace($tokenID), '\\'); + + $class = ''; + $localAlias = null; + for ($localID = $tokenID + 1; $this->tokens[$localID][self::TOKEN_CODE] !== ';'; ++$localID) { + if ($this->tokens[$localID][self::TOKEN_TYPE] == T_AS) { + $localAlias = ''; + continue; + } + + if ($localAlias === null) { + $class .= $this->tokens[$localID][self::TOKEN_CODE]; + } else { + $localAlias .= $this->tokens[$localID][self::TOKEN_CODE]; + } + } + + if (empty($localAlias)) { + $names = explode('\\', $class); + $localAlias = end($names); + } + + $this->namespaces[$namespace][self::N_USES][\trim($localAlias)] = \trim($class); + } + + /** + * Handle function declaration (function creation). + */ + private function registerFunction(int $tokenID): void + { + foreach ($this->declarations as $declarations) { + foreach ($declarations as $location) { + if ($tokenID >= $location[self::O_TOKEN] && $tokenID <= $location[self::C_TOKEN]) { + //We are inside class, function is method + return; + } + } + } + + $localID = $tokenID + 1; + while ($this->tokens[$localID][self::TOKEN_TYPE] !== T_STRING) { + //Fetching function name + ++$localID; + } + + $name = $this->tokens[$localID][self::TOKEN_CODE]; + if (!empty($namespace = $this->activeNamespace($tokenID))) { + $name = $namespace . self::NS_SEPARATOR . $name; + } + + $this->functions[$name] = [ + self::O_TOKEN => $tokenID, + self::C_TOKEN => $this->endingToken($tokenID), + ]; + } + + /** + * Handle declaration of class, trait of interface. Declaration will be stored under it's token + * type in declarations array. + */ + private function registerDeclaration(int $tokenID, int $tokenType): void + { + $localID = $tokenID + 1; + while ($this->tokens[$localID][self::TOKEN_TYPE] !== T_STRING) { + ++$localID; + } + + $name = $this->tokens[$localID][self::TOKEN_CODE]; + if (!empty($namespace = $this->activeNamespace($tokenID))) { + $name = $namespace . self::NS_SEPARATOR . $name; + } + + $this->declarations[\token_name($tokenType)][$name] = [ + self::O_TOKEN => $tokenID, + self::C_TOKEN => $this->endingToken($tokenID), + ]; + } + + /** + * Check if token ID represents `ClassName::class` constant statement. + */ + private function isClassNameConst(int $tokenID): bool + { + return $this->tokens[$tokenID][self::TOKEN_TYPE] === T_CLASS + && isset($this->tokens[$tokenID - 1]) + && $this->tokens[$tokenID - 1][self::TOKEN_TYPE] === T_PAAMAYIM_NEKUDOTAYIM; + } + + /** + * Check if token ID represents anonymous class creation, e.g. `new class ('foo', 'bar')`. + */ + private function isAnonymousClass(int|string $tokenID): bool + { + return $this->tokens[$tokenID][self::TOKEN_TYPE] === T_CLASS + && isset($this->tokens[$tokenID - 2]) + && $this->tokens[$tokenID - 2][self::TOKEN_TYPE] === T_NEW; + } + + /** + * Check if token ID represents named parameter with name `class`, e.g. `foo(class: SomeClass::name)`. + */ + private function isCorrectDeclaration(int|string $tokenID): bool + { + return \in_array($this->tokens[$tokenID][self::TOKEN_TYPE], [T_CLASS, T_TRAIT, T_INTERFACE, T_ENUM], true) + && isset($this->tokens[$tokenID + 2]) + && $this->tokens[$tokenID + 1][self::TOKEN_TYPE] === T_WHITESPACE + && $this->tokens[$tokenID + 2][self::TOKEN_TYPE] === T_STRING; + } + + /** + * Locate every function or static method call (including $this calls). + * + * This is pretty old code, potentially to be improved using AST. + * + * @param array $tokens + */ + private function locateInvocations(array $tokens, int $invocationLevel = 0): void + { + //Multiple "(" and ")" statements nested. + $level = 0; + + //Skip all tokens until next function + $ignore = false; + + //Were function was found + $invocationTID = 0; + + //Parsed arguments and their first token id + $arguments = []; + $argumentsTID = false; + + //Tokens used to re-enable token detection + $stopTokens = [T_STRING, T_WHITESPACE, T_DOUBLE_COLON, T_OBJECT_OPERATOR, T_NS_SEPARATOR]; + foreach ($tokens as $tokenID => $token) { + $tokenType = $token[self::TOKEN_TYPE]; + + //We are not indexing function declarations or functions called from $objects. + if (\in_array($tokenType, [T_FUNCTION, T_OBJECT_OPERATOR, T_NEW])) { + if ( + empty($argumentsTID) + && ( + empty($invocationTID) + || $this->getSource($invocationTID, $tokenID - 1) !== '$this' + ) + ) { + //Not a call, function declaration, or object method + $ignore = true; + continue; + } + } elseif ($ignore) { + if (!\in_array($tokenType, $stopTokens)) { + //Returning to search + $ignore = false; + } + continue; + } + + //We are inside function, and there is "(", indexing arguments. + if (!empty($invocationTID) && ($tokenType === '(' || $tokenType === '[')) { + if (empty($argumentsTID)) { + $argumentsTID = $tokenID; + } + + ++$level; + if ($level != 1) { + //Not arguments beginning, but arguments part + $arguments[$tokenID] = $token; + } + + continue; + } + + //We are inside function arguments and ")" met. + if (!empty($invocationTID) && ($tokenType === ')' || $tokenType === ']')) { + --$level; + if ($level == -1) { + $invocationTID = false; + $level = 0; + continue; + } + + //Function fully indexed, we can process it now. + if ($level == 0) { + $this->registerInvocation( + $invocationTID, + $argumentsTID, + $tokenID, + $arguments, + $invocationLevel + ); + + //Closing search + $arguments = []; + $argumentsTID = $invocationTID = false; + } else { + //Not arguments beginning, but arguments part + $arguments[$tokenID] = $token; + } + + continue; + } + + //Still inside arguments. + if (!empty($invocationTID) && !empty($level)) { + $arguments[$tokenID] = $token; + continue; + } + + //Nothing valuable to remember, will be parsed later. + if (!empty($invocationTID) && \in_array($tokenType, $stopTokens)) { + continue; + } + + //Seems like we found function/method call + if ( + $tokenType == T_STRING + || $tokenType == T_STATIC + || $tokenType == T_NS_SEPARATOR + || ($tokenType == T_VARIABLE && $token[self::TOKEN_CODE] === '$this') + ) { + $invocationTID = $tokenID; + $level = 0; + + $argumentsTID = false; + continue; + } + + //Returning to search + $invocationTID = false; + $arguments = []; + } + } + + /** + * Registering invocation. + */ + private function registerInvocation( + int $invocationID, + int $argumentsID, + int $endID, + array $arguments, + int $invocationLevel + ): void { + //Nested invocations + $this->locateInvocations($arguments, $invocationLevel + 1); + + [$class, $operator, $name] = $this->fetchContext($invocationID, $argumentsID); + + if (!empty($operator) && empty($class)) { + //Non detectable + return; + } + + $this->invocations[] = new ReflectionInvocation( + $this->filename, + $this->lineNumber($invocationID), + $class, + $operator, + $name, + ReflectionArgument::locateArguments($arguments), + $this->getSource($invocationID, $endID), + $invocationLevel + ); + } + + /** + * Fetching invocation context. + */ + private function fetchContext(int $invocationTID, int $argumentsTID): array + { + $class = $operator = ''; + $name = \trim($this->getSource($invocationTID, $argumentsTID), '( '); + + //Let's try to fetch all information we need + if (\str_contains($name, '->')) { + $operator = '->'; + } elseif (\str_contains($name, '::')) { + $operator = '::'; + } + + if (!empty($operator)) { + [$class, $name] = \explode($operator, $name); + + //We now have to clarify class name + if (\in_array($class, ['self', 'static', '$this'])) { + $class = $this->activeDeclaration($invocationTID); + } + } + + return [$class, $operator, $name]; + } + + /** + * Get declaration which is active in given token position. + */ + private function activeDeclaration(int $tokenID): string + { + foreach ($this->declarations as $declarations) { + foreach ($declarations as $name => $position) { + if ($tokenID >= $position[self::O_TOKEN] && $tokenID <= $position[self::C_TOKEN]) { + return $name; + } + } + } + + //Can not be detected + return ''; + } + + /** + * Get namespace name active at specified token position. + */ + private function activeNamespace(int $tokenID): string + { + foreach ($this->namespaces as $namespace => $position) { + if ($tokenID >= $position[self::O_TOKEN] && $tokenID <= $position[self::C_TOKEN]) { + return $namespace; + } + } + + //Seems like no namespace declaration + $this->namespaces[''] = [ + self::O_TOKEN => 0, + self::C_TOKEN => \count($this->tokens), + self::N_USES => [], + ]; + + return ''; + } + + /** + * Find token ID of ending brace. + */ + private function endingToken(int $tokenID): int + { + $level = null; + for ($localID = $tokenID; $localID < $this->countTokens; ++$localID) { + $token = $this->tokens[$localID]; + if ($token[self::TOKEN_CODE] === '{') { + ++$level; + continue; + } + + if ($token[self::TOKEN_CODE] === '}') { + --$level; + } + + if ($level === 0) { + break; + } + } + + return $localID; + } + + /** + * Get line number associated with token. + */ + private function lineNumber(int $tokenID): int + { + while (empty($this->tokens[$tokenID][self::TOKEN_LINE])) { + --$tokenID; + } + + return $this->tokens[$tokenID][self::TOKEN_LINE]; + } + + /** + * Get src located between two tokens. + */ + private function getSource(int $startID, int $endID): string + { + $result = ''; + for ($tokenID = $startID; $tokenID <= $endID; ++$tokenID) { + //Collecting function usage src + $result .= $this->tokens[$tokenID][self::TOKEN_CODE]; + } + + return $result; + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionInvocation.php b/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionInvocation.php new file mode 100644 index 0000000..99af64b --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/Reflection/ReflectionInvocation.php @@ -0,0 +1,130 @@ +filename); + } + + /** + * Function usage line. + */ + public function getLine(): int + { + return $this->line; + } + + /** + * Parent class. + * + * @return class-string + */ + public function getClass(): string + { + return $this->class; + } + + /** + * Method operator (:: or ->). + */ + public function getOperator(): string + { + return $this->operator; + } + + /** + * Function or method name. + */ + public function getName(): string + { + return $this->name; + } + + /** + * Call made by class method. + */ + public function isMethod(): bool + { + return !empty($this->class); + } + + /** + * Function usage src. + */ + public function getSource(): string + { + return $this->source; + } + + /** + * Count of arguments in call. + */ + public function countArguments(): int + { + return \count($this->arguments); + } + + /** + * All parsed function arguments. + * + * @return ReflectionArgument[] + */ + public function getArguments(): array + { + return $this->arguments; + } + + /** + * Get call argument by it position. + */ + public function getArgument(int $index): ReflectionArgument + { + if (!isset($this->arguments[$index])) { + throw new ReflectionException(\sprintf("No such argument with index '%d'", $index)); + } + + return $this->arguments[$index]; + } + + /** + * Invoking level. + */ + public function getLevel(): int + { + return $this->level; + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedClassLocator.php b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedClassLocator.php new file mode 100644 index 0000000..df394b6 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedClassLocator.php @@ -0,0 +1,18 @@ +tokenizer->scopedClassLocator($scope)->getClasses($target); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedClassesInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedClassesInterface.php new file mode 100644 index 0000000..cb721ff --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedClassesInterface.php @@ -0,0 +1,21 @@ +tokenizer->scopedEnumLocator($scope)->getEnums($target); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedEnumsInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedEnumsInterface.php new file mode 100644 index 0000000..bd9cdbe --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedEnumsInterface.php @@ -0,0 +1,20 @@ +tokenizer->scopedInterfaceLocator($scope)->getInterfaces($target); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedInterfacesInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedInterfacesInterface.php new file mode 100644 index 0000000..4dacdc6 --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/ScopedInterfacesInterface.php @@ -0,0 +1,21 @@ +config->getScope($scope); + + return $this->classLocator($dirs['directories'], $dirs['exclude']); + } + + /** + * Get pre-configured enum locator for specific scope. + */ + public function scopedEnumLocator(string $scope): EnumsInterface + { + $dirs = $this->config->getScope($scope); + + return $this->enumLocator($dirs['directories'], $dirs['exclude']); + } + + /** + * Get pre-configured interface locator for specific scope. + */ + public function scopedInterfaceLocator(string $scope): InterfacesInterface + { + $dirs = $this->config->getScope($scope); + + return $this->interfaceLocator($dirs['directories'], $dirs['exclude']); + } + + /** + * Get pre-configured class locator. + */ + public function classLocator( + array $directories = [], + array $exclude = [] + ): ClassLocator { + return new ClassLocator($this->makeFinder($directories, $exclude), $this->config->isDebug()); + } + + /** + * Get pre-configured invocation locator. + */ + public function invocationLocator( + array $directories = [], + array $exclude = [] + ): InvocationLocator { + return new InvocationLocator($this->makeFinder($directories, $exclude), $this->config->isDebug()); + } + + public function enumLocator( + array $directories = [], + array $exclude = [] + ): EnumLocator { + return new EnumLocator($this->makeFinder($directories, $exclude), $this->config->isDebug()); + } + + public function interfaceLocator( + array $directories = [], + array $exclude = [] + ): InterfaceLocator { + return new InterfaceLocator($this->makeFinder($directories, $exclude), $this->config->isDebug()); + } + + /** + * Get all tokes for specific file. + */ + public static function getTokens(string $filename): array + { + $tokens = \token_get_all(\file_get_contents($filename)); + + $line = 0; + foreach ($tokens as &$token) { + if (isset($token[self::LINE])) { + $line = $token[self::LINE]; + } + + if (!\is_array($token)) { + $token = [$token, $token, $line]; + } + + unset($token); + } + + return $tokens; + } + + /** + * @param array $directories Overwrites default config values. + * @param array $exclude Overwrites default config values. + */ + private function makeFinder(array $directories = [], array $exclude = []): Finder + { + $finder = new Finder(); + + if (empty($directories)) { + $directories = $this->config->getDirectories(); + } + + if (empty($exclude)) { + $exclude = $this->config->getExcludes(); + } + + return $finder->files()->in($directories)->exclude($exclude)->name('*.php'); + } +} diff --git a/tests/php_test_files/vendor/spiral/tokenizer/src/TokenizerListenerRegistryInterface.php b/tests/php_test_files/vendor/spiral/tokenizer/src/TokenizerListenerRegistryInterface.php new file mode 100644 index 0000000..74df24d --- /dev/null +++ b/tests/php_test_files/vendor/spiral/tokenizer/src/TokenizerListenerRegistryInterface.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Comparator; + +/** + * @author Fabien Potencier + */ +class Comparator +{ + private string $operator; + + public function __construct( + private string $target, + string $operator = '==', + ) { + if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) { + throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator)); + } + + $this->operator = $operator; + } + + /** + * Gets the target value. + */ + public function getTarget(): string + { + return $this->target; + } + + /** + * Gets the comparison operator. + */ + public function getOperator(): string + { + return $this->operator; + } + + /** + * Tests against the target. + */ + public function test(mixed $test): bool + { + return match ($this->operator) { + '>' => $test > $this->target, + '>=' => $test >= $this->target, + '<' => $test < $this->target, + '<=' => $test <= $this->target, + '!=' => $test != $this->target, + default => $test == $this->target, + }; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Comparator/DateComparator.php b/tests/php_test_files/vendor/symfony/finder/Comparator/DateComparator.php new file mode 100644 index 0000000..e0c523d --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Comparator/DateComparator.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Comparator; + +/** + * DateCompare compiles date comparisons. + * + * @author Fabien Potencier + */ +class DateComparator extends Comparator +{ + /** + * @param string $test A comparison string + * + * @throws \InvalidArgumentException If the test is not understood + */ + public function __construct(string $test) + { + if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) { + throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test)); + } + + try { + $date = new \DateTimeImmutable($matches[2]); + $target = $date->format('U'); + } catch (\Exception) { + throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2])); + } + + $operator = $matches[1] ?? '=='; + if ('since' === $operator || 'after' === $operator) { + $operator = '>'; + } + + if ('until' === $operator || 'before' === $operator) { + $operator = '<'; + } + + parent::__construct($target, $operator); + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Comparator/NumberComparator.php b/tests/php_test_files/vendor/symfony/finder/Comparator/NumberComparator.php new file mode 100644 index 0000000..dd30820 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Comparator/NumberComparator.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Comparator; + +/** + * NumberComparator compiles a simple comparison to an anonymous + * subroutine, which you can call with a value to be tested again. + * + * Now this would be very pointless, if NumberCompare didn't understand + * magnitudes. + * + * The target value may use magnitudes of kilobytes (k, ki), + * megabytes (m, mi), or gigabytes (g, gi). Those suffixed + * with an i use the appropriate 2**n version in accordance with the + * IEC standard: http://physics.nist.gov/cuu/Units/binary.html + * + * Based on the Perl Number::Compare module. + * + * @author Fabien Potencier PHP port + * @author Richard Clamp Perl version + * @copyright 2004-2005 Fabien Potencier + * @copyright 2002 Richard Clamp + * + * @see http://physics.nist.gov/cuu/Units/binary.html + */ +class NumberComparator extends Comparator +{ + /** + * @param string|null $test A comparison string or null + * + * @throws \InvalidArgumentException If the test is not understood + */ + public function __construct(?string $test) + { + if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) { + throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null')); + } + + $target = $matches[2]; + if (!is_numeric($target)) { + throw new \InvalidArgumentException(sprintf('Invalid number "%s".', $target)); + } + if (isset($matches[3])) { + // magnitude + switch (strtolower($matches[3])) { + case 'k': + $target *= 1000; + break; + case 'ki': + $target *= 1024; + break; + case 'm': + $target *= 1000000; + break; + case 'mi': + $target *= 1024 * 1024; + break; + case 'g': + $target *= 1000000000; + break; + case 'gi': + $target *= 1024 * 1024 * 1024; + break; + } + } + + parent::__construct($target, $matches[1] ?: '=='); + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Exception/AccessDeniedException.php b/tests/php_test_files/vendor/symfony/finder/Exception/AccessDeniedException.php new file mode 100644 index 0000000..ee195ea --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Exception/AccessDeniedException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Exception; + +/** + * @author Jean-Franรงois Simon + */ +class AccessDeniedException extends \UnexpectedValueException +{ +} diff --git a/tests/php_test_files/vendor/symfony/finder/Exception/DirectoryNotFoundException.php b/tests/php_test_files/vendor/symfony/finder/Exception/DirectoryNotFoundException.php new file mode 100644 index 0000000..c6cc0f2 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Exception/DirectoryNotFoundException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Exception; + +/** + * @author Andreas Erhard + */ +class DirectoryNotFoundException extends \InvalidArgumentException +{ +} diff --git a/tests/php_test_files/vendor/symfony/finder/Finder.php b/tests/php_test_files/vendor/symfony/finder/Finder.php new file mode 100644 index 0000000..0894dcd --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Finder.php @@ -0,0 +1,856 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder; + +use Symfony\Component\Finder\Comparator\DateComparator; +use Symfony\Component\Finder\Comparator\NumberComparator; +use Symfony\Component\Finder\Exception\DirectoryNotFoundException; +use Symfony\Component\Finder\Iterator\CustomFilterIterator; +use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; +use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; +use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator; +use Symfony\Component\Finder\Iterator\FilecontentFilterIterator; +use Symfony\Component\Finder\Iterator\FilenameFilterIterator; +use Symfony\Component\Finder\Iterator\LazyIterator; +use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; +use Symfony\Component\Finder\Iterator\SortableIterator; + +/** + * Finder allows to build rules to find files and directories. + * + * It is a thin wrapper around several specialized iterator classes. + * + * All rules may be invoked several times. + * + * All methods return the current Finder object to allow chaining: + * + * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); + * + * @author Fabien Potencier + * + * @implements \IteratorAggregate + */ +class Finder implements \IteratorAggregate, \Countable +{ + public const IGNORE_VCS_FILES = 1; + public const IGNORE_DOT_FILES = 2; + public const IGNORE_VCS_IGNORED_FILES = 4; + + private int $mode = 0; + private array $names = []; + private array $notNames = []; + private array $exclude = []; + private array $filters = []; + private array $pruneFilters = []; + private array $depths = []; + private array $sizes = []; + private bool $followLinks = false; + private bool $reverseSorting = false; + private \Closure|int|false $sort = false; + private int $ignore = 0; + private array $dirs = []; + private array $dates = []; + private array $iterators = []; + private array $contains = []; + private array $notContains = []; + private array $paths = []; + private array $notPaths = []; + private bool $ignoreUnreadableDirs = false; + + private static array $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg']; + + public function __construct() + { + $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES; + } + + /** + * Creates a new Finder. + */ + public static function create(): static + { + return new static(); + } + + /** + * Restricts the matching to directories only. + * + * @return $this + */ + public function directories(): static + { + $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES; + + return $this; + } + + /** + * Restricts the matching to files only. + * + * @return $this + */ + public function files(): static + { + $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES; + + return $this; + } + + /** + * Adds tests for the directory depth. + * + * Usage: + * + * $finder->depth('> 1') // the Finder will start matching at level 1. + * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. + * $finder->depth(['>= 1', '< 3']) + * + * @param string|int|string[]|int[] $levels The depth level expression or an array of depth levels + * + * @return $this + * + * @see DepthRangeFilterIterator + * @see NumberComparator + */ + public function depth(string|int|array $levels): static + { + foreach ((array) $levels as $level) { + $this->depths[] = new NumberComparator($level); + } + + return $this; + } + + /** + * Adds tests for file dates (last modified). + * + * The date must be something that strtotime() is able to parse: + * + * $finder->date('since yesterday'); + * $finder->date('until 2 days ago'); + * $finder->date('> now - 2 hours'); + * $finder->date('>= 2005-10-15'); + * $finder->date(['>= 2005-10-15', '<= 2006-05-27']); + * + * @param string|string[] $dates A date range string or an array of date ranges + * + * @return $this + * + * @see strtotime + * @see DateRangeFilterIterator + * @see DateComparator + */ + public function date(string|array $dates): static + { + foreach ((array) $dates as $date) { + $this->dates[] = new DateComparator($date); + } + + return $this; + } + + /** + * Adds rules that files must match. + * + * You can use patterns (delimited with / sign), globs or simple strings. + * + * $finder->name('/\.php$/') + * $finder->name('*.php') // same as above, without dot files + * $finder->name('test.php') + * $finder->name(['test.py', 'test.php']) + * + * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns + * + * @return $this + * + * @see FilenameFilterIterator + */ + public function name(string|array $patterns): static + { + $this->names = array_merge($this->names, (array) $patterns); + + return $this; + } + + /** + * Adds rules that files must not match. + * + * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns + * + * @return $this + * + * @see FilenameFilterIterator + */ + public function notName(string|array $patterns): static + { + $this->notNames = array_merge($this->notNames, (array) $patterns); + + return $this; + } + + /** + * Adds tests that file contents must match. + * + * Strings or PCRE patterns can be used: + * + * $finder->contains('Lorem ipsum') + * $finder->contains('/Lorem ipsum/i') + * $finder->contains(['dolor', '/ipsum/i']) + * + * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns + * + * @return $this + * + * @see FilecontentFilterIterator + */ + public function contains(string|array $patterns): static + { + $this->contains = array_merge($this->contains, (array) $patterns); + + return $this; + } + + /** + * Adds tests that file contents must not match. + * + * Strings or PCRE patterns can be used: + * + * $finder->notContains('Lorem ipsum') + * $finder->notContains('/Lorem ipsum/i') + * $finder->notContains(['lorem', '/dolor/i']) + * + * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns + * + * @return $this + * + * @see FilecontentFilterIterator + */ + public function notContains(string|array $patterns): static + { + $this->notContains = array_merge($this->notContains, (array) $patterns); + + return $this; + } + + /** + * Adds rules that filenames must match. + * + * You can use patterns (delimited with / sign) or simple strings. + * + * $finder->path('some/special/dir') + * $finder->path('/some\/special\/dir/') // same as above + * $finder->path(['some dir', 'another/dir']) + * + * Use only / as dirname separator. + * + * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns + * + * @return $this + * + * @see FilenameFilterIterator + */ + public function path(string|array $patterns): static + { + $this->paths = array_merge($this->paths, (array) $patterns); + + return $this; + } + + /** + * Adds rules that filenames must not match. + * + * You can use patterns (delimited with / sign) or simple strings. + * + * $finder->notPath('some/special/dir') + * $finder->notPath('/some\/special\/dir/') // same as above + * $finder->notPath(['some/file.txt', 'another/file.log']) + * + * Use only / as dirname separator. + * + * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns + * + * @return $this + * + * @see FilenameFilterIterator + */ + public function notPath(string|array $patterns): static + { + $this->notPaths = array_merge($this->notPaths, (array) $patterns); + + return $this; + } + + /** + * Adds tests for file sizes. + * + * $finder->size('> 10K'); + * $finder->size('<= 1Ki'); + * $finder->size(4); + * $finder->size(['> 10K', '< 20K']) + * + * @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges + * + * @return $this + * + * @see SizeRangeFilterIterator + * @see NumberComparator + */ + public function size(string|int|array $sizes): static + { + foreach ((array) $sizes as $size) { + $this->sizes[] = new NumberComparator($size); + } + + return $this; + } + + /** + * Excludes directories. + * + * Directories passed as argument must be relative to the ones defined with the `in()` method. For example: + * + * $finder->in(__DIR__)->exclude('ruby'); + * + * @param string|array $dirs A directory path or an array of directories + * + * @return $this + * + * @see ExcludeDirectoryFilterIterator + */ + public function exclude(string|array $dirs): static + { + $this->exclude = array_merge($this->exclude, (array) $dirs); + + return $this; + } + + /** + * Excludes "hidden" directories and files (starting with a dot). + * + * This option is enabled by default. + * + * @return $this + * + * @see ExcludeDirectoryFilterIterator + */ + public function ignoreDotFiles(bool $ignoreDotFiles): static + { + if ($ignoreDotFiles) { + $this->ignore |= static::IGNORE_DOT_FILES; + } else { + $this->ignore &= ~static::IGNORE_DOT_FILES; + } + + return $this; + } + + /** + * Forces the finder to ignore version control directories. + * + * This option is enabled by default. + * + * @return $this + * + * @see ExcludeDirectoryFilterIterator + */ + public function ignoreVCS(bool $ignoreVCS): static + { + if ($ignoreVCS) { + $this->ignore |= static::IGNORE_VCS_FILES; + } else { + $this->ignore &= ~static::IGNORE_VCS_FILES; + } + + return $this; + } + + /** + * Forces Finder to obey .gitignore and ignore files based on rules listed there. + * + * This option is disabled by default. + * + * @return $this + */ + public function ignoreVCSIgnored(bool $ignoreVCSIgnored): static + { + if ($ignoreVCSIgnored) { + $this->ignore |= static::IGNORE_VCS_IGNORED_FILES; + } else { + $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES; + } + + return $this; + } + + /** + * Adds VCS patterns. + * + * @see ignoreVCS() + * + * @param string|string[] $pattern VCS patterns to ignore + */ + public static function addVCSPattern(string|array $pattern): void + { + foreach ((array) $pattern as $p) { + self::$vcsPatterns[] = $p; + } + + self::$vcsPatterns = array_unique(self::$vcsPatterns); + } + + /** + * Sorts files and directories by an anonymous function. + * + * The anonymous function receives two \SplFileInfo instances to compare. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sort(\Closure $closure): static + { + $this->sort = $closure; + + return $this; + } + + /** + * Sorts files and directories by extension. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortByExtension(): static + { + $this->sort = SortableIterator::SORT_BY_EXTENSION; + + return $this; + } + + /** + * Sorts files and directories by name. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortByName(bool $useNaturalSort = false): static + { + $this->sort = $useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL : SortableIterator::SORT_BY_NAME; + + return $this; + } + + /** + * Sorts files and directories by name case insensitive. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortByCaseInsensitiveName(bool $useNaturalSort = false): static + { + $this->sort = $useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE; + + return $this; + } + + /** + * Sorts files and directories by size. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortBySize(): static + { + $this->sort = SortableIterator::SORT_BY_SIZE; + + return $this; + } + + /** + * Sorts files and directories by type (directories before files), then by name. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortByType(): static + { + $this->sort = SortableIterator::SORT_BY_TYPE; + + return $this; + } + + /** + * Sorts files and directories by the last accessed time. + * + * This is the time that the file was last accessed, read or written to. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortByAccessedTime(): static + { + $this->sort = SortableIterator::SORT_BY_ACCESSED_TIME; + + return $this; + } + + /** + * Reverses the sorting. + * + * @return $this + */ + public function reverseSorting(): static + { + $this->reverseSorting = true; + + return $this; + } + + /** + * Sorts files and directories by the last inode changed time. + * + * This is the time that the inode information was last modified (permissions, owner, group or other metadata). + * + * On Windows, since inode is not available, changed time is actually the file creation time. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortByChangedTime(): static + { + $this->sort = SortableIterator::SORT_BY_CHANGED_TIME; + + return $this; + } + + /** + * Sorts files and directories by the last modified time. + * + * This is the last time the actual contents of the file were last modified. + * + * This can be slow as all the matching files and directories must be retrieved for comparison. + * + * @return $this + * + * @see SortableIterator + */ + public function sortByModifiedTime(): static + { + $this->sort = SortableIterator::SORT_BY_MODIFIED_TIME; + + return $this; + } + + /** + * Filters the iterator with an anonymous function. + * + * The anonymous function receives a \SplFileInfo and must return false + * to remove files. + * + * @param \Closure(SplFileInfo): bool $closure + * @param bool $prune Whether to skip traversing directories further + * + * @return $this + * + * @see CustomFilterIterator + */ + public function filter(\Closure $closure, bool $prune = false): static + { + $this->filters[] = $closure; + + if ($prune) { + $this->pruneFilters[] = $closure; + } + + return $this; + } + + /** + * Forces the following of symlinks. + * + * @return $this + */ + public function followLinks(): static + { + $this->followLinks = true; + + return $this; + } + + /** + * Tells finder to ignore unreadable directories. + * + * By default, scanning unreadable directories content throws an AccessDeniedException. + * + * @return $this + */ + public function ignoreUnreadableDirs(bool $ignore = true): static + { + $this->ignoreUnreadableDirs = $ignore; + + return $this; + } + + /** + * Searches files and directories which match defined rules. + * + * @param string|string[] $dirs A directory path or an array of directories + * + * @return $this + * + * @throws DirectoryNotFoundException if one of the directories does not exist + */ + public function in(string|array $dirs): static + { + $resolvedDirs = []; + + foreach ((array) $dirs as $dir) { + if (is_dir($dir)) { + $resolvedDirs[] = [$this->normalizeDir($dir)]; + } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) { + sort($glob); + $resolvedDirs[] = array_map($this->normalizeDir(...), $glob); + } else { + throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir)); + } + } + + $this->dirs = array_merge($this->dirs, ...$resolvedDirs); + + return $this; + } + + /** + * Returns an Iterator for the current Finder configuration. + * + * This method implements the IteratorAggregate interface. + * + * @return \Iterator + * + * @throws \LogicException if the in() method has not been called + */ + public function getIterator(): \Iterator + { + if (0 === \count($this->dirs) && 0 === \count($this->iterators)) { + throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.'); + } + + if (1 === \count($this->dirs) && 0 === \count($this->iterators)) { + $iterator = $this->searchInDirectory($this->dirs[0]); + + if ($this->sort || $this->reverseSorting) { + $iterator = (new SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); + } + + return $iterator; + } + + $iterator = new \AppendIterator(); + foreach ($this->dirs as $dir) { + $iterator->append(new \IteratorIterator(new LazyIterator(fn () => $this->searchInDirectory($dir)))); + } + + foreach ($this->iterators as $it) { + $iterator->append($it); + } + + if ($this->sort || $this->reverseSorting) { + $iterator = (new SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); + } + + return $iterator; + } + + /** + * Appends an existing set of files/directories to the finder. + * + * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. + * + * @return $this + * + * @throws \InvalidArgumentException when the given argument is not iterable + */ + public function append(iterable $iterator): static + { + if ($iterator instanceof \IteratorAggregate) { + $this->iterators[] = $iterator->getIterator(); + } elseif ($iterator instanceof \Iterator) { + $this->iterators[] = $iterator; + } elseif (is_iterable($iterator)) { + $it = new \ArrayIterator(); + foreach ($iterator as $file) { + $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file); + $it[$file->getPathname()] = $file; + } + $this->iterators[] = $it; + } else { + throw new \InvalidArgumentException('Finder::append() method wrong argument type.'); + } + + return $this; + } + + /** + * Check if any results were found. + */ + public function hasResults(): bool + { + foreach ($this->getIterator() as $_) { + return true; + } + + return false; + } + + /** + * Counts all the results collected by the iterators. + */ + public function count(): int + { + return iterator_count($this->getIterator()); + } + + private function searchInDirectory(string $dir): \Iterator + { + $exclude = $this->exclude; + $notPaths = $this->notPaths; + + if ($this->pruneFilters) { + $exclude = array_merge($exclude, $this->pruneFilters); + } + + if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { + $exclude = array_merge($exclude, self::$vcsPatterns); + } + + if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { + $notPaths[] = '#(^|/)\..+(/|$)#'; + } + + $minDepth = 0; + $maxDepth = \PHP_INT_MAX; + + foreach ($this->depths as $comparator) { + switch ($comparator->getOperator()) { + case '>': + $minDepth = $comparator->getTarget() + 1; + break; + case '>=': + $minDepth = $comparator->getTarget(); + break; + case '<': + $maxDepth = $comparator->getTarget() - 1; + break; + case '<=': + $maxDepth = $comparator->getTarget(); + break; + default: + $minDepth = $maxDepth = $comparator->getTarget(); + } + } + + $flags = \RecursiveDirectoryIterator::SKIP_DOTS; + + if ($this->followLinks) { + $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; + } + + $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs); + + if ($exclude) { + $iterator = new ExcludeDirectoryFilterIterator($iterator, $exclude); + } + + $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); + + if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) { + $iterator = new DepthRangeFilterIterator($iterator, $minDepth, $maxDepth); + } + + if ($this->mode) { + $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); + } + + if ($this->names || $this->notNames) { + $iterator = new FilenameFilterIterator($iterator, $this->names, $this->notNames); + } + + if ($this->contains || $this->notContains) { + $iterator = new FilecontentFilterIterator($iterator, $this->contains, $this->notContains); + } + + if ($this->sizes) { + $iterator = new SizeRangeFilterIterator($iterator, $this->sizes); + } + + if ($this->dates) { + $iterator = new DateRangeFilterIterator($iterator, $this->dates); + } + + if ($this->filters) { + $iterator = new CustomFilterIterator($iterator, $this->filters); + } + + if ($this->paths || $notPaths) { + $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths); + } + + if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) { + $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir); + } + + return $iterator; + } + + /** + * Normalizes given directory names by removing trailing slashes. + * + * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper + */ + private function normalizeDir(string $dir): string + { + if ('/' === $dir) { + return $dir; + } + + $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); + + if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) { + $dir .= '/'; + } + + return $dir; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Gitignore.php b/tests/php_test_files/vendor/symfony/finder/Gitignore.php new file mode 100644 index 0000000..bf05c5b --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Gitignore.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder; + +/** + * Gitignore matches against text. + * + * @author Michael Voล™รญลกek + * @author Ahmed Abdou + */ +class Gitignore +{ + /** + * Returns a regexp which is the equivalent of the gitignore pattern. + * + * Format specification: https://git-scm.com/docs/gitignore#_pattern_format + */ + public static function toRegex(string $gitignoreFileContent): string + { + return self::buildRegex($gitignoreFileContent, false); + } + + public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string + { + return self::buildRegex($gitignoreFileContent, true); + } + + private static function buildRegex(string $gitignoreFileContent, bool $inverted): string + { + $gitignoreFileContent = preg_replace('~(? '['.('' !== $matches[1] ? '^' : '').str_replace('\\-', '-', $matches[2]).']', $regex); + $regex = preg_replace('~(?:(?:\\\\\*){2,}(/?))+~', '(?:(?:(?!//).(? + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder; + +/** + * Glob matches globbing patterns against text. + * + * if match_glob("foo.*", "foo.bar") echo "matched\n"; + * + * // prints foo.bar and foo.baz + * $regex = glob_to_regex("foo.*"); + * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t) + * { + * if (/$regex/) echo "matched: $car\n"; + * } + * + * Glob implements glob(3) style matching that can be used to match + * against text, rather than fetching names from a filesystem. + * + * Based on the Perl Text::Glob module. + * + * @author Fabien Potencier PHP port + * @author Richard Clamp Perl version + * @copyright 2004-2005 Fabien Potencier + * @copyright 2002 Richard Clamp + */ +class Glob +{ + /** + * Returns a regexp which is the equivalent of the glob pattern. + */ + public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#'): string + { + $firstByte = true; + $escaping = false; + $inCurlies = 0; + $regex = ''; + $sizeGlob = \strlen($glob); + for ($i = 0; $i < $sizeGlob; ++$i) { + $car = $glob[$i]; + if ($firstByte && $strictLeadingDot && '.' !== $car) { + $regex .= '(?=[^\.])'; + } + + $firstByte = '/' === $car; + + if ($firstByte && $strictWildcardSlash && isset($glob[$i + 2]) && '**' === $glob[$i + 1].$glob[$i + 2] && (!isset($glob[$i + 3]) || '/' === $glob[$i + 3])) { + $car = '[^/]++/'; + if (!isset($glob[$i + 3])) { + $car .= '?'; + } + + if ($strictLeadingDot) { + $car = '(?=[^\.])'.$car; + } + + $car = '/(?:'.$car.')*'; + $i += 2 + isset($glob[$i + 3]); + + if ('/' === $delimiter) { + $car = str_replace('/', '\\/', $car); + } + } + + if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) { + $regex .= "\\$car"; + } elseif ('*' === $car) { + $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*'); + } elseif ('?' === $car) { + $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.'); + } elseif ('{' === $car) { + $regex .= $escaping ? '\\{' : '('; + if (!$escaping) { + ++$inCurlies; + } + } elseif ('}' === $car && $inCurlies) { + $regex .= $escaping ? '}' : ')'; + if (!$escaping) { + --$inCurlies; + } + } elseif (',' === $car && $inCurlies) { + $regex .= $escaping ? ',' : '|'; + } elseif ('\\' === $car) { + if ($escaping) { + $regex .= '\\\\'; + $escaping = false; + } else { + $escaping = true; + } + + continue; + } else { + $regex .= $car; + } + $escaping = false; + } + + return $delimiter.'^'.$regex.'$'.$delimiter; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/CustomFilterIterator.php new file mode 100644 index 0000000..82ee81d --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/CustomFilterIterator.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +/** + * CustomFilterIterator filters files by applying anonymous functions. + * + * The anonymous function receives a \SplFileInfo and must return false + * to remove files. + * + * @author Fabien Potencier + * + * @extends \FilterIterator + */ +class CustomFilterIterator extends \FilterIterator +{ + private array $filters = []; + + /** + * @param \Iterator $iterator The Iterator to filter + * @param callable[] $filters An array of PHP callbacks + * + * @throws \InvalidArgumentException + */ + public function __construct(\Iterator $iterator, array $filters) + { + foreach ($filters as $filter) { + if (!\is_callable($filter)) { + throw new \InvalidArgumentException('Invalid PHP callback.'); + } + } + $this->filters = $filters; + + parent::__construct($iterator); + } + + /** + * Filters the iterator values. + */ + public function accept(): bool + { + $fileinfo = $this->current(); + + foreach ($this->filters as $filter) { + if (false === $filter($fileinfo)) { + return false; + } + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php new file mode 100644 index 0000000..718d42b --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\Comparator\DateComparator; + +/** + * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates). + * + * @author Fabien Potencier + * + * @extends \FilterIterator + */ +class DateRangeFilterIterator extends \FilterIterator +{ + private array $comparators = []; + + /** + * @param \Iterator $iterator + * @param DateComparator[] $comparators + */ + public function __construct(\Iterator $iterator, array $comparators) + { + $this->comparators = $comparators; + + parent::__construct($iterator); + } + + /** + * Filters the iterator values. + */ + public function accept(): bool + { + $fileinfo = $this->current(); + + if (!file_exists($fileinfo->getPathname())) { + return false; + } + + $filedate = $fileinfo->getMTime(); + foreach ($this->comparators as $compare) { + if (!$compare->test($filedate)) { + return false; + } + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php new file mode 100644 index 0000000..1cddb5f --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +/** + * DepthRangeFilterIterator limits the directory depth. + * + * @author Fabien Potencier + * + * @template-covariant TKey + * @template-covariant TValue + * + * @extends \FilterIterator + */ +class DepthRangeFilterIterator extends \FilterIterator +{ + private int $minDepth = 0; + + /** + * @param \RecursiveIteratorIterator<\RecursiveIterator> $iterator The Iterator to filter + * @param int $minDepth The min depth + * @param int $maxDepth The max depth + */ + public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = \PHP_INT_MAX) + { + $this->minDepth = $minDepth; + $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth); + + parent::__construct($iterator); + } + + /** + * Filters the iterator values. + */ + public function accept(): bool + { + return $this->getInnerIterator()->getDepth() >= $this->minDepth; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php new file mode 100644 index 0000000..ebbc76e --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\SplFileInfo; + +/** + * ExcludeDirectoryFilterIterator filters out directories. + * + * @author Fabien Potencier + * + * @extends \FilterIterator + * + * @implements \RecursiveIterator + */ +class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator +{ + /** @var \Iterator */ + private \Iterator $iterator; + private bool $isRecursive; + /** @var array */ + private array $excludedDirs = []; + private ?string $excludedPattern = null; + /** @var list */ + private array $pruneFilters = []; + + /** + * @param \Iterator $iterator The Iterator to filter + * @param list $directories An array of directories to exclude + */ + public function __construct(\Iterator $iterator, array $directories) + { + $this->iterator = $iterator; + $this->isRecursive = $iterator instanceof \RecursiveIterator; + $patterns = []; + foreach ($directories as $directory) { + if (!\is_string($directory)) { + if (!\is_callable($directory)) { + throw new \InvalidArgumentException('Invalid PHP callback.'); + } + + $this->pruneFilters[] = $directory; + + continue; + } + + $directory = rtrim($directory, '/'); + if (!$this->isRecursive || str_contains($directory, '/')) { + $patterns[] = preg_quote($directory, '#'); + } else { + $this->excludedDirs[$directory] = true; + } + } + if ($patterns) { + $this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#'; + } + + parent::__construct($iterator); + } + + /** + * Filters the iterator values. + */ + public function accept(): bool + { + if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) { + return false; + } + + if ($this->excludedPattern) { + $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath(); + $path = str_replace('\\', '/', $path); + + return !preg_match($this->excludedPattern, $path); + } + + if ($this->pruneFilters && $this->hasChildren()) { + foreach ($this->pruneFilters as $pruneFilter) { + if (!$pruneFilter($this->current())) { + return false; + } + } + } + + return true; + } + + public function hasChildren(): bool + { + return $this->isRecursive && $this->iterator->hasChildren(); + } + + public function getChildren(): self + { + $children = new self($this->iterator->getChildren(), []); + $children->excludedDirs = $this->excludedDirs; + $children->excludedPattern = $this->excludedPattern; + + return $children; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php new file mode 100644 index 0000000..2130378 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +/** + * FileTypeFilterIterator only keeps files, directories, or both. + * + * @author Fabien Potencier + * + * @extends \FilterIterator + */ +class FileTypeFilterIterator extends \FilterIterator +{ + public const ONLY_FILES = 1; + public const ONLY_DIRECTORIES = 2; + + private int $mode; + + /** + * @param \Iterator $iterator The Iterator to filter + * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) + */ + public function __construct(\Iterator $iterator, int $mode) + { + $this->mode = $mode; + + parent::__construct($iterator); + } + + /** + * Filters the iterator values. + */ + public function accept(): bool + { + $fileinfo = $this->current(); + if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) { + return false; + } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) { + return false; + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php new file mode 100644 index 0000000..bdc71ff --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\SplFileInfo; + +/** + * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings). + * + * @author Fabien Potencier + * @author Wล‚odzimierz Gajda + * + * @extends MultiplePcreFilterIterator + */ +class FilecontentFilterIterator extends MultiplePcreFilterIterator +{ + /** + * Filters the iterator values. + */ + public function accept(): bool + { + if (!$this->matchRegexps && !$this->noMatchRegexps) { + return true; + } + + $fileinfo = $this->current(); + + if ($fileinfo->isDir() || !$fileinfo->isReadable()) { + return false; + } + + $content = $fileinfo->getContents(); + if (!$content) { + return false; + } + + return $this->isAccepted($content); + } + + /** + * Converts string to regexp if necessary. + * + * @param string $str Pattern: string or regexp + */ + protected function toRegex(string $str): string + { + return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/FilenameFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/FilenameFilterIterator.php new file mode 100644 index 0000000..05d9535 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/FilenameFilterIterator.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\Glob; + +/** + * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string). + * + * @author Fabien Potencier + * + * @extends MultiplePcreFilterIterator + */ +class FilenameFilterIterator extends MultiplePcreFilterIterator +{ + /** + * Filters the iterator values. + */ + public function accept(): bool + { + return $this->isAccepted($this->current()->getFilename()); + } + + /** + * Converts glob to regexp. + * + * PCRE patterns are left unchanged. + * Glob strings are transformed with Glob::toRegex(). + * + * @param string $str Pattern: glob or regexp + */ + protected function toRegex(string $str): string + { + return $this->isRegex($str) ? $str : Glob::toRegex($str); + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/LazyIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/LazyIterator.php new file mode 100644 index 0000000..5b5806b --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/LazyIterator.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +/** + * @author Jรฉrรฉmy Derussรฉ + * + * @internal + */ +class LazyIterator implements \IteratorAggregate +{ + private \Closure $iteratorFactory; + + public function __construct(callable $iteratorFactory) + { + $this->iteratorFactory = $iteratorFactory(...); + } + + public function getIterator(): \Traversable + { + yield from ($this->iteratorFactory)(); + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php new file mode 100644 index 0000000..3450c49 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +/** + * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings). + * + * @author Fabien Potencier + * + * @template-covariant TKey + * @template-covariant TValue + * + * @extends \FilterIterator + */ +abstract class MultiplePcreFilterIterator extends \FilterIterator +{ + protected array $matchRegexps = []; + protected array $noMatchRegexps = []; + + /** + * @param \Iterator $iterator The Iterator to filter + * @param string[] $matchPatterns An array of patterns that need to match + * @param string[] $noMatchPatterns An array of patterns that need to not match + */ + public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns) + { + foreach ($matchPatterns as $pattern) { + $this->matchRegexps[] = $this->toRegex($pattern); + } + + foreach ($noMatchPatterns as $pattern) { + $this->noMatchRegexps[] = $this->toRegex($pattern); + } + + parent::__construct($iterator); + } + + /** + * Checks whether the string is accepted by the regex filters. + * + * If there is no regexps defined in the class, this method will accept the string. + * Such case can be handled by child classes before calling the method if they want to + * apply a different behavior. + */ + protected function isAccepted(string $string): bool + { + // should at least not match one rule to exclude + foreach ($this->noMatchRegexps as $regex) { + if (preg_match($regex, $string)) { + return false; + } + } + + // should at least match one rule + if ($this->matchRegexps) { + foreach ($this->matchRegexps as $regex) { + if (preg_match($regex, $string)) { + return true; + } + } + + return false; + } + + // If there is no match rules, the file is accepted + return true; + } + + /** + * Checks whether the string is a regex. + */ + protected function isRegex(string $str): bool + { + $availableModifiers = 'imsxuADUn'; + + if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) { + $start = substr($m[1], 0, 1); + $end = substr($m[1], -1); + + if ($start === $end) { + return !preg_match('/[*?[:alnum:] \\\\]/', $start); + } + + foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) { + if ($start === $delimiters[0] && $end === $delimiters[1]) { + return true; + } + } + } + + return false; + } + + /** + * Converts string into regexp. + */ + abstract protected function toRegex(string $str): string; +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/PathFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/PathFilterIterator.php new file mode 100644 index 0000000..c6d5813 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/PathFilterIterator.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\SplFileInfo; + +/** + * PathFilterIterator filters files by path patterns (e.g. some/special/dir). + * + * @author Fabien Potencier + * @author Wล‚odzimierz Gajda + * + * @extends MultiplePcreFilterIterator + */ +class PathFilterIterator extends MultiplePcreFilterIterator +{ + /** + * Filters the iterator values. + */ + public function accept(): bool + { + $filename = $this->current()->getRelativePathname(); + + if ('\\' === \DIRECTORY_SEPARATOR) { + $filename = str_replace('\\', '/', $filename); + } + + return $this->isAccepted($filename); + } + + /** + * Converts strings to regexp. + * + * PCRE patterns are left unchanged. + * + * Default conversion: + * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' + * + * Use only / as directory separator (on Windows also). + * + * @param string $str Pattern: regexp or dirname + */ + protected function toRegex(string $str): string + { + return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php new file mode 100644 index 0000000..34cced6 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php @@ -0,0 +1,133 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\Exception\AccessDeniedException; +use Symfony\Component\Finder\SplFileInfo; + +/** + * Extends the \RecursiveDirectoryIterator to support relative paths. + * + * @author Victor Berchet + * + * @extends \RecursiveDirectoryIterator + */ +class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator +{ + private bool $ignoreUnreadableDirs; + private bool $ignoreFirstRewind = true; + + // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations + private string $rootPath; + private string $subPath; + private string $directorySeparator = '/'; + + /** + * @throws \RuntimeException + */ + public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false) + { + if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) { + throw new \RuntimeException('This iterator only support returning current as fileinfo.'); + } + + parent::__construct($path, $flags); + $this->ignoreUnreadableDirs = $ignoreUnreadableDirs; + $this->rootPath = $path; + if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) { + $this->directorySeparator = \DIRECTORY_SEPARATOR; + } + } + + /** + * Return an instance of SplFileInfo with support for relative paths. + */ + public function current(): SplFileInfo + { + // the logic here avoids redoing the same work in all iterations + + if (!isset($this->subPath)) { + $this->subPath = $this->getSubPath(); + } + $subPathname = $this->subPath; + if ('' !== $subPathname) { + $subPathname .= $this->directorySeparator; + } + $subPathname .= $this->getFilename(); + + if ('/' !== $basePath = $this->rootPath) { + $basePath .= $this->directorySeparator; + } + + return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname); + } + + public function hasChildren(bool $allowLinks = false): bool + { + $hasChildren = parent::hasChildren($allowLinks); + + if (!$hasChildren || !$this->ignoreUnreadableDirs) { + return $hasChildren; + } + + try { + parent::getChildren(); + + return true; + } catch (\UnexpectedValueException) { + // If directory is unreadable and finder is set to ignore it, skip children + return false; + } + } + + /** + * @throws AccessDeniedException + */ + public function getChildren(): \RecursiveDirectoryIterator + { + try { + $children = parent::getChildren(); + + if ($children instanceof self) { + // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore + $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs; + + // performance optimization to avoid redoing the same work in all children + $children->rootPath = $this->rootPath; + } + + return $children; + } catch (\UnexpectedValueException $e) { + throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e); + } + } + + public function next(): void + { + $this->ignoreFirstRewind = false; + + parent::next(); + } + + public function rewind(): void + { + // some streams like FTP are not rewindable, ignore the first rewind after creation, + // as newly created DirectoryIterator does not need to be rewound + if ($this->ignoreFirstRewind) { + $this->ignoreFirstRewind = false; + + return; + } + + parent::rewind(); + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php new file mode 100644 index 0000000..925830a --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\Comparator\NumberComparator; + +/** + * SizeRangeFilterIterator filters out files that are not in the given size range. + * + * @author Fabien Potencier + * + * @extends \FilterIterator + */ +class SizeRangeFilterIterator extends \FilterIterator +{ + private array $comparators = []; + + /** + * @param \Iterator $iterator + * @param NumberComparator[] $comparators + */ + public function __construct(\Iterator $iterator, array $comparators) + { + $this->comparators = $comparators; + + parent::__construct($iterator); + } + + /** + * Filters the iterator values. + */ + public function accept(): bool + { + $fileinfo = $this->current(); + if (!$fileinfo->isFile()) { + return true; + } + + $filesize = $fileinfo->getSize(); + foreach ($this->comparators as $compare) { + if (!$compare->test($filesize)) { + return false; + } + } + + return true; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/SortableIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/SortableIterator.php new file mode 100644 index 0000000..177cd0b --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/SortableIterator.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +/** + * SortableIterator applies a sort on a given Iterator. + * + * @author Fabien Potencier + * + * @implements \IteratorAggregate + */ +class SortableIterator implements \IteratorAggregate +{ + public const SORT_BY_NONE = 0; + public const SORT_BY_NAME = 1; + public const SORT_BY_TYPE = 2; + public const SORT_BY_ACCESSED_TIME = 3; + public const SORT_BY_CHANGED_TIME = 4; + public const SORT_BY_MODIFIED_TIME = 5; + public const SORT_BY_NAME_NATURAL = 6; + public const SORT_BY_NAME_CASE_INSENSITIVE = 7; + public const SORT_BY_NAME_NATURAL_CASE_INSENSITIVE = 8; + public const SORT_BY_EXTENSION = 9; + public const SORT_BY_SIZE = 10; + + /** @var \Traversable */ + private \Traversable $iterator; + private \Closure|int $sort; + + /** + * @param \Traversable $iterator + * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) + * + * @throws \InvalidArgumentException + */ + public function __construct(\Traversable $iterator, int|callable $sort, bool $reverseOrder = false) + { + $this->iterator = $iterator; + $order = $reverseOrder ? -1 : 1; + + if (self::SORT_BY_NAME === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + } elseif (self::SORT_BY_NAME_NATURAL === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + } elseif (self::SORT_BY_NAME_CASE_INSENSITIVE === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + } elseif (self::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + } elseif (self::SORT_BY_TYPE === $sort) { + $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { + if ($a->isDir() && $b->isFile()) { + return -$order; + } elseif ($a->isFile() && $b->isDir()) { + return $order; + } + + return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); + }; + } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getATime() - $b->getATime()); + } elseif (self::SORT_BY_CHANGED_TIME === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getCTime() - $b->getCTime()); + } elseif (self::SORT_BY_MODIFIED_TIME === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getMTime() - $b->getMTime()); + } elseif (self::SORT_BY_EXTENSION === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getExtension(), $b->getExtension()); + } elseif (self::SORT_BY_SIZE === $sort) { + $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getSize() - $b->getSize()); + } elseif (self::SORT_BY_NONE === $sort) { + $this->sort = $order; + } elseif (\is_callable($sort)) { + $this->sort = $reverseOrder ? static fn (\SplFileInfo $a, \SplFileInfo $b) => -$sort($a, $b) : $sort(...); + } else { + throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.'); + } + } + + public function getIterator(): \Traversable + { + if (1 === $this->sort) { + return $this->iterator; + } + + $array = iterator_to_array($this->iterator, true); + + if (-1 === $this->sort) { + $array = array_reverse($array); + } else { + uasort($array, $this->sort); + } + + return new \ArrayIterator($array); + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php b/tests/php_test_files/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php new file mode 100644 index 0000000..b278706 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\Gitignore; + +/** + * @extends \FilterIterator + */ +final class VcsIgnoredFilterIterator extends \FilterIterator +{ + private string $baseDir; + + /** + * @var array + */ + private array $gitignoreFilesCache = []; + + /** + * @var array + */ + private array $ignoredPathsCache = []; + + /** + * @param \Iterator $iterator + */ + public function __construct(\Iterator $iterator, string $baseDir) + { + $this->baseDir = $this->normalizePath($baseDir); + + foreach ([$this->baseDir, ...$this->parentDirectoriesUpwards($this->baseDir)] as $directory) { + if (@is_dir("{$directory}/.git")) { + $this->baseDir = $directory; + break; + } + } + + parent::__construct($iterator); + } + + public function accept(): bool + { + $file = $this->current(); + + $fileRealPath = $this->normalizePath($file->getRealPath()); + + return !$this->isIgnored($fileRealPath); + } + + private function isIgnored(string $fileRealPath): bool + { + if (is_dir($fileRealPath) && !str_ends_with($fileRealPath, '/')) { + $fileRealPath .= '/'; + } + + if (isset($this->ignoredPathsCache[$fileRealPath])) { + return $this->ignoredPathsCache[$fileRealPath]; + } + + $ignored = false; + + foreach ($this->parentDirectoriesDownwards($fileRealPath) as $parentDirectory) { + if ($this->isIgnored($parentDirectory)) { + // rules in ignored directories are ignored, no need to check further. + break; + } + + $fileRelativePath = substr($fileRealPath, \strlen($parentDirectory) + 1); + + if (null === $regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore")) { + continue; + } + + [$exclusionRegex, $inclusionRegex] = $regexps; + + if (preg_match($exclusionRegex, $fileRelativePath)) { + $ignored = true; + + continue; + } + + if (preg_match($inclusionRegex, $fileRelativePath)) { + $ignored = false; + } + } + + return $this->ignoredPathsCache[$fileRealPath] = $ignored; + } + + /** + * @return list + */ + private function parentDirectoriesUpwards(string $from): array + { + $parentDirectories = []; + + $parentDirectory = $from; + + while (true) { + $newParentDirectory = \dirname($parentDirectory); + + // dirname('/') = '/' + if ($newParentDirectory === $parentDirectory) { + break; + } + + $parentDirectories[] = $parentDirectory = $newParentDirectory; + } + + return $parentDirectories; + } + + private function parentDirectoriesUpTo(string $from, string $upTo): array + { + return array_filter( + $this->parentDirectoriesUpwards($from), + static fn (string $directory): bool => str_starts_with($directory, $upTo) + ); + } + + /** + * @return list + */ + private function parentDirectoriesDownwards(string $fileRealPath): array + { + return array_reverse( + $this->parentDirectoriesUpTo($fileRealPath, $this->baseDir) + ); + } + + /** + * @return array{0: string, 1: string}|null + */ + private function readGitignoreFile(string $path): ?array + { + if (\array_key_exists($path, $this->gitignoreFilesCache)) { + return $this->gitignoreFilesCache[$path]; + } + + if (!file_exists($path)) { + return $this->gitignoreFilesCache[$path] = null; + } + + if (!is_file($path) || !is_readable($path)) { + throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable."); + } + + $gitignoreFileContent = file_get_contents($path); + + return $this->gitignoreFilesCache[$path] = [ + Gitignore::toRegex($gitignoreFileContent), + Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent), + ]; + } + + private function normalizePath(string $path): string + { + if ('\\' === \DIRECTORY_SEPARATOR) { + return str_replace('\\', '/', $path); + } + + return $path; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/LICENSE b/tests/php_test_files/vendor/symfony/finder/LICENSE new file mode 100644 index 0000000..0138f8f --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-present Fabien Potencier + +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/symfony/finder/README.md b/tests/php_test_files/vendor/symfony/finder/README.md new file mode 100644 index 0000000..22bdeb9 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/README.md @@ -0,0 +1,14 @@ +Finder Component +================ + +The Finder component finds files and directories via an intuitive fluent +interface. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/finder.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/tests/php_test_files/vendor/symfony/finder/SplFileInfo.php b/tests/php_test_files/vendor/symfony/finder/SplFileInfo.php new file mode 100644 index 0000000..2afc378 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/SplFileInfo.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder; + +/** + * Extends \SplFileInfo to support relative paths. + * + * @author Fabien Potencier + */ +class SplFileInfo extends \SplFileInfo +{ + /** + * @param string $file The file name + * @param string $relativePath The relative path + * @param string $relativePathname The relative path name + */ + public function __construct( + string $file, + private string $relativePath, + private string $relativePathname, + ) { + parent::__construct($file); + } + + /** + * Returns the relative path. + * + * This path does not contain the file name. + */ + public function getRelativePath(): string + { + return $this->relativePath; + } + + /** + * Returns the relative path name. + * + * This path contains the file name. + */ + public function getRelativePathname(): string + { + return $this->relativePathname; + } + + public function getFilenameWithoutExtension(): string + { + $filename = $this->getFilename(); + + return pathinfo($filename, \PATHINFO_FILENAME); + } + + /** + * Returns the contents of the file. + * + * @throws \RuntimeException + */ + public function getContents(): string + { + set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); + try { + $content = file_get_contents($this->getPathname()); + } finally { + restore_error_handler(); + } + if (false === $content) { + throw new \RuntimeException($error); + } + + return $content; + } +} diff --git a/tests/php_test_files/vendor/symfony/finder/composer.json b/tests/php_test_files/vendor/symfony/finder/composer.json new file mode 100644 index 0000000..2b70600 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/finder/composer.json @@ -0,0 +1,31 @@ +{ + "name": "symfony/finder", + "type": "library", + "description": "Finds files and directories via an intuitive fluent interface", + "keywords": [], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" + }, + "autoload": { + "psr-4": { "Symfony\\Component\\Finder\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev" +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Idn.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Idn.php new file mode 100644 index 0000000..eb6bada --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Idn.php @@ -0,0 +1,933 @@ + and Trevor Rowbotham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn; + +use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; +use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; + +/** + * @see https://www.unicode.org/reports/tr46/ + * + * @internal + */ +final class Idn +{ + public const ERROR_EMPTY_LABEL = 1; + public const ERROR_LABEL_TOO_LONG = 2; + public const ERROR_DOMAIN_NAME_TOO_LONG = 4; + public const ERROR_LEADING_HYPHEN = 8; + public const ERROR_TRAILING_HYPHEN = 0x10; + public const ERROR_HYPHEN_3_4 = 0x20; + public const ERROR_LEADING_COMBINING_MARK = 0x40; + public const ERROR_DISALLOWED = 0x80; + public const ERROR_PUNYCODE = 0x100; + public const ERROR_LABEL_HAS_DOT = 0x200; + public const ERROR_INVALID_ACE_LABEL = 0x400; + public const ERROR_BIDI = 0x800; + public const ERROR_CONTEXTJ = 0x1000; + public const ERROR_CONTEXTO_PUNCTUATION = 0x2000; + public const ERROR_CONTEXTO_DIGITS = 0x4000; + + public const INTL_IDNA_VARIANT_2003 = 0; + public const INTL_IDNA_VARIANT_UTS46 = 1; + + public const IDNA_DEFAULT = 0; + public const IDNA_ALLOW_UNASSIGNED = 1; + public const IDNA_USE_STD3_RULES = 2; + public const IDNA_CHECK_BIDI = 4; + public const IDNA_CHECK_CONTEXTJ = 8; + public const IDNA_NONTRANSITIONAL_TO_ASCII = 16; + public const IDNA_NONTRANSITIONAL_TO_UNICODE = 32; + + public const MAX_DOMAIN_SIZE = 253; + public const MAX_LABEL_SIZE = 63; + + public const BASE = 36; + public const TMIN = 1; + public const TMAX = 26; + public const SKEW = 38; + public const DAMP = 700; + public const INITIAL_BIAS = 72; + public const INITIAL_N = 128; + public const DELIMITER = '-'; + public const MAX_INT = 2147483647; + + /** + * Contains the numeric value of a basic code point (for use in representing integers) in the + * range 0 to BASE-1, or -1 if b is does not represent a value. + * + * @var array + */ + private static $basicToDigit = [ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, + + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + ]; + + /** + * @var array + */ + private static $virama; + + /** + * @var array + */ + private static $mapped; + + /** + * @var array + */ + private static $ignored; + + /** + * @var array + */ + private static $deviation; + + /** + * @var array + */ + private static $disallowed; + + /** + * @var array + */ + private static $disallowed_STD3_mapped; + + /** + * @var array + */ + private static $disallowed_STD3_valid; + + /** + * @var bool + */ + private static $mappingTableLoaded = false; + + /** + * @see https://www.unicode.org/reports/tr46/#ToASCII + * + * @param string $domainName + * @param int $options + * @param int $variant + * @param array $idna_info + * + * @return string|false + */ + public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); + } + + $options = [ + 'CheckHyphens' => true, + 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), + 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), + 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), + 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII), + 'VerifyDnsLength' => true, + ]; + $info = new Info(); + $labels = self::process((string) $domainName, $options, $info); + + foreach ($labels as $i => $label) { + // Only convert labels to punycode that contain non-ASCII code points + if (1 === preg_match('/[^\x00-\x7F]/', $label)) { + try { + $label = 'xn--'.self::punycodeEncode($label); + } catch (\Exception $e) { + $info->errors |= self::ERROR_PUNYCODE; + } + + $labels[$i] = $label; + } + } + + if ($options['VerifyDnsLength']) { + self::validateDomainAndLabelLength($labels, $info); + } + + $idna_info = [ + 'result' => implode('.', $labels), + 'isTransitionalDifferent' => $info->transitionalDifferent, + 'errors' => $info->errors, + ]; + + return 0 === $info->errors ? $idna_info['result'] : false; + } + + /** + * @see https://www.unicode.org/reports/tr46/#ToUnicode + * + * @param string $domainName + * @param int $options + * @param int $variant + * @param array $idna_info + * + * @return string|false + */ + public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); + } + + $info = new Info(); + $labels = self::process((string) $domainName, [ + 'CheckHyphens' => true, + 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), + 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), + 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), + 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_UNICODE), + ], $info); + $idna_info = [ + 'result' => implode('.', $labels), + 'isTransitionalDifferent' => $info->transitionalDifferent, + 'errors' => $info->errors, + ]; + + return 0 === $info->errors ? $idna_info['result'] : false; + } + + /** + * @param string $label + * + * @return bool + */ + private static function isValidContextJ(array $codePoints, $label) + { + if (!isset(self::$virama)) { + self::$virama = require __DIR__.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'unidata'.\DIRECTORY_SEPARATOR.'virama.php'; + } + + $offset = 0; + + foreach ($codePoints as $i => $codePoint) { + if (0x200C !== $codePoint && 0x200D !== $codePoint) { + continue; + } + + if (!isset($codePoints[$i - 1])) { + return false; + } + + // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True; + if (isset(self::$virama[$codePoints[$i - 1]])) { + continue; + } + + // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then + // True; + // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}] + if (0x200C === $codePoint && 1 === preg_match(Regex::ZWNJ, $label, $matches, \PREG_OFFSET_CAPTURE, $offset)) { + $offset += \strlen($matches[1][0]); + + continue; + } + + return false; + } + + return true; + } + + /** + * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap + * + * @param string $input + * @param array $options + * + * @return string + */ + private static function mapCodePoints($input, array $options, Info $info) + { + $str = ''; + $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; + $transitional = $options['Transitional_Processing']; + + foreach (self::utf8Decode($input) as $codePoint) { + $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); + + switch ($data['status']) { + case 'disallowed': + case 'valid': + $str .= mb_chr($codePoint, 'utf-8'); + + break; + + case 'ignored': + // Do nothing. + break; + + case 'mapped': + $str .= $transitional && 0x1E9E === $codePoint ? 'ss' : $data['mapping']; + + break; + + case 'deviation': + $info->transitionalDifferent = true; + $str .= ($transitional ? $data['mapping'] : mb_chr($codePoint, 'utf-8')); + + break; + } + } + + return $str; + } + + /** + * @see https://www.unicode.org/reports/tr46/#Processing + * + * @param string $domain + * @param array $options + * + * @return array + */ + private static function process($domain, array $options, Info $info) + { + // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and + // we need to respect the VerifyDnsLength option. + $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength']; + + if ($checkForEmptyLabels && '' === $domain) { + $info->errors |= self::ERROR_EMPTY_LABEL; + + return [$domain]; + } + + // Step 1. Map each code point in the domain name string + $domain = self::mapCodePoints($domain, $options, $info); + + // Step 2. Normalize the domain name string to Unicode Normalization Form C. + if (!\Normalizer::isNormalized($domain, \Normalizer::FORM_C)) { + $domain = \Normalizer::normalize($domain, \Normalizer::FORM_C); + } + + // Step 3. Break the string into labels at U+002E (.) FULL STOP. + $labels = explode('.', $domain); + $lastLabelIndex = \count($labels) - 1; + + // Step 4. Convert and validate each label in the domain name string. + foreach ($labels as $i => $label) { + $validationOptions = $options; + + if ('xn--' === substr($label, 0, 4)) { + // Step 4.1. If the label contains any non-ASCII code point (i.e., a code point greater than U+007F), + // record that there was an error, and continue with the next label. + if (preg_match('/[^\x00-\x7F]/', $label)) { + $info->errors |= self::ERROR_PUNYCODE; + + continue; + } + + // Step 4.2. Attempt to convert the rest of the label to Unicode according to Punycode [RFC3492]. If + // that conversion fails, record that there was an error, and continue + // with the next label. Otherwise replace the original label in the string by the results of the + // conversion. + try { + $label = self::punycodeDecode(substr($label, 4)); + } catch (\Exception $e) { + $info->errors |= self::ERROR_PUNYCODE; + + continue; + } + + $validationOptions['Transitional_Processing'] = false; + $labels[$i] = $label; + } + + self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex); + } + + if ($info->bidiDomain && !$info->validBidiDomain) { + $info->errors |= self::ERROR_BIDI; + } + + // Any input domain name string that does not record an error has been successfully + // processed according to this specification. Conversely, if an input domain_name string + // causes an error, then the processing of the input domain_name string fails. Determining + // what to do with error input is up to the caller, and not in the scope of this document. + return $labels; + } + + /** + * @see https://tools.ietf.org/html/rfc5893#section-2 + * + * @param string $label + */ + private static function validateBidiLabel($label, Info $info) + { + if (1 === preg_match(Regex::RTL_LABEL, $label)) { + $info->bidiDomain = true; + + // Step 1. The first character must be a character with Bidi property L, R, or AL. + // If it has the R or AL property, it is an RTL label + if (1 !== preg_match(Regex::BIDI_STEP_1_RTL, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES, + // CS, ET, ON, BN, or NSM are allowed. + if (1 === preg_match(Regex::BIDI_STEP_2, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 3. In an RTL label, the end of the label must be a character with Bidi property + // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM. + if (1 !== preg_match(Regex::BIDI_STEP_3, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa. + if (1 === preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === preg_match(Regex::BIDI_STEP_4_EN, $label)) { + $info->validBidiDomain = false; + + return; + } + + return; + } + + // We are a LTR label + // Step 1. The first character must be a character with Bidi property L, R, or AL. + // If it has the L property, it is an LTR label. + if (1 !== preg_match(Regex::BIDI_STEP_1_LTR, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 5. In an LTR label, only characters with the Bidi properties L, EN, + // ES, CS, ET, ON, BN, or NSM are allowed. + if (1 === preg_match(Regex::BIDI_STEP_5, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or + // EN, followed by zero or more characters with Bidi property NSM. + if (1 !== preg_match(Regex::BIDI_STEP_6, $label)) { + $info->validBidiDomain = false; + + return; + } + } + + /** + * @param array $labels + */ + private static function validateDomainAndLabelLength(array $labels, Info $info) + { + $maxDomainSize = self::MAX_DOMAIN_SIZE; + $length = \count($labels); + + // Number of "." delimiters. + $domainLength = $length - 1; + + // If the last label is empty and it is not the first label, then it is the root label. + // Increase the max size by 1, making it 254, to account for the root label's "." + // delimiter. This also means we don't need to check the last label's length for being too + // long. + if ($length > 1 && '' === $labels[$length - 1]) { + ++$maxDomainSize; + --$length; + } + + for ($i = 0; $i < $length; ++$i) { + $bytes = \strlen($labels[$i]); + $domainLength += $bytes; + + if ($bytes > self::MAX_LABEL_SIZE) { + $info->errors |= self::ERROR_LABEL_TOO_LONG; + } + } + + if ($domainLength > $maxDomainSize) { + $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG; + } + } + + /** + * @see https://www.unicode.org/reports/tr46/#Validity_Criteria + * + * @param string $label + * @param array $options + * @param bool $canBeEmpty + */ + private static function validateLabel($label, Info $info, array $options, $canBeEmpty) + { + if ('' === $label) { + if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) { + $info->errors |= self::ERROR_EMPTY_LABEL; + } + + return; + } + + // Step 1. The label must be in Unicode Normalization Form C. + if (!\Normalizer::isNormalized($label, \Normalizer::FORM_C)) { + $info->errors |= self::ERROR_INVALID_ACE_LABEL; + } + + $codePoints = self::utf8Decode($label); + + if ($options['CheckHyphens']) { + // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character + // in both the thrid and fourth positions. + if (isset($codePoints[2], $codePoints[3]) && 0x002D === $codePoints[2] && 0x002D === $codePoints[3]) { + $info->errors |= self::ERROR_HYPHEN_3_4; + } + + // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D + // HYPHEN-MINUS character. + if ('-' === substr($label, 0, 1)) { + $info->errors |= self::ERROR_LEADING_HYPHEN; + } + + if ('-' === substr($label, -1, 1)) { + $info->errors |= self::ERROR_TRAILING_HYPHEN; + } + } elseif ('xn--' === substr($label, 0, 4)) { + $info->errors |= self::ERROR_PUNYCODE; + } + + // Step 4. The label must not contain a U+002E (.) FULL STOP. + if (false !== strpos($label, '.')) { + $info->errors |= self::ERROR_LABEL_HAS_DOT; + } + + // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark. + if (1 === preg_match(Regex::COMBINING_MARK, $label)) { + $info->errors |= self::ERROR_LEADING_COMBINING_MARK; + } + + // Step 6. Each code point in the label must only have certain status values according to + // Section 5, IDNA Mapping Table: + $transitional = $options['Transitional_Processing']; + $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; + + foreach ($codePoints as $codePoint) { + $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); + $status = $data['status']; + + if ('valid' === $status || (!$transitional && 'deviation' === $status)) { + continue; + } + + $info->errors |= self::ERROR_DISALLOWED; + + break; + } + + // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in + // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA) + // [IDNA2008]. + if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) { + $info->errors |= self::ERROR_CONTEXTJ; + } + + // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must + // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2. + if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) { + self::validateBidiLabel($label, $info); + } + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.2 + * + * @param string $input + * + * @return string + */ + private static function punycodeDecode($input) + { + $n = self::INITIAL_N; + $out = 0; + $i = 0; + $bias = self::INITIAL_BIAS; + $lastDelimIndex = strrpos($input, self::DELIMITER); + $b = false === $lastDelimIndex ? 0 : $lastDelimIndex; + $inputLength = \strlen($input); + $output = []; + $bytes = array_map('ord', str_split($input)); + + for ($j = 0; $j < $b; ++$j) { + if ($bytes[$j] > 0x7F) { + throw new \Exception('Invalid input'); + } + + $output[$out++] = $input[$j]; + } + + if ($b > 0) { + ++$b; + } + + for ($in = $b; $in < $inputLength; ++$out) { + $oldi = $i; + $w = 1; + + for ($k = self::BASE; /* no condition */; $k += self::BASE) { + if ($in >= $inputLength) { + throw new \Exception('Invalid input'); + } + + $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; + + if ($digit < 0) { + throw new \Exception('Invalid input'); + } + + if ($digit > intdiv(self::MAX_INT - $i, $w)) { + throw new \Exception('Integer overflow'); + } + + $i += $digit * $w; + + if ($k <= $bias) { + $t = self::TMIN; + } elseif ($k >= $bias + self::TMAX) { + $t = self::TMAX; + } else { + $t = $k - $bias; + } + + if ($digit < $t) { + break; + } + + $baseMinusT = self::BASE - $t; + + if ($w > intdiv(self::MAX_INT, $baseMinusT)) { + throw new \Exception('Integer overflow'); + } + + $w *= $baseMinusT; + } + + $outPlusOne = $out + 1; + $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); + + if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { + throw new \Exception('Integer overflow'); + } + + $n += intdiv($i, $outPlusOne); + $i %= $outPlusOne; + array_splice($output, $i++, 0, [mb_chr($n, 'utf-8')]); + } + + return implode('', $output); + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.3 + * + * @param string $input + * + * @return string + */ + private static function punycodeEncode($input) + { + $n = self::INITIAL_N; + $delta = 0; + $out = 0; + $bias = self::INITIAL_BIAS; + $inputLength = 0; + $output = ''; + $iter = self::utf8Decode($input); + + foreach ($iter as $codePoint) { + ++$inputLength; + + if ($codePoint < 0x80) { + $output .= \chr($codePoint); + ++$out; + } + } + + $h = $out; + $b = $out; + + if ($b > 0) { + $output .= self::DELIMITER; + ++$out; + } + + while ($h < $inputLength) { + $m = self::MAX_INT; + + foreach ($iter as $codePoint) { + if ($codePoint >= $n && $codePoint < $m) { + $m = $codePoint; + } + } + + if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { + throw new \Exception('Integer overflow'); + } + + $delta += ($m - $n) * ($h + 1); + $n = $m; + + foreach ($iter as $codePoint) { + if ($codePoint < $n && 0 === ++$delta) { + throw new \Exception('Integer overflow'); + } + + if ($codePoint === $n) { + $q = $delta; + + for ($k = self::BASE; /* no condition */; $k += self::BASE) { + if ($k <= $bias) { + $t = self::TMIN; + } elseif ($k >= $bias + self::TMAX) { + $t = self::TMAX; + } else { + $t = $k - $bias; + } + + if ($q < $t) { + break; + } + + $qMinusT = $q - $t; + $baseMinusT = self::BASE - $t; + $output .= self::encodeDigit($t + $qMinusT % $baseMinusT, false); + ++$out; + $q = intdiv($qMinusT, $baseMinusT); + } + + $output .= self::encodeDigit($q, false); + ++$out; + $bias = self::adaptBias($delta, $h + 1, $h === $b); + $delta = 0; + ++$h; + } + } + + ++$delta; + ++$n; + } + + return $output; + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.1 + * + * @param int $delta + * @param int $numPoints + * @param bool $firstTime + * + * @return int + */ + private static function adaptBias($delta, $numPoints, $firstTime) + { + // xxx >> 1 is a faster way of doing intdiv(xxx, 2) + $delta = $firstTime ? intdiv($delta, self::DAMP) : $delta >> 1; + $delta += intdiv($delta, $numPoints); + $k = 0; + + while ($delta > ((self::BASE - self::TMIN) * self::TMAX) >> 1) { + $delta = intdiv($delta, self::BASE - self::TMIN); + $k += self::BASE; + } + + return $k + intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW); + } + + /** + * @param int $d + * @param bool $flag + * + * @return string + */ + private static function encodeDigit($d, $flag) + { + return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5)); + } + + /** + * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any + * invalid byte sequences will be replaced by a U+FFFD replacement code point. + * + * @see https://encoding.spec.whatwg.org/#utf-8-decoder + * + * @param string $input + * + * @return array + */ + private static function utf8Decode($input) + { + $bytesSeen = 0; + $bytesNeeded = 0; + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + $codePoint = 0; + $codePoints = []; + $length = \strlen($input); + + for ($i = 0; $i < $length; ++$i) { + $byte = \ord($input[$i]); + + if (0 === $bytesNeeded) { + if ($byte >= 0x00 && $byte <= 0x7F) { + $codePoints[] = $byte; + + continue; + } + + if ($byte >= 0xC2 && $byte <= 0xDF) { + $bytesNeeded = 1; + $codePoint = $byte & 0x1F; + } elseif ($byte >= 0xE0 && $byte <= 0xEF) { + if (0xE0 === $byte) { + $lowerBoundary = 0xA0; + } elseif (0xED === $byte) { + $upperBoundary = 0x9F; + } + + $bytesNeeded = 2; + $codePoint = $byte & 0xF; + } elseif ($byte >= 0xF0 && $byte <= 0xF4) { + if (0xF0 === $byte) { + $lowerBoundary = 0x90; + } elseif (0xF4 === $byte) { + $upperBoundary = 0x8F; + } + + $bytesNeeded = 3; + $codePoint = $byte & 0x7; + } else { + $codePoints[] = 0xFFFD; + } + + continue; + } + + if ($byte < $lowerBoundary || $byte > $upperBoundary) { + $codePoint = 0; + $bytesNeeded = 0; + $bytesSeen = 0; + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + --$i; + $codePoints[] = 0xFFFD; + + continue; + } + + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + $codePoint = ($codePoint << 6) | ($byte & 0x3F); + + if (++$bytesSeen !== $bytesNeeded) { + continue; + } + + $codePoints[] = $codePoint; + $codePoint = 0; + $bytesNeeded = 0; + $bytesSeen = 0; + } + + // String unexpectedly ended, so append a U+FFFD code point. + if (0 !== $bytesNeeded) { + $codePoints[] = 0xFFFD; + } + + return $codePoints; + } + + /** + * @param int $codePoint + * @param bool $useSTD3ASCIIRules + * + * @return array{status: string, mapping?: string} + */ + private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules) + { + if (!self::$mappingTableLoaded) { + self::$mappingTableLoaded = true; + self::$mapped = require __DIR__.'/Resources/unidata/mapped.php'; + self::$ignored = require __DIR__.'/Resources/unidata/ignored.php'; + self::$deviation = require __DIR__.'/Resources/unidata/deviation.php'; + self::$disallowed = require __DIR__.'/Resources/unidata/disallowed.php'; + self::$disallowed_STD3_mapped = require __DIR__.'/Resources/unidata/disallowed_STD3_mapped.php'; + self::$disallowed_STD3_valid = require __DIR__.'/Resources/unidata/disallowed_STD3_valid.php'; + } + + if (isset(self::$mapped[$codePoint])) { + return ['status' => 'mapped', 'mapping' => self::$mapped[$codePoint]]; + } + + if (isset(self::$ignored[$codePoint])) { + return ['status' => 'ignored']; + } + + if (isset(self::$deviation[$codePoint])) { + return ['status' => 'deviation', 'mapping' => self::$deviation[$codePoint]]; + } + + if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) { + return ['status' => 'disallowed']; + } + + $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]); + + if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) { + $status = 'disallowed'; + + if (!$useSTD3ASCIIRules) { + $status = $isDisallowedMapped ? 'mapped' : 'valid'; + } + + if ($isDisallowedMapped) { + return ['status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]]; + } + + return ['status' => $status]; + } + + return ['status' => 'valid']; + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Info.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Info.php new file mode 100644 index 0000000..25c3582 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Info.php @@ -0,0 +1,23 @@ + and Trevor Rowbotham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn; + +/** + * @internal + */ +class Info +{ + public $bidiDomain = false; + public $errors = 0; + public $validBidiDomain = true; + public $transitionalDifferent = false; +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/LICENSE b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/LICENSE new file mode 100644 index 0000000..fd0a062 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-present Fabien Potencier and Trevor Rowbotham + +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/symfony/polyfill-intl-idn/README.md b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/README.md new file mode 100644 index 0000000..cae5517 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Intl: Idn +============================ + +This component provides [`idn_to_ascii`](https://php.net/idn-to-ascii) and [`idn_to_utf8`](https://php.net/idn-to-utf8) functions to users who run php versions without the [Intl](https://php.net/intl) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php new file mode 100644 index 0000000..d285acd --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php @@ -0,0 +1,384 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; + +/** + * @internal + */ +final class DisallowedRanges +{ + /** + * @param int $codePoint + * + * @return bool + */ + public static function inRange($codePoint) + { + if ($codePoint >= 128 && $codePoint <= 159) { + return true; + } + + if ($codePoint >= 2155 && $codePoint <= 2207) { + return true; + } + + if ($codePoint >= 3676 && $codePoint <= 3712) { + return true; + } + + if ($codePoint >= 3808 && $codePoint <= 3839) { + return true; + } + + if ($codePoint >= 4059 && $codePoint <= 4095) { + return true; + } + + if ($codePoint >= 4256 && $codePoint <= 4293) { + return true; + } + + if ($codePoint >= 6849 && $codePoint <= 6911) { + return true; + } + + if ($codePoint >= 11859 && $codePoint <= 11903) { + return true; + } + + if ($codePoint >= 42955 && $codePoint <= 42996) { + return true; + } + + if ($codePoint >= 55296 && $codePoint <= 57343) { + return true; + } + + if ($codePoint >= 57344 && $codePoint <= 63743) { + return true; + } + + if ($codePoint >= 64218 && $codePoint <= 64255) { + return true; + } + + if ($codePoint >= 64976 && $codePoint <= 65007) { + return true; + } + + if ($codePoint >= 65630 && $codePoint <= 65663) { + return true; + } + + if ($codePoint >= 65953 && $codePoint <= 65999) { + return true; + } + + if ($codePoint >= 66046 && $codePoint <= 66175) { + return true; + } + + if ($codePoint >= 66518 && $codePoint <= 66559) { + return true; + } + + if ($codePoint >= 66928 && $codePoint <= 67071) { + return true; + } + + if ($codePoint >= 67432 && $codePoint <= 67583) { + return true; + } + + if ($codePoint >= 67760 && $codePoint <= 67807) { + return true; + } + + if ($codePoint >= 67904 && $codePoint <= 67967) { + return true; + } + + if ($codePoint >= 68256 && $codePoint <= 68287) { + return true; + } + + if ($codePoint >= 68528 && $codePoint <= 68607) { + return true; + } + + if ($codePoint >= 68681 && $codePoint <= 68735) { + return true; + } + + if ($codePoint >= 68922 && $codePoint <= 69215) { + return true; + } + + if ($codePoint >= 69298 && $codePoint <= 69375) { + return true; + } + + if ($codePoint >= 69466 && $codePoint <= 69551) { + return true; + } + + if ($codePoint >= 70207 && $codePoint <= 70271) { + return true; + } + + if ($codePoint >= 70517 && $codePoint <= 70655) { + return true; + } + + if ($codePoint >= 70874 && $codePoint <= 71039) { + return true; + } + + if ($codePoint >= 71134 && $codePoint <= 71167) { + return true; + } + + if ($codePoint >= 71370 && $codePoint <= 71423) { + return true; + } + + if ($codePoint >= 71488 && $codePoint <= 71679) { + return true; + } + + if ($codePoint >= 71740 && $codePoint <= 71839) { + return true; + } + + if ($codePoint >= 72026 && $codePoint <= 72095) { + return true; + } + + if ($codePoint >= 72441 && $codePoint <= 72703) { + return true; + } + + if ($codePoint >= 72887 && $codePoint <= 72959) { + return true; + } + + if ($codePoint >= 73130 && $codePoint <= 73439) { + return true; + } + + if ($codePoint >= 73465 && $codePoint <= 73647) { + return true; + } + + if ($codePoint >= 74650 && $codePoint <= 74751) { + return true; + } + + if ($codePoint >= 75076 && $codePoint <= 77823) { + return true; + } + + if ($codePoint >= 78905 && $codePoint <= 82943) { + return true; + } + + if ($codePoint >= 83527 && $codePoint <= 92159) { + return true; + } + + if ($codePoint >= 92784 && $codePoint <= 92879) { + return true; + } + + if ($codePoint >= 93072 && $codePoint <= 93759) { + return true; + } + + if ($codePoint >= 93851 && $codePoint <= 93951) { + return true; + } + + if ($codePoint >= 94112 && $codePoint <= 94175) { + return true; + } + + if ($codePoint >= 101590 && $codePoint <= 101631) { + return true; + } + + if ($codePoint >= 101641 && $codePoint <= 110591) { + return true; + } + + if ($codePoint >= 110879 && $codePoint <= 110927) { + return true; + } + + if ($codePoint >= 111356 && $codePoint <= 113663) { + return true; + } + + if ($codePoint >= 113828 && $codePoint <= 118783) { + return true; + } + + if ($codePoint >= 119366 && $codePoint <= 119519) { + return true; + } + + if ($codePoint >= 119673 && $codePoint <= 119807) { + return true; + } + + if ($codePoint >= 121520 && $codePoint <= 122879) { + return true; + } + + if ($codePoint >= 122923 && $codePoint <= 123135) { + return true; + } + + if ($codePoint >= 123216 && $codePoint <= 123583) { + return true; + } + + if ($codePoint >= 123648 && $codePoint <= 124927) { + return true; + } + + if ($codePoint >= 125143 && $codePoint <= 125183) { + return true; + } + + if ($codePoint >= 125280 && $codePoint <= 126064) { + return true; + } + + if ($codePoint >= 126133 && $codePoint <= 126208) { + return true; + } + + if ($codePoint >= 126270 && $codePoint <= 126463) { + return true; + } + + if ($codePoint >= 126652 && $codePoint <= 126703) { + return true; + } + + if ($codePoint >= 126706 && $codePoint <= 126975) { + return true; + } + + if ($codePoint >= 127406 && $codePoint <= 127461) { + return true; + } + + if ($codePoint >= 127590 && $codePoint <= 127743) { + return true; + } + + if ($codePoint >= 129202 && $codePoint <= 129279) { + return true; + } + + if ($codePoint >= 129751 && $codePoint <= 129791) { + return true; + } + + if ($codePoint >= 129995 && $codePoint <= 130031) { + return true; + } + + if ($codePoint >= 130042 && $codePoint <= 131069) { + return true; + } + + if ($codePoint >= 173790 && $codePoint <= 173823) { + return true; + } + + if ($codePoint >= 191457 && $codePoint <= 194559) { + return true; + } + + if ($codePoint >= 195102 && $codePoint <= 196605) { + return true; + } + + if ($codePoint >= 201547 && $codePoint <= 262141) { + return true; + } + + if ($codePoint >= 262144 && $codePoint <= 327677) { + return true; + } + + if ($codePoint >= 327680 && $codePoint <= 393213) { + return true; + } + + if ($codePoint >= 393216 && $codePoint <= 458749) { + return true; + } + + if ($codePoint >= 458752 && $codePoint <= 524285) { + return true; + } + + if ($codePoint >= 524288 && $codePoint <= 589821) { + return true; + } + + if ($codePoint >= 589824 && $codePoint <= 655357) { + return true; + } + + if ($codePoint >= 655360 && $codePoint <= 720893) { + return true; + } + + if ($codePoint >= 720896 && $codePoint <= 786429) { + return true; + } + + if ($codePoint >= 786432 && $codePoint <= 851965) { + return true; + } + + if ($codePoint >= 851968 && $codePoint <= 917501) { + return true; + } + + if ($codePoint >= 917536 && $codePoint <= 917631) { + return true; + } + + if ($codePoint >= 917632 && $codePoint <= 917759) { + return true; + } + + if ($codePoint >= 918000 && $codePoint <= 983037) { + return true; + } + + if ($codePoint >= 983040 && $codePoint <= 1048573) { + return true; + } + + if ($codePoint >= 1048576 && $codePoint <= 1114109) { + return true; + } + + return false; + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php new file mode 100644 index 0000000..3c6af0c --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; + +/** + * @internal + */ +final class Regex +{ + const COMBINING_MARK = '/^[\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{0903}\x{093A}\x{093B}\x{093C}\x{093E}-\x{0940}\x{0941}-\x{0948}\x{0949}-\x{094C}\x{094D}\x{094E}-\x{094F}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{0982}-\x{0983}\x{09BC}\x{09BE}-\x{09C0}\x{09C1}-\x{09C4}\x{09C7}-\x{09C8}\x{09CB}-\x{09CC}\x{09CD}\x{09D7}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A03}\x{0A3C}\x{0A3E}-\x{0A40}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0A83}\x{0ABC}\x{0ABE}-\x{0AC0}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0AC9}\x{0ACB}-\x{0ACC}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B02}-\x{0B03}\x{0B3C}\x{0B3E}\x{0B3F}\x{0B40}\x{0B41}-\x{0B44}\x{0B47}-\x{0B48}\x{0B4B}-\x{0B4C}\x{0B4D}\x{0B55}-\x{0B56}\x{0B57}\x{0B62}-\x{0B63}\x{0B82}\x{0BBE}-\x{0BBF}\x{0BC0}\x{0BC1}-\x{0BC2}\x{0BC6}-\x{0BC8}\x{0BCA}-\x{0BCC}\x{0BCD}\x{0BD7}\x{0C00}\x{0C01}-\x{0C03}\x{0C04}\x{0C3E}-\x{0C40}\x{0C41}-\x{0C44}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0C82}-\x{0C83}\x{0CBC}\x{0CBE}\x{0CBF}\x{0CC0}-\x{0CC4}\x{0CC6}\x{0CC7}-\x{0CC8}\x{0CCA}-\x{0CCB}\x{0CCC}-\x{0CCD}\x{0CD5}-\x{0CD6}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D02}-\x{0D03}\x{0D3B}-\x{0D3C}\x{0D3E}-\x{0D40}\x{0D41}-\x{0D44}\x{0D46}-\x{0D48}\x{0D4A}-\x{0D4C}\x{0D4D}\x{0D57}\x{0D62}-\x{0D63}\x{0D81}\x{0D82}-\x{0D83}\x{0DCA}\x{0DCF}-\x{0DD1}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0DD8}-\x{0DDF}\x{0DF2}-\x{0DF3}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3E}-\x{0F3F}\x{0F71}-\x{0F7E}\x{0F7F}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102B}-\x{102C}\x{102D}-\x{1030}\x{1031}\x{1032}-\x{1037}\x{1038}\x{1039}-\x{103A}\x{103B}-\x{103C}\x{103D}-\x{103E}\x{1056}-\x{1057}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1062}-\x{1064}\x{1067}-\x{106D}\x{1071}-\x{1074}\x{1082}\x{1083}-\x{1084}\x{1085}-\x{1086}\x{1087}-\x{108C}\x{108D}\x{108F}\x{109A}-\x{109C}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B6}\x{17B7}-\x{17BD}\x{17BE}-\x{17C5}\x{17C6}\x{17C7}-\x{17C8}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1923}-\x{1926}\x{1927}-\x{1928}\x{1929}-\x{192B}\x{1930}-\x{1931}\x{1932}\x{1933}-\x{1938}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A19}-\x{1A1A}\x{1A1B}\x{1A55}\x{1A56}\x{1A57}\x{1A58}-\x{1A5E}\x{1A60}\x{1A61}\x{1A62}\x{1A63}-\x{1A64}\x{1A65}-\x{1A6C}\x{1A6D}-\x{1A72}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B04}\x{1B34}\x{1B35}\x{1B36}-\x{1B3A}\x{1B3B}\x{1B3C}\x{1B3D}-\x{1B41}\x{1B42}\x{1B43}-\x{1B44}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1B82}\x{1BA1}\x{1BA2}-\x{1BA5}\x{1BA6}-\x{1BA7}\x{1BA8}-\x{1BA9}\x{1BAA}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE7}\x{1BE8}-\x{1BE9}\x{1BEA}-\x{1BEC}\x{1BED}\x{1BEE}\x{1BEF}-\x{1BF1}\x{1BF2}-\x{1BF3}\x{1C24}-\x{1C2B}\x{1C2C}-\x{1C33}\x{1C34}-\x{1C35}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE1}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF7}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{302E}-\x{302F}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A823}-\x{A824}\x{A825}-\x{A826}\x{A827}\x{A82C}\x{A880}-\x{A881}\x{A8B4}-\x{A8C3}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A952}-\x{A953}\x{A980}-\x{A982}\x{A983}\x{A9B3}\x{A9B4}-\x{A9B5}\x{A9B6}-\x{A9B9}\x{A9BA}-\x{A9BB}\x{A9BC}-\x{A9BD}\x{A9BE}-\x{A9C0}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA2F}-\x{AA30}\x{AA31}-\x{AA32}\x{AA33}-\x{AA34}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA4D}\x{AA7B}\x{AA7C}\x{AA7D}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEB}\x{AAEC}-\x{AAED}\x{AAEE}-\x{AAEF}\x{AAF5}\x{AAF6}\x{ABE3}-\x{ABE4}\x{ABE5}\x{ABE6}-\x{ABE7}\x{ABE8}\x{ABE9}-\x{ABEA}\x{ABEC}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11000}\x{11001}\x{11002}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{11082}\x{110B0}-\x{110B2}\x{110B3}-\x{110B6}\x{110B7}-\x{110B8}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112C}\x{1112D}-\x{11134}\x{11145}-\x{11146}\x{11173}\x{11180}-\x{11181}\x{11182}\x{111B3}-\x{111B5}\x{111B6}-\x{111BE}\x{111BF}-\x{111C0}\x{111C9}-\x{111CC}\x{111CE}\x{111CF}\x{1122C}-\x{1122E}\x{1122F}-\x{11231}\x{11232}-\x{11233}\x{11234}\x{11235}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E0}-\x{112E2}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{11302}-\x{11303}\x{1133B}-\x{1133C}\x{1133E}-\x{1133F}\x{11340}\x{11341}-\x{11344}\x{11347}-\x{11348}\x{1134B}-\x{1134D}\x{11357}\x{11362}-\x{11363}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11435}-\x{11437}\x{11438}-\x{1143F}\x{11440}-\x{11441}\x{11442}-\x{11444}\x{11445}\x{11446}\x{1145E}\x{114B0}-\x{114B2}\x{114B3}-\x{114B8}\x{114B9}\x{114BA}\x{114BB}-\x{114BE}\x{114BF}-\x{114C0}\x{114C1}\x{114C2}-\x{114C3}\x{115AF}-\x{115B1}\x{115B2}-\x{115B5}\x{115B8}-\x{115BB}\x{115BC}-\x{115BD}\x{115BE}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11630}-\x{11632}\x{11633}-\x{1163A}\x{1163B}-\x{1163C}\x{1163D}\x{1163E}\x{1163F}-\x{11640}\x{116AB}\x{116AC}\x{116AD}\x{116AE}-\x{116AF}\x{116B0}-\x{116B5}\x{116B6}\x{116B7}\x{1171D}-\x{1171F}\x{11720}-\x{11721}\x{11722}-\x{11725}\x{11726}\x{11727}-\x{1172B}\x{1182C}-\x{1182E}\x{1182F}-\x{11837}\x{11838}\x{11839}-\x{1183A}\x{11930}-\x{11935}\x{11937}-\x{11938}\x{1193B}-\x{1193C}\x{1193D}\x{1193E}\x{11940}\x{11942}\x{11943}\x{119D1}-\x{119D3}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119DC}-\x{119DF}\x{119E0}\x{119E4}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A39}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A57}-\x{11A58}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A97}\x{11A98}-\x{11A99}\x{11C2F}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3E}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CA9}\x{11CAA}-\x{11CB0}\x{11CB1}\x{11CB2}-\x{11CB3}\x{11CB4}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D8A}-\x{11D8E}\x{11D90}-\x{11D91}\x{11D93}-\x{11D94}\x{11D95}\x{11D96}\x{11D97}\x{11EF3}-\x{11EF4}\x{11EF5}-\x{11EF6}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F51}-\x{16F87}\x{16F8F}-\x{16F92}\x{16FE4}\x{16FF0}-\x{16FF1}\x{1BC9D}-\x{1BC9E}\x{1D165}-\x{1D166}\x{1D167}-\x{1D169}\x{1D16D}-\x{1D172}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]/u'; + + const RTL_LABEL = '/[\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{200F}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u'; + + const BIDI_STEP_1_LTR = '/^[^\x{0000}-\x{0008}\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{000E}-\x{001B}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{0030}-\x{0039}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0085}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B2}-\x{00B3}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00B9}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{1680}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{2000}-\x{200A}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{205F}\x{2060}-\x{2064}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}\x{206A}-\x{206F}\x{2070}\x{2074}-\x{2079}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{2080}-\x{2089}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{2488}-\x{249B}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3000}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF10}-\x{FF19}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{102E1}-\x{102FB}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1D7CE}-\x{1D7FF}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F100}-\x{1F10A}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FBF0}-\x{1FBF9}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}]/u'; + const BIDI_STEP_1_RTL = '/^[\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{200F}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u'; + const BIDI_STEP_2 = '/[^\x{0000}-\x{0008}\x{000E}-\x{001B}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{0030}-\x{0039}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B2}-\x{00B3}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00B9}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{2060}-\x{2064}\x{2065}\x{206A}-\x{206F}\x{2070}\x{2074}-\x{2079}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{2080}-\x{2089}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{2488}-\x{249B}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF10}-\x{FF19}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{102E1}-\x{102FB}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1D7CE}-\x{1D7FF}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F100}-\x{1F10A}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FBF0}-\x{1FBF9}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}]/u'; + const BIDI_STEP_3 = '/[\x{0030}-\x{0039}\x{00B2}-\x{00B3}\x{00B9}\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06F0}-\x{06F9}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{200F}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2488}-\x{249B}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FF10}-\x{FF19}\x{102E1}-\x{102FB}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1D7CE}-\x{1D7FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F100}-\x{1F10A}\x{1FBF0}-\x{1FBF9}][\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1D167}-\x{1D169}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]*$/u'; + const BIDI_STEP_4_AN = '/[\x{0600}-\x{0605}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{06DD}\x{08E2}\x{10D30}-\x{10D39}\x{10E60}-\x{10E7E}]/u'; + const BIDI_STEP_4_EN = '/[\x{0030}-\x{0039}\x{00B2}-\x{00B3}\x{00B9}\x{06F0}-\x{06F9}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2488}-\x{249B}\x{FF10}-\x{FF19}\x{102E1}-\x{102FB}\x{1D7CE}-\x{1D7FF}\x{1F100}-\x{1F10A}\x{1FBF0}-\x{1FBF9}]/u'; + const BIDI_STEP_5 = '/[\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0085}\x{0590}\x{05BE}\x{05C0}\x{05C3}\x{05C6}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0608}\x{060B}\x{060D}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{0660}-\x{0669}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06DD}\x{06E5}-\x{06E6}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0712}-\x{072F}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07F4}-\x{07F5}\x{07FA}\x{07FB}-\x{07FC}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{081A}\x{0824}\x{0828}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08E2}\x{1680}\x{2000}-\x{200A}\x{200F}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{205F}\x{2066}\x{2067}\x{2068}\x{2069}\x{3000}\x{FB1D}\x{FB1F}-\x{FB28}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFE}-\x{FDFF}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A04}\x{10A07}-\x{10A0B}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A3B}-\x{10A3E}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}]/u'; + const BIDI_STEP_6 = '/[^\x{0000}-\x{0008}\x{0009}\x{000A}\x{000B}\x{000C}\x{000D}\x{000E}-\x{001B}\x{001C}-\x{001E}\x{001F}\x{0020}\x{0021}-\x{0022}\x{0023}\x{0024}\x{0025}\x{0026}-\x{0027}\x{0028}\x{0029}\x{002A}\x{002B}\x{002C}\x{002D}\x{002E}-\x{002F}\x{003A}\x{003B}\x{003C}-\x{003E}\x{003F}-\x{0040}\x{005B}\x{005C}\x{005D}\x{005E}\x{005F}\x{0060}\x{007B}\x{007C}\x{007D}\x{007E}\x{007F}-\x{0084}\x{0085}\x{0086}-\x{009F}\x{00A0}\x{00A1}\x{00A2}-\x{00A5}\x{00A6}\x{00A7}\x{00A8}\x{00A9}\x{00AB}\x{00AC}\x{00AD}\x{00AE}\x{00AF}\x{00B0}\x{00B1}\x{00B4}\x{00B6}-\x{00B7}\x{00B8}\x{00BB}\x{00BC}-\x{00BE}\x{00BF}\x{00D7}\x{00F7}\x{02B9}-\x{02BA}\x{02C2}-\x{02C5}\x{02C6}-\x{02CF}\x{02D2}-\x{02DF}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037E}\x{0384}-\x{0385}\x{0387}\x{03F6}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{058A}\x{058D}-\x{058E}\x{058F}\x{0590}\x{0591}-\x{05BD}\x{05BE}\x{05BF}\x{05C0}\x{05C1}-\x{05C2}\x{05C3}\x{05C4}-\x{05C5}\x{05C6}\x{05C7}\x{05C8}-\x{05CF}\x{05D0}-\x{05EA}\x{05EB}-\x{05EE}\x{05EF}-\x{05F2}\x{05F3}-\x{05F4}\x{05F5}-\x{05FF}\x{0600}-\x{0605}\x{0606}-\x{0607}\x{0608}\x{0609}-\x{060A}\x{060B}\x{060C}\x{060D}\x{060E}-\x{060F}\x{0610}-\x{061A}\x{061B}\x{061C}\x{061D}\x{061E}-\x{061F}\x{0620}-\x{063F}\x{0640}\x{0641}-\x{064A}\x{064B}-\x{065F}\x{0660}-\x{0669}\x{066A}\x{066B}-\x{066C}\x{066D}\x{066E}-\x{066F}\x{0670}\x{0671}-\x{06D3}\x{06D4}\x{06D5}\x{06D6}-\x{06DC}\x{06DD}\x{06DE}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06E9}\x{06EA}-\x{06ED}\x{06EE}-\x{06EF}\x{06FA}-\x{06FC}\x{06FD}-\x{06FE}\x{06FF}\x{0700}-\x{070D}\x{070E}\x{070F}\x{0710}\x{0711}\x{0712}-\x{072F}\x{0730}-\x{074A}\x{074B}-\x{074C}\x{074D}-\x{07A5}\x{07A6}-\x{07B0}\x{07B1}\x{07B2}-\x{07BF}\x{07C0}-\x{07C9}\x{07CA}-\x{07EA}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07F6}\x{07F7}-\x{07F9}\x{07FA}\x{07FB}-\x{07FC}\x{07FD}\x{07FE}-\x{07FF}\x{0800}-\x{0815}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{082E}-\x{082F}\x{0830}-\x{083E}\x{083F}\x{0840}-\x{0858}\x{0859}-\x{085B}\x{085C}-\x{085D}\x{085E}\x{085F}\x{0860}-\x{086A}\x{086B}-\x{086F}\x{0870}-\x{089F}\x{08A0}-\x{08B4}\x{08B5}\x{08B6}-\x{08C7}\x{08C8}-\x{08D2}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09F2}-\x{09F3}\x{09FB}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AF1}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0BF3}-\x{0BF8}\x{0BF9}\x{0BFA}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C78}-\x{0C7E}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E3F}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F3A}\x{0F3B}\x{0F3C}\x{0F3D}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1390}-\x{1399}\x{1400}\x{1680}\x{169B}\x{169C}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DB}\x{17DD}\x{17F0}-\x{17F9}\x{1800}-\x{1805}\x{1806}\x{1807}-\x{180A}\x{180B}-\x{180D}\x{180E}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1940}\x{1944}-\x{1945}\x{19DE}-\x{19FF}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{2000}-\x{200A}\x{200B}-\x{200D}\x{200F}\x{2010}-\x{2015}\x{2016}-\x{2017}\x{2018}\x{2019}\x{201A}\x{201B}-\x{201C}\x{201D}\x{201E}\x{201F}\x{2020}-\x{2027}\x{2028}\x{2029}\x{202A}\x{202B}\x{202C}\x{202D}\x{202E}\x{202F}\x{2030}-\x{2034}\x{2035}-\x{2038}\x{2039}\x{203A}\x{203B}-\x{203E}\x{203F}-\x{2040}\x{2041}-\x{2043}\x{2044}\x{2045}\x{2046}\x{2047}-\x{2051}\x{2052}\x{2053}\x{2054}\x{2055}-\x{205E}\x{205F}\x{2060}-\x{2064}\x{2065}\x{2066}\x{2067}\x{2068}\x{2069}\x{206A}-\x{206F}\x{207A}-\x{207B}\x{207C}\x{207D}\x{207E}\x{208A}-\x{208B}\x{208C}\x{208D}\x{208E}\x{20A0}-\x{20BF}\x{20C0}-\x{20CF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2117}\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}\x{214B}\x{214C}-\x{214D}\x{2150}-\x{215F}\x{2189}\x{218A}-\x{218B}\x{2190}-\x{2194}\x{2195}-\x{2199}\x{219A}-\x{219B}\x{219C}-\x{219F}\x{21A0}\x{21A1}-\x{21A2}\x{21A3}\x{21A4}-\x{21A5}\x{21A6}\x{21A7}-\x{21AD}\x{21AE}\x{21AF}-\x{21CD}\x{21CE}-\x{21CF}\x{21D0}-\x{21D1}\x{21D2}\x{21D3}\x{21D4}\x{21D5}-\x{21F3}\x{21F4}-\x{2211}\x{2212}\x{2213}\x{2214}-\x{22FF}\x{2300}-\x{2307}\x{2308}\x{2309}\x{230A}\x{230B}\x{230C}-\x{231F}\x{2320}-\x{2321}\x{2322}-\x{2328}\x{2329}\x{232A}\x{232B}-\x{2335}\x{237B}\x{237C}\x{237D}-\x{2394}\x{2396}-\x{239A}\x{239B}-\x{23B3}\x{23B4}-\x{23DB}\x{23DC}-\x{23E1}\x{23E2}-\x{2426}\x{2440}-\x{244A}\x{2460}-\x{2487}\x{24EA}-\x{24FF}\x{2500}-\x{25B6}\x{25B7}\x{25B8}-\x{25C0}\x{25C1}\x{25C2}-\x{25F7}\x{25F8}-\x{25FF}\x{2600}-\x{266E}\x{266F}\x{2670}-\x{26AB}\x{26AD}-\x{2767}\x{2768}\x{2769}\x{276A}\x{276B}\x{276C}\x{276D}\x{276E}\x{276F}\x{2770}\x{2771}\x{2772}\x{2773}\x{2774}\x{2775}\x{2776}-\x{2793}\x{2794}-\x{27BF}\x{27C0}-\x{27C4}\x{27C5}\x{27C6}\x{27C7}-\x{27E5}\x{27E6}\x{27E7}\x{27E8}\x{27E9}\x{27EA}\x{27EB}\x{27EC}\x{27ED}\x{27EE}\x{27EF}\x{27F0}-\x{27FF}\x{2900}-\x{2982}\x{2983}\x{2984}\x{2985}\x{2986}\x{2987}\x{2988}\x{2989}\x{298A}\x{298B}\x{298C}\x{298D}\x{298E}\x{298F}\x{2990}\x{2991}\x{2992}\x{2993}\x{2994}\x{2995}\x{2996}\x{2997}\x{2998}\x{2999}-\x{29D7}\x{29D8}\x{29D9}\x{29DA}\x{29DB}\x{29DC}-\x{29FB}\x{29FC}\x{29FD}\x{29FE}-\x{2AFF}\x{2B00}-\x{2B2F}\x{2B30}-\x{2B44}\x{2B45}-\x{2B46}\x{2B47}-\x{2B4C}\x{2B4D}-\x{2B73}\x{2B76}-\x{2B95}\x{2B97}-\x{2BFF}\x{2CE5}-\x{2CEA}\x{2CEF}-\x{2CF1}\x{2CF9}-\x{2CFC}\x{2CFD}\x{2CFE}-\x{2CFF}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E00}-\x{2E01}\x{2E02}\x{2E03}\x{2E04}\x{2E05}\x{2E06}-\x{2E08}\x{2E09}\x{2E0A}\x{2E0B}\x{2E0C}\x{2E0D}\x{2E0E}-\x{2E16}\x{2E17}\x{2E18}-\x{2E19}\x{2E1A}\x{2E1B}\x{2E1C}\x{2E1D}\x{2E1E}-\x{2E1F}\x{2E20}\x{2E21}\x{2E22}\x{2E23}\x{2E24}\x{2E25}\x{2E26}\x{2E27}\x{2E28}\x{2E29}\x{2E2A}-\x{2E2E}\x{2E2F}\x{2E30}-\x{2E39}\x{2E3A}-\x{2E3B}\x{2E3C}-\x{2E3F}\x{2E40}\x{2E41}\x{2E42}\x{2E43}-\x{2E4F}\x{2E50}-\x{2E51}\x{2E52}\x{2E80}-\x{2E99}\x{2E9B}-\x{2EF3}\x{2F00}-\x{2FD5}\x{2FF0}-\x{2FFB}\x{3000}\x{3001}-\x{3003}\x{3004}\x{3008}\x{3009}\x{300A}\x{300B}\x{300C}\x{300D}\x{300E}\x{300F}\x{3010}\x{3011}\x{3012}-\x{3013}\x{3014}\x{3015}\x{3016}\x{3017}\x{3018}\x{3019}\x{301A}\x{301B}\x{301C}\x{301D}\x{301E}-\x{301F}\x{3020}\x{302A}-\x{302D}\x{3030}\x{3036}-\x{3037}\x{303D}\x{303E}-\x{303F}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{31C0}-\x{31E3}\x{321D}-\x{321E}\x{3250}\x{3251}-\x{325F}\x{327C}-\x{327E}\x{32B1}-\x{32BF}\x{32CC}-\x{32CF}\x{3377}-\x{337A}\x{33DE}-\x{33DF}\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A60D}-\x{A60F}\x{A66F}\x{A670}-\x{A672}\x{A673}\x{A674}-\x{A67D}\x{A67E}\x{A67F}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A788}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A828}-\x{A82B}\x{A82C}\x{A838}\x{A839}\x{A874}-\x{A877}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{AB6A}-\x{AB6B}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1D}\x{FB1E}\x{FB1F}-\x{FB28}\x{FB29}\x{FB2A}-\x{FB36}\x{FB37}\x{FB38}-\x{FB3C}\x{FB3D}\x{FB3E}\x{FB3F}\x{FB40}-\x{FB41}\x{FB42}\x{FB43}-\x{FB44}\x{FB45}\x{FB46}-\x{FB4F}\x{FB50}-\x{FBB1}\x{FBB2}-\x{FBC1}\x{FBC2}-\x{FBD2}\x{FBD3}-\x{FD3D}\x{FD3E}\x{FD3F}\x{FD40}-\x{FD4F}\x{FD50}-\x{FD8F}\x{FD90}-\x{FD91}\x{FD92}-\x{FDC7}\x{FDC8}-\x{FDCF}\x{FDD0}-\x{FDEF}\x{FDF0}-\x{FDFB}\x{FDFC}\x{FDFD}\x{FDFE}-\x{FDFF}\x{FE00}-\x{FE0F}\x{FE10}-\x{FE16}\x{FE17}\x{FE18}\x{FE19}\x{FE20}-\x{FE2F}\x{FE30}\x{FE31}-\x{FE32}\x{FE33}-\x{FE34}\x{FE35}\x{FE36}\x{FE37}\x{FE38}\x{FE39}\x{FE3A}\x{FE3B}\x{FE3C}\x{FE3D}\x{FE3E}\x{FE3F}\x{FE40}\x{FE41}\x{FE42}\x{FE43}\x{FE44}\x{FE45}-\x{FE46}\x{FE47}\x{FE48}\x{FE49}-\x{FE4C}\x{FE4D}-\x{FE4F}\x{FE50}\x{FE51}\x{FE52}\x{FE54}\x{FE55}\x{FE56}-\x{FE57}\x{FE58}\x{FE59}\x{FE5A}\x{FE5B}\x{FE5C}\x{FE5D}\x{FE5E}\x{FE5F}\x{FE60}-\x{FE61}\x{FE62}\x{FE63}\x{FE64}-\x{FE66}\x{FE68}\x{FE69}\x{FE6A}\x{FE6B}\x{FE70}-\x{FE74}\x{FE75}\x{FE76}-\x{FEFC}\x{FEFD}-\x{FEFE}\x{FEFF}\x{FF01}-\x{FF02}\x{FF03}\x{FF04}\x{FF05}\x{FF06}-\x{FF07}\x{FF08}\x{FF09}\x{FF0A}\x{FF0B}\x{FF0C}\x{FF0D}\x{FF0E}-\x{FF0F}\x{FF1A}\x{FF1B}\x{FF1C}-\x{FF1E}\x{FF1F}-\x{FF20}\x{FF3B}\x{FF3C}\x{FF3D}\x{FF3E}\x{FF3F}\x{FF40}\x{FF5B}\x{FF5C}\x{FF5D}\x{FF5E}\x{FF5F}\x{FF60}\x{FF61}\x{FF62}\x{FF63}\x{FF64}-\x{FF65}\x{FFE0}-\x{FFE1}\x{FFE2}\x{FFE3}\x{FFE4}\x{FFE5}-\x{FFE6}\x{FFE8}\x{FFE9}-\x{FFEC}\x{FFED}-\x{FFEE}\x{FFF0}-\x{FFF8}\x{FFF9}-\x{FFFB}\x{FFFC}-\x{FFFD}\x{FFFE}-\x{FFFF}\x{10101}\x{10140}-\x{10174}\x{10175}-\x{10178}\x{10179}-\x{10189}\x{1018A}-\x{1018B}\x{1018C}\x{10190}-\x{1019C}\x{101A0}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10800}-\x{10805}\x{10806}-\x{10807}\x{10808}\x{10809}\x{1080A}-\x{10835}\x{10836}\x{10837}-\x{10838}\x{10839}-\x{1083B}\x{1083C}\x{1083D}-\x{1083E}\x{1083F}-\x{10855}\x{10856}\x{10857}\x{10858}-\x{1085F}\x{10860}-\x{10876}\x{10877}-\x{10878}\x{10879}-\x{1087F}\x{10880}-\x{1089E}\x{1089F}-\x{108A6}\x{108A7}-\x{108AF}\x{108B0}-\x{108DF}\x{108E0}-\x{108F2}\x{108F3}\x{108F4}-\x{108F5}\x{108F6}-\x{108FA}\x{108FB}-\x{108FF}\x{10900}-\x{10915}\x{10916}-\x{1091B}\x{1091C}-\x{1091E}\x{1091F}\x{10920}-\x{10939}\x{1093A}-\x{1093E}\x{1093F}\x{10940}-\x{1097F}\x{10980}-\x{109B7}\x{109B8}-\x{109BB}\x{109BC}-\x{109BD}\x{109BE}-\x{109BF}\x{109C0}-\x{109CF}\x{109D0}-\x{109D1}\x{109D2}-\x{109FF}\x{10A00}\x{10A01}-\x{10A03}\x{10A04}\x{10A05}-\x{10A06}\x{10A07}-\x{10A0B}\x{10A0C}-\x{10A0F}\x{10A10}-\x{10A13}\x{10A14}\x{10A15}-\x{10A17}\x{10A18}\x{10A19}-\x{10A35}\x{10A36}-\x{10A37}\x{10A38}-\x{10A3A}\x{10A3B}-\x{10A3E}\x{10A3F}\x{10A40}-\x{10A48}\x{10A49}-\x{10A4F}\x{10A50}-\x{10A58}\x{10A59}-\x{10A5F}\x{10A60}-\x{10A7C}\x{10A7D}-\x{10A7E}\x{10A7F}\x{10A80}-\x{10A9C}\x{10A9D}-\x{10A9F}\x{10AA0}-\x{10ABF}\x{10AC0}-\x{10AC7}\x{10AC8}\x{10AC9}-\x{10AE4}\x{10AE5}-\x{10AE6}\x{10AE7}-\x{10AEA}\x{10AEB}-\x{10AEF}\x{10AF0}-\x{10AF6}\x{10AF7}-\x{10AFF}\x{10B00}-\x{10B35}\x{10B36}-\x{10B38}\x{10B39}-\x{10B3F}\x{10B40}-\x{10B55}\x{10B56}-\x{10B57}\x{10B58}-\x{10B5F}\x{10B60}-\x{10B72}\x{10B73}-\x{10B77}\x{10B78}-\x{10B7F}\x{10B80}-\x{10B91}\x{10B92}-\x{10B98}\x{10B99}-\x{10B9C}\x{10B9D}-\x{10BA8}\x{10BA9}-\x{10BAF}\x{10BB0}-\x{10BFF}\x{10C00}-\x{10C48}\x{10C49}-\x{10C7F}\x{10C80}-\x{10CB2}\x{10CB3}-\x{10CBF}\x{10CC0}-\x{10CF2}\x{10CF3}-\x{10CF9}\x{10CFA}-\x{10CFF}\x{10D00}-\x{10D23}\x{10D24}-\x{10D27}\x{10D28}-\x{10D2F}\x{10D30}-\x{10D39}\x{10D3A}-\x{10D3F}\x{10D40}-\x{10E5F}\x{10E60}-\x{10E7E}\x{10E7F}\x{10E80}-\x{10EA9}\x{10EAA}\x{10EAB}-\x{10EAC}\x{10EAD}\x{10EAE}-\x{10EAF}\x{10EB0}-\x{10EB1}\x{10EB2}-\x{10EFF}\x{10F00}-\x{10F1C}\x{10F1D}-\x{10F26}\x{10F27}\x{10F28}-\x{10F2F}\x{10F30}-\x{10F45}\x{10F46}-\x{10F50}\x{10F51}-\x{10F54}\x{10F55}-\x{10F59}\x{10F5A}-\x{10F6F}\x{10F70}-\x{10FAF}\x{10FB0}-\x{10FC4}\x{10FC5}-\x{10FCB}\x{10FCC}-\x{10FDF}\x{10FE0}-\x{10FF6}\x{10FF7}-\x{10FFF}\x{11001}\x{11038}-\x{11046}\x{11052}-\x{11065}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{11660}-\x{1166C}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{11FD5}-\x{11FDC}\x{11FDD}-\x{11FE0}\x{11FE1}-\x{11FF1}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE2}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D200}-\x{1D241}\x{1D242}-\x{1D244}\x{1D245}\x{1D300}-\x{1D356}\x{1D6DB}\x{1D715}\x{1D74F}\x{1D789}\x{1D7C3}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E2FF}\x{1E800}-\x{1E8C4}\x{1E8C5}-\x{1E8C6}\x{1E8C7}-\x{1E8CF}\x{1E8D0}-\x{1E8D6}\x{1E8D7}-\x{1E8FF}\x{1E900}-\x{1E943}\x{1E944}-\x{1E94A}\x{1E94B}\x{1E94C}-\x{1E94F}\x{1E950}-\x{1E959}\x{1E95A}-\x{1E95D}\x{1E95E}-\x{1E95F}\x{1E960}-\x{1EC6F}\x{1EC70}\x{1EC71}-\x{1ECAB}\x{1ECAC}\x{1ECAD}-\x{1ECAF}\x{1ECB0}\x{1ECB1}-\x{1ECB4}\x{1ECB5}-\x{1ECBF}\x{1ECC0}-\x{1ECFF}\x{1ED00}\x{1ED01}-\x{1ED2D}\x{1ED2E}\x{1ED2F}-\x{1ED3D}\x{1ED3E}-\x{1ED4F}\x{1ED50}-\x{1EDFF}\x{1EE00}-\x{1EE03}\x{1EE04}\x{1EE05}-\x{1EE1F}\x{1EE20}\x{1EE21}-\x{1EE22}\x{1EE23}\x{1EE24}\x{1EE25}-\x{1EE26}\x{1EE27}\x{1EE28}\x{1EE29}-\x{1EE32}\x{1EE33}\x{1EE34}-\x{1EE37}\x{1EE38}\x{1EE39}\x{1EE3A}\x{1EE3B}\x{1EE3C}-\x{1EE41}\x{1EE42}\x{1EE43}-\x{1EE46}\x{1EE47}\x{1EE48}\x{1EE49}\x{1EE4A}\x{1EE4B}\x{1EE4C}\x{1EE4D}-\x{1EE4F}\x{1EE50}\x{1EE51}-\x{1EE52}\x{1EE53}\x{1EE54}\x{1EE55}-\x{1EE56}\x{1EE57}\x{1EE58}\x{1EE59}\x{1EE5A}\x{1EE5B}\x{1EE5C}\x{1EE5D}\x{1EE5E}\x{1EE5F}\x{1EE60}\x{1EE61}-\x{1EE62}\x{1EE63}\x{1EE64}\x{1EE65}-\x{1EE66}\x{1EE67}-\x{1EE6A}\x{1EE6B}\x{1EE6C}-\x{1EE72}\x{1EE73}\x{1EE74}-\x{1EE77}\x{1EE78}\x{1EE79}-\x{1EE7C}\x{1EE7D}\x{1EE7E}\x{1EE7F}\x{1EE80}-\x{1EE89}\x{1EE8A}\x{1EE8B}-\x{1EE9B}\x{1EE9C}-\x{1EEA0}\x{1EEA1}-\x{1EEA3}\x{1EEA4}\x{1EEA5}-\x{1EEA9}\x{1EEAA}\x{1EEAB}-\x{1EEBB}\x{1EEBC}-\x{1EEEF}\x{1EEF0}-\x{1EEF1}\x{1EEF2}-\x{1EEFF}\x{1EF00}-\x{1EFFF}\x{1F000}-\x{1F02B}\x{1F030}-\x{1F093}\x{1F0A0}-\x{1F0AE}\x{1F0B1}-\x{1F0BF}\x{1F0C1}-\x{1F0CF}\x{1F0D1}-\x{1F0F5}\x{1F10B}-\x{1F10C}\x{1F10D}-\x{1F10F}\x{1F12F}\x{1F16A}-\x{1F16F}\x{1F1AD}\x{1F260}-\x{1F265}\x{1F300}-\x{1F3FA}\x{1F3FB}-\x{1F3FF}\x{1F400}-\x{1F6D7}\x{1F6E0}-\x{1F6EC}\x{1F6F0}-\x{1F6FC}\x{1F700}-\x{1F773}\x{1F780}-\x{1F7D8}\x{1F7E0}-\x{1F7EB}\x{1F800}-\x{1F80B}\x{1F810}-\x{1F847}\x{1F850}-\x{1F859}\x{1F860}-\x{1F887}\x{1F890}-\x{1F8AD}\x{1F8B0}-\x{1F8B1}\x{1F900}-\x{1F978}\x{1F97A}-\x{1F9CB}\x{1F9CD}-\x{1FA53}\x{1FA60}-\x{1FA6D}\x{1FA70}-\x{1FA74}\x{1FA78}-\x{1FA7A}\x{1FA80}-\x{1FA86}\x{1FA90}-\x{1FAA8}\x{1FAB0}-\x{1FAB6}\x{1FAC0}-\x{1FAC2}\x{1FAD0}-\x{1FAD6}\x{1FB00}-\x{1FB92}\x{1FB94}-\x{1FBCA}\x{1FFFE}-\x{1FFFF}\x{2FFFE}-\x{2FFFF}\x{3FFFE}-\x{3FFFF}\x{4FFFE}-\x{4FFFF}\x{5FFFE}-\x{5FFFF}\x{6FFFE}-\x{6FFFF}\x{7FFFE}-\x{7FFFF}\x{8FFFE}-\x{8FFFF}\x{9FFFE}-\x{9FFFF}\x{AFFFE}-\x{AFFFF}\x{BFFFE}-\x{BFFFF}\x{CFFFE}-\x{CFFFF}\x{DFFFE}-\x{E0000}\x{E0001}\x{E0002}-\x{E001F}\x{E0020}-\x{E007F}\x{E0080}-\x{E00FF}\x{E0100}-\x{E01EF}\x{E01F0}-\x{E0FFF}\x{EFFFE}-\x{EFFFF}\x{FFFFE}-\x{FFFFF}\x{10FFFE}-\x{10FFFF}][\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A06}\x{11A09}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1D167}-\x{1D169}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{E0100}-\x{E01EF}]*$/u'; + + const ZWNJ = '/([\x{A872}\x{10ACD}\x{10AD7}\x{10D00}\x{10FCB}\x{0620}\x{0626}\x{0628}\x{062A}-\x{062E}\x{0633}-\x{063F}\x{0641}-\x{0647}\x{0649}-\x{064A}\x{066E}-\x{066F}\x{0678}-\x{0687}\x{069A}-\x{06BF}\x{06C1}-\x{06C2}\x{06CC}\x{06CE}\x{06D0}-\x{06D1}\x{06FA}-\x{06FC}\x{06FF}\x{0712}-\x{0714}\x{071A}-\x{071D}\x{071F}-\x{0727}\x{0729}\x{072B}\x{072D}-\x{072E}\x{074E}-\x{0758}\x{075C}-\x{076A}\x{076D}-\x{0770}\x{0772}\x{0775}-\x{0777}\x{077A}-\x{077F}\x{07CA}-\x{07EA}\x{0841}-\x{0845}\x{0848}\x{084A}-\x{0853}\x{0855}\x{0860}\x{0862}-\x{0865}\x{0868}\x{08A0}-\x{08A9}\x{08AF}-\x{08B0}\x{08B3}-\x{08B4}\x{08B6}-\x{08B8}\x{08BA}-\x{08C7}\x{1807}\x{1820}-\x{1842}\x{1843}\x{1844}-\x{1878}\x{1887}-\x{18A8}\x{18AA}\x{A840}-\x{A871}\x{10AC0}-\x{10AC4}\x{10AD3}-\x{10AD6}\x{10AD8}-\x{10ADC}\x{10ADE}-\x{10AE0}\x{10AEB}-\x{10AEE}\x{10B80}\x{10B82}\x{10B86}-\x{10B88}\x{10B8A}-\x{10B8B}\x{10B8D}\x{10B90}\x{10BAD}-\x{10BAE}\x{10D01}-\x{10D21}\x{10D23}\x{10F30}-\x{10F32}\x{10F34}-\x{10F44}\x{10F51}-\x{10F53}\x{10FB0}\x{10FB2}-\x{10FB3}\x{10FB8}\x{10FBB}-\x{10FBC}\x{10FBE}-\x{10FBF}\x{10FC1}\x{10FC4}\x{10FCA}\x{1E900}-\x{1E943}][\x{00AD}\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{061C}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{200B}\x{200E}-\x{200F}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{206A}-\x{206F}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{FEFF}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{13430}-\x{13438}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1E94B}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}]*\x{200C}[\x{00AD}\x{0300}-\x{036F}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{0610}-\x{061A}\x{061C}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DF}-\x{06E4}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07FD}\x{0816}-\x{0819}\x{081B}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B55}-\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0D81}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EBC}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17DD}\x{180B}-\x{180D}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1ABF}-\x{1AC0}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{200B}\x{200E}-\x{200F}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{206A}-\x{206F}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2CEF}-\x{2CF1}\x{2D7F}\x{2DE0}-\x{2DFF}\x{302A}-\x{302D}\x{3099}-\x{309A}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A82C}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}-\x{A9BD}\x{A9E5}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AAEC}-\x{AAED}\x{AAF6}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FE00}-\x{FE0F}\x{FE20}-\x{FE2F}\x{FEFF}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10EAB}-\x{10EAC}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{111CF}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{1193B}-\x{1193C}\x{1193E}\x{11943}\x{119D4}-\x{119D7}\x{119DA}-\x{119DB}\x{119E0}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{13430}-\x{13438}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16F4F}\x{16F8F}-\x{16F92}\x{16FE4}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E130}-\x{1E136}\x{1E2EC}-\x{1E2EF}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1E94B}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}]*)[\x{0622}-\x{0625}\x{0627}\x{0629}\x{062F}-\x{0632}\x{0648}\x{0671}-\x{0673}\x{0675}-\x{0677}\x{0688}-\x{0699}\x{06C0}\x{06C3}-\x{06CB}\x{06CD}\x{06CF}\x{06D2}-\x{06D3}\x{06D5}\x{06EE}-\x{06EF}\x{0710}\x{0715}-\x{0719}\x{071E}\x{0728}\x{072A}\x{072C}\x{072F}\x{074D}\x{0759}-\x{075B}\x{076B}-\x{076C}\x{0771}\x{0773}-\x{0774}\x{0778}-\x{0779}\x{0840}\x{0846}-\x{0847}\x{0849}\x{0854}\x{0856}-\x{0858}\x{0867}\x{0869}-\x{086A}\x{08AA}-\x{08AC}\x{08AE}\x{08B1}-\x{08B2}\x{08B9}\x{10AC5}\x{10AC7}\x{10AC9}-\x{10ACA}\x{10ACE}-\x{10AD2}\x{10ADD}\x{10AE1}\x{10AE4}\x{10AEF}\x{10B81}\x{10B83}-\x{10B85}\x{10B89}\x{10B8C}\x{10B8E}-\x{10B8F}\x{10B91}\x{10BA9}-\x{10BAC}\x{10D22}\x{10F33}\x{10F54}\x{10FB4}-\x{10FB6}\x{10FB9}-\x{10FBA}\x{10FBD}\x{10FC2}-\x{10FC3}\x{10FC9}\x{0620}\x{0626}\x{0628}\x{062A}-\x{062E}\x{0633}-\x{063F}\x{0641}-\x{0647}\x{0649}-\x{064A}\x{066E}-\x{066F}\x{0678}-\x{0687}\x{069A}-\x{06BF}\x{06C1}-\x{06C2}\x{06CC}\x{06CE}\x{06D0}-\x{06D1}\x{06FA}-\x{06FC}\x{06FF}\x{0712}-\x{0714}\x{071A}-\x{071D}\x{071F}-\x{0727}\x{0729}\x{072B}\x{072D}-\x{072E}\x{074E}-\x{0758}\x{075C}-\x{076A}\x{076D}-\x{0770}\x{0772}\x{0775}-\x{0777}\x{077A}-\x{077F}\x{07CA}-\x{07EA}\x{0841}-\x{0845}\x{0848}\x{084A}-\x{0853}\x{0855}\x{0860}\x{0862}-\x{0865}\x{0868}\x{08A0}-\x{08A9}\x{08AF}-\x{08B0}\x{08B3}-\x{08B4}\x{08B6}-\x{08B8}\x{08BA}-\x{08C7}\x{1807}\x{1820}-\x{1842}\x{1843}\x{1844}-\x{1878}\x{1887}-\x{18A8}\x{18AA}\x{A840}-\x{A871}\x{10AC0}-\x{10AC4}\x{10AD3}-\x{10AD6}\x{10AD8}-\x{10ADC}\x{10ADE}-\x{10AE0}\x{10AEB}-\x{10AEE}\x{10B80}\x{10B82}\x{10B86}-\x{10B88}\x{10B8A}-\x{10B8B}\x{10B8D}\x{10B90}\x{10BAD}-\x{10BAE}\x{10D01}-\x{10D21}\x{10D23}\x{10F30}-\x{10F32}\x{10F34}-\x{10F44}\x{10F51}-\x{10F53}\x{10FB0}\x{10FB2}-\x{10FB3}\x{10FB8}\x{10FBB}-\x{10FBC}\x{10FBE}-\x{10FBF}\x{10FC1}\x{10FC4}\x{10FCA}\x{1E900}-\x{1E943}]/u'; +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php new file mode 100644 index 0000000..0bbd335 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php @@ -0,0 +1,8 @@ + 'ss', + 962 => 'ฯƒ', + 8204 => '', + 8205 => '', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php new file mode 100644 index 0000000..25a5f56 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php @@ -0,0 +1,2638 @@ + true, + 889 => true, + 896 => true, + 897 => true, + 898 => true, + 899 => true, + 907 => true, + 909 => true, + 930 => true, + 1216 => true, + 1328 => true, + 1367 => true, + 1368 => true, + 1419 => true, + 1420 => true, + 1424 => true, + 1480 => true, + 1481 => true, + 1482 => true, + 1483 => true, + 1484 => true, + 1485 => true, + 1486 => true, + 1487 => true, + 1515 => true, + 1516 => true, + 1517 => true, + 1518 => true, + 1525 => true, + 1526 => true, + 1527 => true, + 1528 => true, + 1529 => true, + 1530 => true, + 1531 => true, + 1532 => true, + 1533 => true, + 1534 => true, + 1535 => true, + 1536 => true, + 1537 => true, + 1538 => true, + 1539 => true, + 1540 => true, + 1541 => true, + 1564 => true, + 1565 => true, + 1757 => true, + 1806 => true, + 1807 => true, + 1867 => true, + 1868 => true, + 1970 => true, + 1971 => true, + 1972 => true, + 1973 => true, + 1974 => true, + 1975 => true, + 1976 => true, + 1977 => true, + 1978 => true, + 1979 => true, + 1980 => true, + 1981 => true, + 1982 => true, + 1983 => true, + 2043 => true, + 2044 => true, + 2094 => true, + 2095 => true, + 2111 => true, + 2140 => true, + 2141 => true, + 2143 => true, + 2229 => true, + 2248 => true, + 2249 => true, + 2250 => true, + 2251 => true, + 2252 => true, + 2253 => true, + 2254 => true, + 2255 => true, + 2256 => true, + 2257 => true, + 2258 => true, + 2274 => true, + 2436 => true, + 2445 => true, + 2446 => true, + 2449 => true, + 2450 => true, + 2473 => true, + 2481 => true, + 2483 => true, + 2484 => true, + 2485 => true, + 2490 => true, + 2491 => true, + 2501 => true, + 2502 => true, + 2505 => true, + 2506 => true, + 2511 => true, + 2512 => true, + 2513 => true, + 2514 => true, + 2515 => true, + 2516 => true, + 2517 => true, + 2518 => true, + 2520 => true, + 2521 => true, + 2522 => true, + 2523 => true, + 2526 => true, + 2532 => true, + 2533 => true, + 2559 => true, + 2560 => true, + 2564 => true, + 2571 => true, + 2572 => true, + 2573 => true, + 2574 => true, + 2577 => true, + 2578 => true, + 2601 => true, + 2609 => true, + 2612 => true, + 2615 => true, + 2618 => true, + 2619 => true, + 2621 => true, + 2627 => true, + 2628 => true, + 2629 => true, + 2630 => true, + 2633 => true, + 2634 => true, + 2638 => true, + 2639 => true, + 2640 => true, + 2642 => true, + 2643 => true, + 2644 => true, + 2645 => true, + 2646 => true, + 2647 => true, + 2648 => true, + 2653 => true, + 2655 => true, + 2656 => true, + 2657 => true, + 2658 => true, + 2659 => true, + 2660 => true, + 2661 => true, + 2679 => true, + 2680 => true, + 2681 => true, + 2682 => true, + 2683 => true, + 2684 => true, + 2685 => true, + 2686 => true, + 2687 => true, + 2688 => true, + 2692 => true, + 2702 => true, + 2706 => true, + 2729 => true, + 2737 => true, + 2740 => true, + 2746 => true, + 2747 => true, + 2758 => true, + 2762 => true, + 2766 => true, + 2767 => true, + 2769 => true, + 2770 => true, + 2771 => true, + 2772 => true, + 2773 => true, + 2774 => true, + 2775 => true, + 2776 => true, + 2777 => true, + 2778 => true, + 2779 => true, + 2780 => true, + 2781 => true, + 2782 => true, + 2783 => true, + 2788 => true, + 2789 => true, + 2802 => true, + 2803 => true, + 2804 => true, + 2805 => true, + 2806 => true, + 2807 => true, + 2808 => true, + 2816 => true, + 2820 => true, + 2829 => true, + 2830 => true, + 2833 => true, + 2834 => true, + 2857 => true, + 2865 => true, + 2868 => true, + 2874 => true, + 2875 => true, + 2885 => true, + 2886 => true, + 2889 => true, + 2890 => true, + 2894 => true, + 2895 => true, + 2896 => true, + 2897 => true, + 2898 => true, + 2899 => true, + 2900 => true, + 2904 => true, + 2905 => true, + 2906 => true, + 2907 => true, + 2910 => true, + 2916 => true, + 2917 => true, + 2936 => true, + 2937 => true, + 2938 => true, + 2939 => true, + 2940 => true, + 2941 => true, + 2942 => true, + 2943 => true, + 2944 => true, + 2945 => true, + 2948 => true, + 2955 => true, + 2956 => true, + 2957 => true, + 2961 => true, + 2966 => true, + 2967 => true, + 2968 => true, + 2971 => true, + 2973 => true, + 2976 => true, + 2977 => true, + 2978 => true, + 2981 => true, + 2982 => true, + 2983 => true, + 2987 => true, + 2988 => true, + 2989 => true, + 3002 => true, + 3003 => true, + 3004 => true, + 3005 => true, + 3011 => true, + 3012 => true, + 3013 => true, + 3017 => true, + 3022 => true, + 3023 => true, + 3025 => true, + 3026 => true, + 3027 => true, + 3028 => true, + 3029 => true, + 3030 => true, + 3032 => true, + 3033 => true, + 3034 => true, + 3035 => true, + 3036 => true, + 3037 => true, + 3038 => true, + 3039 => true, + 3040 => true, + 3041 => true, + 3042 => true, + 3043 => true, + 3044 => true, + 3045 => true, + 3067 => true, + 3068 => true, + 3069 => true, + 3070 => true, + 3071 => true, + 3085 => true, + 3089 => true, + 3113 => true, + 3130 => true, + 3131 => true, + 3132 => true, + 3141 => true, + 3145 => true, + 3150 => true, + 3151 => true, + 3152 => true, + 3153 => true, + 3154 => true, + 3155 => true, + 3156 => true, + 3159 => true, + 3163 => true, + 3164 => true, + 3165 => true, + 3166 => true, + 3167 => true, + 3172 => true, + 3173 => true, + 3184 => true, + 3185 => true, + 3186 => true, + 3187 => true, + 3188 => true, + 3189 => true, + 3190 => true, + 3213 => true, + 3217 => true, + 3241 => true, + 3252 => true, + 3258 => true, + 3259 => true, + 3269 => true, + 3273 => true, + 3278 => true, + 3279 => true, + 3280 => true, + 3281 => true, + 3282 => true, + 3283 => true, + 3284 => true, + 3287 => true, + 3288 => true, + 3289 => true, + 3290 => true, + 3291 => true, + 3292 => true, + 3293 => true, + 3295 => true, + 3300 => true, + 3301 => true, + 3312 => true, + 3315 => true, + 3316 => true, + 3317 => true, + 3318 => true, + 3319 => true, + 3320 => true, + 3321 => true, + 3322 => true, + 3323 => true, + 3324 => true, + 3325 => true, + 3326 => true, + 3327 => true, + 3341 => true, + 3345 => true, + 3397 => true, + 3401 => true, + 3408 => true, + 3409 => true, + 3410 => true, + 3411 => true, + 3428 => true, + 3429 => true, + 3456 => true, + 3460 => true, + 3479 => true, + 3480 => true, + 3481 => true, + 3506 => true, + 3516 => true, + 3518 => true, + 3519 => true, + 3527 => true, + 3528 => true, + 3529 => true, + 3531 => true, + 3532 => true, + 3533 => true, + 3534 => true, + 3541 => true, + 3543 => true, + 3552 => true, + 3553 => true, + 3554 => true, + 3555 => true, + 3556 => true, + 3557 => true, + 3568 => true, + 3569 => true, + 3573 => true, + 3574 => true, + 3575 => true, + 3576 => true, + 3577 => true, + 3578 => true, + 3579 => true, + 3580 => true, + 3581 => true, + 3582 => true, + 3583 => true, + 3584 => true, + 3643 => true, + 3644 => true, + 3645 => true, + 3646 => true, + 3715 => true, + 3717 => true, + 3723 => true, + 3748 => true, + 3750 => true, + 3774 => true, + 3775 => true, + 3781 => true, + 3783 => true, + 3790 => true, + 3791 => true, + 3802 => true, + 3803 => true, + 3912 => true, + 3949 => true, + 3950 => true, + 3951 => true, + 3952 => true, + 3992 => true, + 4029 => true, + 4045 => true, + 4294 => true, + 4296 => true, + 4297 => true, + 4298 => true, + 4299 => true, + 4300 => true, + 4302 => true, + 4303 => true, + 4447 => true, + 4448 => true, + 4681 => true, + 4686 => true, + 4687 => true, + 4695 => true, + 4697 => true, + 4702 => true, + 4703 => true, + 4745 => true, + 4750 => true, + 4751 => true, + 4785 => true, + 4790 => true, + 4791 => true, + 4799 => true, + 4801 => true, + 4806 => true, + 4807 => true, + 4823 => true, + 4881 => true, + 4886 => true, + 4887 => true, + 4955 => true, + 4956 => true, + 4989 => true, + 4990 => true, + 4991 => true, + 5018 => true, + 5019 => true, + 5020 => true, + 5021 => true, + 5022 => true, + 5023 => true, + 5110 => true, + 5111 => true, + 5118 => true, + 5119 => true, + 5760 => true, + 5789 => true, + 5790 => true, + 5791 => true, + 5881 => true, + 5882 => true, + 5883 => true, + 5884 => true, + 5885 => true, + 5886 => true, + 5887 => true, + 5901 => true, + 5909 => true, + 5910 => true, + 5911 => true, + 5912 => true, + 5913 => true, + 5914 => true, + 5915 => true, + 5916 => true, + 5917 => true, + 5918 => true, + 5919 => true, + 5943 => true, + 5944 => true, + 5945 => true, + 5946 => true, + 5947 => true, + 5948 => true, + 5949 => true, + 5950 => true, + 5951 => true, + 5972 => true, + 5973 => true, + 5974 => true, + 5975 => true, + 5976 => true, + 5977 => true, + 5978 => true, + 5979 => true, + 5980 => true, + 5981 => true, + 5982 => true, + 5983 => true, + 5997 => true, + 6001 => true, + 6004 => true, + 6005 => true, + 6006 => true, + 6007 => true, + 6008 => true, + 6009 => true, + 6010 => true, + 6011 => true, + 6012 => true, + 6013 => true, + 6014 => true, + 6015 => true, + 6068 => true, + 6069 => true, + 6110 => true, + 6111 => true, + 6122 => true, + 6123 => true, + 6124 => true, + 6125 => true, + 6126 => true, + 6127 => true, + 6138 => true, + 6139 => true, + 6140 => true, + 6141 => true, + 6142 => true, + 6143 => true, + 6150 => true, + 6158 => true, + 6159 => true, + 6170 => true, + 6171 => true, + 6172 => true, + 6173 => true, + 6174 => true, + 6175 => true, + 6265 => true, + 6266 => true, + 6267 => true, + 6268 => true, + 6269 => true, + 6270 => true, + 6271 => true, + 6315 => true, + 6316 => true, + 6317 => true, + 6318 => true, + 6319 => true, + 6390 => true, + 6391 => true, + 6392 => true, + 6393 => true, + 6394 => true, + 6395 => true, + 6396 => true, + 6397 => true, + 6398 => true, + 6399 => true, + 6431 => true, + 6444 => true, + 6445 => true, + 6446 => true, + 6447 => true, + 6460 => true, + 6461 => true, + 6462 => true, + 6463 => true, + 6465 => true, + 6466 => true, + 6467 => true, + 6510 => true, + 6511 => true, + 6517 => true, + 6518 => true, + 6519 => true, + 6520 => true, + 6521 => true, + 6522 => true, + 6523 => true, + 6524 => true, + 6525 => true, + 6526 => true, + 6527 => true, + 6572 => true, + 6573 => true, + 6574 => true, + 6575 => true, + 6602 => true, + 6603 => true, + 6604 => true, + 6605 => true, + 6606 => true, + 6607 => true, + 6619 => true, + 6620 => true, + 6621 => true, + 6684 => true, + 6685 => true, + 6751 => true, + 6781 => true, + 6782 => true, + 6794 => true, + 6795 => true, + 6796 => true, + 6797 => true, + 6798 => true, + 6799 => true, + 6810 => true, + 6811 => true, + 6812 => true, + 6813 => true, + 6814 => true, + 6815 => true, + 6830 => true, + 6831 => true, + 6988 => true, + 6989 => true, + 6990 => true, + 6991 => true, + 7037 => true, + 7038 => true, + 7039 => true, + 7156 => true, + 7157 => true, + 7158 => true, + 7159 => true, + 7160 => true, + 7161 => true, + 7162 => true, + 7163 => true, + 7224 => true, + 7225 => true, + 7226 => true, + 7242 => true, + 7243 => true, + 7244 => true, + 7305 => true, + 7306 => true, + 7307 => true, + 7308 => true, + 7309 => true, + 7310 => true, + 7311 => true, + 7355 => true, + 7356 => true, + 7368 => true, + 7369 => true, + 7370 => true, + 7371 => true, + 7372 => true, + 7373 => true, + 7374 => true, + 7375 => true, + 7419 => true, + 7420 => true, + 7421 => true, + 7422 => true, + 7423 => true, + 7674 => true, + 7958 => true, + 7959 => true, + 7966 => true, + 7967 => true, + 8006 => true, + 8007 => true, + 8014 => true, + 8015 => true, + 8024 => true, + 8026 => true, + 8028 => true, + 8030 => true, + 8062 => true, + 8063 => true, + 8117 => true, + 8133 => true, + 8148 => true, + 8149 => true, + 8156 => true, + 8176 => true, + 8177 => true, + 8181 => true, + 8191 => true, + 8206 => true, + 8207 => true, + 8228 => true, + 8229 => true, + 8230 => true, + 8232 => true, + 8233 => true, + 8234 => true, + 8235 => true, + 8236 => true, + 8237 => true, + 8238 => true, + 8289 => true, + 8290 => true, + 8291 => true, + 8293 => true, + 8294 => true, + 8295 => true, + 8296 => true, + 8297 => true, + 8298 => true, + 8299 => true, + 8300 => true, + 8301 => true, + 8302 => true, + 8303 => true, + 8306 => true, + 8307 => true, + 8335 => true, + 8349 => true, + 8350 => true, + 8351 => true, + 8384 => true, + 8385 => true, + 8386 => true, + 8387 => true, + 8388 => true, + 8389 => true, + 8390 => true, + 8391 => true, + 8392 => true, + 8393 => true, + 8394 => true, + 8395 => true, + 8396 => true, + 8397 => true, + 8398 => true, + 8399 => true, + 8433 => true, + 8434 => true, + 8435 => true, + 8436 => true, + 8437 => true, + 8438 => true, + 8439 => true, + 8440 => true, + 8441 => true, + 8442 => true, + 8443 => true, + 8444 => true, + 8445 => true, + 8446 => true, + 8447 => true, + 8498 => true, + 8579 => true, + 8588 => true, + 8589 => true, + 8590 => true, + 8591 => true, + 9255 => true, + 9256 => true, + 9257 => true, + 9258 => true, + 9259 => true, + 9260 => true, + 9261 => true, + 9262 => true, + 9263 => true, + 9264 => true, + 9265 => true, + 9266 => true, + 9267 => true, + 9268 => true, + 9269 => true, + 9270 => true, + 9271 => true, + 9272 => true, + 9273 => true, + 9274 => true, + 9275 => true, + 9276 => true, + 9277 => true, + 9278 => true, + 9279 => true, + 9291 => true, + 9292 => true, + 9293 => true, + 9294 => true, + 9295 => true, + 9296 => true, + 9297 => true, + 9298 => true, + 9299 => true, + 9300 => true, + 9301 => true, + 9302 => true, + 9303 => true, + 9304 => true, + 9305 => true, + 9306 => true, + 9307 => true, + 9308 => true, + 9309 => true, + 9310 => true, + 9311 => true, + 9352 => true, + 9353 => true, + 9354 => true, + 9355 => true, + 9356 => true, + 9357 => true, + 9358 => true, + 9359 => true, + 9360 => true, + 9361 => true, + 9362 => true, + 9363 => true, + 9364 => true, + 9365 => true, + 9366 => true, + 9367 => true, + 9368 => true, + 9369 => true, + 9370 => true, + 9371 => true, + 11124 => true, + 11125 => true, + 11158 => true, + 11311 => true, + 11359 => true, + 11508 => true, + 11509 => true, + 11510 => true, + 11511 => true, + 11512 => true, + 11558 => true, + 11560 => true, + 11561 => true, + 11562 => true, + 11563 => true, + 11564 => true, + 11566 => true, + 11567 => true, + 11624 => true, + 11625 => true, + 11626 => true, + 11627 => true, + 11628 => true, + 11629 => true, + 11630 => true, + 11633 => true, + 11634 => true, + 11635 => true, + 11636 => true, + 11637 => true, + 11638 => true, + 11639 => true, + 11640 => true, + 11641 => true, + 11642 => true, + 11643 => true, + 11644 => true, + 11645 => true, + 11646 => true, + 11671 => true, + 11672 => true, + 11673 => true, + 11674 => true, + 11675 => true, + 11676 => true, + 11677 => true, + 11678 => true, + 11679 => true, + 11687 => true, + 11695 => true, + 11703 => true, + 11711 => true, + 11719 => true, + 11727 => true, + 11735 => true, + 11743 => true, + 11930 => true, + 12020 => true, + 12021 => true, + 12022 => true, + 12023 => true, + 12024 => true, + 12025 => true, + 12026 => true, + 12027 => true, + 12028 => true, + 12029 => true, + 12030 => true, + 12031 => true, + 12246 => true, + 12247 => true, + 12248 => true, + 12249 => true, + 12250 => true, + 12251 => true, + 12252 => true, + 12253 => true, + 12254 => true, + 12255 => true, + 12256 => true, + 12257 => true, + 12258 => true, + 12259 => true, + 12260 => true, + 12261 => true, + 12262 => true, + 12263 => true, + 12264 => true, + 12265 => true, + 12266 => true, + 12267 => true, + 12268 => true, + 12269 => true, + 12270 => true, + 12271 => true, + 12272 => true, + 12273 => true, + 12274 => true, + 12275 => true, + 12276 => true, + 12277 => true, + 12278 => true, + 12279 => true, + 12280 => true, + 12281 => true, + 12282 => true, + 12283 => true, + 12284 => true, + 12285 => true, + 12286 => true, + 12287 => true, + 12352 => true, + 12439 => true, + 12440 => true, + 12544 => true, + 12545 => true, + 12546 => true, + 12547 => true, + 12548 => true, + 12592 => true, + 12644 => true, + 12687 => true, + 12772 => true, + 12773 => true, + 12774 => true, + 12775 => true, + 12776 => true, + 12777 => true, + 12778 => true, + 12779 => true, + 12780 => true, + 12781 => true, + 12782 => true, + 12783 => true, + 12831 => true, + 13250 => true, + 13255 => true, + 13272 => true, + 40957 => true, + 40958 => true, + 40959 => true, + 42125 => true, + 42126 => true, + 42127 => true, + 42183 => true, + 42184 => true, + 42185 => true, + 42186 => true, + 42187 => true, + 42188 => true, + 42189 => true, + 42190 => true, + 42191 => true, + 42540 => true, + 42541 => true, + 42542 => true, + 42543 => true, + 42544 => true, + 42545 => true, + 42546 => true, + 42547 => true, + 42548 => true, + 42549 => true, + 42550 => true, + 42551 => true, + 42552 => true, + 42553 => true, + 42554 => true, + 42555 => true, + 42556 => true, + 42557 => true, + 42558 => true, + 42559 => true, + 42744 => true, + 42745 => true, + 42746 => true, + 42747 => true, + 42748 => true, + 42749 => true, + 42750 => true, + 42751 => true, + 42944 => true, + 42945 => true, + 43053 => true, + 43054 => true, + 43055 => true, + 43066 => true, + 43067 => true, + 43068 => true, + 43069 => true, + 43070 => true, + 43071 => true, + 43128 => true, + 43129 => true, + 43130 => true, + 43131 => true, + 43132 => true, + 43133 => true, + 43134 => true, + 43135 => true, + 43206 => true, + 43207 => true, + 43208 => true, + 43209 => true, + 43210 => true, + 43211 => true, + 43212 => true, + 43213 => true, + 43226 => true, + 43227 => true, + 43228 => true, + 43229 => true, + 43230 => true, + 43231 => true, + 43348 => true, + 43349 => true, + 43350 => true, + 43351 => true, + 43352 => true, + 43353 => true, + 43354 => true, + 43355 => true, + 43356 => true, + 43357 => true, + 43358 => true, + 43389 => true, + 43390 => true, + 43391 => true, + 43470 => true, + 43482 => true, + 43483 => true, + 43484 => true, + 43485 => true, + 43519 => true, + 43575 => true, + 43576 => true, + 43577 => true, + 43578 => true, + 43579 => true, + 43580 => true, + 43581 => true, + 43582 => true, + 43583 => true, + 43598 => true, + 43599 => true, + 43610 => true, + 43611 => true, + 43715 => true, + 43716 => true, + 43717 => true, + 43718 => true, + 43719 => true, + 43720 => true, + 43721 => true, + 43722 => true, + 43723 => true, + 43724 => true, + 43725 => true, + 43726 => true, + 43727 => true, + 43728 => true, + 43729 => true, + 43730 => true, + 43731 => true, + 43732 => true, + 43733 => true, + 43734 => true, + 43735 => true, + 43736 => true, + 43737 => true, + 43738 => true, + 43767 => true, + 43768 => true, + 43769 => true, + 43770 => true, + 43771 => true, + 43772 => true, + 43773 => true, + 43774 => true, + 43775 => true, + 43776 => true, + 43783 => true, + 43784 => true, + 43791 => true, + 43792 => true, + 43799 => true, + 43800 => true, + 43801 => true, + 43802 => true, + 43803 => true, + 43804 => true, + 43805 => true, + 43806 => true, + 43807 => true, + 43815 => true, + 43823 => true, + 43884 => true, + 43885 => true, + 43886 => true, + 43887 => true, + 44014 => true, + 44015 => true, + 44026 => true, + 44027 => true, + 44028 => true, + 44029 => true, + 44030 => true, + 44031 => true, + 55204 => true, + 55205 => true, + 55206 => true, + 55207 => true, + 55208 => true, + 55209 => true, + 55210 => true, + 55211 => true, + 55212 => true, + 55213 => true, + 55214 => true, + 55215 => true, + 55239 => true, + 55240 => true, + 55241 => true, + 55242 => true, + 55292 => true, + 55293 => true, + 55294 => true, + 55295 => true, + 64110 => true, + 64111 => true, + 64263 => true, + 64264 => true, + 64265 => true, + 64266 => true, + 64267 => true, + 64268 => true, + 64269 => true, + 64270 => true, + 64271 => true, + 64272 => true, + 64273 => true, + 64274 => true, + 64280 => true, + 64281 => true, + 64282 => true, + 64283 => true, + 64284 => true, + 64311 => true, + 64317 => true, + 64319 => true, + 64322 => true, + 64325 => true, + 64450 => true, + 64451 => true, + 64452 => true, + 64453 => true, + 64454 => true, + 64455 => true, + 64456 => true, + 64457 => true, + 64458 => true, + 64459 => true, + 64460 => true, + 64461 => true, + 64462 => true, + 64463 => true, + 64464 => true, + 64465 => true, + 64466 => true, + 64832 => true, + 64833 => true, + 64834 => true, + 64835 => true, + 64836 => true, + 64837 => true, + 64838 => true, + 64839 => true, + 64840 => true, + 64841 => true, + 64842 => true, + 64843 => true, + 64844 => true, + 64845 => true, + 64846 => true, + 64847 => true, + 64912 => true, + 64913 => true, + 64968 => true, + 64969 => true, + 64970 => true, + 64971 => true, + 64972 => true, + 64973 => true, + 64974 => true, + 64975 => true, + 65022 => true, + 65023 => true, + 65042 => true, + 65049 => true, + 65050 => true, + 65051 => true, + 65052 => true, + 65053 => true, + 65054 => true, + 65055 => true, + 65072 => true, + 65106 => true, + 65107 => true, + 65127 => true, + 65132 => true, + 65133 => true, + 65134 => true, + 65135 => true, + 65141 => true, + 65277 => true, + 65278 => true, + 65280 => true, + 65440 => true, + 65471 => true, + 65472 => true, + 65473 => true, + 65480 => true, + 65481 => true, + 65488 => true, + 65489 => true, + 65496 => true, + 65497 => true, + 65501 => true, + 65502 => true, + 65503 => true, + 65511 => true, + 65519 => true, + 65520 => true, + 65521 => true, + 65522 => true, + 65523 => true, + 65524 => true, + 65525 => true, + 65526 => true, + 65527 => true, + 65528 => true, + 65529 => true, + 65530 => true, + 65531 => true, + 65532 => true, + 65533 => true, + 65534 => true, + 65535 => true, + 65548 => true, + 65575 => true, + 65595 => true, + 65598 => true, + 65614 => true, + 65615 => true, + 65787 => true, + 65788 => true, + 65789 => true, + 65790 => true, + 65791 => true, + 65795 => true, + 65796 => true, + 65797 => true, + 65798 => true, + 65844 => true, + 65845 => true, + 65846 => true, + 65935 => true, + 65949 => true, + 65950 => true, + 65951 => true, + 66205 => true, + 66206 => true, + 66207 => true, + 66257 => true, + 66258 => true, + 66259 => true, + 66260 => true, + 66261 => true, + 66262 => true, + 66263 => true, + 66264 => true, + 66265 => true, + 66266 => true, + 66267 => true, + 66268 => true, + 66269 => true, + 66270 => true, + 66271 => true, + 66300 => true, + 66301 => true, + 66302 => true, + 66303 => true, + 66340 => true, + 66341 => true, + 66342 => true, + 66343 => true, + 66344 => true, + 66345 => true, + 66346 => true, + 66347 => true, + 66348 => true, + 66379 => true, + 66380 => true, + 66381 => true, + 66382 => true, + 66383 => true, + 66427 => true, + 66428 => true, + 66429 => true, + 66430 => true, + 66431 => true, + 66462 => true, + 66500 => true, + 66501 => true, + 66502 => true, + 66503 => true, + 66718 => true, + 66719 => true, + 66730 => true, + 66731 => true, + 66732 => true, + 66733 => true, + 66734 => true, + 66735 => true, + 66772 => true, + 66773 => true, + 66774 => true, + 66775 => true, + 66812 => true, + 66813 => true, + 66814 => true, + 66815 => true, + 66856 => true, + 66857 => true, + 66858 => true, + 66859 => true, + 66860 => true, + 66861 => true, + 66862 => true, + 66863 => true, + 66916 => true, + 66917 => true, + 66918 => true, + 66919 => true, + 66920 => true, + 66921 => true, + 66922 => true, + 66923 => true, + 66924 => true, + 66925 => true, + 66926 => true, + 67383 => true, + 67384 => true, + 67385 => true, + 67386 => true, + 67387 => true, + 67388 => true, + 67389 => true, + 67390 => true, + 67391 => true, + 67414 => true, + 67415 => true, + 67416 => true, + 67417 => true, + 67418 => true, + 67419 => true, + 67420 => true, + 67421 => true, + 67422 => true, + 67423 => true, + 67590 => true, + 67591 => true, + 67593 => true, + 67638 => true, + 67641 => true, + 67642 => true, + 67643 => true, + 67645 => true, + 67646 => true, + 67670 => true, + 67743 => true, + 67744 => true, + 67745 => true, + 67746 => true, + 67747 => true, + 67748 => true, + 67749 => true, + 67750 => true, + 67827 => true, + 67830 => true, + 67831 => true, + 67832 => true, + 67833 => true, + 67834 => true, + 67868 => true, + 67869 => true, + 67870 => true, + 67898 => true, + 67899 => true, + 67900 => true, + 67901 => true, + 67902 => true, + 68024 => true, + 68025 => true, + 68026 => true, + 68027 => true, + 68048 => true, + 68049 => true, + 68100 => true, + 68103 => true, + 68104 => true, + 68105 => true, + 68106 => true, + 68107 => true, + 68116 => true, + 68120 => true, + 68150 => true, + 68151 => true, + 68155 => true, + 68156 => true, + 68157 => true, + 68158 => true, + 68169 => true, + 68170 => true, + 68171 => true, + 68172 => true, + 68173 => true, + 68174 => true, + 68175 => true, + 68185 => true, + 68186 => true, + 68187 => true, + 68188 => true, + 68189 => true, + 68190 => true, + 68191 => true, + 68327 => true, + 68328 => true, + 68329 => true, + 68330 => true, + 68343 => true, + 68344 => true, + 68345 => true, + 68346 => true, + 68347 => true, + 68348 => true, + 68349 => true, + 68350 => true, + 68351 => true, + 68406 => true, + 68407 => true, + 68408 => true, + 68438 => true, + 68439 => true, + 68467 => true, + 68468 => true, + 68469 => true, + 68470 => true, + 68471 => true, + 68498 => true, + 68499 => true, + 68500 => true, + 68501 => true, + 68502 => true, + 68503 => true, + 68504 => true, + 68509 => true, + 68510 => true, + 68511 => true, + 68512 => true, + 68513 => true, + 68514 => true, + 68515 => true, + 68516 => true, + 68517 => true, + 68518 => true, + 68519 => true, + 68520 => true, + 68787 => true, + 68788 => true, + 68789 => true, + 68790 => true, + 68791 => true, + 68792 => true, + 68793 => true, + 68794 => true, + 68795 => true, + 68796 => true, + 68797 => true, + 68798 => true, + 68799 => true, + 68851 => true, + 68852 => true, + 68853 => true, + 68854 => true, + 68855 => true, + 68856 => true, + 68857 => true, + 68904 => true, + 68905 => true, + 68906 => true, + 68907 => true, + 68908 => true, + 68909 => true, + 68910 => true, + 68911 => true, + 69247 => true, + 69290 => true, + 69294 => true, + 69295 => true, + 69416 => true, + 69417 => true, + 69418 => true, + 69419 => true, + 69420 => true, + 69421 => true, + 69422 => true, + 69423 => true, + 69580 => true, + 69581 => true, + 69582 => true, + 69583 => true, + 69584 => true, + 69585 => true, + 69586 => true, + 69587 => true, + 69588 => true, + 69589 => true, + 69590 => true, + 69591 => true, + 69592 => true, + 69593 => true, + 69594 => true, + 69595 => true, + 69596 => true, + 69597 => true, + 69598 => true, + 69599 => true, + 69623 => true, + 69624 => true, + 69625 => true, + 69626 => true, + 69627 => true, + 69628 => true, + 69629 => true, + 69630 => true, + 69631 => true, + 69710 => true, + 69711 => true, + 69712 => true, + 69713 => true, + 69744 => true, + 69745 => true, + 69746 => true, + 69747 => true, + 69748 => true, + 69749 => true, + 69750 => true, + 69751 => true, + 69752 => true, + 69753 => true, + 69754 => true, + 69755 => true, + 69756 => true, + 69757 => true, + 69758 => true, + 69821 => true, + 69826 => true, + 69827 => true, + 69828 => true, + 69829 => true, + 69830 => true, + 69831 => true, + 69832 => true, + 69833 => true, + 69834 => true, + 69835 => true, + 69836 => true, + 69837 => true, + 69838 => true, + 69839 => true, + 69865 => true, + 69866 => true, + 69867 => true, + 69868 => true, + 69869 => true, + 69870 => true, + 69871 => true, + 69882 => true, + 69883 => true, + 69884 => true, + 69885 => true, + 69886 => true, + 69887 => true, + 69941 => true, + 69960 => true, + 69961 => true, + 69962 => true, + 69963 => true, + 69964 => true, + 69965 => true, + 69966 => true, + 69967 => true, + 70007 => true, + 70008 => true, + 70009 => true, + 70010 => true, + 70011 => true, + 70012 => true, + 70013 => true, + 70014 => true, + 70015 => true, + 70112 => true, + 70133 => true, + 70134 => true, + 70135 => true, + 70136 => true, + 70137 => true, + 70138 => true, + 70139 => true, + 70140 => true, + 70141 => true, + 70142 => true, + 70143 => true, + 70162 => true, + 70279 => true, + 70281 => true, + 70286 => true, + 70302 => true, + 70314 => true, + 70315 => true, + 70316 => true, + 70317 => true, + 70318 => true, + 70319 => true, + 70379 => true, + 70380 => true, + 70381 => true, + 70382 => true, + 70383 => true, + 70394 => true, + 70395 => true, + 70396 => true, + 70397 => true, + 70398 => true, + 70399 => true, + 70404 => true, + 70413 => true, + 70414 => true, + 70417 => true, + 70418 => true, + 70441 => true, + 70449 => true, + 70452 => true, + 70458 => true, + 70469 => true, + 70470 => true, + 70473 => true, + 70474 => true, + 70478 => true, + 70479 => true, + 70481 => true, + 70482 => true, + 70483 => true, + 70484 => true, + 70485 => true, + 70486 => true, + 70488 => true, + 70489 => true, + 70490 => true, + 70491 => true, + 70492 => true, + 70500 => true, + 70501 => true, + 70509 => true, + 70510 => true, + 70511 => true, + 70748 => true, + 70754 => true, + 70755 => true, + 70756 => true, + 70757 => true, + 70758 => true, + 70759 => true, + 70760 => true, + 70761 => true, + 70762 => true, + 70763 => true, + 70764 => true, + 70765 => true, + 70766 => true, + 70767 => true, + 70768 => true, + 70769 => true, + 70770 => true, + 70771 => true, + 70772 => true, + 70773 => true, + 70774 => true, + 70775 => true, + 70776 => true, + 70777 => true, + 70778 => true, + 70779 => true, + 70780 => true, + 70781 => true, + 70782 => true, + 70783 => true, + 70856 => true, + 70857 => true, + 70858 => true, + 70859 => true, + 70860 => true, + 70861 => true, + 70862 => true, + 70863 => true, + 71094 => true, + 71095 => true, + 71237 => true, + 71238 => true, + 71239 => true, + 71240 => true, + 71241 => true, + 71242 => true, + 71243 => true, + 71244 => true, + 71245 => true, + 71246 => true, + 71247 => true, + 71258 => true, + 71259 => true, + 71260 => true, + 71261 => true, + 71262 => true, + 71263 => true, + 71277 => true, + 71278 => true, + 71279 => true, + 71280 => true, + 71281 => true, + 71282 => true, + 71283 => true, + 71284 => true, + 71285 => true, + 71286 => true, + 71287 => true, + 71288 => true, + 71289 => true, + 71290 => true, + 71291 => true, + 71292 => true, + 71293 => true, + 71294 => true, + 71295 => true, + 71353 => true, + 71354 => true, + 71355 => true, + 71356 => true, + 71357 => true, + 71358 => true, + 71359 => true, + 71451 => true, + 71452 => true, + 71468 => true, + 71469 => true, + 71470 => true, + 71471 => true, + 71923 => true, + 71924 => true, + 71925 => true, + 71926 => true, + 71927 => true, + 71928 => true, + 71929 => true, + 71930 => true, + 71931 => true, + 71932 => true, + 71933 => true, + 71934 => true, + 71943 => true, + 71944 => true, + 71946 => true, + 71947 => true, + 71956 => true, + 71959 => true, + 71990 => true, + 71993 => true, + 71994 => true, + 72007 => true, + 72008 => true, + 72009 => true, + 72010 => true, + 72011 => true, + 72012 => true, + 72013 => true, + 72014 => true, + 72015 => true, + 72104 => true, + 72105 => true, + 72152 => true, + 72153 => true, + 72165 => true, + 72166 => true, + 72167 => true, + 72168 => true, + 72169 => true, + 72170 => true, + 72171 => true, + 72172 => true, + 72173 => true, + 72174 => true, + 72175 => true, + 72176 => true, + 72177 => true, + 72178 => true, + 72179 => true, + 72180 => true, + 72181 => true, + 72182 => true, + 72183 => true, + 72184 => true, + 72185 => true, + 72186 => true, + 72187 => true, + 72188 => true, + 72189 => true, + 72190 => true, + 72191 => true, + 72264 => true, + 72265 => true, + 72266 => true, + 72267 => true, + 72268 => true, + 72269 => true, + 72270 => true, + 72271 => true, + 72355 => true, + 72356 => true, + 72357 => true, + 72358 => true, + 72359 => true, + 72360 => true, + 72361 => true, + 72362 => true, + 72363 => true, + 72364 => true, + 72365 => true, + 72366 => true, + 72367 => true, + 72368 => true, + 72369 => true, + 72370 => true, + 72371 => true, + 72372 => true, + 72373 => true, + 72374 => true, + 72375 => true, + 72376 => true, + 72377 => true, + 72378 => true, + 72379 => true, + 72380 => true, + 72381 => true, + 72382 => true, + 72383 => true, + 72713 => true, + 72759 => true, + 72774 => true, + 72775 => true, + 72776 => true, + 72777 => true, + 72778 => true, + 72779 => true, + 72780 => true, + 72781 => true, + 72782 => true, + 72783 => true, + 72813 => true, + 72814 => true, + 72815 => true, + 72848 => true, + 72849 => true, + 72872 => true, + 72967 => true, + 72970 => true, + 73015 => true, + 73016 => true, + 73017 => true, + 73019 => true, + 73022 => true, + 73032 => true, + 73033 => true, + 73034 => true, + 73035 => true, + 73036 => true, + 73037 => true, + 73038 => true, + 73039 => true, + 73050 => true, + 73051 => true, + 73052 => true, + 73053 => true, + 73054 => true, + 73055 => true, + 73062 => true, + 73065 => true, + 73103 => true, + 73106 => true, + 73113 => true, + 73114 => true, + 73115 => true, + 73116 => true, + 73117 => true, + 73118 => true, + 73119 => true, + 73649 => true, + 73650 => true, + 73651 => true, + 73652 => true, + 73653 => true, + 73654 => true, + 73655 => true, + 73656 => true, + 73657 => true, + 73658 => true, + 73659 => true, + 73660 => true, + 73661 => true, + 73662 => true, + 73663 => true, + 73714 => true, + 73715 => true, + 73716 => true, + 73717 => true, + 73718 => true, + 73719 => true, + 73720 => true, + 73721 => true, + 73722 => true, + 73723 => true, + 73724 => true, + 73725 => true, + 73726 => true, + 74863 => true, + 74869 => true, + 74870 => true, + 74871 => true, + 74872 => true, + 74873 => true, + 74874 => true, + 74875 => true, + 74876 => true, + 74877 => true, + 74878 => true, + 74879 => true, + 78895 => true, + 78896 => true, + 78897 => true, + 78898 => true, + 78899 => true, + 78900 => true, + 78901 => true, + 78902 => true, + 78903 => true, + 78904 => true, + 92729 => true, + 92730 => true, + 92731 => true, + 92732 => true, + 92733 => true, + 92734 => true, + 92735 => true, + 92767 => true, + 92778 => true, + 92779 => true, + 92780 => true, + 92781 => true, + 92910 => true, + 92911 => true, + 92918 => true, + 92919 => true, + 92920 => true, + 92921 => true, + 92922 => true, + 92923 => true, + 92924 => true, + 92925 => true, + 92926 => true, + 92927 => true, + 92998 => true, + 92999 => true, + 93000 => true, + 93001 => true, + 93002 => true, + 93003 => true, + 93004 => true, + 93005 => true, + 93006 => true, + 93007 => true, + 93018 => true, + 93026 => true, + 93048 => true, + 93049 => true, + 93050 => true, + 93051 => true, + 93052 => true, + 94027 => true, + 94028 => true, + 94029 => true, + 94030 => true, + 94088 => true, + 94089 => true, + 94090 => true, + 94091 => true, + 94092 => true, + 94093 => true, + 94094 => true, + 94181 => true, + 94182 => true, + 94183 => true, + 94184 => true, + 94185 => true, + 94186 => true, + 94187 => true, + 94188 => true, + 94189 => true, + 94190 => true, + 94191 => true, + 94194 => true, + 94195 => true, + 94196 => true, + 94197 => true, + 94198 => true, + 94199 => true, + 94200 => true, + 94201 => true, + 94202 => true, + 94203 => true, + 94204 => true, + 94205 => true, + 94206 => true, + 94207 => true, + 100344 => true, + 100345 => true, + 100346 => true, + 100347 => true, + 100348 => true, + 100349 => true, + 100350 => true, + 100351 => true, + 110931 => true, + 110932 => true, + 110933 => true, + 110934 => true, + 110935 => true, + 110936 => true, + 110937 => true, + 110938 => true, + 110939 => true, + 110940 => true, + 110941 => true, + 110942 => true, + 110943 => true, + 110944 => true, + 110945 => true, + 110946 => true, + 110947 => true, + 110952 => true, + 110953 => true, + 110954 => true, + 110955 => true, + 110956 => true, + 110957 => true, + 110958 => true, + 110959 => true, + 113771 => true, + 113772 => true, + 113773 => true, + 113774 => true, + 113775 => true, + 113789 => true, + 113790 => true, + 113791 => true, + 113801 => true, + 113802 => true, + 113803 => true, + 113804 => true, + 113805 => true, + 113806 => true, + 113807 => true, + 113818 => true, + 113819 => true, + 119030 => true, + 119031 => true, + 119032 => true, + 119033 => true, + 119034 => true, + 119035 => true, + 119036 => true, + 119037 => true, + 119038 => true, + 119039 => true, + 119079 => true, + 119080 => true, + 119155 => true, + 119156 => true, + 119157 => true, + 119158 => true, + 119159 => true, + 119160 => true, + 119161 => true, + 119162 => true, + 119273 => true, + 119274 => true, + 119275 => true, + 119276 => true, + 119277 => true, + 119278 => true, + 119279 => true, + 119280 => true, + 119281 => true, + 119282 => true, + 119283 => true, + 119284 => true, + 119285 => true, + 119286 => true, + 119287 => true, + 119288 => true, + 119289 => true, + 119290 => true, + 119291 => true, + 119292 => true, + 119293 => true, + 119294 => true, + 119295 => true, + 119540 => true, + 119541 => true, + 119542 => true, + 119543 => true, + 119544 => true, + 119545 => true, + 119546 => true, + 119547 => true, + 119548 => true, + 119549 => true, + 119550 => true, + 119551 => true, + 119639 => true, + 119640 => true, + 119641 => true, + 119642 => true, + 119643 => true, + 119644 => true, + 119645 => true, + 119646 => true, + 119647 => true, + 119893 => true, + 119965 => true, + 119968 => true, + 119969 => true, + 119971 => true, + 119972 => true, + 119975 => true, + 119976 => true, + 119981 => true, + 119994 => true, + 119996 => true, + 120004 => true, + 120070 => true, + 120075 => true, + 120076 => true, + 120085 => true, + 120093 => true, + 120122 => true, + 120127 => true, + 120133 => true, + 120135 => true, + 120136 => true, + 120137 => true, + 120145 => true, + 120486 => true, + 120487 => true, + 120780 => true, + 120781 => true, + 121484 => true, + 121485 => true, + 121486 => true, + 121487 => true, + 121488 => true, + 121489 => true, + 121490 => true, + 121491 => true, + 121492 => true, + 121493 => true, + 121494 => true, + 121495 => true, + 121496 => true, + 121497 => true, + 121498 => true, + 121504 => true, + 122887 => true, + 122905 => true, + 122906 => true, + 122914 => true, + 122917 => true, + 123181 => true, + 123182 => true, + 123183 => true, + 123198 => true, + 123199 => true, + 123210 => true, + 123211 => true, + 123212 => true, + 123213 => true, + 123642 => true, + 123643 => true, + 123644 => true, + 123645 => true, + 123646 => true, + 125125 => true, + 125126 => true, + 125260 => true, + 125261 => true, + 125262 => true, + 125263 => true, + 125274 => true, + 125275 => true, + 125276 => true, + 125277 => true, + 126468 => true, + 126496 => true, + 126499 => true, + 126501 => true, + 126502 => true, + 126504 => true, + 126515 => true, + 126520 => true, + 126522 => true, + 126524 => true, + 126525 => true, + 126526 => true, + 126527 => true, + 126528 => true, + 126529 => true, + 126531 => true, + 126532 => true, + 126533 => true, + 126534 => true, + 126536 => true, + 126538 => true, + 126540 => true, + 126544 => true, + 126547 => true, + 126549 => true, + 126550 => true, + 126552 => true, + 126554 => true, + 126556 => true, + 126558 => true, + 126560 => true, + 126563 => true, + 126565 => true, + 126566 => true, + 126571 => true, + 126579 => true, + 126584 => true, + 126589 => true, + 126591 => true, + 126602 => true, + 126620 => true, + 126621 => true, + 126622 => true, + 126623 => true, + 126624 => true, + 126628 => true, + 126634 => true, + 127020 => true, + 127021 => true, + 127022 => true, + 127023 => true, + 127124 => true, + 127125 => true, + 127126 => true, + 127127 => true, + 127128 => true, + 127129 => true, + 127130 => true, + 127131 => true, + 127132 => true, + 127133 => true, + 127134 => true, + 127135 => true, + 127151 => true, + 127152 => true, + 127168 => true, + 127184 => true, + 127222 => true, + 127223 => true, + 127224 => true, + 127225 => true, + 127226 => true, + 127227 => true, + 127228 => true, + 127229 => true, + 127230 => true, + 127231 => true, + 127232 => true, + 127491 => true, + 127492 => true, + 127493 => true, + 127494 => true, + 127495 => true, + 127496 => true, + 127497 => true, + 127498 => true, + 127499 => true, + 127500 => true, + 127501 => true, + 127502 => true, + 127503 => true, + 127548 => true, + 127549 => true, + 127550 => true, + 127551 => true, + 127561 => true, + 127562 => true, + 127563 => true, + 127564 => true, + 127565 => true, + 127566 => true, + 127567 => true, + 127570 => true, + 127571 => true, + 127572 => true, + 127573 => true, + 127574 => true, + 127575 => true, + 127576 => true, + 127577 => true, + 127578 => true, + 127579 => true, + 127580 => true, + 127581 => true, + 127582 => true, + 127583 => true, + 128728 => true, + 128729 => true, + 128730 => true, + 128731 => true, + 128732 => true, + 128733 => true, + 128734 => true, + 128735 => true, + 128749 => true, + 128750 => true, + 128751 => true, + 128765 => true, + 128766 => true, + 128767 => true, + 128884 => true, + 128885 => true, + 128886 => true, + 128887 => true, + 128888 => true, + 128889 => true, + 128890 => true, + 128891 => true, + 128892 => true, + 128893 => true, + 128894 => true, + 128895 => true, + 128985 => true, + 128986 => true, + 128987 => true, + 128988 => true, + 128989 => true, + 128990 => true, + 128991 => true, + 129004 => true, + 129005 => true, + 129006 => true, + 129007 => true, + 129008 => true, + 129009 => true, + 129010 => true, + 129011 => true, + 129012 => true, + 129013 => true, + 129014 => true, + 129015 => true, + 129016 => true, + 129017 => true, + 129018 => true, + 129019 => true, + 129020 => true, + 129021 => true, + 129022 => true, + 129023 => true, + 129036 => true, + 129037 => true, + 129038 => true, + 129039 => true, + 129096 => true, + 129097 => true, + 129098 => true, + 129099 => true, + 129100 => true, + 129101 => true, + 129102 => true, + 129103 => true, + 129114 => true, + 129115 => true, + 129116 => true, + 129117 => true, + 129118 => true, + 129119 => true, + 129160 => true, + 129161 => true, + 129162 => true, + 129163 => true, + 129164 => true, + 129165 => true, + 129166 => true, + 129167 => true, + 129198 => true, + 129199 => true, + 129401 => true, + 129484 => true, + 129620 => true, + 129621 => true, + 129622 => true, + 129623 => true, + 129624 => true, + 129625 => true, + 129626 => true, + 129627 => true, + 129628 => true, + 129629 => true, + 129630 => true, + 129631 => true, + 129646 => true, + 129647 => true, + 129653 => true, + 129654 => true, + 129655 => true, + 129659 => true, + 129660 => true, + 129661 => true, + 129662 => true, + 129663 => true, + 129671 => true, + 129672 => true, + 129673 => true, + 129674 => true, + 129675 => true, + 129676 => true, + 129677 => true, + 129678 => true, + 129679 => true, + 129705 => true, + 129706 => true, + 129707 => true, + 129708 => true, + 129709 => true, + 129710 => true, + 129711 => true, + 129719 => true, + 129720 => true, + 129721 => true, + 129722 => true, + 129723 => true, + 129724 => true, + 129725 => true, + 129726 => true, + 129727 => true, + 129731 => true, + 129732 => true, + 129733 => true, + 129734 => true, + 129735 => true, + 129736 => true, + 129737 => true, + 129738 => true, + 129739 => true, + 129740 => true, + 129741 => true, + 129742 => true, + 129743 => true, + 129939 => true, + 131070 => true, + 131071 => true, + 177973 => true, + 177974 => true, + 177975 => true, + 177976 => true, + 177977 => true, + 177978 => true, + 177979 => true, + 177980 => true, + 177981 => true, + 177982 => true, + 177983 => true, + 178206 => true, + 178207 => true, + 183970 => true, + 183971 => true, + 183972 => true, + 183973 => true, + 183974 => true, + 183975 => true, + 183976 => true, + 183977 => true, + 183978 => true, + 183979 => true, + 183980 => true, + 183981 => true, + 183982 => true, + 183983 => true, + 194664 => true, + 194676 => true, + 194847 => true, + 194911 => true, + 195007 => true, + 196606 => true, + 196607 => true, + 262142 => true, + 262143 => true, + 327678 => true, + 327679 => true, + 393214 => true, + 393215 => true, + 458750 => true, + 458751 => true, + 524286 => true, + 524287 => true, + 589822 => true, + 589823 => true, + 655358 => true, + 655359 => true, + 720894 => true, + 720895 => true, + 786430 => true, + 786431 => true, + 851966 => true, + 851967 => true, + 917502 => true, + 917503 => true, + 917504 => true, + 917505 => true, + 917506 => true, + 917507 => true, + 917508 => true, + 917509 => true, + 917510 => true, + 917511 => true, + 917512 => true, + 917513 => true, + 917514 => true, + 917515 => true, + 917516 => true, + 917517 => true, + 917518 => true, + 917519 => true, + 917520 => true, + 917521 => true, + 917522 => true, + 917523 => true, + 917524 => true, + 917525 => true, + 917526 => true, + 917527 => true, + 917528 => true, + 917529 => true, + 917530 => true, + 917531 => true, + 917532 => true, + 917533 => true, + 917534 => true, + 917535 => true, + 983038 => true, + 983039 => true, + 1048574 => true, + 1048575 => true, + 1114110 => true, + 1114111 => true, +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php new file mode 100644 index 0000000..54f21cc --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php @@ -0,0 +1,308 @@ + ' ', + 168 => ' ฬˆ', + 175 => ' ฬ„', + 180 => ' ฬ', + 184 => ' ฬง', + 728 => ' ฬ†', + 729 => ' ฬ‡', + 730 => ' ฬŠ', + 731 => ' ฬจ', + 732 => ' ฬƒ', + 733 => ' ฬ‹', + 890 => ' ฮน', + 894 => ';', + 900 => ' ฬ', + 901 => ' ฬˆฬ', + 8125 => ' ฬ“', + 8127 => ' ฬ“', + 8128 => ' อ‚', + 8129 => ' ฬˆอ‚', + 8141 => ' ฬ“ฬ€', + 8142 => ' ฬ“ฬ', + 8143 => ' ฬ“อ‚', + 8157 => ' ฬ”ฬ€', + 8158 => ' ฬ”ฬ', + 8159 => ' ฬ”อ‚', + 8173 => ' ฬˆฬ€', + 8174 => ' ฬˆฬ', + 8175 => '`', + 8189 => ' ฬ', + 8190 => ' ฬ”', + 8192 => ' ', + 8193 => ' ', + 8194 => ' ', + 8195 => ' ', + 8196 => ' ', + 8197 => ' ', + 8198 => ' ', + 8199 => ' ', + 8200 => ' ', + 8201 => ' ', + 8202 => ' ', + 8215 => ' ฬณ', + 8239 => ' ', + 8252 => '!!', + 8254 => ' ฬ…', + 8263 => '??', + 8264 => '?!', + 8265 => '!?', + 8287 => ' ', + 8314 => '+', + 8316 => '=', + 8317 => '(', + 8318 => ')', + 8330 => '+', + 8332 => '=', + 8333 => '(', + 8334 => ')', + 8448 => 'a/c', + 8449 => 'a/s', + 8453 => 'c/o', + 8454 => 'c/u', + 9332 => '(1)', + 9333 => '(2)', + 9334 => '(3)', + 9335 => '(4)', + 9336 => '(5)', + 9337 => '(6)', + 9338 => '(7)', + 9339 => '(8)', + 9340 => '(9)', + 9341 => '(10)', + 9342 => '(11)', + 9343 => '(12)', + 9344 => '(13)', + 9345 => '(14)', + 9346 => '(15)', + 9347 => '(16)', + 9348 => '(17)', + 9349 => '(18)', + 9350 => '(19)', + 9351 => '(20)', + 9372 => '(a)', + 9373 => '(b)', + 9374 => '(c)', + 9375 => '(d)', + 9376 => '(e)', + 9377 => '(f)', + 9378 => '(g)', + 9379 => '(h)', + 9380 => '(i)', + 9381 => '(j)', + 9382 => '(k)', + 9383 => '(l)', + 9384 => '(m)', + 9385 => '(n)', + 9386 => '(o)', + 9387 => '(p)', + 9388 => '(q)', + 9389 => '(r)', + 9390 => '(s)', + 9391 => '(t)', + 9392 => '(u)', + 9393 => '(v)', + 9394 => '(w)', + 9395 => '(x)', + 9396 => '(y)', + 9397 => '(z)', + 10868 => '::=', + 10869 => '==', + 10870 => '===', + 12288 => ' ', + 12443 => ' ใ‚™', + 12444 => ' ใ‚š', + 12800 => '(แ„€)', + 12801 => '(แ„‚)', + 12802 => '(แ„ƒ)', + 12803 => '(แ„…)', + 12804 => '(แ„†)', + 12805 => '(แ„‡)', + 12806 => '(แ„‰)', + 12807 => '(แ„‹)', + 12808 => '(แ„Œ)', + 12809 => '(แ„Ž)', + 12810 => '(แ„)', + 12811 => '(แ„)', + 12812 => '(แ„‘)', + 12813 => '(แ„’)', + 12814 => '(๊ฐ€)', + 12815 => '(๋‚˜)', + 12816 => '(๋‹ค)', + 12817 => '(๋ผ)', + 12818 => '(๋งˆ)', + 12819 => '(๋ฐ”)', + 12820 => '(์‚ฌ)', + 12821 => '(์•„)', + 12822 => '(์ž)', + 12823 => '(์ฐจ)', + 12824 => '(์นด)', + 12825 => '(ํƒ€)', + 12826 => '(ํŒŒ)', + 12827 => '(ํ•˜)', + 12828 => '(์ฃผ)', + 12829 => '(์˜ค์ „)', + 12830 => '(์˜คํ›„)', + 12832 => '(ไธ€)', + 12833 => '(ไบŒ)', + 12834 => '(ไธ‰)', + 12835 => '(ๅ››)', + 12836 => '(ไบ”)', + 12837 => '(ๅ…ญ)', + 12838 => '(ไธƒ)', + 12839 => '(ๅ…ซ)', + 12840 => '(ไน)', + 12841 => '(ๅ)', + 12842 => '(ๆœˆ)', + 12843 => '(็ซ)', + 12844 => '(ๆฐด)', + 12845 => '(ๆœจ)', + 12846 => '(้‡‘)', + 12847 => '(ๅœŸ)', + 12848 => '(ๆ—ฅ)', + 12849 => '(ๆ ช)', + 12850 => '(ๆœ‰)', + 12851 => '(็คพ)', + 12852 => '(ๅ)', + 12853 => '(็‰น)', + 12854 => '(่ฒก)', + 12855 => '(็ฅ)', + 12856 => '(ๅŠด)', + 12857 => '(ไปฃ)', + 12858 => '(ๅ‘ผ)', + 12859 => '(ๅญฆ)', + 12860 => '(็›ฃ)', + 12861 => '(ไผ)', + 12862 => '(่ณ‡)', + 12863 => '(ๅ”)', + 12864 => '(็ฅญ)', + 12865 => '(ไผ‘)', + 12866 => '(่‡ช)', + 12867 => '(่‡ณ)', + 64297 => '+', + 64606 => ' ูŒู‘', + 64607 => ' ูู‘', + 64608 => ' ูŽู‘', + 64609 => ' ูู‘', + 64610 => ' ูู‘', + 64611 => ' ู‘ูฐ', + 65018 => 'ุตู„ู‰ ุงู„ู„ู‡ ุนู„ูŠู‡ ูˆุณู„ู…', + 65019 => 'ุฌู„ ุฌู„ุงู„ู‡', + 65040 => ',', + 65043 => ':', + 65044 => ';', + 65045 => '!', + 65046 => '?', + 65075 => '_', + 65076 => '_', + 65077 => '(', + 65078 => ')', + 65079 => '{', + 65080 => '}', + 65095 => '[', + 65096 => ']', + 65097 => ' ฬ…', + 65098 => ' ฬ…', + 65099 => ' ฬ…', + 65100 => ' ฬ…', + 65101 => '_', + 65102 => '_', + 65103 => '_', + 65104 => ',', + 65108 => ';', + 65109 => ':', + 65110 => '?', + 65111 => '!', + 65113 => '(', + 65114 => ')', + 65115 => '{', + 65116 => '}', + 65119 => '#', + 65120 => '&', + 65121 => '*', + 65122 => '+', + 65124 => '<', + 65125 => '>', + 65126 => '=', + 65128 => '\\', + 65129 => '$', + 65130 => '%', + 65131 => '@', + 65136 => ' ู‹', + 65138 => ' ูŒ', + 65140 => ' ู', + 65142 => ' ูŽ', + 65144 => ' ู', + 65146 => ' ู', + 65148 => ' ู‘', + 65150 => ' ู’', + 65281 => '!', + 65282 => '"', + 65283 => '#', + 65284 => '$', + 65285 => '%', + 65286 => '&', + 65287 => '\'', + 65288 => '(', + 65289 => ')', + 65290 => '*', + 65291 => '+', + 65292 => ',', + 65295 => '/', + 65306 => ':', + 65307 => ';', + 65308 => '<', + 65309 => '=', + 65310 => '>', + 65311 => '?', + 65312 => '@', + 65339 => '[', + 65340 => '\\', + 65341 => ']', + 65342 => '^', + 65343 => '_', + 65344 => '`', + 65371 => '{', + 65372 => '|', + 65373 => '}', + 65374 => '~', + 65507 => ' ฬ„', + 127233 => '0,', + 127234 => '1,', + 127235 => '2,', + 127236 => '3,', + 127237 => '4,', + 127238 => '5,', + 127239 => '6,', + 127240 => '7,', + 127241 => '8,', + 127242 => '9,', + 127248 => '(a)', + 127249 => '(b)', + 127250 => '(c)', + 127251 => '(d)', + 127252 => '(e)', + 127253 => '(f)', + 127254 => '(g)', + 127255 => '(h)', + 127256 => '(i)', + 127257 => '(j)', + 127258 => '(k)', + 127259 => '(l)', + 127260 => '(m)', + 127261 => '(n)', + 127262 => '(o)', + 127263 => '(p)', + 127264 => '(q)', + 127265 => '(r)', + 127266 => '(s)', + 127267 => '(t)', + 127268 => '(u)', + 127269 => '(v)', + 127270 => '(w)', + 127271 => '(x)', + 127272 => '(y)', + 127273 => '(z)', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php new file mode 100644 index 0000000..223396e --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php @@ -0,0 +1,71 @@ + true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true, + 30 => true, + 31 => true, + 32 => true, + 33 => true, + 34 => true, + 35 => true, + 36 => true, + 37 => true, + 38 => true, + 39 => true, + 40 => true, + 41 => true, + 42 => true, + 43 => true, + 44 => true, + 47 => true, + 58 => true, + 59 => true, + 60 => true, + 61 => true, + 62 => true, + 63 => true, + 64 => true, + 91 => true, + 92 => true, + 93 => true, + 94 => true, + 95 => true, + 96 => true, + 123 => true, + 124 => true, + 125 => true, + 126 => true, + 127 => true, + 8800 => true, + 8814 => true, + 8815 => true, +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php new file mode 100644 index 0000000..b377844 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php @@ -0,0 +1,273 @@ + true, + 847 => true, + 6155 => true, + 6156 => true, + 6157 => true, + 8203 => true, + 8288 => true, + 8292 => true, + 65024 => true, + 65025 => true, + 65026 => true, + 65027 => true, + 65028 => true, + 65029 => true, + 65030 => true, + 65031 => true, + 65032 => true, + 65033 => true, + 65034 => true, + 65035 => true, + 65036 => true, + 65037 => true, + 65038 => true, + 65039 => true, + 65279 => true, + 113824 => true, + 113825 => true, + 113826 => true, + 113827 => true, + 917760 => true, + 917761 => true, + 917762 => true, + 917763 => true, + 917764 => true, + 917765 => true, + 917766 => true, + 917767 => true, + 917768 => true, + 917769 => true, + 917770 => true, + 917771 => true, + 917772 => true, + 917773 => true, + 917774 => true, + 917775 => true, + 917776 => true, + 917777 => true, + 917778 => true, + 917779 => true, + 917780 => true, + 917781 => true, + 917782 => true, + 917783 => true, + 917784 => true, + 917785 => true, + 917786 => true, + 917787 => true, + 917788 => true, + 917789 => true, + 917790 => true, + 917791 => true, + 917792 => true, + 917793 => true, + 917794 => true, + 917795 => true, + 917796 => true, + 917797 => true, + 917798 => true, + 917799 => true, + 917800 => true, + 917801 => true, + 917802 => true, + 917803 => true, + 917804 => true, + 917805 => true, + 917806 => true, + 917807 => true, + 917808 => true, + 917809 => true, + 917810 => true, + 917811 => true, + 917812 => true, + 917813 => true, + 917814 => true, + 917815 => true, + 917816 => true, + 917817 => true, + 917818 => true, + 917819 => true, + 917820 => true, + 917821 => true, + 917822 => true, + 917823 => true, + 917824 => true, + 917825 => true, + 917826 => true, + 917827 => true, + 917828 => true, + 917829 => true, + 917830 => true, + 917831 => true, + 917832 => true, + 917833 => true, + 917834 => true, + 917835 => true, + 917836 => true, + 917837 => true, + 917838 => true, + 917839 => true, + 917840 => true, + 917841 => true, + 917842 => true, + 917843 => true, + 917844 => true, + 917845 => true, + 917846 => true, + 917847 => true, + 917848 => true, + 917849 => true, + 917850 => true, + 917851 => true, + 917852 => true, + 917853 => true, + 917854 => true, + 917855 => true, + 917856 => true, + 917857 => true, + 917858 => true, + 917859 => true, + 917860 => true, + 917861 => true, + 917862 => true, + 917863 => true, + 917864 => true, + 917865 => true, + 917866 => true, + 917867 => true, + 917868 => true, + 917869 => true, + 917870 => true, + 917871 => true, + 917872 => true, + 917873 => true, + 917874 => true, + 917875 => true, + 917876 => true, + 917877 => true, + 917878 => true, + 917879 => true, + 917880 => true, + 917881 => true, + 917882 => true, + 917883 => true, + 917884 => true, + 917885 => true, + 917886 => true, + 917887 => true, + 917888 => true, + 917889 => true, + 917890 => true, + 917891 => true, + 917892 => true, + 917893 => true, + 917894 => true, + 917895 => true, + 917896 => true, + 917897 => true, + 917898 => true, + 917899 => true, + 917900 => true, + 917901 => true, + 917902 => true, + 917903 => true, + 917904 => true, + 917905 => true, + 917906 => true, + 917907 => true, + 917908 => true, + 917909 => true, + 917910 => true, + 917911 => true, + 917912 => true, + 917913 => true, + 917914 => true, + 917915 => true, + 917916 => true, + 917917 => true, + 917918 => true, + 917919 => true, + 917920 => true, + 917921 => true, + 917922 => true, + 917923 => true, + 917924 => true, + 917925 => true, + 917926 => true, + 917927 => true, + 917928 => true, + 917929 => true, + 917930 => true, + 917931 => true, + 917932 => true, + 917933 => true, + 917934 => true, + 917935 => true, + 917936 => true, + 917937 => true, + 917938 => true, + 917939 => true, + 917940 => true, + 917941 => true, + 917942 => true, + 917943 => true, + 917944 => true, + 917945 => true, + 917946 => true, + 917947 => true, + 917948 => true, + 917949 => true, + 917950 => true, + 917951 => true, + 917952 => true, + 917953 => true, + 917954 => true, + 917955 => true, + 917956 => true, + 917957 => true, + 917958 => true, + 917959 => true, + 917960 => true, + 917961 => true, + 917962 => true, + 917963 => true, + 917964 => true, + 917965 => true, + 917966 => true, + 917967 => true, + 917968 => true, + 917969 => true, + 917970 => true, + 917971 => true, + 917972 => true, + 917973 => true, + 917974 => true, + 917975 => true, + 917976 => true, + 917977 => true, + 917978 => true, + 917979 => true, + 917980 => true, + 917981 => true, + 917982 => true, + 917983 => true, + 917984 => true, + 917985 => true, + 917986 => true, + 917987 => true, + 917988 => true, + 917989 => true, + 917990 => true, + 917991 => true, + 917992 => true, + 917993 => true, + 917994 => true, + 917995 => true, + 917996 => true, + 917997 => true, + 917998 => true, + 917999 => true, +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php new file mode 100644 index 0000000..9b85fe9 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php @@ -0,0 +1,5778 @@ + 'a', + 66 => 'b', + 67 => 'c', + 68 => 'd', + 69 => 'e', + 70 => 'f', + 71 => 'g', + 72 => 'h', + 73 => 'i', + 74 => 'j', + 75 => 'k', + 76 => 'l', + 77 => 'm', + 78 => 'n', + 79 => 'o', + 80 => 'p', + 81 => 'q', + 82 => 'r', + 83 => 's', + 84 => 't', + 85 => 'u', + 86 => 'v', + 87 => 'w', + 88 => 'x', + 89 => 'y', + 90 => 'z', + 170 => 'a', + 178 => '2', + 179 => '3', + 181 => 'ฮผ', + 185 => '1', + 186 => 'o', + 188 => '1โ„4', + 189 => '1โ„2', + 190 => '3โ„4', + 192 => 'ร ', + 193 => 'รก', + 194 => 'รข', + 195 => 'รฃ', + 196 => 'รค', + 197 => 'รฅ', + 198 => 'รฆ', + 199 => 'รง', + 200 => 'รจ', + 201 => 'รฉ', + 202 => 'รช', + 203 => 'รซ', + 204 => 'รฌ', + 205 => 'รญ', + 206 => 'รฎ', + 207 => 'รฏ', + 208 => 'รฐ', + 209 => 'รฑ', + 210 => 'รฒ', + 211 => 'รณ', + 212 => 'รด', + 213 => 'รต', + 214 => 'รถ', + 216 => 'รธ', + 217 => 'รน', + 218 => 'รบ', + 219 => 'รป', + 220 => 'รผ', + 221 => 'รฝ', + 222 => 'รพ', + 256 => 'ฤ', + 258 => 'ฤƒ', + 260 => 'ฤ…', + 262 => 'ฤ‡', + 264 => 'ฤ‰', + 266 => 'ฤ‹', + 268 => 'ฤ', + 270 => 'ฤ', + 272 => 'ฤ‘', + 274 => 'ฤ“', + 276 => 'ฤ•', + 278 => 'ฤ—', + 280 => 'ฤ™', + 282 => 'ฤ›', + 284 => 'ฤ', + 286 => 'ฤŸ', + 288 => 'ฤก', + 290 => 'ฤฃ', + 292 => 'ฤฅ', + 294 => 'ฤง', + 296 => 'ฤฉ', + 298 => 'ฤซ', + 300 => 'ฤญ', + 302 => 'ฤฏ', + 304 => 'iฬ‡', + 306 => 'ij', + 307 => 'ij', + 308 => 'ฤต', + 310 => 'ฤท', + 313 => 'ฤบ', + 315 => 'ฤผ', + 317 => 'ฤพ', + 319 => 'lยท', + 320 => 'lยท', + 321 => 'ล‚', + 323 => 'ล„', + 325 => 'ล†', + 327 => 'ลˆ', + 329 => 'สผn', + 330 => 'ล‹', + 332 => 'ล', + 334 => 'ล', + 336 => 'ล‘', + 338 => 'ล“', + 340 => 'ล•', + 342 => 'ล—', + 344 => 'ล™', + 346 => 'ล›', + 348 => 'ล', + 350 => 'ลŸ', + 352 => 'ลก', + 354 => 'ลฃ', + 356 => 'ลฅ', + 358 => 'ลง', + 360 => 'ลฉ', + 362 => 'ลซ', + 364 => 'ลญ', + 366 => 'ลฏ', + 368 => 'ลฑ', + 370 => 'ลณ', + 372 => 'ลต', + 374 => 'ลท', + 376 => 'รฟ', + 377 => 'ลบ', + 379 => 'ลผ', + 381 => 'ลพ', + 383 => 's', + 385 => 'ษ“', + 386 => 'ฦƒ', + 388 => 'ฦ…', + 390 => 'ษ”', + 391 => 'ฦˆ', + 393 => 'ษ–', + 394 => 'ษ—', + 395 => 'ฦŒ', + 398 => 'ว', + 399 => 'ษ™', + 400 => 'ษ›', + 401 => 'ฦ’', + 403 => 'ษ ', + 404 => 'ษฃ', + 406 => 'ษฉ', + 407 => 'ษจ', + 408 => 'ฦ™', + 412 => 'ษฏ', + 413 => 'ษฒ', + 415 => 'ษต', + 416 => 'ฦก', + 418 => 'ฦฃ', + 420 => 'ฦฅ', + 422 => 'ส€', + 423 => 'ฦจ', + 425 => 'สƒ', + 428 => 'ฦญ', + 430 => 'สˆ', + 431 => 'ฦฐ', + 433 => 'สŠ', + 434 => 'ส‹', + 435 => 'ฦด', + 437 => 'ฦถ', + 439 => 'ส’', + 440 => 'ฦน', + 444 => 'ฦฝ', + 452 => 'dลพ', + 453 => 'dลพ', + 454 => 'dลพ', + 455 => 'lj', + 456 => 'lj', + 457 => 'lj', + 458 => 'nj', + 459 => 'nj', + 460 => 'nj', + 461 => 'วŽ', + 463 => 'ว', + 465 => 'ว’', + 467 => 'ว”', + 469 => 'ว–', + 471 => 'ว˜', + 473 => 'วš', + 475 => 'วœ', + 478 => 'วŸ', + 480 => 'วก', + 482 => 'วฃ', + 484 => 'วฅ', + 486 => 'วง', + 488 => 'วฉ', + 490 => 'วซ', + 492 => 'วญ', + 494 => 'วฏ', + 497 => 'dz', + 498 => 'dz', + 499 => 'dz', + 500 => 'วต', + 502 => 'ฦ•', + 503 => 'ฦฟ', + 504 => 'วน', + 506 => 'วป', + 508 => 'วฝ', + 510 => 'วฟ', + 512 => 'ศ', + 514 => 'ศƒ', + 516 => 'ศ…', + 518 => 'ศ‡', + 520 => 'ศ‰', + 522 => 'ศ‹', + 524 => 'ศ', + 526 => 'ศ', + 528 => 'ศ‘', + 530 => 'ศ“', + 532 => 'ศ•', + 534 => 'ศ—', + 536 => 'ศ™', + 538 => 'ศ›', + 540 => 'ศ', + 542 => 'ศŸ', + 544 => 'ฦž', + 546 => 'ศฃ', + 548 => 'ศฅ', + 550 => 'ศง', + 552 => 'ศฉ', + 554 => 'ศซ', + 556 => 'ศญ', + 558 => 'ศฏ', + 560 => 'ศฑ', + 562 => 'ศณ', + 570 => 'โฑฅ', + 571 => 'ศผ', + 573 => 'ฦš', + 574 => 'โฑฆ', + 577 => 'ษ‚', + 579 => 'ฦ€', + 580 => 'ส‰', + 581 => 'สŒ', + 582 => 'ษ‡', + 584 => 'ษ‰', + 586 => 'ษ‹', + 588 => 'ษ', + 590 => 'ษ', + 688 => 'h', + 689 => 'ษฆ', + 690 => 'j', + 691 => 'r', + 692 => 'ษน', + 693 => 'ษป', + 694 => 'ส', + 695 => 'w', + 696 => 'y', + 736 => 'ษฃ', + 737 => 'l', + 738 => 's', + 739 => 'x', + 740 => 'ส•', + 832 => 'ฬ€', + 833 => 'ฬ', + 835 => 'ฬ“', + 836 => 'ฬˆฬ', + 837 => 'ฮน', + 880 => 'อฑ', + 882 => 'อณ', + 884 => 'สน', + 886 => 'อท', + 895 => 'ฯณ', + 902 => 'ฮฌ', + 903 => 'ยท', + 904 => 'ฮญ', + 905 => 'ฮฎ', + 906 => 'ฮฏ', + 908 => 'ฯŒ', + 910 => 'ฯ', + 911 => 'ฯŽ', + 913 => 'ฮฑ', + 914 => 'ฮฒ', + 915 => 'ฮณ', + 916 => 'ฮด', + 917 => 'ฮต', + 918 => 'ฮถ', + 919 => 'ฮท', + 920 => 'ฮธ', + 921 => 'ฮน', + 922 => 'ฮบ', + 923 => 'ฮป', + 924 => 'ฮผ', + 925 => 'ฮฝ', + 926 => 'ฮพ', + 927 => 'ฮฟ', + 928 => 'ฯ€', + 929 => 'ฯ', + 931 => 'ฯƒ', + 932 => 'ฯ„', + 933 => 'ฯ…', + 934 => 'ฯ†', + 935 => 'ฯ‡', + 936 => 'ฯˆ', + 937 => 'ฯ‰', + 938 => 'ฯŠ', + 939 => 'ฯ‹', + 975 => 'ฯ—', + 976 => 'ฮฒ', + 977 => 'ฮธ', + 978 => 'ฯ…', + 979 => 'ฯ', + 980 => 'ฯ‹', + 981 => 'ฯ†', + 982 => 'ฯ€', + 984 => 'ฯ™', + 986 => 'ฯ›', + 988 => 'ฯ', + 990 => 'ฯŸ', + 992 => 'ฯก', + 994 => 'ฯฃ', + 996 => 'ฯฅ', + 998 => 'ฯง', + 1000 => 'ฯฉ', + 1002 => 'ฯซ', + 1004 => 'ฯญ', + 1006 => 'ฯฏ', + 1008 => 'ฮบ', + 1009 => 'ฯ', + 1010 => 'ฯƒ', + 1012 => 'ฮธ', + 1013 => 'ฮต', + 1015 => 'ฯธ', + 1017 => 'ฯƒ', + 1018 => 'ฯป', + 1021 => 'อป', + 1022 => 'อผ', + 1023 => 'อฝ', + 1024 => 'ั', + 1025 => 'ั‘', + 1026 => 'ั’', + 1027 => 'ั“', + 1028 => 'ั”', + 1029 => 'ั•', + 1030 => 'ั–', + 1031 => 'ั—', + 1032 => 'ั˜', + 1033 => 'ั™', + 1034 => 'ัš', + 1035 => 'ั›', + 1036 => 'ัœ', + 1037 => 'ั', + 1038 => 'ัž', + 1039 => 'ัŸ', + 1040 => 'ะฐ', + 1041 => 'ะฑ', + 1042 => 'ะฒ', + 1043 => 'ะณ', + 1044 => 'ะด', + 1045 => 'ะต', + 1046 => 'ะถ', + 1047 => 'ะท', + 1048 => 'ะธ', + 1049 => 'ะน', + 1050 => 'ะบ', + 1051 => 'ะป', + 1052 => 'ะผ', + 1053 => 'ะฝ', + 1054 => 'ะพ', + 1055 => 'ะฟ', + 1056 => 'ั€', + 1057 => 'ั', + 1058 => 'ั‚', + 1059 => 'ัƒ', + 1060 => 'ั„', + 1061 => 'ั…', + 1062 => 'ั†', + 1063 => 'ั‡', + 1064 => 'ัˆ', + 1065 => 'ั‰', + 1066 => 'ัŠ', + 1067 => 'ั‹', + 1068 => 'ัŒ', + 1069 => 'ั', + 1070 => 'ัŽ', + 1071 => 'ั', + 1120 => 'ัก', + 1122 => 'ัฃ', + 1124 => 'ัฅ', + 1126 => 'ัง', + 1128 => 'ัฉ', + 1130 => 'ัซ', + 1132 => 'ัญ', + 1134 => 'ัฏ', + 1136 => 'ัฑ', + 1138 => 'ัณ', + 1140 => 'ัต', + 1142 => 'ัท', + 1144 => 'ัน', + 1146 => 'ัป', + 1148 => 'ัฝ', + 1150 => 'ัฟ', + 1152 => 'า', + 1162 => 'า‹', + 1164 => 'า', + 1166 => 'า', + 1168 => 'า‘', + 1170 => 'า“', + 1172 => 'า•', + 1174 => 'า—', + 1176 => 'า™', + 1178 => 'า›', + 1180 => 'า', + 1182 => 'าŸ', + 1184 => 'าก', + 1186 => 'าฃ', + 1188 => 'าฅ', + 1190 => 'าง', + 1192 => 'าฉ', + 1194 => 'าซ', + 1196 => 'าญ', + 1198 => 'าฏ', + 1200 => 'าฑ', + 1202 => 'าณ', + 1204 => 'าต', + 1206 => 'าท', + 1208 => 'าน', + 1210 => 'าป', + 1212 => 'าฝ', + 1214 => 'าฟ', + 1217 => 'ำ‚', + 1219 => 'ำ„', + 1221 => 'ำ†', + 1223 => 'ำˆ', + 1225 => 'ำŠ', + 1227 => 'ำŒ', + 1229 => 'ำŽ', + 1232 => 'ำ‘', + 1234 => 'ำ“', + 1236 => 'ำ•', + 1238 => 'ำ—', + 1240 => 'ำ™', + 1242 => 'ำ›', + 1244 => 'ำ', + 1246 => 'ำŸ', + 1248 => 'ำก', + 1250 => 'ำฃ', + 1252 => 'ำฅ', + 1254 => 'ำง', + 1256 => 'ำฉ', + 1258 => 'ำซ', + 1260 => 'ำญ', + 1262 => 'ำฏ', + 1264 => 'ำฑ', + 1266 => 'ำณ', + 1268 => 'ำต', + 1270 => 'ำท', + 1272 => 'ำน', + 1274 => 'ำป', + 1276 => 'ำฝ', + 1278 => 'ำฟ', + 1280 => 'ิ', + 1282 => 'ิƒ', + 1284 => 'ิ…', + 1286 => 'ิ‡', + 1288 => 'ิ‰', + 1290 => 'ิ‹', + 1292 => 'ิ', + 1294 => 'ิ', + 1296 => 'ิ‘', + 1298 => 'ิ“', + 1300 => 'ิ•', + 1302 => 'ิ—', + 1304 => 'ิ™', + 1306 => 'ิ›', + 1308 => 'ิ', + 1310 => 'ิŸ', + 1312 => 'ิก', + 1314 => 'ิฃ', + 1316 => 'ิฅ', + 1318 => 'ิง', + 1320 => 'ิฉ', + 1322 => 'ิซ', + 1324 => 'ิญ', + 1326 => 'ิฏ', + 1329 => 'ีก', + 1330 => 'ีข', + 1331 => 'ีฃ', + 1332 => 'ีค', + 1333 => 'ีฅ', + 1334 => 'ีฆ', + 1335 => 'ีง', + 1336 => 'ีจ', + 1337 => 'ีฉ', + 1338 => 'ีช', + 1339 => 'ีซ', + 1340 => 'ีฌ', + 1341 => 'ีญ', + 1342 => 'ีฎ', + 1343 => 'ีฏ', + 1344 => 'ีฐ', + 1345 => 'ีฑ', + 1346 => 'ีฒ', + 1347 => 'ีณ', + 1348 => 'ีด', + 1349 => 'ีต', + 1350 => 'ีถ', + 1351 => 'ีท', + 1352 => 'ีธ', + 1353 => 'ีน', + 1354 => 'ีบ', + 1355 => 'ีป', + 1356 => 'ีผ', + 1357 => 'ีฝ', + 1358 => 'ีพ', + 1359 => 'ีฟ', + 1360 => 'ึ€', + 1361 => 'ึ', + 1362 => 'ึ‚', + 1363 => 'ึƒ', + 1364 => 'ึ„', + 1365 => 'ึ…', + 1366 => 'ึ†', + 1415 => 'ีฅึ‚', + 1653 => 'ุงูด', + 1654 => 'ูˆูด', + 1655 => '‡ูด', + 1656 => 'ูŠูด', + 2392 => 'เค•เคผ', + 2393 => 'เค–เคผ', + 2394 => 'เค—เคผ', + 2395 => 'เคœเคผ', + 2396 => 'เคกเคผ', + 2397 => 'เคขเคผ', + 2398 => 'เคซเคผ', + 2399 => 'เคฏเคผ', + 2524 => 'เฆกเฆผ', + 2525 => 'เฆขเฆผ', + 2527 => 'เฆฏเฆผ', + 2611 => 'เจฒเจผ', + 2614 => 'เจธเจผ', + 2649 => 'เจ–เจผ', + 2650 => 'เจ—เจผ', + 2651 => 'เจœเจผ', + 2654 => 'เจซเจผ', + 2908 => 'เฌกเฌผ', + 2909 => 'เฌขเฌผ', + 3635 => 'เนเธฒ', + 3763 => 'เปเบฒ', + 3804 => 'เบซเบ™', + 3805 => 'เบซเบก', + 3852 => 'เผ‹', + 3907 => 'เฝ‚เพท', + 3917 => 'เฝŒเพท', + 3922 => 'เฝ‘เพท', + 3927 => 'เฝ–เพท', + 3932 => 'เฝ›เพท', + 3945 => 'เฝ€เพต', + 3955 => 'เฝฑเฝฒ', + 3957 => 'เฝฑเฝด', + 3958 => 'เพฒเพ€', + 3959 => 'เพฒเฝฑเพ€', + 3960 => 'เพณเพ€', + 3961 => 'เพณเฝฑเพ€', + 3969 => 'เฝฑเพ€', + 3987 => 'เพ’เพท', + 3997 => 'เพœเพท', + 4002 => 'เพกเพท', + 4007 => 'เพฆเพท', + 4012 => 'เพซเพท', + 4025 => 'เพเพต', + 4295 => 'โดง', + 4301 => 'โดญ', + 4348 => 'แƒœ', + 5112 => 'แฐ', + 5113 => 'แฑ', + 5114 => 'แฒ', + 5115 => 'แณ', + 5116 => 'แด', + 5117 => 'แต', + 7296 => 'ะฒ', + 7297 => 'ะด', + 7298 => 'ะพ', + 7299 => 'ั', + 7300 => 'ั‚', + 7301 => 'ั‚', + 7302 => 'ัŠ', + 7303 => 'ัฃ', + 7304 => '๊™‹', + 7312 => 'แƒ', + 7313 => 'แƒ‘', + 7314 => 'แƒ’', + 7315 => 'แƒ“', + 7316 => 'แƒ”', + 7317 => 'แƒ•', + 7318 => 'แƒ–', + 7319 => 'แƒ—', + 7320 => 'แƒ˜', + 7321 => 'แƒ™', + 7322 => 'แƒš', + 7323 => 'แƒ›', + 7324 => 'แƒœ', + 7325 => 'แƒ', + 7326 => 'แƒž', + 7327 => 'แƒŸ', + 7328 => 'แƒ ', + 7329 => 'แƒก', + 7330 => 'แƒข', + 7331 => 'แƒฃ', + 7332 => 'แƒค', + 7333 => 'แƒฅ', + 7334 => 'แƒฆ', + 7335 => 'แƒง', + 7336 => 'แƒจ', + 7337 => 'แƒฉ', + 7338 => 'แƒช', + 7339 => 'แƒซ', + 7340 => 'แƒฌ', + 7341 => 'แƒญ', + 7342 => 'แƒฎ', + 7343 => 'แƒฏ', + 7344 => 'แƒฐ', + 7345 => 'แƒฑ', + 7346 => 'แƒฒ', + 7347 => 'แƒณ', + 7348 => 'แƒด', + 7349 => 'แƒต', + 7350 => 'แƒถ', + 7351 => 'แƒท', + 7352 => 'แƒธ', + 7353 => 'แƒน', + 7354 => 'แƒบ', + 7357 => 'แƒฝ', + 7358 => 'แƒพ', + 7359 => 'แƒฟ', + 7468 => 'a', + 7469 => 'รฆ', + 7470 => 'b', + 7472 => 'd', + 7473 => 'e', + 7474 => 'ว', + 7475 => 'g', + 7476 => 'h', + 7477 => 'i', + 7478 => 'j', + 7479 => 'k', + 7480 => 'l', + 7481 => 'm', + 7482 => 'n', + 7484 => 'o', + 7485 => 'ศฃ', + 7486 => 'p', + 7487 => 'r', + 7488 => 't', + 7489 => 'u', + 7490 => 'w', + 7491 => 'a', + 7492 => 'ษ', + 7493 => 'ษ‘', + 7494 => 'แด‚', + 7495 => 'b', + 7496 => 'd', + 7497 => 'e', + 7498 => 'ษ™', + 7499 => 'ษ›', + 7500 => 'ษœ', + 7501 => 'g', + 7503 => 'k', + 7504 => 'm', + 7505 => 'ล‹', + 7506 => 'o', + 7507 => 'ษ”', + 7508 => 'แด–', + 7509 => 'แด—', + 7510 => 'p', + 7511 => 't', + 7512 => 'u', + 7513 => 'แด', + 7514 => 'ษฏ', + 7515 => 'v', + 7516 => 'แดฅ', + 7517 => 'ฮฒ', + 7518 => 'ฮณ', + 7519 => 'ฮด', + 7520 => 'ฯ†', + 7521 => 'ฯ‡', + 7522 => 'i', + 7523 => 'r', + 7524 => 'u', + 7525 => 'v', + 7526 => 'ฮฒ', + 7527 => 'ฮณ', + 7528 => 'ฯ', + 7529 => 'ฯ†', + 7530 => 'ฯ‡', + 7544 => 'ะฝ', + 7579 => 'ษ’', + 7580 => 'c', + 7581 => 'ษ•', + 7582 => 'รฐ', + 7583 => 'ษœ', + 7584 => 'f', + 7585 => 'ษŸ', + 7586 => 'ษก', + 7587 => 'ษฅ', + 7588 => 'ษจ', + 7589 => 'ษฉ', + 7590 => 'ษช', + 7591 => 'แตป', + 7592 => 'ส', + 7593 => 'ษญ', + 7594 => 'แถ…', + 7595 => 'สŸ', + 7596 => 'ษฑ', + 7597 => 'ษฐ', + 7598 => 'ษฒ', + 7599 => 'ษณ', + 7600 => 'ษด', + 7601 => 'ษต', + 7602 => 'ษธ', + 7603 => 'ส‚', + 7604 => 'สƒ', + 7605 => 'ฦซ', + 7606 => 'ส‰', + 7607 => 'สŠ', + 7608 => 'แดœ', + 7609 => 'ส‹', + 7610 => 'สŒ', + 7611 => 'z', + 7612 => 'ส', + 7613 => 'ส‘', + 7614 => 'ส’', + 7615 => 'ฮธ', + 7680 => 'แธ', + 7682 => 'แธƒ', + 7684 => 'แธ…', + 7686 => 'แธ‡', + 7688 => 'แธ‰', + 7690 => 'แธ‹', + 7692 => 'แธ', + 7694 => 'แธ', + 7696 => 'แธ‘', + 7698 => 'แธ“', + 7700 => 'แธ•', + 7702 => 'แธ—', + 7704 => 'แธ™', + 7706 => 'แธ›', + 7708 => 'แธ', + 7710 => 'แธŸ', + 7712 => 'แธก', + 7714 => 'แธฃ', + 7716 => 'แธฅ', + 7718 => 'แธง', + 7720 => 'แธฉ', + 7722 => 'แธซ', + 7724 => 'แธญ', + 7726 => 'แธฏ', + 7728 => 'แธฑ', + 7730 => 'แธณ', + 7732 => 'แธต', + 7734 => 'แธท', + 7736 => 'แธน', + 7738 => 'แธป', + 7740 => 'แธฝ', + 7742 => 'แธฟ', + 7744 => 'แน', + 7746 => 'แนƒ', + 7748 => 'แน…', + 7750 => 'แน‡', + 7752 => 'แน‰', + 7754 => 'แน‹', + 7756 => 'แน', + 7758 => 'แน', + 7760 => 'แน‘', + 7762 => 'แน“', + 7764 => 'แน•', + 7766 => 'แน—', + 7768 => 'แน™', + 7770 => 'แน›', + 7772 => 'แน', + 7774 => 'แนŸ', + 7776 => 'แนก', + 7778 => 'แนฃ', + 7780 => 'แนฅ', + 7782 => 'แนง', + 7784 => 'แนฉ', + 7786 => 'แนซ', + 7788 => 'แนญ', + 7790 => 'แนฏ', + 7792 => 'แนฑ', + 7794 => 'แนณ', + 7796 => 'แนต', + 7798 => 'แนท', + 7800 => 'แนน', + 7802 => 'แนป', + 7804 => 'แนฝ', + 7806 => 'แนฟ', + 7808 => 'แบ', + 7810 => 'แบƒ', + 7812 => 'แบ…', + 7814 => 'แบ‡', + 7816 => 'แบ‰', + 7818 => 'แบ‹', + 7820 => 'แบ', + 7822 => 'แบ', + 7824 => 'แบ‘', + 7826 => 'แบ“', + 7828 => 'แบ•', + 7834 => 'aสพ', + 7835 => 'แนก', + 7838 => 'ss', + 7840 => 'แบก', + 7842 => 'แบฃ', + 7844 => 'แบฅ', + 7846 => 'แบง', + 7848 => 'แบฉ', + 7850 => 'แบซ', + 7852 => 'แบญ', + 7854 => 'แบฏ', + 7856 => 'แบฑ', + 7858 => 'แบณ', + 7860 => 'แบต', + 7862 => 'แบท', + 7864 => 'แบน', + 7866 => 'แบป', + 7868 => 'แบฝ', + 7870 => 'แบฟ', + 7872 => 'แป', + 7874 => 'แปƒ', + 7876 => 'แป…', + 7878 => 'แป‡', + 7880 => 'แป‰', + 7882 => 'แป‹', + 7884 => 'แป', + 7886 => 'แป', + 7888 => 'แป‘', + 7890 => 'แป“', + 7892 => 'แป•', + 7894 => 'แป—', + 7896 => 'แป™', + 7898 => 'แป›', + 7900 => 'แป', + 7902 => 'แปŸ', + 7904 => 'แปก', + 7906 => 'แปฃ', + 7908 => 'แปฅ', + 7910 => 'แปง', + 7912 => 'แปฉ', + 7914 => 'แปซ', + 7916 => 'แปญ', + 7918 => 'แปฏ', + 7920 => 'แปฑ', + 7922 => 'แปณ', + 7924 => 'แปต', + 7926 => 'แปท', + 7928 => 'แปน', + 7930 => 'แปป', + 7932 => 'แปฝ', + 7934 => 'แปฟ', + 7944 => 'แผ€', + 7945 => 'แผ', + 7946 => 'แผ‚', + 7947 => 'แผƒ', + 7948 => 'แผ„', + 7949 => 'แผ…', + 7950 => 'แผ†', + 7951 => 'แผ‡', + 7960 => 'แผ', + 7961 => 'แผ‘', + 7962 => 'แผ’', + 7963 => 'แผ“', + 7964 => 'แผ”', + 7965 => 'แผ•', + 7976 => 'แผ ', + 7977 => 'แผก', + 7978 => 'แผข', + 7979 => 'แผฃ', + 7980 => 'แผค', + 7981 => 'แผฅ', + 7982 => 'แผฆ', + 7983 => 'แผง', + 7992 => 'แผฐ', + 7993 => 'แผฑ', + 7994 => 'แผฒ', + 7995 => 'แผณ', + 7996 => 'แผด', + 7997 => 'แผต', + 7998 => 'แผถ', + 7999 => 'แผท', + 8008 => 'แฝ€', + 8009 => 'แฝ', + 8010 => 'แฝ‚', + 8011 => 'แฝƒ', + 8012 => 'แฝ„', + 8013 => 'แฝ…', + 8025 => 'แฝ‘', + 8027 => 'แฝ“', + 8029 => 'แฝ•', + 8031 => 'แฝ—', + 8040 => 'แฝ ', + 8041 => 'แฝก', + 8042 => 'แฝข', + 8043 => 'แฝฃ', + 8044 => 'แฝค', + 8045 => 'แฝฅ', + 8046 => 'แฝฆ', + 8047 => 'แฝง', + 8049 => 'ฮฌ', + 8051 => 'ฮญ', + 8053 => 'ฮฎ', + 8055 => 'ฮฏ', + 8057 => 'ฯŒ', + 8059 => 'ฯ', + 8061 => 'ฯŽ', + 8064 => 'แผ€ฮน', + 8065 => 'แผฮน', + 8066 => 'แผ‚ฮน', + 8067 => 'แผƒฮน', + 8068 => 'แผ„ฮน', + 8069 => 'แผ…ฮน', + 8070 => 'แผ†ฮน', + 8071 => 'แผ‡ฮน', + 8072 => 'แผ€ฮน', + 8073 => 'แผฮน', + 8074 => 'แผ‚ฮน', + 8075 => 'แผƒฮน', + 8076 => 'แผ„ฮน', + 8077 => 'แผ…ฮน', + 8078 => 'แผ†ฮน', + 8079 => 'แผ‡ฮน', + 8080 => 'แผ ฮน', + 8081 => 'แผกฮน', + 8082 => 'แผขฮน', + 8083 => 'แผฃฮน', + 8084 => 'แผคฮน', + 8085 => 'แผฅฮน', + 8086 => 'แผฆฮน', + 8087 => 'แผงฮน', + 8088 => 'แผ ฮน', + 8089 => 'แผกฮน', + 8090 => 'แผขฮน', + 8091 => 'แผฃฮน', + 8092 => 'แผคฮน', + 8093 => 'แผฅฮน', + 8094 => 'แผฆฮน', + 8095 => 'แผงฮน', + 8096 => 'แฝ ฮน', + 8097 => 'แฝกฮน', + 8098 => 'แฝขฮน', + 8099 => 'แฝฃฮน', + 8100 => 'แฝคฮน', + 8101 => 'แฝฅฮน', + 8102 => 'แฝฆฮน', + 8103 => 'แฝงฮน', + 8104 => 'แฝ ฮน', + 8105 => 'แฝกฮน', + 8106 => 'แฝขฮน', + 8107 => 'แฝฃฮน', + 8108 => 'แฝคฮน', + 8109 => 'แฝฅฮน', + 8110 => 'แฝฆฮน', + 8111 => 'แฝงฮน', + 8114 => 'แฝฐฮน', + 8115 => 'ฮฑฮน', + 8116 => 'ฮฌฮน', + 8119 => 'แพถฮน', + 8120 => 'แพฐ', + 8121 => 'แพฑ', + 8122 => 'แฝฐ', + 8123 => 'ฮฌ', + 8124 => 'ฮฑฮน', + 8126 => 'ฮน', + 8130 => 'แฝดฮน', + 8131 => 'ฮทฮน', + 8132 => 'ฮฎฮน', + 8135 => 'แฟ†ฮน', + 8136 => 'แฝฒ', + 8137 => 'ฮญ', + 8138 => 'แฝด', + 8139 => 'ฮฎ', + 8140 => 'ฮทฮน', + 8147 => 'ฮ', + 8152 => 'แฟ', + 8153 => 'แฟ‘', + 8154 => 'แฝถ', + 8155 => 'ฮฏ', + 8163 => 'ฮฐ', + 8168 => 'แฟ ', + 8169 => 'แฟก', + 8170 => 'แฝบ', + 8171 => 'ฯ', + 8172 => 'แฟฅ', + 8178 => 'แฝผฮน', + 8179 => 'ฯ‰ฮน', + 8180 => 'ฯŽฮน', + 8183 => 'แฟถฮน', + 8184 => 'แฝธ', + 8185 => 'ฯŒ', + 8186 => 'แฝผ', + 8187 => 'ฯŽ', + 8188 => 'ฯ‰ฮน', + 8209 => 'โ€', + 8243 => 'โ€ฒโ€ฒ', + 8244 => 'โ€ฒโ€ฒโ€ฒ', + 8246 => 'โ€ตโ€ต', + 8247 => 'โ€ตโ€ตโ€ต', + 8279 => 'โ€ฒโ€ฒโ€ฒโ€ฒ', + 8304 => '0', + 8305 => 'i', + 8308 => '4', + 8309 => '5', + 8310 => '6', + 8311 => '7', + 8312 => '8', + 8313 => '9', + 8315 => 'โˆ’', + 8319 => 'n', + 8320 => '0', + 8321 => '1', + 8322 => '2', + 8323 => '3', + 8324 => '4', + 8325 => '5', + 8326 => '6', + 8327 => '7', + 8328 => '8', + 8329 => '9', + 8331 => 'โˆ’', + 8336 => 'a', + 8337 => 'e', + 8338 => 'o', + 8339 => 'x', + 8340 => 'ษ™', + 8341 => 'h', + 8342 => 'k', + 8343 => 'l', + 8344 => 'm', + 8345 => 'n', + 8346 => 'p', + 8347 => 's', + 8348 => 't', + 8360 => 'rs', + 8450 => 'c', + 8451 => 'ยฐc', + 8455 => 'ษ›', + 8457 => 'ยฐf', + 8458 => 'g', + 8459 => 'h', + 8460 => 'h', + 8461 => 'h', + 8462 => 'h', + 8463 => 'ฤง', + 8464 => 'i', + 8465 => 'i', + 8466 => 'l', + 8467 => 'l', + 8469 => 'n', + 8470 => 'no', + 8473 => 'p', + 8474 => 'q', + 8475 => 'r', + 8476 => 'r', + 8477 => 'r', + 8480 => 'sm', + 8481 => 'tel', + 8482 => 'tm', + 8484 => 'z', + 8486 => 'ฯ‰', + 8488 => 'z', + 8490 => 'k', + 8491 => 'รฅ', + 8492 => 'b', + 8493 => 'c', + 8495 => 'e', + 8496 => 'e', + 8497 => 'f', + 8499 => 'm', + 8500 => 'o', + 8501 => 'ื', + 8502 => 'ื‘', + 8503 => 'ื’', + 8504 => 'ื“', + 8505 => 'i', + 8507 => 'fax', + 8508 => 'ฯ€', + 8509 => 'ฮณ', + 8510 => 'ฮณ', + 8511 => 'ฯ€', + 8512 => 'โˆ‘', + 8517 => 'd', + 8518 => 'd', + 8519 => 'e', + 8520 => 'i', + 8521 => 'j', + 8528 => '1โ„7', + 8529 => '1โ„9', + 8530 => '1โ„10', + 8531 => '1โ„3', + 8532 => '2โ„3', + 8533 => '1โ„5', + 8534 => '2โ„5', + 8535 => '3โ„5', + 8536 => '4โ„5', + 8537 => '1โ„6', + 8538 => '5โ„6', + 8539 => '1โ„8', + 8540 => '3โ„8', + 8541 => '5โ„8', + 8542 => '7โ„8', + 8543 => '1โ„', + 8544 => 'i', + 8545 => 'ii', + 8546 => 'iii', + 8547 => 'iv', + 8548 => 'v', + 8549 => 'vi', + 8550 => 'vii', + 8551 => 'viii', + 8552 => 'ix', + 8553 => 'x', + 8554 => 'xi', + 8555 => 'xii', + 8556 => 'l', + 8557 => 'c', + 8558 => 'd', + 8559 => 'm', + 8560 => 'i', + 8561 => 'ii', + 8562 => 'iii', + 8563 => 'iv', + 8564 => 'v', + 8565 => 'vi', + 8566 => 'vii', + 8567 => 'viii', + 8568 => 'ix', + 8569 => 'x', + 8570 => 'xi', + 8571 => 'xii', + 8572 => 'l', + 8573 => 'c', + 8574 => 'd', + 8575 => 'm', + 8585 => '0โ„3', + 8748 => 'โˆซโˆซ', + 8749 => 'โˆซโˆซโˆซ', + 8751 => 'โˆฎโˆฎ', + 8752 => 'โˆฎโˆฎโˆฎ', + 9001 => 'ใ€ˆ', + 9002 => 'ใ€‰', + 9312 => '1', + 9313 => '2', + 9314 => '3', + 9315 => '4', + 9316 => '5', + 9317 => '6', + 9318 => '7', + 9319 => '8', + 9320 => '9', + 9321 => '10', + 9322 => '11', + 9323 => '12', + 9324 => '13', + 9325 => '14', + 9326 => '15', + 9327 => '16', + 9328 => '17', + 9329 => '18', + 9330 => '19', + 9331 => '20', + 9398 => 'a', + 9399 => 'b', + 9400 => 'c', + 9401 => 'd', + 9402 => 'e', + 9403 => 'f', + 9404 => 'g', + 9405 => 'h', + 9406 => 'i', + 9407 => 'j', + 9408 => 'k', + 9409 => 'l', + 9410 => 'm', + 9411 => 'n', + 9412 => 'o', + 9413 => 'p', + 9414 => 'q', + 9415 => 'r', + 9416 => 's', + 9417 => 't', + 9418 => 'u', + 9419 => 'v', + 9420 => 'w', + 9421 => 'x', + 9422 => 'y', + 9423 => 'z', + 9424 => 'a', + 9425 => 'b', + 9426 => 'c', + 9427 => 'd', + 9428 => 'e', + 9429 => 'f', + 9430 => 'g', + 9431 => 'h', + 9432 => 'i', + 9433 => 'j', + 9434 => 'k', + 9435 => 'l', + 9436 => 'm', + 9437 => 'n', + 9438 => 'o', + 9439 => 'p', + 9440 => 'q', + 9441 => 'r', + 9442 => 's', + 9443 => 't', + 9444 => 'u', + 9445 => 'v', + 9446 => 'w', + 9447 => 'x', + 9448 => 'y', + 9449 => 'z', + 9450 => '0', + 10764 => 'โˆซโˆซโˆซโˆซ', + 10972 => 'โซฬธ', + 11264 => 'โฐฐ', + 11265 => 'โฐฑ', + 11266 => 'โฐฒ', + 11267 => 'โฐณ', + 11268 => 'โฐด', + 11269 => 'โฐต', + 11270 => 'โฐถ', + 11271 => 'โฐท', + 11272 => 'โฐธ', + 11273 => 'โฐน', + 11274 => 'โฐบ', + 11275 => 'โฐป', + 11276 => 'โฐผ', + 11277 => 'โฐฝ', + 11278 => 'โฐพ', + 11279 => 'โฐฟ', + 11280 => 'โฑ€', + 11281 => 'โฑ', + 11282 => 'โฑ‚', + 11283 => 'โฑƒ', + 11284 => 'โฑ„', + 11285 => 'โฑ…', + 11286 => 'โฑ†', + 11287 => 'โฑ‡', + 11288 => 'โฑˆ', + 11289 => 'โฑ‰', + 11290 => 'โฑŠ', + 11291 => 'โฑ‹', + 11292 => 'โฑŒ', + 11293 => 'โฑ', + 11294 => 'โฑŽ', + 11295 => 'โฑ', + 11296 => 'โฑ', + 11297 => 'โฑ‘', + 11298 => 'โฑ’', + 11299 => 'โฑ“', + 11300 => 'โฑ”', + 11301 => 'โฑ•', + 11302 => 'โฑ–', + 11303 => 'โฑ—', + 11304 => 'โฑ˜', + 11305 => 'โฑ™', + 11306 => 'โฑš', + 11307 => 'โฑ›', + 11308 => 'โฑœ', + 11309 => 'โฑ', + 11310 => 'โฑž', + 11360 => 'โฑก', + 11362 => 'ษซ', + 11363 => 'แตฝ', + 11364 => 'ษฝ', + 11367 => 'โฑจ', + 11369 => 'โฑช', + 11371 => 'โฑฌ', + 11373 => 'ษ‘', + 11374 => 'ษฑ', + 11375 => 'ษ', + 11376 => 'ษ’', + 11378 => 'โฑณ', + 11381 => 'โฑถ', + 11388 => 'j', + 11389 => 'v', + 11390 => 'ศฟ', + 11391 => 'ษ€', + 11392 => 'โฒ', + 11394 => 'โฒƒ', + 11396 => 'โฒ…', + 11398 => 'โฒ‡', + 11400 => 'โฒ‰', + 11402 => 'โฒ‹', + 11404 => 'โฒ', + 11406 => 'โฒ', + 11408 => 'โฒ‘', + 11410 => 'โฒ“', + 11412 => 'โฒ•', + 11414 => 'โฒ—', + 11416 => 'โฒ™', + 11418 => 'โฒ›', + 11420 => 'โฒ', + 11422 => 'โฒŸ', + 11424 => 'โฒก', + 11426 => 'โฒฃ', + 11428 => 'โฒฅ', + 11430 => 'โฒง', + 11432 => 'โฒฉ', + 11434 => 'โฒซ', + 11436 => 'โฒญ', + 11438 => 'โฒฏ', + 11440 => 'โฒฑ', + 11442 => 'โฒณ', + 11444 => 'โฒต', + 11446 => 'โฒท', + 11448 => 'โฒน', + 11450 => 'โฒป', + 11452 => 'โฒฝ', + 11454 => 'โฒฟ', + 11456 => 'โณ', + 11458 => 'โณƒ', + 11460 => 'โณ…', + 11462 => 'โณ‡', + 11464 => 'โณ‰', + 11466 => 'โณ‹', + 11468 => 'โณ', + 11470 => 'โณ', + 11472 => 'โณ‘', + 11474 => 'โณ“', + 11476 => 'โณ•', + 11478 => 'โณ—', + 11480 => 'โณ™', + 11482 => 'โณ›', + 11484 => 'โณ', + 11486 => 'โณŸ', + 11488 => 'โณก', + 11490 => 'โณฃ', + 11499 => 'โณฌ', + 11501 => 'โณฎ', + 11506 => 'โณณ', + 11631 => 'โตก', + 11935 => 'ๆฏ', + 12019 => '้พŸ', + 12032 => 'ไธ€', + 12033 => 'ไธจ', + 12034 => 'ไธถ', + 12035 => 'ไธฟ', + 12036 => 'ไน™', + 12037 => 'ไบ…', + 12038 => 'ไบŒ', + 12039 => 'ไบ ', + 12040 => 'ไบบ', + 12041 => 'ๅ„ฟ', + 12042 => 'ๅ…ฅ', + 12043 => 'ๅ…ซ', + 12044 => 'ๅ†‚', + 12045 => 'ๅ†–', + 12046 => 'ๅ†ซ', + 12047 => 'ๅ‡ ', + 12048 => 'ๅ‡ต', + 12049 => 'ๅˆ€', + 12050 => 'ๅŠ›', + 12051 => 'ๅ‹น', + 12052 => 'ๅŒ•', + 12053 => 'ๅŒš', + 12054 => 'ๅŒธ', + 12055 => 'ๅ', + 12056 => 'ๅœ', + 12057 => 'ๅฉ', + 12058 => 'ๅŽ‚', + 12059 => 'ๅŽถ', + 12060 => 'ๅˆ', + 12061 => 'ๅฃ', + 12062 => 'ๅ›—', + 12063 => 'ๅœŸ', + 12064 => 'ๅฃซ', + 12065 => 'ๅค‚', + 12066 => 'ๅคŠ', + 12067 => 'ๅค•', + 12068 => 'ๅคง', + 12069 => 'ๅฅณ', + 12070 => 'ๅญ', + 12071 => 'ๅฎ€', + 12072 => 'ๅฏธ', + 12073 => 'ๅฐ', + 12074 => 'ๅฐข', + 12075 => 'ๅฐธ', + 12076 => 'ๅฑฎ', + 12077 => 'ๅฑฑ', + 12078 => 'ๅท›', + 12079 => 'ๅทฅ', + 12080 => 'ๅทฑ', + 12081 => 'ๅทพ', + 12082 => 'ๅนฒ', + 12083 => 'ๅนบ', + 12084 => 'ๅนฟ', + 12085 => 'ๅปด', + 12086 => 'ๅปพ', + 12087 => 'ๅผ‹', + 12088 => 'ๅผ“', + 12089 => 'ๅฝ', + 12090 => 'ๅฝก', + 12091 => 'ๅฝณ', + 12092 => 'ๅฟƒ', + 12093 => 'ๆˆˆ', + 12094 => 'ๆˆถ', + 12095 => 'ๆ‰‹', + 12096 => 'ๆ”ฏ', + 12097 => 'ๆ”ด', + 12098 => 'ๆ–‡', + 12099 => 'ๆ–—', + 12100 => 'ๆ–ค', + 12101 => 'ๆ–น', + 12102 => 'ๆ— ', + 12103 => 'ๆ—ฅ', + 12104 => 'ๆ›ฐ', + 12105 => 'ๆœˆ', + 12106 => 'ๆœจ', + 12107 => 'ๆฌ ', + 12108 => 'ๆญข', + 12109 => 'ๆญน', + 12110 => 'ๆฎณ', + 12111 => 'ๆฏ‹', + 12112 => 'ๆฏ”', + 12113 => 'ๆฏ›', + 12114 => 'ๆฐ', + 12115 => 'ๆฐ”', + 12116 => 'ๆฐด', + 12117 => '็ซ', + 12118 => '็ˆช', + 12119 => '็ˆถ', + 12120 => '็ˆป', + 12121 => '็ˆฟ', + 12122 => '็‰‡', + 12123 => '็‰™', + 12124 => '็‰›', + 12125 => '็Šฌ', + 12126 => '็Ž„', + 12127 => '็Ž‰', + 12128 => '็“œ', + 12129 => '็“ฆ', + 12130 => '็”˜', + 12131 => '็”Ÿ', + 12132 => '็”จ', + 12133 => '็”ฐ', + 12134 => '็–‹', + 12135 => '็–’', + 12136 => '็™ถ', + 12137 => '็™ฝ', + 12138 => '็šฎ', + 12139 => '็šฟ', + 12140 => '็›ฎ', + 12141 => '็Ÿ›', + 12142 => '็Ÿข', + 12143 => '็Ÿณ', + 12144 => '็คบ', + 12145 => '็ฆธ', + 12146 => '็ฆพ', + 12147 => '็ฉด', + 12148 => '็ซ‹', + 12149 => '็ซน', + 12150 => '็ฑณ', + 12151 => '็ณธ', + 12152 => '็ผถ', + 12153 => '็ฝ‘', + 12154 => '็พŠ', + 12155 => '็พฝ', + 12156 => '่€', + 12157 => '่€Œ', + 12158 => '่€’', + 12159 => '่€ณ', + 12160 => '่ฟ', + 12161 => '่‚‰', + 12162 => '่‡ฃ', + 12163 => '่‡ช', + 12164 => '่‡ณ', + 12165 => '่‡ผ', + 12166 => '่ˆŒ', + 12167 => '่ˆ›', + 12168 => '่ˆŸ', + 12169 => '่‰ฎ', + 12170 => '่‰ฒ', + 12171 => '่‰ธ', + 12172 => '่™', + 12173 => '่™ซ', + 12174 => '่ก€', + 12175 => '่กŒ', + 12176 => '่กฃ', + 12177 => '่ฅพ', + 12178 => '่ฆ‹', + 12179 => '่ง’', + 12180 => '่จ€', + 12181 => '่ฐท', + 12182 => '่ฑ†', + 12183 => '่ฑ•', + 12184 => '่ฑธ', + 12185 => '่ฒ', + 12186 => '่ตค', + 12187 => '่ตฐ', + 12188 => '่ถณ', + 12189 => '่บซ', + 12190 => '่ปŠ', + 12191 => '่พ›', + 12192 => '่พฐ', + 12193 => '่พต', + 12194 => '้‚‘', + 12195 => '้…‰', + 12196 => '้‡†', + 12197 => '้‡Œ', + 12198 => '้‡‘', + 12199 => '้•ท', + 12200 => '้–€', + 12201 => '้˜œ', + 12202 => '้šถ', + 12203 => '้šน', + 12204 => '้›จ', + 12205 => '้‘', + 12206 => '้ž', + 12207 => '้ข', + 12208 => '้ฉ', + 12209 => '้Ÿ‹', + 12210 => '้Ÿญ', + 12211 => '้Ÿณ', + 12212 => '้ ', + 12213 => '้ขจ', + 12214 => '้ฃ›', + 12215 => '้ฃŸ', + 12216 => '้ฆ–', + 12217 => '้ฆ™', + 12218 => '้ฆฌ', + 12219 => '้ชจ', + 12220 => '้ซ˜', + 12221 => '้ซŸ', + 12222 => '้ฌฅ', + 12223 => '้ฌฏ', + 12224 => '้ฌฒ', + 12225 => '้ฌผ', + 12226 => '้ญš', + 12227 => '้ณฅ', + 12228 => '้นต', + 12229 => '้นฟ', + 12230 => '้บฅ', + 12231 => '้บป', + 12232 => '้ปƒ', + 12233 => '้ป', + 12234 => '้ป‘', + 12235 => '้ปน', + 12236 => '้ปฝ', + 12237 => '้ผŽ', + 12238 => '้ผ“', + 12239 => '้ผ ', + 12240 => '้ผป', + 12241 => '้ฝŠ', + 12242 => '้ฝ’', + 12243 => '้พ', + 12244 => '้พœ', + 12245 => '้พ ', + 12290 => '.', + 12342 => 'ใ€’', + 12344 => 'ๅ', + 12345 => 'ๅ„', + 12346 => 'ๅ…', + 12447 => 'ใ‚ˆใ‚Š', + 12543 => 'ใ‚ณใƒˆ', + 12593 => 'แ„€', + 12594 => 'แ„', + 12595 => 'แ†ช', + 12596 => 'แ„‚', + 12597 => 'แ†ฌ', + 12598 => 'แ†ญ', + 12599 => 'แ„ƒ', + 12600 => 'แ„„', + 12601 => 'แ„…', + 12602 => 'แ†ฐ', + 12603 => 'แ†ฑ', + 12604 => 'แ†ฒ', + 12605 => 'แ†ณ', + 12606 => 'แ†ด', + 12607 => 'แ†ต', + 12608 => 'แ„š', + 12609 => 'แ„†', + 12610 => 'แ„‡', + 12611 => 'แ„ˆ', + 12612 => 'แ„ก', + 12613 => 'แ„‰', + 12614 => 'แ„Š', + 12615 => 'แ„‹', + 12616 => 'แ„Œ', + 12617 => 'แ„', + 12618 => 'แ„Ž', + 12619 => 'แ„', + 12620 => 'แ„', + 12621 => 'แ„‘', + 12622 => 'แ„’', + 12623 => 'แ…ก', + 12624 => 'แ…ข', + 12625 => 'แ…ฃ', + 12626 => 'แ…ค', + 12627 => 'แ…ฅ', + 12628 => 'แ…ฆ', + 12629 => 'แ…ง', + 12630 => 'แ…จ', + 12631 => 'แ…ฉ', + 12632 => 'แ…ช', + 12633 => 'แ…ซ', + 12634 => 'แ…ฌ', + 12635 => 'แ…ญ', + 12636 => 'แ…ฎ', + 12637 => 'แ…ฏ', + 12638 => 'แ…ฐ', + 12639 => 'แ…ฑ', + 12640 => 'แ…ฒ', + 12641 => 'แ…ณ', + 12642 => 'แ…ด', + 12643 => 'แ…ต', + 12645 => 'แ„”', + 12646 => 'แ„•', + 12647 => 'แ‡‡', + 12648 => 'แ‡ˆ', + 12649 => 'แ‡Œ', + 12650 => 'แ‡Ž', + 12651 => 'แ‡“', + 12652 => 'แ‡—', + 12653 => 'แ‡™', + 12654 => 'แ„œ', + 12655 => 'แ‡', + 12656 => 'แ‡Ÿ', + 12657 => 'แ„', + 12658 => 'แ„ž', + 12659 => 'แ„ ', + 12660 => 'แ„ข', + 12661 => 'แ„ฃ', + 12662 => 'แ„ง', + 12663 => 'แ„ฉ', + 12664 => 'แ„ซ', + 12665 => 'แ„ฌ', + 12666 => 'แ„ญ', + 12667 => 'แ„ฎ', + 12668 => 'แ„ฏ', + 12669 => 'แ„ฒ', + 12670 => 'แ„ถ', + 12671 => 'แ…€', + 12672 => 'แ…‡', + 12673 => 'แ…Œ', + 12674 => 'แ‡ฑ', + 12675 => 'แ‡ฒ', + 12676 => 'แ…—', + 12677 => 'แ…˜', + 12678 => 'แ…™', + 12679 => 'แ†„', + 12680 => 'แ†…', + 12681 => 'แ†ˆ', + 12682 => 'แ†‘', + 12683 => 'แ†’', + 12684 => 'แ†”', + 12685 => 'แ†ž', + 12686 => 'แ†ก', + 12690 => 'ไธ€', + 12691 => 'ไบŒ', + 12692 => 'ไธ‰', + 12693 => 'ๅ››', + 12694 => 'ไธŠ', + 12695 => 'ไธญ', + 12696 => 'ไธ‹', + 12697 => '็”ฒ', + 12698 => 'ไน™', + 12699 => 'ไธ™', + 12700 => 'ไธ', + 12701 => 'ๅคฉ', + 12702 => 'ๅœฐ', + 12703 => 'ไบบ', + 12868 => 'ๅ•', + 12869 => 'ๅนผ', + 12870 => 'ๆ–‡', + 12871 => '็ฎ', + 12880 => 'pte', + 12881 => '21', + 12882 => '22', + 12883 => '23', + 12884 => '24', + 12885 => '25', + 12886 => '26', + 12887 => '27', + 12888 => '28', + 12889 => '29', + 12890 => '30', + 12891 => '31', + 12892 => '32', + 12893 => '33', + 12894 => '34', + 12895 => '35', + 12896 => 'แ„€', + 12897 => 'แ„‚', + 12898 => 'แ„ƒ', + 12899 => 'แ„…', + 12900 => 'แ„†', + 12901 => 'แ„‡', + 12902 => 'แ„‰', + 12903 => 'แ„‹', + 12904 => 'แ„Œ', + 12905 => 'แ„Ž', + 12906 => 'แ„', + 12907 => 'แ„', + 12908 => 'แ„‘', + 12909 => 'แ„’', + 12910 => '๊ฐ€', + 12911 => '๋‚˜', + 12912 => '๋‹ค', + 12913 => '๋ผ', + 12914 => '๋งˆ', + 12915 => '๋ฐ”', + 12916 => '์‚ฌ', + 12917 => '์•„', + 12918 => '์ž', + 12919 => '์ฐจ', + 12920 => '์นด', + 12921 => 'ํƒ€', + 12922 => 'ํŒŒ', + 12923 => 'ํ•˜', + 12924 => '์ฐธ๊ณ ', + 12925 => '์ฃผ์˜', + 12926 => '์šฐ', + 12928 => 'ไธ€', + 12929 => 'ไบŒ', + 12930 => 'ไธ‰', + 12931 => 'ๅ››', + 12932 => 'ไบ”', + 12933 => 'ๅ…ญ', + 12934 => 'ไธƒ', + 12935 => 'ๅ…ซ', + 12936 => 'ไน', + 12937 => 'ๅ', + 12938 => 'ๆœˆ', + 12939 => '็ซ', + 12940 => 'ๆฐด', + 12941 => 'ๆœจ', + 12942 => '้‡‘', + 12943 => 'ๅœŸ', + 12944 => 'ๆ—ฅ', + 12945 => 'ๆ ช', + 12946 => 'ๆœ‰', + 12947 => '็คพ', + 12948 => 'ๅ', + 12949 => '็‰น', + 12950 => '่ฒก', + 12951 => '็ฅ', + 12952 => 'ๅŠด', + 12953 => '็ง˜', + 12954 => '็”ท', + 12955 => 'ๅฅณ', + 12956 => '้ฉ', + 12957 => 'ๅ„ช', + 12958 => 'ๅฐ', + 12959 => 'ๆณจ', + 12960 => '้ …', + 12961 => 'ไผ‘', + 12962 => 'ๅ†™', + 12963 => 'ๆญฃ', + 12964 => 'ไธŠ', + 12965 => 'ไธญ', + 12966 => 'ไธ‹', + 12967 => 'ๅทฆ', + 12968 => 'ๅณ', + 12969 => 'ๅŒป', + 12970 => 'ๅฎ—', + 12971 => 'ๅญฆ', + 12972 => '็›ฃ', + 12973 => 'ไผ', + 12974 => '่ณ‡', + 12975 => 'ๅ”', + 12976 => 'ๅคœ', + 12977 => '36', + 12978 => '37', + 12979 => '38', + 12980 => '39', + 12981 => '40', + 12982 => '41', + 12983 => '42', + 12984 => '43', + 12985 => '44', + 12986 => '45', + 12987 => '46', + 12988 => '47', + 12989 => '48', + 12990 => '49', + 12991 => '50', + 12992 => '1ๆœˆ', + 12993 => '2ๆœˆ', + 12994 => '3ๆœˆ', + 12995 => '4ๆœˆ', + 12996 => '5ๆœˆ', + 12997 => '6ๆœˆ', + 12998 => '7ๆœˆ', + 12999 => '8ๆœˆ', + 13000 => '9ๆœˆ', + 13001 => '10ๆœˆ', + 13002 => '11ๆœˆ', + 13003 => '12ๆœˆ', + 13004 => 'hg', + 13005 => 'erg', + 13006 => 'ev', + 13007 => 'ltd', + 13008 => 'ใ‚ข', + 13009 => 'ใ‚ค', + 13010 => 'ใ‚ฆ', + 13011 => 'ใ‚จ', + 13012 => 'ใ‚ช', + 13013 => 'ใ‚ซ', + 13014 => 'ใ‚ญ', + 13015 => 'ใ‚ฏ', + 13016 => 'ใ‚ฑ', + 13017 => 'ใ‚ณ', + 13018 => 'ใ‚ต', + 13019 => 'ใ‚ท', + 13020 => 'ใ‚น', + 13021 => 'ใ‚ป', + 13022 => 'ใ‚ฝ', + 13023 => 'ใ‚ฟ', + 13024 => 'ใƒ', + 13025 => 'ใƒ„', + 13026 => 'ใƒ†', + 13027 => 'ใƒˆ', + 13028 => 'ใƒŠ', + 13029 => 'ใƒ‹', + 13030 => 'ใƒŒ', + 13031 => 'ใƒ', + 13032 => 'ใƒŽ', + 13033 => 'ใƒ', + 13034 => 'ใƒ’', + 13035 => 'ใƒ•', + 13036 => 'ใƒ˜', + 13037 => 'ใƒ›', + 13038 => 'ใƒž', + 13039 => 'ใƒŸ', + 13040 => 'ใƒ ', + 13041 => 'ใƒก', + 13042 => 'ใƒข', + 13043 => 'ใƒค', + 13044 => 'ใƒฆ', + 13045 => 'ใƒจ', + 13046 => 'ใƒฉ', + 13047 => 'ใƒช', + 13048 => 'ใƒซ', + 13049 => 'ใƒฌ', + 13050 => 'ใƒญ', + 13051 => 'ใƒฏ', + 13052 => 'ใƒฐ', + 13053 => 'ใƒฑ', + 13054 => 'ใƒฒ', + 13055 => 'ไปคๅ’Œ', + 13056 => 'ใ‚ขใƒ‘ใƒผใƒˆ', + 13057 => 'ใ‚ขใƒซใƒ•ใ‚ก', + 13058 => 'ใ‚ขใƒณใƒšใ‚ข', + 13059 => 'ใ‚ขใƒผใƒซ', + 13060 => 'ใ‚คใƒ‹ใƒณใ‚ฐ', + 13061 => 'ใ‚คใƒณใƒ', + 13062 => 'ใ‚ฆใ‚ฉใƒณ', + 13063 => 'ใ‚จใ‚นใ‚ฏใƒผใƒ‰', + 13064 => 'ใ‚จใƒผใ‚ซใƒผ', + 13065 => 'ใ‚ชใƒณใ‚น', + 13066 => 'ใ‚ชใƒผใƒ ', + 13067 => 'ใ‚ซใ‚คใƒช', + 13068 => 'ใ‚ซใƒฉใƒƒใƒˆ', + 13069 => 'ใ‚ซใƒญใƒชใƒผ', + 13070 => 'ใ‚ฌใƒญใƒณ', + 13071 => 'ใ‚ฌใƒณใƒž', + 13072 => 'ใ‚ฎใ‚ฌ', + 13073 => 'ใ‚ฎใƒ‹ใƒผ', + 13074 => 'ใ‚ญใƒฅใƒชใƒผ', + 13075 => 'ใ‚ฎใƒซใƒ€ใƒผ', + 13076 => 'ใ‚ญใƒญ', + 13077 => 'ใ‚ญใƒญใ‚ฐใƒฉใƒ ', + 13078 => 'ใ‚ญใƒญใƒกใƒผใƒˆใƒซ', + 13079 => 'ใ‚ญใƒญใƒฏใƒƒใƒˆ', + 13080 => 'ใ‚ฐใƒฉใƒ ', + 13081 => 'ใ‚ฐใƒฉใƒ ใƒˆใƒณ', + 13082 => 'ใ‚ฏใƒซใ‚ผใ‚คใƒญ', + 13083 => 'ใ‚ฏใƒญใƒผใƒ', + 13084 => 'ใ‚ฑใƒผใ‚น', + 13085 => 'ใ‚ณใƒซใƒŠ', + 13086 => 'ใ‚ณใƒผใƒ', + 13087 => 'ใ‚ตใ‚คใ‚ฏใƒซ', + 13088 => 'ใ‚ตใƒณใƒใƒผใƒ ', + 13089 => 'ใ‚ทใƒชใƒณใ‚ฐ', + 13090 => 'ใ‚ปใƒณใƒ', + 13091 => 'ใ‚ปใƒณใƒˆ', + 13092 => 'ใƒ€ใƒผใ‚น', + 13093 => 'ใƒ‡ใ‚ท', + 13094 => 'ใƒ‰ใƒซ', + 13095 => 'ใƒˆใƒณ', + 13096 => 'ใƒŠใƒŽ', + 13097 => 'ใƒŽใƒƒใƒˆ', + 13098 => 'ใƒใ‚คใƒ„', + 13099 => 'ใƒ‘ใƒผใ‚ปใƒณใƒˆ', + 13100 => 'ใƒ‘ใƒผใƒ„', + 13101 => 'ใƒใƒผใƒฌใƒซ', + 13102 => 'ใƒ”ใ‚ขใ‚นใƒˆใƒซ', + 13103 => 'ใƒ”ใ‚ฏใƒซ', + 13104 => 'ใƒ”ใ‚ณ', + 13105 => 'ใƒ“ใƒซ', + 13106 => 'ใƒ•ใ‚กใƒฉใƒƒใƒ‰', + 13107 => 'ใƒ•ใ‚ฃใƒผใƒˆ', + 13108 => 'ใƒ–ใƒƒใ‚ทใ‚งใƒซ', + 13109 => 'ใƒ•ใƒฉใƒณ', + 13110 => 'ใƒ˜ใ‚ฏใ‚ฟใƒผใƒซ', + 13111 => 'ใƒšใ‚ฝ', + 13112 => 'ใƒšใƒ‹ใƒ’', + 13113 => 'ใƒ˜ใƒซใƒ„', + 13114 => 'ใƒšใƒณใ‚น', + 13115 => 'ใƒšใƒผใ‚ธ', + 13116 => 'ใƒ™ใƒผใ‚ฟ', + 13117 => 'ใƒใ‚คใƒณใƒˆ', + 13118 => 'ใƒœใƒซใƒˆ', + 13119 => 'ใƒ›ใƒณ', + 13120 => 'ใƒใƒณใƒ‰', + 13121 => 'ใƒ›ใƒผใƒซ', + 13122 => 'ใƒ›ใƒผใƒณ', + 13123 => 'ใƒžใ‚คใ‚ฏใƒญ', + 13124 => 'ใƒžใ‚คใƒซ', + 13125 => 'ใƒžใƒƒใƒ', + 13126 => 'ใƒžใƒซใ‚ฏ', + 13127 => 'ใƒžใƒณใ‚ทใƒงใƒณ', + 13128 => 'ใƒŸใ‚ฏใƒญใƒณ', + 13129 => 'ใƒŸใƒช', + 13130 => 'ใƒŸใƒชใƒใƒผใƒซ', + 13131 => 'ใƒกใ‚ฌ', + 13132 => 'ใƒกใ‚ฌใƒˆใƒณ', + 13133 => 'ใƒกใƒผใƒˆใƒซ', + 13134 => 'ใƒคใƒผใƒ‰', + 13135 => 'ใƒคใƒผใƒซ', + 13136 => 'ใƒฆใ‚ขใƒณ', + 13137 => 'ใƒชใƒƒใƒˆใƒซ', + 13138 => 'ใƒชใƒฉ', + 13139 => 'ใƒซใƒ”ใƒผ', + 13140 => 'ใƒซใƒผใƒ–ใƒซ', + 13141 => 'ใƒฌใƒ ', + 13142 => 'ใƒฌใƒณใƒˆใ‚ฒใƒณ', + 13143 => 'ใƒฏใƒƒใƒˆ', + 13144 => '0็‚น', + 13145 => '1็‚น', + 13146 => '2็‚น', + 13147 => '3็‚น', + 13148 => '4็‚น', + 13149 => '5็‚น', + 13150 => '6็‚น', + 13151 => '7็‚น', + 13152 => '8็‚น', + 13153 => '9็‚น', + 13154 => '10็‚น', + 13155 => '11็‚น', + 13156 => '12็‚น', + 13157 => '13็‚น', + 13158 => '14็‚น', + 13159 => '15็‚น', + 13160 => '16็‚น', + 13161 => '17็‚น', + 13162 => '18็‚น', + 13163 => '19็‚น', + 13164 => '20็‚น', + 13165 => '21็‚น', + 13166 => '22็‚น', + 13167 => '23็‚น', + 13168 => '24็‚น', + 13169 => 'hpa', + 13170 => 'da', + 13171 => 'au', + 13172 => 'bar', + 13173 => 'ov', + 13174 => 'pc', + 13175 => 'dm', + 13176 => 'dm2', + 13177 => 'dm3', + 13178 => 'iu', + 13179 => 'ๅนณๆˆ', + 13180 => 'ๆ˜ญๅ’Œ', + 13181 => 'ๅคงๆญฃ', + 13182 => 'ๆ˜Žๆฒป', + 13183 => 'ๆ ชๅผไผš็คพ', + 13184 => 'pa', + 13185 => 'na', + 13186 => 'ฮผa', + 13187 => 'ma', + 13188 => 'ka', + 13189 => 'kb', + 13190 => 'mb', + 13191 => 'gb', + 13192 => 'cal', + 13193 => 'kcal', + 13194 => 'pf', + 13195 => 'nf', + 13196 => 'ฮผf', + 13197 => 'ฮผg', + 13198 => 'mg', + 13199 => 'kg', + 13200 => 'hz', + 13201 => 'khz', + 13202 => 'mhz', + 13203 => 'ghz', + 13204 => 'thz', + 13205 => 'ฮผl', + 13206 => 'ml', + 13207 => 'dl', + 13208 => 'kl', + 13209 => 'fm', + 13210 => 'nm', + 13211 => 'ฮผm', + 13212 => 'mm', + 13213 => 'cm', + 13214 => 'km', + 13215 => 'mm2', + 13216 => 'cm2', + 13217 => 'm2', + 13218 => 'km2', + 13219 => 'mm3', + 13220 => 'cm3', + 13221 => 'm3', + 13222 => 'km3', + 13223 => 'mโˆ•s', + 13224 => 'mโˆ•s2', + 13225 => 'pa', + 13226 => 'kpa', + 13227 => 'mpa', + 13228 => 'gpa', + 13229 => 'rad', + 13230 => 'radโˆ•s', + 13231 => 'radโˆ•s2', + 13232 => 'ps', + 13233 => 'ns', + 13234 => 'ฮผs', + 13235 => 'ms', + 13236 => 'pv', + 13237 => 'nv', + 13238 => 'ฮผv', + 13239 => 'mv', + 13240 => 'kv', + 13241 => 'mv', + 13242 => 'pw', + 13243 => 'nw', + 13244 => 'ฮผw', + 13245 => 'mw', + 13246 => 'kw', + 13247 => 'mw', + 13248 => 'kฯ‰', + 13249 => 'mฯ‰', + 13251 => 'bq', + 13252 => 'cc', + 13253 => 'cd', + 13254 => 'cโˆ•kg', + 13256 => 'db', + 13257 => 'gy', + 13258 => 'ha', + 13259 => 'hp', + 13260 => 'in', + 13261 => 'kk', + 13262 => 'km', + 13263 => 'kt', + 13264 => 'lm', + 13265 => 'ln', + 13266 => 'log', + 13267 => 'lx', + 13268 => 'mb', + 13269 => 'mil', + 13270 => 'mol', + 13271 => 'ph', + 13273 => 'ppm', + 13274 => 'pr', + 13275 => 'sr', + 13276 => 'sv', + 13277 => 'wb', + 13278 => 'vโˆ•m', + 13279 => 'aโˆ•m', + 13280 => '1ๆ—ฅ', + 13281 => '2ๆ—ฅ', + 13282 => '3ๆ—ฅ', + 13283 => '4ๆ—ฅ', + 13284 => '5ๆ—ฅ', + 13285 => '6ๆ—ฅ', + 13286 => '7ๆ—ฅ', + 13287 => '8ๆ—ฅ', + 13288 => '9ๆ—ฅ', + 13289 => '10ๆ—ฅ', + 13290 => '11ๆ—ฅ', + 13291 => '12ๆ—ฅ', + 13292 => '13ๆ—ฅ', + 13293 => '14ๆ—ฅ', + 13294 => '15ๆ—ฅ', + 13295 => '16ๆ—ฅ', + 13296 => '17ๆ—ฅ', + 13297 => '18ๆ—ฅ', + 13298 => '19ๆ—ฅ', + 13299 => '20ๆ—ฅ', + 13300 => '21ๆ—ฅ', + 13301 => '22ๆ—ฅ', + 13302 => '23ๆ—ฅ', + 13303 => '24ๆ—ฅ', + 13304 => '25ๆ—ฅ', + 13305 => '26ๆ—ฅ', + 13306 => '27ๆ—ฅ', + 13307 => '28ๆ—ฅ', + 13308 => '29ๆ—ฅ', + 13309 => '30ๆ—ฅ', + 13310 => '31ๆ—ฅ', + 13311 => 'gal', + 42560 => '๊™', + 42562 => '๊™ƒ', + 42564 => '๊™…', + 42566 => '๊™‡', + 42568 => '๊™‰', + 42570 => '๊™‹', + 42572 => '๊™', + 42574 => '๊™', + 42576 => '๊™‘', + 42578 => '๊™“', + 42580 => '๊™•', + 42582 => '๊™—', + 42584 => '๊™™', + 42586 => '๊™›', + 42588 => '๊™', + 42590 => '๊™Ÿ', + 42592 => '๊™ก', + 42594 => '๊™ฃ', + 42596 => '๊™ฅ', + 42598 => '๊™ง', + 42600 => '๊™ฉ', + 42602 => '๊™ซ', + 42604 => '๊™ญ', + 42624 => '๊š', + 42626 => '๊šƒ', + 42628 => '๊š…', + 42630 => '๊š‡', + 42632 => '๊š‰', + 42634 => '๊š‹', + 42636 => '๊š', + 42638 => '๊š', + 42640 => '๊š‘', + 42642 => '๊š“', + 42644 => '๊š•', + 42646 => '๊š—', + 42648 => '๊š™', + 42650 => '๊š›', + 42652 => 'ัŠ', + 42653 => 'ัŒ', + 42786 => '๊œฃ', + 42788 => '๊œฅ', + 42790 => '๊œง', + 42792 => '๊œฉ', + 42794 => '๊œซ', + 42796 => '๊œญ', + 42798 => '๊œฏ', + 42802 => '๊œณ', + 42804 => '๊œต', + 42806 => '๊œท', + 42808 => '๊œน', + 42810 => '๊œป', + 42812 => '๊œฝ', + 42814 => '๊œฟ', + 42816 => '๊', + 42818 => '๊ƒ', + 42820 => '๊…', + 42822 => '๊‡', + 42824 => '๊‰', + 42826 => '๊‹', + 42828 => '๊', + 42830 => '๊', + 42832 => '๊‘', + 42834 => '๊“', + 42836 => '๊•', + 42838 => '๊—', + 42840 => '๊™', + 42842 => '๊›', + 42844 => '๊', + 42846 => '๊Ÿ', + 42848 => '๊ก', + 42850 => '๊ฃ', + 42852 => '๊ฅ', + 42854 => '๊ง', + 42856 => '๊ฉ', + 42858 => '๊ซ', + 42860 => '๊ญ', + 42862 => '๊ฏ', + 42864 => '๊ฏ', + 42873 => '๊บ', + 42875 => '๊ผ', + 42877 => 'แตน', + 42878 => '๊ฟ', + 42880 => '๊ž', + 42882 => '๊žƒ', + 42884 => '๊ž…', + 42886 => '๊ž‡', + 42891 => '๊žŒ', + 42893 => 'ษฅ', + 42896 => '๊ž‘', + 42898 => '๊ž“', + 42902 => '๊ž—', + 42904 => '๊ž™', + 42906 => '๊ž›', + 42908 => '๊ž', + 42910 => '๊žŸ', + 42912 => '๊žก', + 42914 => '๊žฃ', + 42916 => '๊žฅ', + 42918 => '๊žง', + 42920 => '๊žฉ', + 42922 => 'ษฆ', + 42923 => 'ษœ', + 42924 => 'ษก', + 42925 => 'ษฌ', + 42926 => 'ษช', + 42928 => 'สž', + 42929 => 'ส‡', + 42930 => 'ส', + 42931 => '๊ญ“', + 42932 => '๊žต', + 42934 => '๊žท', + 42936 => '๊žน', + 42938 => '๊žป', + 42940 => '๊žฝ', + 42942 => '๊žฟ', + 42946 => '๊Ÿƒ', + 42948 => '๊ž”', + 42949 => 'ส‚', + 42950 => 'แถŽ', + 42951 => '๊Ÿˆ', + 42953 => '๊ŸŠ', + 42997 => '๊Ÿถ', + 43000 => 'ฤง', + 43001 => 'ล“', + 43868 => '๊œง', + 43869 => '๊ฌท', + 43870 => 'ษซ', + 43871 => '๊ญ’', + 43881 => 'ส', + 43888 => 'แŽ ', + 43889 => 'แŽก', + 43890 => 'แŽข', + 43891 => 'แŽฃ', + 43892 => 'แŽค', + 43893 => 'แŽฅ', + 43894 => 'แŽฆ', + 43895 => 'แŽง', + 43896 => 'แŽจ', + 43897 => 'แŽฉ', + 43898 => 'แŽช', + 43899 => 'แŽซ', + 43900 => 'แŽฌ', + 43901 => 'แŽญ', + 43902 => 'แŽฎ', + 43903 => 'แŽฏ', + 43904 => 'แŽฐ', + 43905 => 'แŽฑ', + 43906 => 'แŽฒ', + 43907 => 'แŽณ', + 43908 => 'แŽด', + 43909 => 'แŽต', + 43910 => 'แŽถ', + 43911 => 'แŽท', + 43912 => 'แŽธ', + 43913 => 'แŽน', + 43914 => 'แŽบ', + 43915 => 'แŽป', + 43916 => 'แŽผ', + 43917 => 'แŽฝ', + 43918 => 'แŽพ', + 43919 => 'แŽฟ', + 43920 => 'แ€', + 43921 => 'แ', + 43922 => 'แ‚', + 43923 => 'แƒ', + 43924 => 'แ„', + 43925 => 'แ…', + 43926 => 'แ†', + 43927 => 'แ‡', + 43928 => 'แˆ', + 43929 => 'แ‰', + 43930 => 'แŠ', + 43931 => 'แ‹', + 43932 => 'แŒ', + 43933 => 'แ', + 43934 => 'แŽ', + 43935 => 'แ', + 43936 => 'แ', + 43937 => 'แ‘', + 43938 => 'แ’', + 43939 => 'แ“', + 43940 => 'แ”', + 43941 => 'แ•', + 43942 => 'แ–', + 43943 => 'แ—', + 43944 => 'แ˜', + 43945 => 'แ™', + 43946 => 'แš', + 43947 => 'แ›', + 43948 => 'แœ', + 43949 => 'แ', + 43950 => 'แž', + 43951 => 'แŸ', + 43952 => 'แ ', + 43953 => 'แก', + 43954 => 'แข', + 43955 => 'แฃ', + 43956 => 'แค', + 43957 => 'แฅ', + 43958 => 'แฆ', + 43959 => 'แง', + 43960 => 'แจ', + 43961 => 'แฉ', + 43962 => 'แช', + 43963 => 'แซ', + 43964 => 'แฌ', + 43965 => 'แญ', + 43966 => 'แฎ', + 43967 => 'แฏ', + 63744 => '่ฑˆ', + 63745 => 'ๆ›ด', + 63746 => '่ปŠ', + 63747 => '่ณˆ', + 63748 => 'ๆป‘', + 63749 => 'ไธฒ', + 63750 => 'ๅฅ', + 63751 => '้พœ', + 63752 => '้พœ', + 63753 => 'ๅฅ‘', + 63754 => '้‡‘', + 63755 => 'ๅ–‡', + 63756 => 'ๅฅˆ', + 63757 => 'ๆ‡ถ', + 63758 => '็™ฉ', + 63759 => '็พ…', + 63760 => '่˜ฟ', + 63761 => '่žบ', + 63762 => '่ฃธ', + 63763 => '้‚', + 63764 => 'ๆจ‚', + 63765 => 'ๆด›', + 63766 => '็ƒ™', + 63767 => '็ž', + 63768 => '่ฝ', + 63769 => '้…ช', + 63770 => '้งฑ', + 63771 => 'ไบ‚', + 63772 => 'ๅต', + 63773 => 'ๆฌ„', + 63774 => '็ˆ›', + 63775 => '่˜ญ', + 63776 => '้ธž', + 63777 => 'ๅต', + 63778 => 'ๆฟซ', + 63779 => '่—', + 63780 => '่ฅค', + 63781 => 'ๆ‹‰', + 63782 => '่‡˜', + 63783 => '่ Ÿ', + 63784 => 'ๅปŠ', + 63785 => 'ๆœ—', + 63786 => 'ๆตช', + 63787 => '็‹ผ', + 63788 => '้ƒŽ', + 63789 => 'ไพ†', + 63790 => 'ๅ†ท', + 63791 => 'ๅ‹ž', + 63792 => 'ๆ“„', + 63793 => 'ๆซ“', + 63794 => '็ˆ', + 63795 => '็›ง', + 63796 => '่€', + 63797 => '่˜†', + 63798 => '่™œ', + 63799 => '่ทฏ', + 63800 => '้œฒ', + 63801 => '้ญฏ', + 63802 => '้ทบ', + 63803 => '็ขŒ', + 63804 => '็ฅฟ', + 63805 => '็ถ ', + 63806 => '่‰', + 63807 => '้Œ„', + 63808 => '้นฟ', + 63809 => '่ซ–', + 63810 => 'ๅฃŸ', + 63811 => 'ๅผ„', + 63812 => '็ฑ ', + 63813 => '่พ', + 63814 => '็‰ข', + 63815 => '็ฃŠ', + 63816 => '่ณ‚', + 63817 => '้›ท', + 63818 => 'ๅฃ˜', + 63819 => 'ๅฑข', + 63820 => 'ๆจ“', + 63821 => 'ๆทš', + 63822 => 'ๆผ', + 63823 => '็ดฏ', + 63824 => '็ธท', + 63825 => '้™‹', + 63826 => 'ๅ‹’', + 63827 => '่‚‹', + 63828 => 'ๅ‡œ', + 63829 => 'ๅ‡Œ', + 63830 => '็จœ', + 63831 => '็ถพ', + 63832 => '่ฑ', + 63833 => '้™ต', + 63834 => '่ฎ€', + 63835 => 'ๆ‹', + 63836 => 'ๆจ‚', + 63837 => '่ซพ', + 63838 => 'ไธน', + 63839 => 'ๅฏง', + 63840 => 'ๆ€’', + 63841 => '็Ž‡', + 63842 => '็•ฐ', + 63843 => 'ๅŒ—', + 63844 => '็ฃป', + 63845 => 'ไพฟ', + 63846 => 'ๅพฉ', + 63847 => 'ไธ', + 63848 => 'ๆณŒ', + 63849 => 'ๆ•ธ', + 63850 => '็ดข', + 63851 => 'ๅƒ', + 63852 => 'ๅกž', + 63853 => '็œ', + 63854 => '่‘‰', + 63855 => '่ชช', + 63856 => 'ๆฎบ', + 63857 => '่พฐ', + 63858 => 'ๆฒˆ', + 63859 => 'ๆ‹พ', + 63860 => '่‹ฅ', + 63861 => 'ๆŽ ', + 63862 => '็•ฅ', + 63863 => 'ไบฎ', + 63864 => 'ๅ…ฉ', + 63865 => 'ๅ‡‰', + 63866 => 'ๆข', + 63867 => '็ณง', + 63868 => '่‰ฏ', + 63869 => '่ซ’', + 63870 => '้‡', + 63871 => 'ๅ‹ต', + 63872 => 'ๅ‘‚', + 63873 => 'ๅฅณ', + 63874 => 'ๅปฌ', + 63875 => 'ๆ—…', + 63876 => 'ๆฟพ', + 63877 => '็คช', + 63878 => '้–ญ', + 63879 => '้ฉช', + 63880 => '้บ—', + 63881 => '้ปŽ', + 63882 => 'ๅŠ›', + 63883 => 'ๆ›†', + 63884 => 'ๆญท', + 63885 => '่ฝข', + 63886 => 'ๅนด', + 63887 => 'ๆ†', + 63888 => 'ๆˆ€', + 63889 => 'ๆ’š', + 63890 => 'ๆผฃ', + 63891 => '็…‰', + 63892 => '็’‰', + 63893 => '็งŠ', + 63894 => '็ทด', + 63895 => '่ฏ', + 63896 => '่ผฆ', + 63897 => '่“ฎ', + 63898 => '้€ฃ', + 63899 => '้Š', + 63900 => 'ๅˆ—', + 63901 => 'ๅŠฃ', + 63902 => 'ๅ’ฝ', + 63903 => '็ƒˆ', + 63904 => '่ฃ‚', + 63905 => '่ชช', + 63906 => 'ๅป‰', + 63907 => 'ๅฟต', + 63908 => 'ๆป', + 63909 => 'ๆฎฎ', + 63910 => '็ฐพ', + 63911 => '็ต', + 63912 => 'ไปค', + 63913 => 'ๅ›น', + 63914 => 'ๅฏง', + 63915 => 'ๅถบ', + 63916 => 'ๆ€œ', + 63917 => '็Žฒ', + 63918 => '็‘ฉ', + 63919 => '็พš', + 63920 => '่†', + 63921 => '้ˆด', + 63922 => '้›ถ', + 63923 => '้ˆ', + 63924 => '้ ˜', + 63925 => 'ไพ‹', + 63926 => '็ฆฎ', + 63927 => '้†ด', + 63928 => '้šธ', + 63929 => 'ๆƒก', + 63930 => 'ไบ†', + 63931 => 'ๅƒš', + 63932 => 'ๅฏฎ', + 63933 => 'ๅฐฟ', + 63934 => 'ๆ–™', + 63935 => 'ๆจ‚', + 63936 => '็‡Ž', + 63937 => '็™‚', + 63938 => '่“ผ', + 63939 => '้ผ', + 63940 => '้พ', + 63941 => 'ๆšˆ', + 63942 => '้˜ฎ', + 63943 => 'ๅŠ‰', + 63944 => 'ๆป', + 63945 => 'ๆŸณ', + 63946 => 'ๆต', + 63947 => 'ๆบœ', + 63948 => '็‰', + 63949 => '็•™', + 63950 => '็กซ', + 63951 => '็ด', + 63952 => '้กž', + 63953 => 'ๅ…ญ', + 63954 => 'ๆˆฎ', + 63955 => '้™ธ', + 63956 => 'ๅ€ซ', + 63957 => 'ๅด™', + 63958 => 'ๆทช', + 63959 => '่ผช', + 63960 => 'ๅพ‹', + 63961 => 'ๆ…„', + 63962 => 'ๆ —', + 63963 => '็Ž‡', + 63964 => '้š†', + 63965 => 'ๅˆฉ', + 63966 => 'ๅ', + 63967 => 'ๅฑฅ', + 63968 => 'ๆ˜“', + 63969 => 'ๆŽ', + 63970 => 'ๆขจ', + 63971 => 'ๆณฅ', + 63972 => '็†', + 63973 => '็—ข', + 63974 => '็ฝน', + 63975 => '่ฃ', + 63976 => '่ฃก', + 63977 => '้‡Œ', + 63978 => '้›ข', + 63979 => 'ๅŒฟ', + 63980 => 'ๆบบ', + 63981 => 'ๅ', + 63982 => '็‡', + 63983 => '็’˜', + 63984 => '่—บ', + 63985 => '้šฃ', + 63986 => '้ฑ—', + 63987 => '้บŸ', + 63988 => 'ๆž—', + 63989 => 'ๆท‹', + 63990 => '่‡จ', + 63991 => '็ซ‹', + 63992 => '็ฌ ', + 63993 => '็ฒ’', + 63994 => '็‹€', + 63995 => '็‚™', + 63996 => '่ญ˜', + 63997 => 'ไป€', + 63998 => '่Œถ', + 63999 => 'ๅˆบ', + 64000 => 'ๅˆ‡', + 64001 => 'ๅบฆ', + 64002 => 'ๆ‹“', + 64003 => '็ณ–', + 64004 => 'ๅฎ…', + 64005 => 'ๆดž', + 64006 => 'ๆšด', + 64007 => '่ผป', + 64008 => '่กŒ', + 64009 => '้™', + 64010 => '่ฆ‹', + 64011 => 'ๅป“', + 64012 => 'ๅ…€', + 64013 => 'ๅ—€', + 64016 => 'ๅกš', + 64018 => 'ๆ™ด', + 64021 => 'ๅ‡ž', + 64022 => '็Œช', + 64023 => '็›Š', + 64024 => '็คผ', + 64025 => '็ฅž', + 64026 => '็ฅฅ', + 64027 => '็ฆ', + 64028 => '้–', + 64029 => '็ฒพ', + 64030 => '็พฝ', + 64032 => '่˜’', + 64034 => '่ซธ', + 64037 => '้€ธ', + 64038 => '้ƒฝ', + 64042 => '้ฃฏ', + 64043 => '้ฃผ', + 64044 => '้คจ', + 64045 => '้ถด', + 64046 => '้ƒž', + 64047 => '้šท', + 64048 => 'ไพฎ', + 64049 => 'ๅƒง', + 64050 => 'ๅ…', + 64051 => 'ๅ‹‰', + 64052 => 'ๅ‹ค', + 64053 => 'ๅ‘', + 64054 => 'ๅ–', + 64055 => 'ๅ˜†', + 64056 => 'ๅ™จ', + 64057 => 'ๅก€', + 64058 => 'ๅขจ', + 64059 => 'ๅฑค', + 64060 => 'ๅฑฎ', + 64061 => 'ๆ‚”', + 64062 => 'ๆ…จ', + 64063 => 'ๆ†Ž', + 64064 => 'ๆ‡ฒ', + 64065 => 'ๆ•', + 64066 => 'ๆ—ข', + 64067 => 'ๆš‘', + 64068 => 'ๆข…', + 64069 => 'ๆตท', + 64070 => 'ๆธš', + 64071 => 'ๆผข', + 64072 => '็…ฎ', + 64073 => '็ˆซ', + 64074 => '็ข', + 64075 => '็ข‘', + 64076 => '็คพ', + 64077 => '็ฅ‰', + 64078 => '็ฅˆ', + 64079 => '็ฅ', + 64080 => '็ฅ–', + 64081 => '็ฅ', + 64082 => '็ฆ', + 64083 => '็ฆŽ', + 64084 => '็ฉ€', + 64085 => '็ช', + 64086 => '็ฏ€', + 64087 => '็ทด', + 64088 => '็ธ‰', + 64089 => '็น', + 64090 => '็ฝฒ', + 64091 => '่€…', + 64092 => '่‡ญ', + 64093 => '่‰น', + 64094 => '่‰น', + 64095 => '่‘—', + 64096 => '่ค', + 64097 => '่ฆ–', + 64098 => '่ฌ', + 64099 => '่ฌน', + 64100 => '่ณ“', + 64101 => '่ดˆ', + 64102 => '่พถ', + 64103 => '้€ธ', + 64104 => '้›ฃ', + 64105 => '้Ÿฟ', + 64106 => '้ ป', + 64107 => 'ๆต', + 64108 => '๐ค‹ฎ', + 64109 => '่ˆ˜', + 64112 => 'ไธฆ', + 64113 => 'ๅ†ต', + 64114 => 'ๅ…จ', + 64115 => 'ไพ€', + 64116 => 'ๅ……', + 64117 => 'ๅ†€', + 64118 => 'ๅ‹‡', + 64119 => 'ๅ‹บ', + 64120 => 'ๅ–', + 64121 => 'ๅ••', + 64122 => 'ๅ–™', + 64123 => 'ๅ—ข', + 64124 => 'ๅกš', + 64125 => 'ๅขณ', + 64126 => 'ๅฅ„', + 64127 => 'ๅฅ”', + 64128 => 'ๅฉข', + 64129 => 'ๅฌจ', + 64130 => 'ๅป’', + 64131 => 'ๅป™', + 64132 => 'ๅฝฉ', + 64133 => 'ๅพญ', + 64134 => 'ๆƒ˜', + 64135 => 'ๆ…Ž', + 64136 => 'ๆ„ˆ', + 64137 => 'ๆ†Ž', + 64138 => 'ๆ… ', + 64139 => 'ๆ‡ฒ', + 64140 => 'ๆˆด', + 64141 => 'ๆ„', + 64142 => 'ๆœ', + 64143 => 'ๆ‘’', + 64144 => 'ๆ•–', + 64145 => 'ๆ™ด', + 64146 => 'ๆœ—', + 64147 => 'ๆœ›', + 64148 => 'ๆ–', + 64149 => 'ๆญน', + 64150 => 'ๆฎบ', + 64151 => 'ๆต', + 64152 => 'ๆป›', + 64153 => 'ๆป‹', + 64154 => 'ๆผข', + 64155 => '็€ž', + 64156 => '็…ฎ', + 64157 => '็žง', + 64158 => '็ˆต', + 64159 => '็Šฏ', + 64160 => '็Œช', + 64161 => '็‘ฑ', + 64162 => '็”†', + 64163 => '็”ป', + 64164 => '็˜', + 64165 => '็˜Ÿ', + 64166 => '็›Š', + 64167 => '็››', + 64168 => '็›ด', + 64169 => '็Š', + 64170 => '็€', + 64171 => '็ฃŒ', + 64172 => '็ชฑ', + 64173 => '็ฏ€', + 64174 => '็ฑป', + 64175 => '็ต›', + 64176 => '็ทด', + 64177 => '็ผพ', + 64178 => '่€…', + 64179 => '่’', + 64180 => '่ฏ', + 64181 => '่น', + 64182 => '่ฅ', + 64183 => '่ฆ†', + 64184 => '่ฆ–', + 64185 => '่ชฟ', + 64186 => '่ซธ', + 64187 => '่ซ‹', + 64188 => '่ฌ', + 64189 => '่ซพ', + 64190 => '่ซญ', + 64191 => '่ฌน', + 64192 => '่ฎŠ', + 64193 => '่ดˆ', + 64194 => '่ผธ', + 64195 => '้ฒ', + 64196 => '้†™', + 64197 => '้‰ถ', + 64198 => '้™ผ', + 64199 => '้›ฃ', + 64200 => '้–', + 64201 => '้Ÿ›', + 64202 => '้Ÿฟ', + 64203 => '้ ‹', + 64204 => '้ ป', + 64205 => '้ฌ’', + 64206 => '้พœ', + 64207 => '๐ขกŠ', + 64208 => '๐ขก„', + 64209 => '๐ฃ•', + 64210 => 'ใฎ', + 64211 => 'ไ€˜', + 64212 => 'ไ€น', + 64213 => '๐ฅ‰‰', + 64214 => '๐ฅณ', + 64215 => '๐งป“', + 64216 => '้ฝƒ', + 64217 => '้พŽ', + 64256 => 'ff', + 64257 => 'fi', + 64258 => 'fl', + 64259 => 'ffi', + 64260 => 'ffl', + 64261 => 'st', + 64262 => 'st', + 64275 => 'ีดีถ', + 64276 => 'ีดีฅ', + 64277 => 'ีดีซ', + 64278 => 'ีพีถ', + 64279 => 'ีดีญ', + 64285 => 'ื™ึด', + 64287 => 'ืฒึท', + 64288 => 'ืข', + 64289 => 'ื', + 64290 => 'ื“', + 64291 => 'ื”', + 64292 => 'ื›', + 64293 => 'ืœ', + 64294 => 'ื', + 64295 => 'ืจ', + 64296 => 'ืช', + 64298 => 'ืฉื', + 64299 => 'ืฉื‚', + 64300 => 'ืฉึผื', + 64301 => 'ืฉึผื‚', + 64302 => 'ืึท', + 64303 => 'ืึธ', + 64304 => 'ืึผ', + 64305 => 'ื‘ึผ', + 64306 => 'ื’ึผ', + 64307 => 'ื“ึผ', + 64308 => 'ื”ึผ', + 64309 => 'ื•ึผ', + 64310 => 'ื–ึผ', + 64312 => 'ื˜ึผ', + 64313 => 'ื™ึผ', + 64314 => 'ืšึผ', + 64315 => 'ื›ึผ', + 64316 => 'ืœึผ', + 64318 => 'ืžึผ', + 64320 => 'ื ึผ', + 64321 => 'ืกึผ', + 64323 => 'ืฃึผ', + 64324 => 'ืคึผ', + 64326 => 'ืฆึผ', + 64327 => 'ืงึผ', + 64328 => 'ืจึผ', + 64329 => 'ืฉึผ', + 64330 => 'ืชึผ', + 64331 => 'ื•ึน', + 64332 => 'ื‘ึฟ', + 64333 => 'ื›ึฟ', + 64334 => 'ืคึฟ', + 64335 => 'ืืœ', + 64336 => 'ูฑ', + 64337 => 'ูฑ', + 64338 => 'ูป', + 64339 => 'ูป', + 64340 => 'ูป', + 64341 => 'ูป', + 64342 => 'ูพ', + 64343 => 'ูพ', + 64344 => 'ูพ', + 64345 => 'ูพ', + 64346 => 'ฺ€', + 64347 => 'ฺ€', + 64348 => 'ฺ€', + 64349 => 'ฺ€', + 64350 => 'ูบ', + 64351 => 'ูบ', + 64352 => 'ูบ', + 64353 => 'ูบ', + 64354 => 'ูฟ', + 64355 => 'ูฟ', + 64356 => 'ูฟ', + 64357 => 'ูฟ', + 64358 => 'ูน', + 64359 => 'ูน', + 64360 => 'ูน', + 64361 => 'ูน', + 64362 => 'ฺค', + 64363 => 'ฺค', + 64364 => 'ฺค', + 64365 => 'ฺค', + 64366 => 'ฺฆ', + 64367 => 'ฺฆ', + 64368 => 'ฺฆ', + 64369 => 'ฺฆ', + 64370 => 'ฺ„', + 64371 => 'ฺ„', + 64372 => 'ฺ„', + 64373 => 'ฺ„', + 64374 => 'ฺƒ', + 64375 => 'ฺƒ', + 64376 => 'ฺƒ', + 64377 => 'ฺƒ', + 64378 => 'ฺ†', + 64379 => 'ฺ†', + 64380 => 'ฺ†', + 64381 => 'ฺ†', + 64382 => 'ฺ‡', + 64383 => 'ฺ‡', + 64384 => 'ฺ‡', + 64385 => 'ฺ‡', + 64386 => 'ฺ', + 64387 => 'ฺ', + 64388 => 'ฺŒ', + 64389 => 'ฺŒ', + 64390 => 'ฺŽ', + 64391 => 'ฺŽ', + 64392 => 'ฺˆ', + 64393 => 'ฺˆ', + 64394 => 'ฺ˜', + 64395 => 'ฺ˜', + 64396 => 'ฺ‘', + 64397 => 'ฺ‘', + 64398 => 'ฺฉ', + 64399 => 'ฺฉ', + 64400 => 'ฺฉ', + 64401 => 'ฺฉ', + 64402 => 'ฺฏ', + 64403 => 'ฺฏ', + 64404 => 'ฺฏ', + 64405 => 'ฺฏ', + 64406 => 'ฺณ', + 64407 => 'ฺณ', + 64408 => 'ฺณ', + 64409 => 'ฺณ', + 64410 => 'ฺฑ', + 64411 => 'ฺฑ', + 64412 => 'ฺฑ', + 64413 => 'ฺฑ', + 64414 => 'ฺบ', + 64415 => 'ฺบ', + 64416 => 'ฺป', + 64417 => 'ฺป', + 64418 => 'ฺป', + 64419 => 'ฺป', + 64420 => '€', + 64421 => '€', + 64422 => '', + 64423 => '', + 64424 => '', + 64425 => '', + 64426 => 'ฺพ', + 64427 => 'ฺพ', + 64428 => 'ฺพ', + 64429 => 'ฺพ', + 64430 => '’', + 64431 => '’', + 64432 => '“', + 64433 => '“', + 64467 => 'ฺญ', + 64468 => 'ฺญ', + 64469 => 'ฺญ', + 64470 => 'ฺญ', + 64471 => '‡', + 64472 => '‡', + 64473 => '†', + 64474 => '†', + 64475 => 'ˆ', + 64476 => 'ˆ', + 64477 => '‡ูด', + 64478 => '‹', + 64479 => '‹', + 64480 => '…', + 64481 => '…', + 64482 => '‰', + 64483 => '‰', + 64484 => '', + 64485 => '', + 64486 => '', + 64487 => '', + 64488 => 'ู‰', + 64489 => 'ู‰', + 64490 => 'ุฆุง', + 64491 => 'ุฆุง', + 64492 => 'ุฆ•', + 64493 => 'ุฆ•', + 64494 => 'ุฆูˆ', + 64495 => 'ุฆูˆ', + 64496 => 'ุฆ‡', + 64497 => 'ุฆ‡', + 64498 => 'ุฆ†', + 64499 => 'ุฆ†', + 64500 => 'ุฆˆ', + 64501 => 'ุฆˆ', + 64502 => 'ุฆ', + 64503 => 'ุฆ', + 64504 => 'ุฆ', + 64505 => 'ุฆู‰', + 64506 => 'ุฆู‰', + 64507 => 'ุฆู‰', + 64508 => 'Œ', + 64509 => 'Œ', + 64510 => 'Œ', + 64511 => 'Œ', + 64512 => 'ุฆุฌ', + 64513 => 'ุฆุญ', + 64514 => 'ุฆู…', + 64515 => 'ุฆู‰', + 64516 => 'ุฆูŠ', + 64517 => 'ุจุฌ', + 64518 => 'ุจุญ', + 64519 => 'ุจุฎ', + 64520 => 'ุจู…', + 64521 => 'ุจู‰', + 64522 => 'ุจูŠ', + 64523 => 'ุชุฌ', + 64524 => 'ุชุญ', + 64525 => 'ุชุฎ', + 64526 => 'ุชู…', + 64527 => 'ุชู‰', + 64528 => 'ุชูŠ', + 64529 => 'ุซุฌ', + 64530 => 'ุซู…', + 64531 => 'ุซู‰', + 64532 => 'ุซูŠ', + 64533 => 'ุฌุญ', + 64534 => 'ุฌู…', + 64535 => 'ุญุฌ', + 64536 => 'ุญู…', + 64537 => 'ุฎุฌ', + 64538 => 'ุฎุญ', + 64539 => 'ุฎู…', + 64540 => 'ุณุฌ', + 64541 => 'ุณุญ', + 64542 => 'ุณุฎ', + 64543 => 'ุณู…', + 64544 => 'ุตุญ', + 64545 => 'ุตู…', + 64546 => 'ุถุฌ', + 64547 => 'ุถุญ', + 64548 => 'ุถุฎ', + 64549 => 'ุถู…', + 64550 => 'ุทุญ', + 64551 => 'ุทู…', + 64552 => 'ุธู…', + 64553 => 'ุนุฌ', + 64554 => 'ุนู…', + 64555 => 'ุบุฌ', + 64556 => 'ุบู…', + 64557 => 'ูุฌ', + 64558 => 'ูุญ', + 64559 => 'ูุฎ', + 64560 => 'ูู…', + 64561 => 'ูู‰', + 64562 => 'ููŠ', + 64563 => 'ู‚ุญ', + 64564 => 'ู‚ู…', + 64565 => 'ู‚ู‰', + 64566 => 'ู‚ูŠ', + 64567 => 'ูƒุง', + 64568 => 'ูƒุฌ', + 64569 => 'ูƒุญ', + 64570 => 'ูƒุฎ', + 64571 => 'ูƒู„', + 64572 => 'ูƒู…', + 64573 => 'ูƒู‰', + 64574 => 'ูƒูŠ', + 64575 => 'ู„ุฌ', + 64576 => 'ู„ุญ', + 64577 => 'ู„ุฎ', + 64578 => 'ู„ู…', + 64579 => 'ู„ู‰', + 64580 => 'ู„ูŠ', + 64581 => 'ู…ุฌ', + 64582 => 'ู…ุญ', + 64583 => 'ู…ุฎ', + 64584 => 'ู…ู…', + 64585 => 'ู…ู‰', + 64586 => 'ู…ูŠ', + 64587 => 'ู†ุฌ', + 64588 => 'ู†ุญ', + 64589 => 'ู†ุฎ', + 64590 => 'ู†ู…', + 64591 => 'ู†ู‰', + 64592 => 'ู†ูŠ', + 64593 => 'ู‡ุฌ', + 64594 => 'ู‡ู…', + 64595 => 'ู‡ู‰', + 64596 => 'ู‡ูŠ', + 64597 => 'ูŠุฌ', + 64598 => 'ูŠุญ', + 64599 => 'ูŠุฎ', + 64600 => 'ูŠู…', + 64601 => 'ูŠู‰', + 64602 => 'ูŠูŠ', + 64603 => 'ุฐูฐ', + 64604 => 'ุฑูฐ', + 64605 => 'ู‰ูฐ', + 64612 => 'ุฆุฑ', + 64613 => 'ุฆุฒ', + 64614 => 'ุฆู…', + 64615 => 'ุฆู†', + 64616 => 'ุฆู‰', + 64617 => 'ุฆูŠ', + 64618 => 'ุจุฑ', + 64619 => 'ุจุฒ', + 64620 => 'ุจู…', + 64621 => 'ุจู†', + 64622 => 'ุจู‰', + 64623 => 'ุจูŠ', + 64624 => 'ุชุฑ', + 64625 => 'ุชุฒ', + 64626 => 'ุชู…', + 64627 => 'ุชู†', + 64628 => 'ุชู‰', + 64629 => 'ุชูŠ', + 64630 => 'ุซุฑ', + 64631 => 'ุซุฒ', + 64632 => 'ุซู…', + 64633 => 'ุซู†', + 64634 => 'ุซู‰', + 64635 => 'ุซูŠ', + 64636 => 'ูู‰', + 64637 => 'ููŠ', + 64638 => 'ู‚ู‰', + 64639 => 'ู‚ูŠ', + 64640 => 'ูƒุง', + 64641 => 'ูƒู„', + 64642 => 'ูƒู…', + 64643 => 'ูƒู‰', + 64644 => 'ูƒูŠ', + 64645 => 'ู„ู…', + 64646 => 'ู„ู‰', + 64647 => 'ู„ูŠ', + 64648 => 'ู…ุง', + 64649 => 'ู…ู…', + 64650 => 'ู†ุฑ', + 64651 => 'ู†ุฒ', + 64652 => 'ู†ู…', + 64653 => 'ู†ู†', + 64654 => 'ู†ู‰', + 64655 => 'ู†ูŠ', + 64656 => 'ู‰ูฐ', + 64657 => 'ูŠุฑ', + 64658 => 'ูŠุฒ', + 64659 => 'ูŠู…', + 64660 => 'ูŠู†', + 64661 => 'ูŠู‰', + 64662 => 'ูŠูŠ', + 64663 => 'ุฆุฌ', + 64664 => 'ุฆุญ', + 64665 => 'ุฆุฎ', + 64666 => 'ุฆู…', + 64667 => 'ุฆู‡', + 64668 => 'ุจุฌ', + 64669 => 'ุจุญ', + 64670 => 'ุจุฎ', + 64671 => 'ุจู…', + 64672 => 'ุจู‡', + 64673 => 'ุชุฌ', + 64674 => 'ุชุญ', + 64675 => 'ุชุฎ', + 64676 => 'ุชู…', + 64677 => 'ุชู‡', + 64678 => 'ุซู…', + 64679 => 'ุฌุญ', + 64680 => 'ุฌู…', + 64681 => 'ุญุฌ', + 64682 => 'ุญู…', + 64683 => 'ุฎุฌ', + 64684 => 'ุฎู…', + 64685 => 'ุณุฌ', + 64686 => 'ุณุญ', + 64687 => 'ุณุฎ', + 64688 => 'ุณู…', + 64689 => 'ุตุญ', + 64690 => 'ุตุฎ', + 64691 => 'ุตู…', + 64692 => 'ุถุฌ', + 64693 => 'ุถุญ', + 64694 => 'ุถุฎ', + 64695 => 'ุถู…', + 64696 => 'ุทุญ', + 64697 => 'ุธู…', + 64698 => 'ุนุฌ', + 64699 => 'ุนู…', + 64700 => 'ุบุฌ', + 64701 => 'ุบู…', + 64702 => 'ูุฌ', + 64703 => 'ูุญ', + 64704 => 'ูุฎ', + 64705 => 'ูู…', + 64706 => 'ู‚ุญ', + 64707 => 'ู‚ู…', + 64708 => 'ูƒุฌ', + 64709 => 'ูƒุญ', + 64710 => 'ูƒุฎ', + 64711 => 'ูƒู„', + 64712 => 'ูƒู…', + 64713 => 'ู„ุฌ', + 64714 => 'ู„ุญ', + 64715 => 'ู„ุฎ', + 64716 => 'ู„ู…', + 64717 => 'ู„ู‡', + 64718 => 'ู…ุฌ', + 64719 => 'ู…ุญ', + 64720 => 'ู…ุฎ', + 64721 => 'ู…ู…', + 64722 => 'ู†ุฌ', + 64723 => 'ู†ุญ', + 64724 => 'ู†ุฎ', + 64725 => 'ู†ู…', + 64726 => 'ู†ู‡', + 64727 => 'ู‡ุฌ', + 64728 => 'ู‡ู…', + 64729 => 'ู‡ูฐ', + 64730 => 'ูŠุฌ', + 64731 => 'ูŠุญ', + 64732 => 'ูŠุฎ', + 64733 => 'ูŠู…', + 64734 => 'ูŠู‡', + 64735 => 'ุฆู…', + 64736 => 'ุฆู‡', + 64737 => 'ุจู…', + 64738 => 'ุจู‡', + 64739 => 'ุชู…', + 64740 => 'ุชู‡', + 64741 => 'ุซู…', + 64742 => 'ุซู‡', + 64743 => 'ุณู…', + 64744 => 'ุณู‡', + 64745 => 'ุดู…', + 64746 => 'ุดู‡', + 64747 => 'ูƒู„', + 64748 => 'ูƒู…', + 64749 => 'ู„ู…', + 64750 => 'ู†ู…', + 64751 => 'ู†ู‡', + 64752 => 'ูŠู…', + 64753 => 'ูŠู‡', + 64754 => 'ู€ูŽู‘', + 64755 => 'ู€ูู‘', + 64756 => 'ู€ูู‘', + 64757 => 'ุทู‰', + 64758 => 'ุทูŠ', + 64759 => 'ุนู‰', + 64760 => 'ุนูŠ', + 64761 => 'ุบู‰', + 64762 => 'ุบูŠ', + 64763 => 'ุณู‰', + 64764 => 'ุณูŠ', + 64765 => 'ุดู‰', + 64766 => 'ุดูŠ', + 64767 => 'ุญู‰', + 64768 => 'ุญูŠ', + 64769 => 'ุฌู‰', + 64770 => 'ุฌูŠ', + 64771 => 'ุฎู‰', + 64772 => 'ุฎูŠ', + 64773 => 'ุตู‰', + 64774 => 'ุตูŠ', + 64775 => 'ุถู‰', + 64776 => 'ุถูŠ', + 64777 => 'ุดุฌ', + 64778 => 'ุดุญ', + 64779 => 'ุดุฎ', + 64780 => 'ุดู…', + 64781 => 'ุดุฑ', + 64782 => 'ุณุฑ', + 64783 => 'ุตุฑ', + 64784 => 'ุถุฑ', + 64785 => 'ุทู‰', + 64786 => 'ุทูŠ', + 64787 => 'ุนู‰', + 64788 => 'ุนูŠ', + 64789 => 'ุบู‰', + 64790 => 'ุบูŠ', + 64791 => 'ุณู‰', + 64792 => 'ุณูŠ', + 64793 => 'ุดู‰', + 64794 => 'ุดูŠ', + 64795 => 'ุญู‰', + 64796 => 'ุญูŠ', + 64797 => 'ุฌู‰', + 64798 => 'ุฌูŠ', + 64799 => 'ุฎู‰', + 64800 => 'ุฎูŠ', + 64801 => 'ุตู‰', + 64802 => 'ุตูŠ', + 64803 => 'ุถู‰', + 64804 => 'ุถูŠ', + 64805 => 'ุดุฌ', + 64806 => 'ุดุญ', + 64807 => 'ุดุฎ', + 64808 => 'ุดู…', + 64809 => 'ุดุฑ', + 64810 => 'ุณุฑ', + 64811 => 'ุตุฑ', + 64812 => 'ุถุฑ', + 64813 => 'ุดุฌ', + 64814 => 'ุดุญ', + 64815 => 'ุดุฎ', + 64816 => 'ุดู…', + 64817 => 'ุณู‡', + 64818 => 'ุดู‡', + 64819 => 'ุทู…', + 64820 => 'ุณุฌ', + 64821 => 'ุณุญ', + 64822 => 'ุณุฎ', + 64823 => 'ุดุฌ', + 64824 => 'ุดุญ', + 64825 => 'ุดุฎ', + 64826 => 'ุทู…', + 64827 => 'ุธู…', + 64828 => 'ุงู‹', + 64829 => 'ุงู‹', + 64848 => 'ุชุฌู…', + 64849 => 'ุชุญุฌ', + 64850 => 'ุชุญุฌ', + 64851 => 'ุชุญู…', + 64852 => 'ุชุฎู…', + 64853 => 'ุชู…ุฌ', + 64854 => 'ุชู…ุญ', + 64855 => 'ุชู…ุฎ', + 64856 => 'ุฌู…ุญ', + 64857 => 'ุฌู…ุญ', + 64858 => 'ุญู…ูŠ', + 64859 => 'ุญู…ู‰', + 64860 => 'ุณุญุฌ', + 64861 => 'ุณุฌุญ', + 64862 => 'ุณุฌู‰', + 64863 => 'ุณู…ุญ', + 64864 => 'ุณู…ุญ', + 64865 => 'ุณู…ุฌ', + 64866 => 'ุณู…ู…', + 64867 => 'ุณู…ู…', + 64868 => 'ุตุญุญ', + 64869 => 'ุตุญุญ', + 64870 => 'ุตู…ู…', + 64871 => 'ุดุญู…', + 64872 => 'ุดุญู…', + 64873 => 'ุดุฌูŠ', + 64874 => 'ุดู…ุฎ', + 64875 => 'ุดู…ุฎ', + 64876 => 'ุดู…ู…', + 64877 => 'ุดู…ู…', + 64878 => 'ุถุญู‰', + 64879 => 'ุถุฎู…', + 64880 => 'ุถุฎู…', + 64881 => 'ุทู…ุญ', + 64882 => 'ุทู…ุญ', + 64883 => 'ุทู…ู…', + 64884 => 'ุทู…ูŠ', + 64885 => 'ุนุฌู…', + 64886 => 'ุนู…ู…', + 64887 => 'ุนู…ู…', + 64888 => 'ุนู…ู‰', + 64889 => 'ุบู…ู…', + 64890 => 'ุบู…ูŠ', + 64891 => 'ุบู…ู‰', + 64892 => 'ูุฎู…', + 64893 => 'ูุฎู…', + 64894 => 'ู‚ู…ุญ', + 64895 => 'ู‚ู…ู…', + 64896 => 'ู„ุญู…', + 64897 => 'ู„ุญูŠ', + 64898 => 'ู„ุญู‰', + 64899 => 'ู„ุฌุฌ', + 64900 => 'ู„ุฌุฌ', + 64901 => 'ู„ุฎู…', + 64902 => 'ู„ุฎู…', + 64903 => 'ู„ู…ุญ', + 64904 => 'ู„ู…ุญ', + 64905 => 'ู…ุญุฌ', + 64906 => 'ู…ุญู…', + 64907 => 'ู…ุญูŠ', + 64908 => 'ู…ุฌุญ', + 64909 => 'ู…ุฌู…', + 64910 => 'ู…ุฎุฌ', + 64911 => 'ู…ุฎู…', + 64914 => 'ู…ุฌุฎ', + 64915 => 'ู‡ู…ุฌ', + 64916 => 'ู‡ู…ู…', + 64917 => 'ู†ุญู…', + 64918 => 'ู†ุญู‰', + 64919 => 'ู†ุฌู…', + 64920 => 'ู†ุฌู…', + 64921 => 'ู†ุฌู‰', + 64922 => 'ู†ู…ูŠ', + 64923 => 'ู†ู…ู‰', + 64924 => 'ูŠู…ู…', + 64925 => 'ูŠู…ู…', + 64926 => 'ุจุฎูŠ', + 64927 => 'ุชุฌูŠ', + 64928 => 'ุชุฌู‰', + 64929 => 'ุชุฎูŠ', + 64930 => 'ุชุฎู‰', + 64931 => 'ุชู…ูŠ', + 64932 => 'ุชู…ู‰', + 64933 => 'ุฌู…ูŠ', + 64934 => 'ุฌุญู‰', + 64935 => 'ุฌู…ู‰', + 64936 => 'ุณุฎู‰', + 64937 => 'ุตุญูŠ', + 64938 => 'ุดุญูŠ', + 64939 => 'ุถุญูŠ', + 64940 => 'ู„ุฌูŠ', + 64941 => 'ู„ู…ูŠ', + 64942 => 'ูŠุญูŠ', + 64943 => 'ูŠุฌูŠ', + 64944 => 'ูŠู…ูŠ', + 64945 => 'ู…ู…ูŠ', + 64946 => 'ู‚ู…ูŠ', + 64947 => 'ู†ุญูŠ', + 64948 => 'ู‚ู…ุญ', + 64949 => 'ู„ุญู…', + 64950 => 'ุนู…ูŠ', + 64951 => 'ูƒู…ูŠ', + 64952 => 'ู†ุฌุญ', + 64953 => 'ู…ุฎูŠ', + 64954 => 'ู„ุฌู…', + 64955 => 'ูƒู…ู…', + 64956 => 'ู„ุฌู…', + 64957 => 'ู†ุฌุญ', + 64958 => 'ุฌุญูŠ', + 64959 => 'ุญุฌูŠ', + 64960 => 'ู…ุฌูŠ', + 64961 => 'ูู…ูŠ', + 64962 => 'ุจุญูŠ', + 64963 => 'ูƒู…ู…', + 64964 => 'ุนุฌู…', + 64965 => 'ุตู…ู…', + 64966 => 'ุณุฎูŠ', + 64967 => 'ู†ุฌูŠ', + 65008 => 'ุตู„’', + 65009 => 'ู‚ู„’', + 65010 => 'ุงู„ู„ู‡', + 65011 => 'ุงูƒุจุฑ', + 65012 => 'ู…ุญู…ุฏ', + 65013 => 'ุตู„ุนู…', + 65014 => 'ุฑุณูˆู„', + 65015 => 'ุนู„ูŠู‡', + 65016 => 'ูˆุณู„ู…', + 65017 => 'ุตู„ู‰', + 65020 => 'ุฑŒุงู„', + 65041 => 'ใ€', + 65047 => 'ใ€–', + 65048 => 'ใ€—', + 65073 => 'โ€”', + 65074 => 'โ€“', + 65081 => 'ใ€”', + 65082 => 'ใ€•', + 65083 => 'ใ€', + 65084 => 'ใ€‘', + 65085 => 'ใ€Š', + 65086 => 'ใ€‹', + 65087 => 'ใ€ˆ', + 65088 => 'ใ€‰', + 65089 => 'ใ€Œ', + 65090 => 'ใ€', + 65091 => 'ใ€Ž', + 65092 => 'ใ€', + 65105 => 'ใ€', + 65112 => 'โ€”', + 65117 => 'ใ€”', + 65118 => 'ใ€•', + 65123 => '-', + 65137 => 'ู€ู‹', + 65143 => 'ู€ูŽ', + 65145 => 'ู€ู', + 65147 => 'ู€ู', + 65149 => 'ู€ู‘', + 65151 => 'ู€ู’', + 65152 => 'ุก', + 65153 => 'ุข', + 65154 => 'ุข', + 65155 => 'ุฃ', + 65156 => 'ุฃ', + 65157 => 'ุค', + 65158 => 'ุค', + 65159 => 'ุฅ', + 65160 => 'ุฅ', + 65161 => 'ุฆ', + 65162 => 'ุฆ', + 65163 => 'ุฆ', + 65164 => 'ุฆ', + 65165 => 'ุง', + 65166 => 'ุง', + 65167 => 'ุจ', + 65168 => 'ุจ', + 65169 => 'ุจ', + 65170 => 'ุจ', + 65171 => 'ุฉ', + 65172 => 'ุฉ', + 65173 => 'ุช', + 65174 => 'ุช', + 65175 => 'ุช', + 65176 => 'ุช', + 65177 => 'ุซ', + 65178 => 'ุซ', + 65179 => 'ุซ', + 65180 => 'ุซ', + 65181 => 'ุฌ', + 65182 => 'ุฌ', + 65183 => 'ุฌ', + 65184 => 'ุฌ', + 65185 => 'ุญ', + 65186 => 'ุญ', + 65187 => 'ุญ', + 65188 => 'ุญ', + 65189 => 'ุฎ', + 65190 => 'ุฎ', + 65191 => 'ุฎ', + 65192 => 'ุฎ', + 65193 => 'ุฏ', + 65194 => 'ุฏ', + 65195 => 'ุฐ', + 65196 => 'ุฐ', + 65197 => 'ุฑ', + 65198 => 'ุฑ', + 65199 => 'ุฒ', + 65200 => 'ุฒ', + 65201 => 'ุณ', + 65202 => 'ุณ', + 65203 => 'ุณ', + 65204 => 'ุณ', + 65205 => 'ุด', + 65206 => 'ุด', + 65207 => 'ุด', + 65208 => 'ุด', + 65209 => 'ุต', + 65210 => 'ุต', + 65211 => 'ุต', + 65212 => 'ุต', + 65213 => 'ุถ', + 65214 => 'ุถ', + 65215 => 'ุถ', + 65216 => 'ุถ', + 65217 => 'ุท', + 65218 => 'ุท', + 65219 => 'ุท', + 65220 => 'ุท', + 65221 => 'ุธ', + 65222 => 'ุธ', + 65223 => 'ุธ', + 65224 => 'ุธ', + 65225 => 'ุน', + 65226 => 'ุน', + 65227 => 'ุน', + 65228 => 'ุน', + 65229 => 'ุบ', + 65230 => 'ุบ', + 65231 => 'ุบ', + 65232 => 'ุบ', + 65233 => 'ู', + 65234 => 'ู', + 65235 => 'ู', + 65236 => 'ู', + 65237 => 'ู‚', + 65238 => 'ู‚', + 65239 => 'ู‚', + 65240 => 'ู‚', + 65241 => 'ูƒ', + 65242 => 'ูƒ', + 65243 => 'ูƒ', + 65244 => 'ูƒ', + 65245 => 'ู„', + 65246 => 'ู„', + 65247 => 'ู„', + 65248 => 'ู„', + 65249 => 'ู…', + 65250 => 'ู…', + 65251 => 'ู…', + 65252 => 'ู…', + 65253 => 'ู†', + 65254 => 'ู†', + 65255 => 'ู†', + 65256 => 'ู†', + 65257 => 'ู‡', + 65258 => 'ู‡', + 65259 => 'ู‡', + 65260 => 'ู‡', + 65261 => 'ูˆ', + 65262 => 'ูˆ', + 65263 => 'ู‰', + 65264 => 'ู‰', + 65265 => 'ูŠ', + 65266 => 'ูŠ', + 65267 => 'ูŠ', + 65268 => 'ูŠ', + 65269 => 'ู„ุข', + 65270 => 'ู„ุข', + 65271 => 'ู„ุฃ', + 65272 => 'ู„ุฃ', + 65273 => 'ู„ุฅ', + 65274 => 'ู„ุฅ', + 65275 => 'ู„ุง', + 65276 => 'ู„ุง', + 65293 => '-', + 65294 => '.', + 65296 => '0', + 65297 => '1', + 65298 => '2', + 65299 => '3', + 65300 => '4', + 65301 => '5', + 65302 => '6', + 65303 => '7', + 65304 => '8', + 65305 => '9', + 65313 => 'a', + 65314 => 'b', + 65315 => 'c', + 65316 => 'd', + 65317 => 'e', + 65318 => 'f', + 65319 => 'g', + 65320 => 'h', + 65321 => 'i', + 65322 => 'j', + 65323 => 'k', + 65324 => 'l', + 65325 => 'm', + 65326 => 'n', + 65327 => 'o', + 65328 => 'p', + 65329 => 'q', + 65330 => 'r', + 65331 => 's', + 65332 => 't', + 65333 => 'u', + 65334 => 'v', + 65335 => 'w', + 65336 => 'x', + 65337 => 'y', + 65338 => 'z', + 65345 => 'a', + 65346 => 'b', + 65347 => 'c', + 65348 => 'd', + 65349 => 'e', + 65350 => 'f', + 65351 => 'g', + 65352 => 'h', + 65353 => 'i', + 65354 => 'j', + 65355 => 'k', + 65356 => 'l', + 65357 => 'm', + 65358 => 'n', + 65359 => 'o', + 65360 => 'p', + 65361 => 'q', + 65362 => 'r', + 65363 => 's', + 65364 => 't', + 65365 => 'u', + 65366 => 'v', + 65367 => 'w', + 65368 => 'x', + 65369 => 'y', + 65370 => 'z', + 65375 => 'โฆ…', + 65376 => 'โฆ†', + 65377 => '.', + 65378 => 'ใ€Œ', + 65379 => 'ใ€', + 65380 => 'ใ€', + 65381 => 'ใƒป', + 65382 => 'ใƒฒ', + 65383 => 'ใ‚ก', + 65384 => 'ใ‚ฃ', + 65385 => 'ใ‚ฅ', + 65386 => 'ใ‚ง', + 65387 => 'ใ‚ฉ', + 65388 => 'ใƒฃ', + 65389 => 'ใƒฅ', + 65390 => 'ใƒง', + 65391 => 'ใƒƒ', + 65392 => 'ใƒผ', + 65393 => 'ใ‚ข', + 65394 => 'ใ‚ค', + 65395 => 'ใ‚ฆ', + 65396 => 'ใ‚จ', + 65397 => 'ใ‚ช', + 65398 => 'ใ‚ซ', + 65399 => 'ใ‚ญ', + 65400 => 'ใ‚ฏ', + 65401 => 'ใ‚ฑ', + 65402 => 'ใ‚ณ', + 65403 => 'ใ‚ต', + 65404 => 'ใ‚ท', + 65405 => 'ใ‚น', + 65406 => 'ใ‚ป', + 65407 => 'ใ‚ฝ', + 65408 => 'ใ‚ฟ', + 65409 => 'ใƒ', + 65410 => 'ใƒ„', + 65411 => 'ใƒ†', + 65412 => 'ใƒˆ', + 65413 => 'ใƒŠ', + 65414 => 'ใƒ‹', + 65415 => 'ใƒŒ', + 65416 => 'ใƒ', + 65417 => 'ใƒŽ', + 65418 => 'ใƒ', + 65419 => 'ใƒ’', + 65420 => 'ใƒ•', + 65421 => 'ใƒ˜', + 65422 => 'ใƒ›', + 65423 => 'ใƒž', + 65424 => 'ใƒŸ', + 65425 => 'ใƒ ', + 65426 => 'ใƒก', + 65427 => 'ใƒข', + 65428 => 'ใƒค', + 65429 => 'ใƒฆ', + 65430 => 'ใƒจ', + 65431 => 'ใƒฉ', + 65432 => 'ใƒช', + 65433 => 'ใƒซ', + 65434 => 'ใƒฌ', + 65435 => 'ใƒญ', + 65436 => 'ใƒฏ', + 65437 => 'ใƒณ', + 65438 => 'ใ‚™', + 65439 => 'ใ‚š', + 65441 => 'แ„€', + 65442 => 'แ„', + 65443 => 'แ†ช', + 65444 => 'แ„‚', + 65445 => 'แ†ฌ', + 65446 => 'แ†ญ', + 65447 => 'แ„ƒ', + 65448 => 'แ„„', + 65449 => 'แ„…', + 65450 => 'แ†ฐ', + 65451 => 'แ†ฑ', + 65452 => 'แ†ฒ', + 65453 => 'แ†ณ', + 65454 => 'แ†ด', + 65455 => 'แ†ต', + 65456 => 'แ„š', + 65457 => 'แ„†', + 65458 => 'แ„‡', + 65459 => 'แ„ˆ', + 65460 => 'แ„ก', + 65461 => 'แ„‰', + 65462 => 'แ„Š', + 65463 => 'แ„‹', + 65464 => 'แ„Œ', + 65465 => 'แ„', + 65466 => 'แ„Ž', + 65467 => 'แ„', + 65468 => 'แ„', + 65469 => 'แ„‘', + 65470 => 'แ„’', + 65474 => 'แ…ก', + 65475 => 'แ…ข', + 65476 => 'แ…ฃ', + 65477 => 'แ…ค', + 65478 => 'แ…ฅ', + 65479 => 'แ…ฆ', + 65482 => 'แ…ง', + 65483 => 'แ…จ', + 65484 => 'แ…ฉ', + 65485 => 'แ…ช', + 65486 => 'แ…ซ', + 65487 => 'แ…ฌ', + 65490 => 'แ…ญ', + 65491 => 'แ…ฎ', + 65492 => 'แ…ฏ', + 65493 => 'แ…ฐ', + 65494 => 'แ…ฑ', + 65495 => 'แ…ฒ', + 65498 => 'แ…ณ', + 65499 => 'แ…ด', + 65500 => 'แ…ต', + 65504 => 'ยข', + 65505 => 'ยฃ', + 65506 => 'ยฌ', + 65508 => 'ยฆ', + 65509 => 'ยฅ', + 65510 => 'โ‚ฉ', + 65512 => 'โ”‚', + 65513 => 'โ†', + 65514 => 'โ†‘', + 65515 => 'โ†’', + 65516 => 'โ†“', + 65517 => 'โ– ', + 65518 => 'โ—‹', + 66560 => '๐จ', + 66561 => '๐ฉ', + 66562 => '๐ช', + 66563 => '๐ซ', + 66564 => '๐ฌ', + 66565 => '๐ญ', + 66566 => '๐ฎ', + 66567 => '๐ฏ', + 66568 => '๐ฐ', + 66569 => '๐ฑ', + 66570 => '๐ฒ', + 66571 => '๐ณ', + 66572 => '๐ด', + 66573 => '๐ต', + 66574 => '๐ถ', + 66575 => '๐ท', + 66576 => '๐ธ', + 66577 => '๐น', + 66578 => '๐บ', + 66579 => '๐ป', + 66580 => '๐ผ', + 66581 => '๐ฝ', + 66582 => '๐พ', + 66583 => '๐ฟ', + 66584 => '๐‘€', + 66585 => '๐‘', + 66586 => '๐‘‚', + 66587 => '๐‘ƒ', + 66588 => '๐‘„', + 66589 => '๐‘…', + 66590 => '๐‘†', + 66591 => '๐‘‡', + 66592 => '๐‘ˆ', + 66593 => '๐‘‰', + 66594 => '๐‘Š', + 66595 => '๐‘‹', + 66596 => '๐‘Œ', + 66597 => '๐‘', + 66598 => '๐‘Ž', + 66599 => '๐‘', + 66736 => '๐“˜', + 66737 => '๐“™', + 66738 => '๐“š', + 66739 => '๐“›', + 66740 => '๐“œ', + 66741 => '๐“', + 66742 => '๐“ž', + 66743 => '๐“Ÿ', + 66744 => '๐“ ', + 66745 => '๐“ก', + 66746 => '๐“ข', + 66747 => '๐“ฃ', + 66748 => '๐“ค', + 66749 => '๐“ฅ', + 66750 => '๐“ฆ', + 66751 => '๐“ง', + 66752 => '๐“จ', + 66753 => '๐“ฉ', + 66754 => '๐“ช', + 66755 => '๐“ซ', + 66756 => '๐“ฌ', + 66757 => '๐“ญ', + 66758 => '๐“ฎ', + 66759 => '๐“ฏ', + 66760 => '๐“ฐ', + 66761 => '๐“ฑ', + 66762 => '๐“ฒ', + 66763 => '๐“ณ', + 66764 => '๐“ด', + 66765 => '๐“ต', + 66766 => '๐“ถ', + 66767 => '๐“ท', + 66768 => '๐“ธ', + 66769 => '๐“น', + 66770 => '๐“บ', + 66771 => '๐“ป', + 68736 => '๐ณ€', + 68737 => '๐ณ', + 68738 => '๐ณ‚', + 68739 => '๐ณƒ', + 68740 => '๐ณ„', + 68741 => '๐ณ…', + 68742 => '๐ณ†', + 68743 => '๐ณ‡', + 68744 => '๐ณˆ', + 68745 => '๐ณ‰', + 68746 => '๐ณŠ', + 68747 => '๐ณ‹', + 68748 => '๐ณŒ', + 68749 => '๐ณ', + 68750 => '๐ณŽ', + 68751 => '๐ณ', + 68752 => '๐ณ', + 68753 => '๐ณ‘', + 68754 => '๐ณ’', + 68755 => '๐ณ“', + 68756 => '๐ณ”', + 68757 => '๐ณ•', + 68758 => '๐ณ–', + 68759 => '๐ณ—', + 68760 => '๐ณ˜', + 68761 => '๐ณ™', + 68762 => '๐ณš', + 68763 => '๐ณ›', + 68764 => '๐ณœ', + 68765 => '๐ณ', + 68766 => '๐ณž', + 68767 => '๐ณŸ', + 68768 => '๐ณ ', + 68769 => '๐ณก', + 68770 => '๐ณข', + 68771 => '๐ณฃ', + 68772 => '๐ณค', + 68773 => '๐ณฅ', + 68774 => '๐ณฆ', + 68775 => '๐ณง', + 68776 => '๐ณจ', + 68777 => '๐ณฉ', + 68778 => '๐ณช', + 68779 => '๐ณซ', + 68780 => '๐ณฌ', + 68781 => '๐ณญ', + 68782 => '๐ณฎ', + 68783 => '๐ณฏ', + 68784 => '๐ณฐ', + 68785 => '๐ณฑ', + 68786 => '๐ณฒ', + 71840 => '๐‘ฃ€', + 71841 => '๐‘ฃ', + 71842 => '๐‘ฃ‚', + 71843 => '๐‘ฃƒ', + 71844 => '๐‘ฃ„', + 71845 => '๐‘ฃ…', + 71846 => '๐‘ฃ†', + 71847 => '๐‘ฃ‡', + 71848 => '๐‘ฃˆ', + 71849 => '๐‘ฃ‰', + 71850 => '๐‘ฃŠ', + 71851 => '๐‘ฃ‹', + 71852 => '๐‘ฃŒ', + 71853 => '๐‘ฃ', + 71854 => '๐‘ฃŽ', + 71855 => '๐‘ฃ', + 71856 => '๐‘ฃ', + 71857 => '๐‘ฃ‘', + 71858 => '๐‘ฃ’', + 71859 => '๐‘ฃ“', + 71860 => '๐‘ฃ”', + 71861 => '๐‘ฃ•', + 71862 => '๐‘ฃ–', + 71863 => '๐‘ฃ—', + 71864 => '๐‘ฃ˜', + 71865 => '๐‘ฃ™', + 71866 => '๐‘ฃš', + 71867 => '๐‘ฃ›', + 71868 => '๐‘ฃœ', + 71869 => '๐‘ฃ', + 71870 => '๐‘ฃž', + 71871 => '๐‘ฃŸ', + 93760 => '๐–น ', + 93761 => '๐–นก', + 93762 => '๐–นข', + 93763 => '๐–นฃ', + 93764 => '๐–นค', + 93765 => '๐–นฅ', + 93766 => '๐–นฆ', + 93767 => '๐–นง', + 93768 => '๐–นจ', + 93769 => '๐–นฉ', + 93770 => '๐–นช', + 93771 => '๐–นซ', + 93772 => '๐–นฌ', + 93773 => '๐–นญ', + 93774 => '๐–นฎ', + 93775 => '๐–นฏ', + 93776 => '๐–นฐ', + 93777 => '๐–นฑ', + 93778 => '๐–นฒ', + 93779 => '๐–นณ', + 93780 => '๐–นด', + 93781 => '๐–นต', + 93782 => '๐–นถ', + 93783 => '๐–นท', + 93784 => '๐–นธ', + 93785 => '๐–นน', + 93786 => '๐–นบ', + 93787 => '๐–นป', + 93788 => '๐–นผ', + 93789 => '๐–นฝ', + 93790 => '๐–นพ', + 93791 => '๐–นฟ', + 119134 => '๐…—๐…ฅ', + 119135 => '๐…˜๐…ฅ', + 119136 => '๐…˜๐…ฅ๐…ฎ', + 119137 => '๐…˜๐…ฅ๐…ฏ', + 119138 => '๐…˜๐…ฅ๐…ฐ', + 119139 => '๐…˜๐…ฅ๐…ฑ', + 119140 => '๐…˜๐…ฅ๐…ฒ', + 119227 => '๐†น๐…ฅ', + 119228 => '๐†บ๐…ฅ', + 119229 => '๐†น๐…ฅ๐…ฎ', + 119230 => '๐†บ๐…ฅ๐…ฎ', + 119231 => '๐†น๐…ฅ๐…ฏ', + 119232 => '๐†บ๐…ฅ๐…ฏ', + 119808 => 'a', + 119809 => 'b', + 119810 => 'c', + 119811 => 'd', + 119812 => 'e', + 119813 => 'f', + 119814 => 'g', + 119815 => 'h', + 119816 => 'i', + 119817 => 'j', + 119818 => 'k', + 119819 => 'l', + 119820 => 'm', + 119821 => 'n', + 119822 => 'o', + 119823 => 'p', + 119824 => 'q', + 119825 => 'r', + 119826 => 's', + 119827 => 't', + 119828 => 'u', + 119829 => 'v', + 119830 => 'w', + 119831 => 'x', + 119832 => 'y', + 119833 => 'z', + 119834 => 'a', + 119835 => 'b', + 119836 => 'c', + 119837 => 'd', + 119838 => 'e', + 119839 => 'f', + 119840 => 'g', + 119841 => 'h', + 119842 => 'i', + 119843 => 'j', + 119844 => 'k', + 119845 => 'l', + 119846 => 'm', + 119847 => 'n', + 119848 => 'o', + 119849 => 'p', + 119850 => 'q', + 119851 => 'r', + 119852 => 's', + 119853 => 't', + 119854 => 'u', + 119855 => 'v', + 119856 => 'w', + 119857 => 'x', + 119858 => 'y', + 119859 => 'z', + 119860 => 'a', + 119861 => 'b', + 119862 => 'c', + 119863 => 'd', + 119864 => 'e', + 119865 => 'f', + 119866 => 'g', + 119867 => 'h', + 119868 => 'i', + 119869 => 'j', + 119870 => 'k', + 119871 => 'l', + 119872 => 'm', + 119873 => 'n', + 119874 => 'o', + 119875 => 'p', + 119876 => 'q', + 119877 => 'r', + 119878 => 's', + 119879 => 't', + 119880 => 'u', + 119881 => 'v', + 119882 => 'w', + 119883 => 'x', + 119884 => 'y', + 119885 => 'z', + 119886 => 'a', + 119887 => 'b', + 119888 => 'c', + 119889 => 'd', + 119890 => 'e', + 119891 => 'f', + 119892 => 'g', + 119894 => 'i', + 119895 => 'j', + 119896 => 'k', + 119897 => 'l', + 119898 => 'm', + 119899 => 'n', + 119900 => 'o', + 119901 => 'p', + 119902 => 'q', + 119903 => 'r', + 119904 => 's', + 119905 => 't', + 119906 => 'u', + 119907 => 'v', + 119908 => 'w', + 119909 => 'x', + 119910 => 'y', + 119911 => 'z', + 119912 => 'a', + 119913 => 'b', + 119914 => 'c', + 119915 => 'd', + 119916 => 'e', + 119917 => 'f', + 119918 => 'g', + 119919 => 'h', + 119920 => 'i', + 119921 => 'j', + 119922 => 'k', + 119923 => 'l', + 119924 => 'm', + 119925 => 'n', + 119926 => 'o', + 119927 => 'p', + 119928 => 'q', + 119929 => 'r', + 119930 => 's', + 119931 => 't', + 119932 => 'u', + 119933 => 'v', + 119934 => 'w', + 119935 => 'x', + 119936 => 'y', + 119937 => 'z', + 119938 => 'a', + 119939 => 'b', + 119940 => 'c', + 119941 => 'd', + 119942 => 'e', + 119943 => 'f', + 119944 => 'g', + 119945 => 'h', + 119946 => 'i', + 119947 => 'j', + 119948 => 'k', + 119949 => 'l', + 119950 => 'm', + 119951 => 'n', + 119952 => 'o', + 119953 => 'p', + 119954 => 'q', + 119955 => 'r', + 119956 => 's', + 119957 => 't', + 119958 => 'u', + 119959 => 'v', + 119960 => 'w', + 119961 => 'x', + 119962 => 'y', + 119963 => 'z', + 119964 => 'a', + 119966 => 'c', + 119967 => 'd', + 119970 => 'g', + 119973 => 'j', + 119974 => 'k', + 119977 => 'n', + 119978 => 'o', + 119979 => 'p', + 119980 => 'q', + 119982 => 's', + 119983 => 't', + 119984 => 'u', + 119985 => 'v', + 119986 => 'w', + 119987 => 'x', + 119988 => 'y', + 119989 => 'z', + 119990 => 'a', + 119991 => 'b', + 119992 => 'c', + 119993 => 'd', + 119995 => 'f', + 119997 => 'h', + 119998 => 'i', + 119999 => 'j', + 120000 => 'k', + 120001 => 'l', + 120002 => 'm', + 120003 => 'n', + 120005 => 'p', + 120006 => 'q', + 120007 => 'r', + 120008 => 's', + 120009 => 't', + 120010 => 'u', + 120011 => 'v', + 120012 => 'w', + 120013 => 'x', + 120014 => 'y', + 120015 => 'z', + 120016 => 'a', + 120017 => 'b', + 120018 => 'c', + 120019 => 'd', + 120020 => 'e', + 120021 => 'f', + 120022 => 'g', + 120023 => 'h', + 120024 => 'i', + 120025 => 'j', + 120026 => 'k', + 120027 => 'l', + 120028 => 'm', + 120029 => 'n', + 120030 => 'o', + 120031 => 'p', + 120032 => 'q', + 120033 => 'r', + 120034 => 's', + 120035 => 't', + 120036 => 'u', + 120037 => 'v', + 120038 => 'w', + 120039 => 'x', + 120040 => 'y', + 120041 => 'z', + 120042 => 'a', + 120043 => 'b', + 120044 => 'c', + 120045 => 'd', + 120046 => 'e', + 120047 => 'f', + 120048 => 'g', + 120049 => 'h', + 120050 => 'i', + 120051 => 'j', + 120052 => 'k', + 120053 => 'l', + 120054 => 'm', + 120055 => 'n', + 120056 => 'o', + 120057 => 'p', + 120058 => 'q', + 120059 => 'r', + 120060 => 's', + 120061 => 't', + 120062 => 'u', + 120063 => 'v', + 120064 => 'w', + 120065 => 'x', + 120066 => 'y', + 120067 => 'z', + 120068 => 'a', + 120069 => 'b', + 120071 => 'd', + 120072 => 'e', + 120073 => 'f', + 120074 => 'g', + 120077 => 'j', + 120078 => 'k', + 120079 => 'l', + 120080 => 'm', + 120081 => 'n', + 120082 => 'o', + 120083 => 'p', + 120084 => 'q', + 120086 => 's', + 120087 => 't', + 120088 => 'u', + 120089 => 'v', + 120090 => 'w', + 120091 => 'x', + 120092 => 'y', + 120094 => 'a', + 120095 => 'b', + 120096 => 'c', + 120097 => 'd', + 120098 => 'e', + 120099 => 'f', + 120100 => 'g', + 120101 => 'h', + 120102 => 'i', + 120103 => 'j', + 120104 => 'k', + 120105 => 'l', + 120106 => 'm', + 120107 => 'n', + 120108 => 'o', + 120109 => 'p', + 120110 => 'q', + 120111 => 'r', + 120112 => 's', + 120113 => 't', + 120114 => 'u', + 120115 => 'v', + 120116 => 'w', + 120117 => 'x', + 120118 => 'y', + 120119 => 'z', + 120120 => 'a', + 120121 => 'b', + 120123 => 'd', + 120124 => 'e', + 120125 => 'f', + 120126 => 'g', + 120128 => 'i', + 120129 => 'j', + 120130 => 'k', + 120131 => 'l', + 120132 => 'm', + 120134 => 'o', + 120138 => 's', + 120139 => 't', + 120140 => 'u', + 120141 => 'v', + 120142 => 'w', + 120143 => 'x', + 120144 => 'y', + 120146 => 'a', + 120147 => 'b', + 120148 => 'c', + 120149 => 'd', + 120150 => 'e', + 120151 => 'f', + 120152 => 'g', + 120153 => 'h', + 120154 => 'i', + 120155 => 'j', + 120156 => 'k', + 120157 => 'l', + 120158 => 'm', + 120159 => 'n', + 120160 => 'o', + 120161 => 'p', + 120162 => 'q', + 120163 => 'r', + 120164 => 's', + 120165 => 't', + 120166 => 'u', + 120167 => 'v', + 120168 => 'w', + 120169 => 'x', + 120170 => 'y', + 120171 => 'z', + 120172 => 'a', + 120173 => 'b', + 120174 => 'c', + 120175 => 'd', + 120176 => 'e', + 120177 => 'f', + 120178 => 'g', + 120179 => 'h', + 120180 => 'i', + 120181 => 'j', + 120182 => 'k', + 120183 => 'l', + 120184 => 'm', + 120185 => 'n', + 120186 => 'o', + 120187 => 'p', + 120188 => 'q', + 120189 => 'r', + 120190 => 's', + 120191 => 't', + 120192 => 'u', + 120193 => 'v', + 120194 => 'w', + 120195 => 'x', + 120196 => 'y', + 120197 => 'z', + 120198 => 'a', + 120199 => 'b', + 120200 => 'c', + 120201 => 'd', + 120202 => 'e', + 120203 => 'f', + 120204 => 'g', + 120205 => 'h', + 120206 => 'i', + 120207 => 'j', + 120208 => 'k', + 120209 => 'l', + 120210 => 'm', + 120211 => 'n', + 120212 => 'o', + 120213 => 'p', + 120214 => 'q', + 120215 => 'r', + 120216 => 's', + 120217 => 't', + 120218 => 'u', + 120219 => 'v', + 120220 => 'w', + 120221 => 'x', + 120222 => 'y', + 120223 => 'z', + 120224 => 'a', + 120225 => 'b', + 120226 => 'c', + 120227 => 'd', + 120228 => 'e', + 120229 => 'f', + 120230 => 'g', + 120231 => 'h', + 120232 => 'i', + 120233 => 'j', + 120234 => 'k', + 120235 => 'l', + 120236 => 'm', + 120237 => 'n', + 120238 => 'o', + 120239 => 'p', + 120240 => 'q', + 120241 => 'r', + 120242 => 's', + 120243 => 't', + 120244 => 'u', + 120245 => 'v', + 120246 => 'w', + 120247 => 'x', + 120248 => 'y', + 120249 => 'z', + 120250 => 'a', + 120251 => 'b', + 120252 => 'c', + 120253 => 'd', + 120254 => 'e', + 120255 => 'f', + 120256 => 'g', + 120257 => 'h', + 120258 => 'i', + 120259 => 'j', + 120260 => 'k', + 120261 => 'l', + 120262 => 'm', + 120263 => 'n', + 120264 => 'o', + 120265 => 'p', + 120266 => 'q', + 120267 => 'r', + 120268 => 's', + 120269 => 't', + 120270 => 'u', + 120271 => 'v', + 120272 => 'w', + 120273 => 'x', + 120274 => 'y', + 120275 => 'z', + 120276 => 'a', + 120277 => 'b', + 120278 => 'c', + 120279 => 'd', + 120280 => 'e', + 120281 => 'f', + 120282 => 'g', + 120283 => 'h', + 120284 => 'i', + 120285 => 'j', + 120286 => 'k', + 120287 => 'l', + 120288 => 'm', + 120289 => 'n', + 120290 => 'o', + 120291 => 'p', + 120292 => 'q', + 120293 => 'r', + 120294 => 's', + 120295 => 't', + 120296 => 'u', + 120297 => 'v', + 120298 => 'w', + 120299 => 'x', + 120300 => 'y', + 120301 => 'z', + 120302 => 'a', + 120303 => 'b', + 120304 => 'c', + 120305 => 'd', + 120306 => 'e', + 120307 => 'f', + 120308 => 'g', + 120309 => 'h', + 120310 => 'i', + 120311 => 'j', + 120312 => 'k', + 120313 => 'l', + 120314 => 'm', + 120315 => 'n', + 120316 => 'o', + 120317 => 'p', + 120318 => 'q', + 120319 => 'r', + 120320 => 's', + 120321 => 't', + 120322 => 'u', + 120323 => 'v', + 120324 => 'w', + 120325 => 'x', + 120326 => 'y', + 120327 => 'z', + 120328 => 'a', + 120329 => 'b', + 120330 => 'c', + 120331 => 'd', + 120332 => 'e', + 120333 => 'f', + 120334 => 'g', + 120335 => 'h', + 120336 => 'i', + 120337 => 'j', + 120338 => 'k', + 120339 => 'l', + 120340 => 'm', + 120341 => 'n', + 120342 => 'o', + 120343 => 'p', + 120344 => 'q', + 120345 => 'r', + 120346 => 's', + 120347 => 't', + 120348 => 'u', + 120349 => 'v', + 120350 => 'w', + 120351 => 'x', + 120352 => 'y', + 120353 => 'z', + 120354 => 'a', + 120355 => 'b', + 120356 => 'c', + 120357 => 'd', + 120358 => 'e', + 120359 => 'f', + 120360 => 'g', + 120361 => 'h', + 120362 => 'i', + 120363 => 'j', + 120364 => 'k', + 120365 => 'l', + 120366 => 'm', + 120367 => 'n', + 120368 => 'o', + 120369 => 'p', + 120370 => 'q', + 120371 => 'r', + 120372 => 's', + 120373 => 't', + 120374 => 'u', + 120375 => 'v', + 120376 => 'w', + 120377 => 'x', + 120378 => 'y', + 120379 => 'z', + 120380 => 'a', + 120381 => 'b', + 120382 => 'c', + 120383 => 'd', + 120384 => 'e', + 120385 => 'f', + 120386 => 'g', + 120387 => 'h', + 120388 => 'i', + 120389 => 'j', + 120390 => 'k', + 120391 => 'l', + 120392 => 'm', + 120393 => 'n', + 120394 => 'o', + 120395 => 'p', + 120396 => 'q', + 120397 => 'r', + 120398 => 's', + 120399 => 't', + 120400 => 'u', + 120401 => 'v', + 120402 => 'w', + 120403 => 'x', + 120404 => 'y', + 120405 => 'z', + 120406 => 'a', + 120407 => 'b', + 120408 => 'c', + 120409 => 'd', + 120410 => 'e', + 120411 => 'f', + 120412 => 'g', + 120413 => 'h', + 120414 => 'i', + 120415 => 'j', + 120416 => 'k', + 120417 => 'l', + 120418 => 'm', + 120419 => 'n', + 120420 => 'o', + 120421 => 'p', + 120422 => 'q', + 120423 => 'r', + 120424 => 's', + 120425 => 't', + 120426 => 'u', + 120427 => 'v', + 120428 => 'w', + 120429 => 'x', + 120430 => 'y', + 120431 => 'z', + 120432 => 'a', + 120433 => 'b', + 120434 => 'c', + 120435 => 'd', + 120436 => 'e', + 120437 => 'f', + 120438 => 'g', + 120439 => 'h', + 120440 => 'i', + 120441 => 'j', + 120442 => 'k', + 120443 => 'l', + 120444 => 'm', + 120445 => 'n', + 120446 => 'o', + 120447 => 'p', + 120448 => 'q', + 120449 => 'r', + 120450 => 's', + 120451 => 't', + 120452 => 'u', + 120453 => 'v', + 120454 => 'w', + 120455 => 'x', + 120456 => 'y', + 120457 => 'z', + 120458 => 'a', + 120459 => 'b', + 120460 => 'c', + 120461 => 'd', + 120462 => 'e', + 120463 => 'f', + 120464 => 'g', + 120465 => 'h', + 120466 => 'i', + 120467 => 'j', + 120468 => 'k', + 120469 => 'l', + 120470 => 'm', + 120471 => 'n', + 120472 => 'o', + 120473 => 'p', + 120474 => 'q', + 120475 => 'r', + 120476 => 's', + 120477 => 't', + 120478 => 'u', + 120479 => 'v', + 120480 => 'w', + 120481 => 'x', + 120482 => 'y', + 120483 => 'z', + 120484 => 'ฤฑ', + 120485 => 'ศท', + 120488 => 'ฮฑ', + 120489 => 'ฮฒ', + 120490 => 'ฮณ', + 120491 => 'ฮด', + 120492 => 'ฮต', + 120493 => 'ฮถ', + 120494 => 'ฮท', + 120495 => 'ฮธ', + 120496 => 'ฮน', + 120497 => 'ฮบ', + 120498 => 'ฮป', + 120499 => 'ฮผ', + 120500 => 'ฮฝ', + 120501 => 'ฮพ', + 120502 => 'ฮฟ', + 120503 => 'ฯ€', + 120504 => 'ฯ', + 120505 => 'ฮธ', + 120506 => 'ฯƒ', + 120507 => 'ฯ„', + 120508 => 'ฯ…', + 120509 => 'ฯ†', + 120510 => 'ฯ‡', + 120511 => 'ฯˆ', + 120512 => 'ฯ‰', + 120513 => 'โˆ‡', + 120514 => 'ฮฑ', + 120515 => 'ฮฒ', + 120516 => 'ฮณ', + 120517 => 'ฮด', + 120518 => 'ฮต', + 120519 => 'ฮถ', + 120520 => 'ฮท', + 120521 => 'ฮธ', + 120522 => 'ฮน', + 120523 => 'ฮบ', + 120524 => 'ฮป', + 120525 => 'ฮผ', + 120526 => 'ฮฝ', + 120527 => 'ฮพ', + 120528 => 'ฮฟ', + 120529 => 'ฯ€', + 120530 => 'ฯ', + 120531 => 'ฯƒ', + 120532 => 'ฯƒ', + 120533 => 'ฯ„', + 120534 => 'ฯ…', + 120535 => 'ฯ†', + 120536 => 'ฯ‡', + 120537 => 'ฯˆ', + 120538 => 'ฯ‰', + 120539 => 'โˆ‚', + 120540 => 'ฮต', + 120541 => 'ฮธ', + 120542 => 'ฮบ', + 120543 => 'ฯ†', + 120544 => 'ฯ', + 120545 => 'ฯ€', + 120546 => 'ฮฑ', + 120547 => 'ฮฒ', + 120548 => 'ฮณ', + 120549 => 'ฮด', + 120550 => 'ฮต', + 120551 => 'ฮถ', + 120552 => 'ฮท', + 120553 => 'ฮธ', + 120554 => 'ฮน', + 120555 => 'ฮบ', + 120556 => 'ฮป', + 120557 => 'ฮผ', + 120558 => 'ฮฝ', + 120559 => 'ฮพ', + 120560 => 'ฮฟ', + 120561 => 'ฯ€', + 120562 => 'ฯ', + 120563 => 'ฮธ', + 120564 => 'ฯƒ', + 120565 => 'ฯ„', + 120566 => 'ฯ…', + 120567 => 'ฯ†', + 120568 => 'ฯ‡', + 120569 => 'ฯˆ', + 120570 => 'ฯ‰', + 120571 => 'โˆ‡', + 120572 => 'ฮฑ', + 120573 => 'ฮฒ', + 120574 => 'ฮณ', + 120575 => 'ฮด', + 120576 => 'ฮต', + 120577 => 'ฮถ', + 120578 => 'ฮท', + 120579 => 'ฮธ', + 120580 => 'ฮน', + 120581 => 'ฮบ', + 120582 => 'ฮป', + 120583 => 'ฮผ', + 120584 => 'ฮฝ', + 120585 => 'ฮพ', + 120586 => 'ฮฟ', + 120587 => 'ฯ€', + 120588 => 'ฯ', + 120589 => 'ฯƒ', + 120590 => 'ฯƒ', + 120591 => 'ฯ„', + 120592 => 'ฯ…', + 120593 => 'ฯ†', + 120594 => 'ฯ‡', + 120595 => 'ฯˆ', + 120596 => 'ฯ‰', + 120597 => 'โˆ‚', + 120598 => 'ฮต', + 120599 => 'ฮธ', + 120600 => 'ฮบ', + 120601 => 'ฯ†', + 120602 => 'ฯ', + 120603 => 'ฯ€', + 120604 => 'ฮฑ', + 120605 => 'ฮฒ', + 120606 => 'ฮณ', + 120607 => 'ฮด', + 120608 => 'ฮต', + 120609 => 'ฮถ', + 120610 => 'ฮท', + 120611 => 'ฮธ', + 120612 => 'ฮน', + 120613 => 'ฮบ', + 120614 => 'ฮป', + 120615 => 'ฮผ', + 120616 => 'ฮฝ', + 120617 => 'ฮพ', + 120618 => 'ฮฟ', + 120619 => 'ฯ€', + 120620 => 'ฯ', + 120621 => 'ฮธ', + 120622 => 'ฯƒ', + 120623 => 'ฯ„', + 120624 => 'ฯ…', + 120625 => 'ฯ†', + 120626 => 'ฯ‡', + 120627 => 'ฯˆ', + 120628 => 'ฯ‰', + 120629 => 'โˆ‡', + 120630 => 'ฮฑ', + 120631 => 'ฮฒ', + 120632 => 'ฮณ', + 120633 => 'ฮด', + 120634 => 'ฮต', + 120635 => 'ฮถ', + 120636 => 'ฮท', + 120637 => 'ฮธ', + 120638 => 'ฮน', + 120639 => 'ฮบ', + 120640 => 'ฮป', + 120641 => 'ฮผ', + 120642 => 'ฮฝ', + 120643 => 'ฮพ', + 120644 => 'ฮฟ', + 120645 => 'ฯ€', + 120646 => 'ฯ', + 120647 => 'ฯƒ', + 120648 => 'ฯƒ', + 120649 => 'ฯ„', + 120650 => 'ฯ…', + 120651 => 'ฯ†', + 120652 => 'ฯ‡', + 120653 => 'ฯˆ', + 120654 => 'ฯ‰', + 120655 => 'โˆ‚', + 120656 => 'ฮต', + 120657 => 'ฮธ', + 120658 => 'ฮบ', + 120659 => 'ฯ†', + 120660 => 'ฯ', + 120661 => 'ฯ€', + 120662 => 'ฮฑ', + 120663 => 'ฮฒ', + 120664 => 'ฮณ', + 120665 => 'ฮด', + 120666 => 'ฮต', + 120667 => 'ฮถ', + 120668 => 'ฮท', + 120669 => 'ฮธ', + 120670 => 'ฮน', + 120671 => 'ฮบ', + 120672 => 'ฮป', + 120673 => 'ฮผ', + 120674 => 'ฮฝ', + 120675 => 'ฮพ', + 120676 => 'ฮฟ', + 120677 => 'ฯ€', + 120678 => 'ฯ', + 120679 => 'ฮธ', + 120680 => 'ฯƒ', + 120681 => 'ฯ„', + 120682 => 'ฯ…', + 120683 => 'ฯ†', + 120684 => 'ฯ‡', + 120685 => 'ฯˆ', + 120686 => 'ฯ‰', + 120687 => 'โˆ‡', + 120688 => 'ฮฑ', + 120689 => 'ฮฒ', + 120690 => 'ฮณ', + 120691 => 'ฮด', + 120692 => 'ฮต', + 120693 => 'ฮถ', + 120694 => 'ฮท', + 120695 => 'ฮธ', + 120696 => 'ฮน', + 120697 => 'ฮบ', + 120698 => 'ฮป', + 120699 => 'ฮผ', + 120700 => 'ฮฝ', + 120701 => 'ฮพ', + 120702 => 'ฮฟ', + 120703 => 'ฯ€', + 120704 => 'ฯ', + 120705 => 'ฯƒ', + 120706 => 'ฯƒ', + 120707 => 'ฯ„', + 120708 => 'ฯ…', + 120709 => 'ฯ†', + 120710 => 'ฯ‡', + 120711 => 'ฯˆ', + 120712 => 'ฯ‰', + 120713 => 'โˆ‚', + 120714 => 'ฮต', + 120715 => 'ฮธ', + 120716 => 'ฮบ', + 120717 => 'ฯ†', + 120718 => 'ฯ', + 120719 => 'ฯ€', + 120720 => 'ฮฑ', + 120721 => 'ฮฒ', + 120722 => 'ฮณ', + 120723 => 'ฮด', + 120724 => 'ฮต', + 120725 => 'ฮถ', + 120726 => 'ฮท', + 120727 => 'ฮธ', + 120728 => 'ฮน', + 120729 => 'ฮบ', + 120730 => 'ฮป', + 120731 => 'ฮผ', + 120732 => 'ฮฝ', + 120733 => 'ฮพ', + 120734 => 'ฮฟ', + 120735 => 'ฯ€', + 120736 => 'ฯ', + 120737 => 'ฮธ', + 120738 => 'ฯƒ', + 120739 => 'ฯ„', + 120740 => 'ฯ…', + 120741 => 'ฯ†', + 120742 => 'ฯ‡', + 120743 => 'ฯˆ', + 120744 => 'ฯ‰', + 120745 => 'โˆ‡', + 120746 => 'ฮฑ', + 120747 => 'ฮฒ', + 120748 => 'ฮณ', + 120749 => 'ฮด', + 120750 => 'ฮต', + 120751 => 'ฮถ', + 120752 => 'ฮท', + 120753 => 'ฮธ', + 120754 => 'ฮน', + 120755 => 'ฮบ', + 120756 => 'ฮป', + 120757 => 'ฮผ', + 120758 => 'ฮฝ', + 120759 => 'ฮพ', + 120760 => 'ฮฟ', + 120761 => 'ฯ€', + 120762 => 'ฯ', + 120763 => 'ฯƒ', + 120764 => 'ฯƒ', + 120765 => 'ฯ„', + 120766 => 'ฯ…', + 120767 => 'ฯ†', + 120768 => 'ฯ‡', + 120769 => 'ฯˆ', + 120770 => 'ฯ‰', + 120771 => 'โˆ‚', + 120772 => 'ฮต', + 120773 => 'ฮธ', + 120774 => 'ฮบ', + 120775 => 'ฯ†', + 120776 => 'ฯ', + 120777 => 'ฯ€', + 120778 => 'ฯ', + 120779 => 'ฯ', + 120782 => '0', + 120783 => '1', + 120784 => '2', + 120785 => '3', + 120786 => '4', + 120787 => '5', + 120788 => '6', + 120789 => '7', + 120790 => '8', + 120791 => '9', + 120792 => '0', + 120793 => '1', + 120794 => '2', + 120795 => '3', + 120796 => '4', + 120797 => '5', + 120798 => '6', + 120799 => '7', + 120800 => '8', + 120801 => '9', + 120802 => '0', + 120803 => '1', + 120804 => '2', + 120805 => '3', + 120806 => '4', + 120807 => '5', + 120808 => '6', + 120809 => '7', + 120810 => '8', + 120811 => '9', + 120812 => '0', + 120813 => '1', + 120814 => '2', + 120815 => '3', + 120816 => '4', + 120817 => '5', + 120818 => '6', + 120819 => '7', + 120820 => '8', + 120821 => '9', + 120822 => '0', + 120823 => '1', + 120824 => '2', + 120825 => '3', + 120826 => '4', + 120827 => '5', + 120828 => '6', + 120829 => '7', + 120830 => '8', + 120831 => '9', + 125184 => '๐žคข', + 125185 => '๐žคฃ', + 125186 => '๐žคค', + 125187 => '๐žคฅ', + 125188 => '๐žคฆ', + 125189 => '๐žคง', + 125190 => '๐žคจ', + 125191 => '๐žคฉ', + 125192 => '๐žคช', + 125193 => '๐žคซ', + 125194 => '๐žคฌ', + 125195 => '๐žคญ', + 125196 => '๐žคฎ', + 125197 => '๐žคฏ', + 125198 => '๐žคฐ', + 125199 => '๐žคฑ', + 125200 => '๐žคฒ', + 125201 => '๐žคณ', + 125202 => '๐žคด', + 125203 => '๐žคต', + 125204 => '๐žคถ', + 125205 => '๐žคท', + 125206 => '๐žคธ', + 125207 => '๐žคน', + 125208 => '๐žคบ', + 125209 => '๐žคป', + 125210 => '๐žคผ', + 125211 => '๐žคฝ', + 125212 => '๐žคพ', + 125213 => '๐žคฟ', + 125214 => '๐žฅ€', + 125215 => '๐žฅ', + 125216 => '๐žฅ‚', + 125217 => '๐žฅƒ', + 126464 => 'ุง', + 126465 => 'ุจ', + 126466 => 'ุฌ', + 126467 => 'ุฏ', + 126469 => 'ูˆ', + 126470 => 'ุฒ', + 126471 => 'ุญ', + 126472 => 'ุท', + 126473 => 'ูŠ', + 126474 => 'ูƒ', + 126475 => 'ู„', + 126476 => 'ู…', + 126477 => 'ู†', + 126478 => 'ุณ', + 126479 => 'ุน', + 126480 => 'ู', + 126481 => 'ุต', + 126482 => 'ู‚', + 126483 => 'ุฑ', + 126484 => 'ุด', + 126485 => 'ุช', + 126486 => 'ุซ', + 126487 => 'ุฎ', + 126488 => 'ุฐ', + 126489 => 'ุถ', + 126490 => 'ุธ', + 126491 => 'ุบ', + 126492 => 'ูฎ', + 126493 => 'ฺบ', + 126494 => 'ฺก', + 126495 => 'ูฏ', + 126497 => 'ุจ', + 126498 => 'ุฌ', + 126500 => 'ู‡', + 126503 => 'ุญ', + 126505 => 'ูŠ', + 126506 => 'ูƒ', + 126507 => 'ู„', + 126508 => 'ู…', + 126509 => 'ู†', + 126510 => 'ุณ', + 126511 => 'ุน', + 126512 => 'ู', + 126513 => 'ุต', + 126514 => 'ู‚', + 126516 => 'ุด', + 126517 => 'ุช', + 126518 => 'ุซ', + 126519 => 'ุฎ', + 126521 => 'ุถ', + 126523 => 'ุบ', + 126530 => 'ุฌ', + 126535 => 'ุญ', + 126537 => 'ูŠ', + 126539 => 'ู„', + 126541 => 'ู†', + 126542 => 'ุณ', + 126543 => 'ุน', + 126545 => 'ุต', + 126546 => 'ู‚', + 126548 => 'ุด', + 126551 => 'ุฎ', + 126553 => 'ุถ', + 126555 => 'ุบ', + 126557 => 'ฺบ', + 126559 => 'ูฏ', + 126561 => 'ุจ', + 126562 => 'ุฌ', + 126564 => 'ู‡', + 126567 => 'ุญ', + 126568 => 'ุท', + 126569 => 'ูŠ', + 126570 => 'ูƒ', + 126572 => 'ู…', + 126573 => 'ู†', + 126574 => 'ุณ', + 126575 => 'ุน', + 126576 => 'ู', + 126577 => 'ุต', + 126578 => 'ู‚', + 126580 => 'ุด', + 126581 => 'ุช', + 126582 => 'ุซ', + 126583 => 'ุฎ', + 126585 => 'ุถ', + 126586 => 'ุธ', + 126587 => 'ุบ', + 126588 => 'ูฎ', + 126590 => 'ฺก', + 126592 => 'ุง', + 126593 => 'ุจ', + 126594 => 'ุฌ', + 126595 => 'ุฏ', + 126596 => 'ู‡', + 126597 => 'ูˆ', + 126598 => 'ุฒ', + 126599 => 'ุญ', + 126600 => 'ุท', + 126601 => 'ูŠ', + 126603 => 'ู„', + 126604 => 'ู…', + 126605 => 'ู†', + 126606 => 'ุณ', + 126607 => 'ุน', + 126608 => 'ู', + 126609 => 'ุต', + 126610 => 'ู‚', + 126611 => 'ุฑ', + 126612 => 'ุด', + 126613 => 'ุช', + 126614 => 'ุซ', + 126615 => 'ุฎ', + 126616 => 'ุฐ', + 126617 => 'ุถ', + 126618 => 'ุธ', + 126619 => 'ุบ', + 126625 => 'ุจ', + 126626 => 'ุฌ', + 126627 => 'ุฏ', + 126629 => 'ูˆ', + 126630 => 'ุฒ', + 126631 => 'ุญ', + 126632 => 'ุท', + 126633 => 'ูŠ', + 126635 => 'ู„', + 126636 => 'ู…', + 126637 => 'ู†', + 126638 => 'ุณ', + 126639 => 'ุน', + 126640 => 'ู', + 126641 => 'ุต', + 126642 => 'ู‚', + 126643 => 'ุฑ', + 126644 => 'ุด', + 126645 => 'ุช', + 126646 => 'ุซ', + 126647 => 'ุฎ', + 126648 => 'ุฐ', + 126649 => 'ุถ', + 126650 => 'ุธ', + 126651 => 'ุบ', + 127274 => 'ใ€”sใ€•', + 127275 => 'c', + 127276 => 'r', + 127277 => 'cd', + 127278 => 'wz', + 127280 => 'a', + 127281 => 'b', + 127282 => 'c', + 127283 => 'd', + 127284 => 'e', + 127285 => 'f', + 127286 => 'g', + 127287 => 'h', + 127288 => 'i', + 127289 => 'j', + 127290 => 'k', + 127291 => 'l', + 127292 => 'm', + 127293 => 'n', + 127294 => 'o', + 127295 => 'p', + 127296 => 'q', + 127297 => 'r', + 127298 => 's', + 127299 => 't', + 127300 => 'u', + 127301 => 'v', + 127302 => 'w', + 127303 => 'x', + 127304 => 'y', + 127305 => 'z', + 127306 => 'hv', + 127307 => 'mv', + 127308 => 'sd', + 127309 => 'ss', + 127310 => 'ppv', + 127311 => 'wc', + 127338 => 'mc', + 127339 => 'md', + 127340 => 'mr', + 127376 => 'dj', + 127488 => 'ใปใ‹', + 127489 => 'ใ‚ณใ‚ณ', + 127490 => 'ใ‚ต', + 127504 => 'ๆ‰‹', + 127505 => 'ๅญ—', + 127506 => 'ๅŒ', + 127507 => 'ใƒ‡', + 127508 => 'ไบŒ', + 127509 => 'ๅคš', + 127510 => '่งฃ', + 127511 => 'ๅคฉ', + 127512 => 'ไบค', + 127513 => 'ๆ˜ ', + 127514 => '็„ก', + 127515 => 'ๆ–™', + 127516 => 'ๅ‰', + 127517 => 'ๅพŒ', + 127518 => 'ๅ†', + 127519 => 'ๆ–ฐ', + 127520 => 'ๅˆ', + 127521 => '็ต‚', + 127522 => '็”Ÿ', + 127523 => '่ฒฉ', + 127524 => 'ๅฃฐ', + 127525 => 'ๅน', + 127526 => 'ๆผ”', + 127527 => 'ๆŠ•', + 127528 => 'ๆ•', + 127529 => 'ไธ€', + 127530 => 'ไธ‰', + 127531 => '้Š', + 127532 => 'ๅทฆ', + 127533 => 'ไธญ', + 127534 => 'ๅณ', + 127535 => 'ๆŒ‡', + 127536 => '่ตฐ', + 127537 => 'ๆ‰“', + 127538 => '็ฆ', + 127539 => '็ฉบ', + 127540 => 'ๅˆ', + 127541 => 'ๆบ€', + 127542 => 'ๆœ‰', + 127543 => 'ๆœˆ', + 127544 => '็”ณ', + 127545 => 'ๅ‰ฒ', + 127546 => 'ๅ–ถ', + 127547 => '้…', + 127552 => 'ใ€”ๆœฌใ€•', + 127553 => 'ใ€”ไธ‰ใ€•', + 127554 => 'ใ€”ไบŒใ€•', + 127555 => 'ใ€”ๅฎ‰ใ€•', + 127556 => 'ใ€”็‚นใ€•', + 127557 => 'ใ€”ๆ‰“ใ€•', + 127558 => 'ใ€”็›—ใ€•', + 127559 => 'ใ€”ๅ‹ใ€•', + 127560 => 'ใ€”ๆ•—ใ€•', + 127568 => 'ๅพ—', + 127569 => 'ๅฏ', + 130032 => '0', + 130033 => '1', + 130034 => '2', + 130035 => '3', + 130036 => '4', + 130037 => '5', + 130038 => '6', + 130039 => '7', + 130040 => '8', + 130041 => '9', + 194560 => 'ไธฝ', + 194561 => 'ไธธ', + 194562 => 'ไน', + 194563 => '๐ „ข', + 194564 => 'ไฝ ', + 194565 => 'ไพฎ', + 194566 => 'ไพป', + 194567 => 'ๅ€‚', + 194568 => 'ๅบ', + 194569 => 'ๅ‚™', + 194570 => 'ๅƒง', + 194571 => 'ๅƒ', + 194572 => 'ใ’ž', + 194573 => '๐ ˜บ', + 194574 => 'ๅ…', + 194575 => 'ๅ…”', + 194576 => 'ๅ…ค', + 194577 => 'ๅ…ท', + 194578 => '๐ ”œ', + 194579 => 'ใ’น', + 194580 => 'ๅ…ง', + 194581 => 'ๅ†', + 194582 => '๐ •‹', + 194583 => 'ๅ†—', + 194584 => 'ๅ†ค', + 194585 => 'ไปŒ', + 194586 => 'ๅ†ฌ', + 194587 => 'ๅ†ต', + 194588 => '๐ฉ‡Ÿ', + 194589 => 'ๅ‡ต', + 194590 => 'ๅˆƒ', + 194591 => 'ใ“Ÿ', + 194592 => 'ๅˆป', + 194593 => 'ๅ‰†', + 194594 => 'ๅ‰ฒ', + 194595 => 'ๅ‰ท', + 194596 => 'ใ”•', + 194597 => 'ๅ‹‡', + 194598 => 'ๅ‹‰', + 194599 => 'ๅ‹ค', + 194600 => 'ๅ‹บ', + 194601 => 'ๅŒ…', + 194602 => 'ๅŒ†', + 194603 => 'ๅŒ—', + 194604 => 'ๅ‰', + 194605 => 'ๅ‘', + 194606 => 'ๅš', + 194607 => 'ๅณ', + 194608 => 'ๅฝ', + 194609 => 'ๅฟ', + 194610 => 'ๅฟ', + 194611 => 'ๅฟ', + 194612 => '๐ จฌ', + 194613 => '็ฐ', + 194614 => 'ๅŠ', + 194615 => 'ๅŸ', + 194616 => '๐ ญฃ', + 194617 => 'ๅซ', + 194618 => 'ๅฑ', + 194619 => 'ๅ†', + 194620 => 'ๅ’ž', + 194621 => 'ๅธ', + 194622 => 'ๅ‘ˆ', + 194623 => 'ๅ‘จ', + 194624 => 'ๅ’ข', + 194625 => 'ๅ“ถ', + 194626 => 'ๅ”', + 194627 => 'ๅ•“', + 194628 => 'ๅ•ฃ', + 194629 => 'ๅ–„', + 194630 => 'ๅ–„', + 194631 => 'ๅ–™', + 194632 => 'ๅ–ซ', + 194633 => 'ๅ–ณ', + 194634 => 'ๅ—‚', + 194635 => 'ๅœ–', + 194636 => 'ๅ˜†', + 194637 => 'ๅœ—', + 194638 => 'ๅ™‘', + 194639 => 'ๅ™ด', + 194640 => 'ๅˆ‡', + 194641 => 'ๅฃฎ', + 194642 => 'ๅŸŽ', + 194643 => 'ๅŸด', + 194644 => 'ๅ ', + 194645 => 'ๅž‹', + 194646 => 'ๅ ฒ', + 194647 => 'ๅ ฑ', + 194648 => 'ๅขฌ', + 194649 => '๐ก“ค', + 194650 => 'ๅฃฒ', + 194651 => 'ๅฃท', + 194652 => 'ๅค†', + 194653 => 'ๅคš', + 194654 => 'ๅคข', + 194655 => 'ๅฅข', + 194656 => '๐กšจ', + 194657 => '๐ก›ช', + 194658 => 'ๅงฌ', + 194659 => 'ๅจ›', + 194660 => 'ๅจง', + 194661 => 'ๅง˜', + 194662 => 'ๅฉฆ', + 194663 => 'ใ›ฎ', + 194665 => 'ๅฌˆ', + 194666 => 'ๅฌพ', + 194667 => 'ๅฌพ', + 194668 => '๐กงˆ', + 194669 => 'ๅฏƒ', + 194670 => 'ๅฏ˜', + 194671 => 'ๅฏง', + 194672 => 'ๅฏณ', + 194673 => '๐กฌ˜', + 194674 => 'ๅฏฟ', + 194675 => 'ๅฐ†', + 194677 => 'ๅฐข', + 194678 => 'ใž', + 194679 => 'ๅฑ ', + 194680 => 'ๅฑฎ', + 194681 => 'ๅณ€', + 194682 => 'ๅฒ', + 194683 => '๐กทค', + 194684 => 'ๅตƒ', + 194685 => '๐กทฆ', + 194686 => 'ๅตฎ', + 194687 => 'ๅตซ', + 194688 => 'ๅตผ', + 194689 => 'ๅทก', + 194690 => 'ๅทข', + 194691 => 'ใ ฏ', + 194692 => 'ๅทฝ', + 194693 => 'ๅธจ', + 194694 => 'ๅธฝ', + 194695 => 'ๅนฉ', + 194696 => 'ใกข', + 194697 => '๐ข†ƒ', + 194698 => 'ใกผ', + 194699 => 'ๅบฐ', + 194700 => 'ๅบณ', + 194701 => 'ๅบถ', + 194702 => 'ๅปŠ', + 194703 => '๐ชŽ’', + 194704 => 'ๅปพ', + 194705 => '๐ขŒฑ', + 194706 => '๐ขŒฑ', + 194707 => '่ˆ', + 194708 => 'ๅผข', + 194709 => 'ๅผข', + 194710 => 'ใฃ‡', + 194711 => '๐ฃŠธ', + 194712 => '๐ฆ‡š', + 194713 => 'ๅฝข', + 194714 => 'ๅฝซ', + 194715 => 'ใฃฃ', + 194716 => 'ๅพš', + 194717 => 'ๅฟ', + 194718 => 'ๅฟ—', + 194719 => 'ๅฟน', + 194720 => 'ๆ‚', + 194721 => 'ใคบ', + 194722 => 'ใคœ', + 194723 => 'ๆ‚”', + 194724 => '๐ข›”', + 194725 => 'ๆƒ‡', + 194726 => 'ๆ…ˆ', + 194727 => 'ๆ…Œ', + 194728 => 'ๆ…Ž', + 194729 => 'ๆ…Œ', + 194730 => 'ๆ…บ', + 194731 => 'ๆ†Ž', + 194732 => 'ๆ†ฒ', + 194733 => 'ๆ†ค', + 194734 => 'ๆ†ฏ', + 194735 => 'ๆ‡ž', + 194736 => 'ๆ‡ฒ', + 194737 => 'ๆ‡ถ', + 194738 => 'ๆˆ', + 194739 => 'ๆˆ›', + 194740 => 'ๆ‰', + 194741 => 'ๆŠฑ', + 194742 => 'ๆ‹”', + 194743 => 'ๆ', + 194744 => '๐ขฌŒ', + 194745 => 'ๆŒฝ', + 194746 => 'ๆ‹ผ', + 194747 => 'ๆจ', + 194748 => 'ๆŽƒ', + 194749 => 'ๆค', + 194750 => '๐ขฏฑ', + 194751 => 'ๆข', + 194752 => 'ๆ…', + 194753 => 'ๆŽฉ', + 194754 => 'ใจฎ', + 194755 => 'ๆ‘ฉ', + 194756 => 'ๆ‘พ', + 194757 => 'ๆ’', + 194758 => 'ๆ‘ท', + 194759 => 'ใฉฌ', + 194760 => 'ๆ•', + 194761 => 'ๆ•ฌ', + 194762 => '๐ฃ€Š', + 194763 => 'ๆ—ฃ', + 194764 => 'ๆ›ธ', + 194765 => 'ๆ™‰', + 194766 => 'ใฌ™', + 194767 => 'ๆš‘', + 194768 => 'ใฌˆ', + 194769 => 'ใซค', + 194770 => 'ๅ†’', + 194771 => 'ๅ†•', + 194772 => 'ๆœ€', + 194773 => 'ๆšœ', + 194774 => '่‚ญ', + 194775 => 'ไ™', + 194776 => 'ๆœ—', + 194777 => 'ๆœ›', + 194778 => 'ๆœก', + 194779 => 'ๆž', + 194780 => 'ๆ“', + 194781 => '๐ฃƒ', + 194782 => 'ใญ‰', + 194783 => 'ๆŸบ', + 194784 => 'ๆž…', + 194785 => 'ๆก’', + 194786 => 'ๆข…', + 194787 => '๐ฃ‘ญ', + 194788 => 'ๆขŽ', + 194789 => 'ๆ Ÿ', + 194790 => 'ๆค”', + 194791 => 'ใฎ', + 194792 => 'ๆฅ‚', + 194793 => 'ๆฆฃ', + 194794 => 'ๆงช', + 194795 => 'ๆชจ', + 194796 => '๐ฃšฃ', + 194797 => 'ๆซ›', + 194798 => 'ใฐ˜', + 194799 => 'ๆฌก', + 194800 => '๐ฃขง', + 194801 => 'ๆญ”', + 194802 => 'ใฑŽ', + 194803 => 'ๆญฒ', + 194804 => 'ๆฎŸ', + 194805 => 'ๆฎบ', + 194806 => 'ๆฎป', + 194807 => '๐ฃช', + 194808 => '๐กด‹', + 194809 => '๐ฃซบ', + 194810 => 'ๆฑŽ', + 194811 => '๐ฃฒผ', + 194812 => 'ๆฒฟ', + 194813 => 'ๆณ', + 194814 => 'ๆฑง', + 194815 => 'ๆด–', + 194816 => 'ๆดพ', + 194817 => 'ๆตท', + 194818 => 'ๆต', + 194819 => 'ๆตฉ', + 194820 => 'ๆตธ', + 194821 => 'ๆถ…', + 194822 => '๐ฃดž', + 194823 => 'ๆดด', + 194824 => 'ๆธฏ', + 194825 => 'ๆนฎ', + 194826 => 'ใดณ', + 194827 => 'ๆป‹', + 194828 => 'ๆป‡', + 194829 => '๐ฃป‘', + 194830 => 'ๆทน', + 194831 => 'ๆฝฎ', + 194832 => '๐ฃฝž', + 194833 => '๐ฃพŽ', + 194834 => 'ๆฟ†', + 194835 => '็€น', + 194836 => '็€ž', + 194837 => '็€›', + 194838 => 'ใถ–', + 194839 => '็Š', + 194840 => '็ฝ', + 194841 => '็ท', + 194842 => '็‚ญ', + 194843 => '๐ ”ฅ', + 194844 => '็……', + 194845 => '๐ค‰ฃ', + 194846 => '็†œ', + 194848 => '็ˆจ', + 194849 => '็ˆต', + 194850 => '็‰', + 194851 => '๐ค˜ˆ', + 194852 => '็Š€', + 194853 => '็Š•', + 194854 => '๐คœต', + 194855 => '๐ค ”', + 194856 => '็บ', + 194857 => '็Ž‹', + 194858 => 'ใบฌ', + 194859 => '็Žฅ', + 194860 => 'ใบธ', + 194861 => 'ใบธ', + 194862 => '็‘‡', + 194863 => '็‘œ', + 194864 => '็‘ฑ', + 194865 => '็’…', + 194866 => '็“Š', + 194867 => 'ใผ›', + 194868 => '็”ค', + 194869 => '๐คฐถ', + 194870 => '็”พ', + 194871 => '๐คฒ’', + 194872 => '็•ฐ', + 194873 => '๐ข†Ÿ', + 194874 => '็˜', + 194875 => '๐คพก', + 194876 => '๐คพธ', + 194877 => '๐ฅ„', + 194878 => 'ใฟผ', + 194879 => 'ไ€ˆ', + 194880 => '็›ด', + 194881 => '๐ฅƒณ', + 194882 => '๐ฅƒฒ', + 194883 => '๐ฅ„™', + 194884 => '๐ฅ„ณ', + 194885 => '็œž', + 194886 => '็œŸ', + 194887 => '็œŸ', + 194888 => '็Š', + 194889 => 'ไ€น', + 194890 => '็ž‹', + 194891 => 'ไ†', + 194892 => 'ไ‚–', + 194893 => '๐ฅ', + 194894 => '็กŽ', + 194895 => '็ขŒ', + 194896 => '็ฃŒ', + 194897 => 'ไƒฃ', + 194898 => '๐ฅ˜ฆ', + 194899 => '็ฅ–', + 194900 => '๐ฅšš', + 194901 => '๐ฅ›…', + 194902 => '็ฆ', + 194903 => '็งซ', + 194904 => 'ไ„ฏ', + 194905 => '็ฉ€', + 194906 => '็ฉŠ', + 194907 => '็ฉ', + 194908 => '๐ฅฅผ', + 194909 => '๐ฅชง', + 194910 => '๐ฅชง', + 194912 => 'ไˆ‚', + 194913 => '๐ฅฎซ', + 194914 => '็ฏ†', + 194915 => '็ฏ‰', + 194916 => 'ไˆง', + 194917 => '๐ฅฒ€', + 194918 => '็ณ’', + 194919 => 'ไŠ ', + 194920 => '็ณจ', + 194921 => '็ณฃ', + 194922 => '็ด€', + 194923 => '๐ฅพ†', + 194924 => '็ตฃ', + 194925 => 'ไŒ', + 194926 => '็ท‡', + 194927 => '็ธ‚', + 194928 => '็น…', + 194929 => 'ไŒด', + 194930 => '๐ฆˆจ', + 194931 => '๐ฆ‰‡', + 194932 => 'ไ™', + 194933 => '๐ฆ‹™', + 194934 => '็ฝบ', + 194935 => '๐ฆŒพ', + 194936 => '็พ•', + 194937 => '็ฟบ', + 194938 => '่€…', + 194939 => '๐ฆ“š', + 194940 => '๐ฆ”ฃ', + 194941 => '่ ', + 194942 => '๐ฆ–จ', + 194943 => '่ฐ', + 194944 => '๐ฃŸ', + 194945 => 'ไ•', + 194946 => '่‚ฒ', + 194947 => '่„ƒ', + 194948 => 'ไ‹', + 194949 => '่„พ', + 194950 => 'ๅชต', + 194951 => '๐ฆžง', + 194952 => '๐ฆžต', + 194953 => '๐ฃŽ“', + 194954 => '๐ฃŽœ', + 194955 => '่ˆ', + 194956 => '่ˆ„', + 194957 => '่พž', + 194958 => 'ไ‘ซ', + 194959 => '่Š‘', + 194960 => '่Š‹', + 194961 => '่Š', + 194962 => 'ๅŠณ', + 194963 => '่Šฑ', + 194964 => '่Šณ', + 194965 => '่Šฝ', + 194966 => '่‹ฆ', + 194967 => '๐ฆฌผ', + 194968 => '่‹ฅ', + 194969 => '่Œ', + 194970 => '่ฃ', + 194971 => '่Žญ', + 194972 => '่Œฃ', + 194973 => '่Žฝ', + 194974 => '่ง', + 194975 => '่‘—', + 194976 => '่“', + 194977 => '่Š', + 194978 => '่Œ', + 194979 => '่œ', + 194980 => '๐ฆฐถ', + 194981 => '๐ฆตซ', + 194982 => '๐ฆณ•', + 194983 => 'ไ”ซ', + 194984 => '่“ฑ', + 194985 => '่“ณ', + 194986 => '่”–', + 194987 => '๐งŠ', + 194988 => '่•ค', + 194989 => '๐ฆผฌ', + 194990 => 'ไ•', + 194991 => 'ไ•ก', + 194992 => '๐ฆพฑ', + 194993 => '๐งƒ’', + 194994 => 'ไ•ซ', + 194995 => '่™', + 194996 => '่™œ', + 194997 => '่™ง', + 194998 => '่™ฉ', + 194999 => '่šฉ', + 195000 => '่šˆ', + 195001 => '่œŽ', + 195002 => '่›ข', + 195003 => '่น', + 195004 => '่œจ', + 195005 => '่ซ', + 195006 => '่ž†', + 195008 => '่Ÿก', + 195009 => '่ ', + 195010 => 'ไ—น', + 195011 => '่ก ', + 195012 => '่กฃ', + 195013 => '๐ง™ง', + 195014 => '่ฃ—', + 195015 => '่ฃž', + 195016 => 'ไ˜ต', + 195017 => '่ฃบ', + 195018 => 'ใ’ป', + 195019 => '๐งขฎ', + 195020 => '๐งฅฆ', + 195021 => 'ไšพ', + 195022 => 'ไ›‡', + 195023 => '่ช ', + 195024 => '่ซญ', + 195025 => '่ฎŠ', + 195026 => '่ฑ•', + 195027 => '๐งฒจ', + 195028 => '่ฒซ', + 195029 => '่ณ', + 195030 => '่ด›', + 195031 => '่ตท', + 195032 => '๐งผฏ', + 195033 => '๐  „', + 195034 => '่ท‹', + 195035 => '่ถผ', + 195036 => '่ทฐ', + 195037 => '๐ ฃž', + 195038 => '่ป”', + 195039 => '่ผธ', + 195040 => '๐จ—’', + 195041 => '๐จ—ญ', + 195042 => '้‚”', + 195043 => '้ƒฑ', + 195044 => '้„‘', + 195045 => '๐จœฎ', + 195046 => '้„›', + 195047 => '้ˆธ', + 195048 => '้‹—', + 195049 => '้‹˜', + 195050 => '้‰ผ', + 195051 => '้น', + 195052 => '้•', + 195053 => '๐จฏบ', + 195054 => '้–‹', + 195055 => 'ไฆ•', + 195056 => '้–ท', + 195057 => '๐จตท', + 195058 => 'ไงฆ', + 195059 => '้›ƒ', + 195060 => 'ๅถฒ', + 195061 => '้œฃ', + 195062 => '๐ฉ……', + 195063 => '๐ฉˆš', + 195064 => 'ไฉฎ', + 195065 => 'ไฉถ', + 195066 => '้Ÿ ', + 195067 => '๐ฉŠ', + 195068 => 'ไชฒ', + 195069 => '๐ฉ’–', + 195070 => '้ ‹', + 195071 => '้ ‹', + 195072 => '้ ฉ', + 195073 => '๐ฉ–ถ', + 195074 => '้ฃข', + 195075 => 'ไฌณ', + 195076 => '้คฉ', + 195077 => '้ฆง', + 195078 => '้ง‚', + 195079 => '้งพ', + 195080 => 'ไฏŽ', + 195081 => '๐ฉฌฐ', + 195082 => '้ฌ’', + 195083 => '้ฑ€', + 195084 => '้ณฝ', + 195085 => 'ไณŽ', + 195086 => 'ไณญ', + 195087 => '้ตง', + 195088 => '๐ชƒŽ', + 195089 => 'ไณธ', + 195090 => '๐ช„…', + 195091 => '๐ชˆŽ', + 195092 => '๐ชŠ‘', + 195093 => '้บป', + 195094 => 'ไต–', + 195095 => '้ปน', + 195096 => '้ปพ', + 195097 => '้ผ…', + 195098 => '้ผ', + 195099 => '้ผ–', + 195100 => '้ผป', + 195101 => '๐ช˜€', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php new file mode 100644 index 0000000..1958e37 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php @@ -0,0 +1,65 @@ + 9, + 2509 => 9, + 2637 => 9, + 2765 => 9, + 2893 => 9, + 3021 => 9, + 3149 => 9, + 3277 => 9, + 3387 => 9, + 3388 => 9, + 3405 => 9, + 3530 => 9, + 3642 => 9, + 3770 => 9, + 3972 => 9, + 4153 => 9, + 4154 => 9, + 5908 => 9, + 5940 => 9, + 6098 => 9, + 6752 => 9, + 6980 => 9, + 7082 => 9, + 7083 => 9, + 7154 => 9, + 7155 => 9, + 11647 => 9, + 43014 => 9, + 43052 => 9, + 43204 => 9, + 43347 => 9, + 43456 => 9, + 43766 => 9, + 44013 => 9, + 68159 => 9, + 69702 => 9, + 69759 => 9, + 69817 => 9, + 69939 => 9, + 69940 => 9, + 70080 => 9, + 70197 => 9, + 70378 => 9, + 70477 => 9, + 70722 => 9, + 70850 => 9, + 71103 => 9, + 71231 => 9, + 71350 => 9, + 71467 => 9, + 71737 => 9, + 71997 => 9, + 71998 => 9, + 72160 => 9, + 72244 => 9, + 72263 => 9, + 72345 => 9, + 72767 => 9, + 73028 => 9, + 73029 => 9, + 73111 => 9, +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/bootstrap.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/bootstrap.php new file mode 100644 index 0000000..57c7835 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/bootstrap.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (extension_loaded('intl')) { + return; +} + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!defined('U_IDNA_PROHIBITED_ERROR')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); +} +if (!defined('U_IDNA_ERROR_START')) { + define('U_IDNA_ERROR_START', 66560); +} +if (!defined('U_IDNA_UNASSIGNED_ERROR')) { + define('U_IDNA_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { + define('U_IDNA_CHECK_BIDI_ERROR', 66562); +} +if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +} +if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { + define('U_IDNA_ACE_PREFIX_ERROR', 66564); +} +if (!defined('U_IDNA_VERIFICATION_ERROR')) { + define('U_IDNA_VERIFICATION_ERROR', 66565); +} +if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +} +if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +} +if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +} +if (!defined('U_IDNA_ERROR_LIMIT')) { + define('U_IDNA_ERROR_LIMIT', 66569); +} +if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +} +if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +} +if (!defined('IDNA_DEFAULT')) { + define('IDNA_DEFAULT', 0); +} +if (!defined('IDNA_ALLOW_UNASSIGNED')) { + define('IDNA_ALLOW_UNASSIGNED', 1); +} +if (!defined('IDNA_USE_STD3_RULES')) { + define('IDNA_USE_STD3_RULES', 2); +} +if (!defined('IDNA_CHECK_BIDI')) { + define('IDNA_CHECK_BIDI', 4); +} +if (!defined('IDNA_CHECK_CONTEXTJ')) { + define('IDNA_CHECK_CONTEXTJ', 8); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +} +if (!defined('INTL_IDNA_VARIANT_2003')) { + define('INTL_IDNA_VARIANT_2003', 0); +} +if (!defined('INTL_IDNA_VARIANT_UTS46')) { + define('INTL_IDNA_VARIANT_UTS46', 1); +} +if (!defined('IDNA_ERROR_EMPTY_LABEL')) { + define('IDNA_ERROR_EMPTY_LABEL', 1); +} +if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { + define('IDNA_ERROR_LABEL_TOO_LONG', 2); +} +if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +} +if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { + define('IDNA_ERROR_LEADING_HYPHEN', 8); +} +if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { + define('IDNA_ERROR_TRAILING_HYPHEN', 16); +} +if (!defined('IDNA_ERROR_HYPHEN_3_4')) { + define('IDNA_ERROR_HYPHEN_3_4', 32); +} +if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +} +if (!defined('IDNA_ERROR_DISALLOWED')) { + define('IDNA_ERROR_DISALLOWED', 128); +} +if (!defined('IDNA_ERROR_PUNYCODE')) { + define('IDNA_ERROR_PUNYCODE', 256); +} +if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { + define('IDNA_ERROR_LABEL_HAS_DOT', 512); +} +if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +} +if (!defined('IDNA_ERROR_BIDI')) { + define('IDNA_ERROR_BIDI', 2048); +} +if (!defined('IDNA_ERROR_CONTEXTJ')) { + define('IDNA_ERROR_CONTEXTJ', 4096); +} + +if (\PHP_VERSION_ID < 70400) { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } + } +} else { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/bootstrap80.php b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/bootstrap80.php new file mode 100644 index 0000000..a62c2d6 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/bootstrap80.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (!defined('U_IDNA_PROHIBITED_ERROR')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); +} +if (!defined('U_IDNA_ERROR_START')) { + define('U_IDNA_ERROR_START', 66560); +} +if (!defined('U_IDNA_UNASSIGNED_ERROR')) { + define('U_IDNA_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { + define('U_IDNA_CHECK_BIDI_ERROR', 66562); +} +if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +} +if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { + define('U_IDNA_ACE_PREFIX_ERROR', 66564); +} +if (!defined('U_IDNA_VERIFICATION_ERROR')) { + define('U_IDNA_VERIFICATION_ERROR', 66565); +} +if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +} +if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +} +if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +} +if (!defined('U_IDNA_ERROR_LIMIT')) { + define('U_IDNA_ERROR_LIMIT', 66569); +} +if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +} +if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +} +if (!defined('IDNA_DEFAULT')) { + define('IDNA_DEFAULT', 0); +} +if (!defined('IDNA_ALLOW_UNASSIGNED')) { + define('IDNA_ALLOW_UNASSIGNED', 1); +} +if (!defined('IDNA_USE_STD3_RULES')) { + define('IDNA_USE_STD3_RULES', 2); +} +if (!defined('IDNA_CHECK_BIDI')) { + define('IDNA_CHECK_BIDI', 4); +} +if (!defined('IDNA_CHECK_CONTEXTJ')) { + define('IDNA_CHECK_CONTEXTJ', 8); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +} +if (!defined('INTL_IDNA_VARIANT_UTS46')) { + define('INTL_IDNA_VARIANT_UTS46', 1); +} +if (!defined('IDNA_ERROR_EMPTY_LABEL')) { + define('IDNA_ERROR_EMPTY_LABEL', 1); +} +if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { + define('IDNA_ERROR_LABEL_TOO_LONG', 2); +} +if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +} +if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { + define('IDNA_ERROR_LEADING_HYPHEN', 8); +} +if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { + define('IDNA_ERROR_TRAILING_HYPHEN', 16); +} +if (!defined('IDNA_ERROR_HYPHEN_3_4')) { + define('IDNA_ERROR_HYPHEN_3_4', 32); +} +if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +} +if (!defined('IDNA_ERROR_DISALLOWED')) { + define('IDNA_ERROR_DISALLOWED', 128); +} +if (!defined('IDNA_ERROR_PUNYCODE')) { + define('IDNA_ERROR_PUNYCODE', 256); +} +if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { + define('IDNA_ERROR_LABEL_HAS_DOT', 512); +} +if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +} +if (!defined('IDNA_ERROR_BIDI')) { + define('IDNA_ERROR_BIDI', 2048); +} +if (!defined('IDNA_ERROR_CONTEXTJ')) { + define('IDNA_ERROR_CONTEXTJ', 4096); +} + +if (!function_exists('idn_to_ascii')) { + function idn_to_ascii(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); } +} +if (!function_exists('idn_to_utf8')) { + function idn_to_utf8(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-idn/composer.json b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/composer.json new file mode 100644 index 0000000..12f75bc --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-idn/composer.json @@ -0,0 +1,41 @@ +{ + "name": "symfony/polyfill-intl-idn", + "type": "library", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "idn"], + "homepage": "https://symfony.com", + "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" + } + ], + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/LICENSE b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/LICENSE new file mode 100644 index 0000000..6e3afce --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-present Fabien Potencier + +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/symfony/polyfill-intl-normalizer/Normalizer.php b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Normalizer.php new file mode 100644 index 0000000..81704ab --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Normalizer.php @@ -0,0 +1,310 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Normalizer; + +/** + * Normalizer is a PHP fallback implementation of the Normalizer class provided by the intl extension. + * + * It has been validated with Unicode 6.3 Normalization Conformance Test. + * See http://www.unicode.org/reports/tr15/ for detailed info about Unicode normalizations. + * + * @author Nicolas Grekas + * + * @internal + */ +class Normalizer +{ + public const FORM_D = \Normalizer::FORM_D; + public const FORM_KD = \Normalizer::FORM_KD; + public const FORM_C = \Normalizer::FORM_C; + public const FORM_KC = \Normalizer::FORM_KC; + public const NFD = \Normalizer::NFD; + public const NFKD = \Normalizer::NFKD; + public const NFC = \Normalizer::NFC; + public const NFKC = \Normalizer::NFKC; + + private static $C; + private static $D; + private static $KD; + private static $cC; + private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; + + public static function isNormalized(string $s, int $form = self::FORM_C) + { + if (!\in_array($form, [self::NFD, self::NFKD, self::NFC, self::NFKC])) { + return false; + } + if (!isset($s[strspn($s, self::$ASCII)])) { + return true; + } + if (self::NFC == $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) { + return true; + } + + return self::normalize($s, $form) === $s; + } + + public static function normalize(string $s, int $form = self::FORM_C) + { + if (!preg_match('//u', $s)) { + return false; + } + + switch ($form) { + case self::NFC: $C = true; $K = false; break; + case self::NFD: $C = false; $K = false; break; + case self::NFKC: $C = true; $K = true; break; + case self::NFKD: $C = false; $K = true; break; + default: + if (\defined('Normalizer::NONE') && \Normalizer::NONE == $form) { + return $s; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError('normalizer_normalize(): Argument #2 ($form) must be a a valid normalization form'); + } + + if ('' === $s) { + return ''; + } + + if ($K && null === self::$KD) { + self::$KD = self::getData('compatibilityDecomposition'); + } + + if (null === self::$D) { + self::$D = self::getData('canonicalDecomposition'); + self::$cC = self::getData('combiningClass'); + } + + if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { + mb_internal_encoding('8bit'); + } + + $r = self::decompose($s, $K); + + if ($C) { + if (null === self::$C) { + self::$C = self::getData('canonicalComposition'); + } + + $r = self::recompose($r); + } + if (null !== $mbEncoding) { + mb_internal_encoding($mbEncoding); + } + + return $r; + } + + private static function recompose($s) + { + $ASCII = self::$ASCII; + $compMap = self::$C; + $combClass = self::$cC; + $ulenMask = self::$ulenMask; + + $result = $tail = ''; + + $i = $s[0] < "\x80" ? 1 : $ulenMask[$s[0] & "\xF0"]; + $len = \strlen($s); + + $lastUchr = substr($s, 0, $i); + $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0; + + while ($i < $len) { + if ($s[$i] < "\x80") { + // ASCII chars + + if ($tail) { + $lastUchr .= $tail; + $tail = ''; + } + + if ($j = strspn($s, $ASCII, $i + 1)) { + $lastUchr .= substr($s, $i, $j); + $i += $j; + } + + $result .= $lastUchr; + $lastUchr = $s[$i]; + $lastUcls = 0; + ++$i; + continue; + } + + $ulen = $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + + if ($lastUchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $lastUchr + || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr + || $lastUcls) { + // Table lookup and combining chars composition + + $ucls = $combClass[$uchr] ?? 0; + + if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) { + $lastUchr = $compMap[$lastUchr.$uchr]; + } elseif ($lastUcls = $ucls) { + $tail .= $uchr; + } else { + if ($tail) { + $lastUchr .= $tail; + $tail = ''; + } + + $result .= $lastUchr; + $lastUchr = $uchr; + } + } else { + // Hangul chars + + $L = \ord($lastUchr[2]) - 0x80; + $V = \ord($uchr[2]) - 0xA1; + $T = 0; + + $uchr = substr($s, $i + $ulen, 3); + + if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") { + $T = \ord($uchr[2]) - 0xA7; + 0 > $T && $T += 0x40; + $ulen += 3; + } + + $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; + $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F); + } + + $i += $ulen; + } + + return $result.$lastUchr.$tail; + } + + private static function decompose($s, $c) + { + $result = ''; + + $ASCII = self::$ASCII; + $decompMap = self::$D; + $combClass = self::$cC; + $ulenMask = self::$ulenMask; + if ($c) { + $compatMap = self::$KD; + } + + $c = []; + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + if ($s[$i] < "\x80") { + // ASCII chars + + if ($c) { + ksort($c); + $result .= implode('', $c); + $c = []; + } + + $j = 1 + strspn($s, $ASCII, $i + 1); + $result .= substr($s, $i, $j); + $i += $j; + continue; + } + + $ulen = $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) { + // Table lookup + + if ($uchr !== $j = $compatMap[$uchr] ?? ($decompMap[$uchr] ?? $uchr)) { + $uchr = $j; + + $j = \strlen($uchr); + $ulen = $uchr[0] < "\x80" ? 1 : $ulenMask[$uchr[0] & "\xF0"]; + + if ($ulen != $j) { + // Put trailing chars in $s + + $j -= $ulen; + $i -= $j; + + if (0 > $i) { + $s = str_repeat(' ', -$i).$s; + $len -= $i; + $i = 0; + } + + while ($j--) { + $s[$i + $j] = $uchr[$ulen + $j]; + } + + $uchr = substr($uchr, 0, $ulen); + } + } + if (isset($combClass[$uchr])) { + // Combining chars, for sorting + + if (!isset($c[$combClass[$uchr]])) { + $c[$combClass[$uchr]] = ''; + } + $c[$combClass[$uchr]] .= $uchr; + continue; + } + } else { + // Hangul chars + + $uchr = unpack('C*', $uchr); + $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; + + $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588)) + ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28)); + + if ($j %= 28) { + $uchr .= $j < 25 + ? ("\xE1\x86".\chr(0xA7 + $j)) + : ("\xE1\x87".\chr(0x67 + $j)); + } + } + if ($c) { + ksort($c); + $result .= implode('', $c); + $c = []; + } + + $result .= $uchr; + } + + if ($c) { + ksort($c); + $result .= implode('', $c); + } + + return $result; + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/README.md b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/README.md new file mode 100644 index 0000000..b9b762e --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/README.md @@ -0,0 +1,14 @@ +Symfony Polyfill / Intl: Normalizer +=================================== + +This component provides a fallback implementation for the +[`Normalizer`](https://php.net/Normalizer) class provided +by the [Intl](https://php.net/intl) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php new file mode 100644 index 0000000..0fdfc89 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php @@ -0,0 +1,17 @@ + 'ร€', + 'Aฬ' => 'ร', + 'Aฬ‚' => 'ร‚', + 'Aฬƒ' => 'รƒ', + 'Aฬˆ' => 'ร„', + 'AฬŠ' => 'ร…', + 'Cฬง' => 'ร‡', + 'Eฬ€' => 'รˆ', + 'Eฬ' => 'ร‰', + 'Eฬ‚' => 'รŠ', + 'Eฬˆ' => 'ร‹', + 'Iฬ€' => 'รŒ', + 'Iฬ' => 'ร', + 'Iฬ‚' => 'รŽ', + 'Iฬˆ' => 'ร', + 'Nฬƒ' => 'ร‘', + 'Oฬ€' => 'ร’', + 'Oฬ' => 'ร“', + 'Oฬ‚' => 'ร”', + 'Oฬƒ' => 'ร•', + 'Oฬˆ' => 'ร–', + 'Uฬ€' => 'ร™', + 'Uฬ' => 'รš', + 'Uฬ‚' => 'ร›', + 'Uฬˆ' => 'รœ', + 'Yฬ' => 'ร', + 'aฬ€' => 'ร ', + 'aฬ' => 'รก', + 'aฬ‚' => 'รข', + 'aฬƒ' => 'รฃ', + 'aฬˆ' => 'รค', + 'aฬŠ' => 'รฅ', + 'cฬง' => 'รง', + 'eฬ€' => 'รจ', + 'eฬ' => 'รฉ', + 'eฬ‚' => 'รช', + 'eฬˆ' => 'รซ', + 'iฬ€' => 'รฌ', + 'iฬ' => 'รญ', + 'iฬ‚' => 'รฎ', + 'iฬˆ' => 'รฏ', + 'nฬƒ' => 'รฑ', + 'oฬ€' => 'รฒ', + 'oฬ' => 'รณ', + 'oฬ‚' => 'รด', + 'oฬƒ' => 'รต', + 'oฬˆ' => 'รถ', + 'uฬ€' => 'รน', + 'uฬ' => 'รบ', + 'uฬ‚' => 'รป', + 'uฬˆ' => 'รผ', + 'yฬ' => 'รฝ', + 'yฬˆ' => 'รฟ', + 'Aฬ„' => 'ฤ€', + 'aฬ„' => 'ฤ', + 'Aฬ†' => 'ฤ‚', + 'aฬ†' => 'ฤƒ', + 'Aฬจ' => 'ฤ„', + 'aฬจ' => 'ฤ…', + 'Cฬ' => 'ฤ†', + 'cฬ' => 'ฤ‡', + 'Cฬ‚' => 'ฤˆ', + 'cฬ‚' => 'ฤ‰', + 'Cฬ‡' => 'ฤŠ', + 'cฬ‡' => 'ฤ‹', + 'CฬŒ' => 'ฤŒ', + 'cฬŒ' => 'ฤ', + 'DฬŒ' => 'ฤŽ', + 'dฬŒ' => 'ฤ', + 'Eฬ„' => 'ฤ’', + 'eฬ„' => 'ฤ“', + 'Eฬ†' => 'ฤ”', + 'eฬ†' => 'ฤ•', + 'Eฬ‡' => 'ฤ–', + 'eฬ‡' => 'ฤ—', + 'Eฬจ' => 'ฤ˜', + 'eฬจ' => 'ฤ™', + 'EฬŒ' => 'ฤš', + 'eฬŒ' => 'ฤ›', + 'Gฬ‚' => 'ฤœ', + 'gฬ‚' => 'ฤ', + 'Gฬ†' => 'ฤž', + 'gฬ†' => 'ฤŸ', + 'Gฬ‡' => 'ฤ ', + 'gฬ‡' => 'ฤก', + 'Gฬง' => 'ฤข', + 'gฬง' => 'ฤฃ', + 'Hฬ‚' => 'ฤค', + 'hฬ‚' => 'ฤฅ', + 'Iฬƒ' => 'ฤจ', + 'iฬƒ' => 'ฤฉ', + 'Iฬ„' => 'ฤช', + 'iฬ„' => 'ฤซ', + 'Iฬ†' => 'ฤฌ', + 'iฬ†' => 'ฤญ', + 'Iฬจ' => 'ฤฎ', + 'iฬจ' => 'ฤฏ', + 'Iฬ‡' => 'ฤฐ', + 'Jฬ‚' => 'ฤด', + 'jฬ‚' => 'ฤต', + 'Kฬง' => 'ฤถ', + 'kฬง' => 'ฤท', + 'Lฬ' => 'ฤน', + 'lฬ' => 'ฤบ', + 'Lฬง' => 'ฤป', + 'lฬง' => 'ฤผ', + 'LฬŒ' => 'ฤฝ', + 'lฬŒ' => 'ฤพ', + 'Nฬ' => 'ลƒ', + 'nฬ' => 'ล„', + 'Nฬง' => 'ล…', + 'nฬง' => 'ล†', + 'NฬŒ' => 'ล‡', + 'nฬŒ' => 'ลˆ', + 'Oฬ„' => 'ลŒ', + 'oฬ„' => 'ล', + 'Oฬ†' => 'ลŽ', + 'oฬ†' => 'ล', + 'Oฬ‹' => 'ล', + 'oฬ‹' => 'ล‘', + 'Rฬ' => 'ล”', + 'rฬ' => 'ล•', + 'Rฬง' => 'ล–', + 'rฬง' => 'ล—', + 'RฬŒ' => 'ล˜', + 'rฬŒ' => 'ล™', + 'Sฬ' => 'ลš', + 'sฬ' => 'ล›', + 'Sฬ‚' => 'ลœ', + 'sฬ‚' => 'ล', + 'Sฬง' => 'ลž', + 'sฬง' => 'ลŸ', + 'SฬŒ' => 'ล ', + 'sฬŒ' => 'ลก', + 'Tฬง' => 'ลข', + 'tฬง' => 'ลฃ', + 'TฬŒ' => 'ลค', + 'tฬŒ' => 'ลฅ', + 'Uฬƒ' => 'ลจ', + 'uฬƒ' => 'ลฉ', + 'Uฬ„' => 'ลช', + 'uฬ„' => 'ลซ', + 'Uฬ†' => 'ลฌ', + 'uฬ†' => 'ลญ', + 'UฬŠ' => 'ลฎ', + 'uฬŠ' => 'ลฏ', + 'Uฬ‹' => 'ลฐ', + 'uฬ‹' => 'ลฑ', + 'Uฬจ' => 'ลฒ', + 'uฬจ' => 'ลณ', + 'Wฬ‚' => 'ลด', + 'wฬ‚' => 'ลต', + 'Yฬ‚' => 'ลถ', + 'yฬ‚' => 'ลท', + 'Yฬˆ' => 'ลธ', + 'Zฬ' => 'ลน', + 'zฬ' => 'ลบ', + 'Zฬ‡' => 'ลป', + 'zฬ‡' => 'ลผ', + 'ZฬŒ' => 'ลฝ', + 'zฬŒ' => 'ลพ', + 'Oฬ›' => 'ฦ ', + 'oฬ›' => 'ฦก', + 'Uฬ›' => 'ฦฏ', + 'uฬ›' => 'ฦฐ', + 'AฬŒ' => 'ว', + 'aฬŒ' => 'วŽ', + 'IฬŒ' => 'ว', + 'iฬŒ' => 'ว', + 'OฬŒ' => 'ว‘', + 'oฬŒ' => 'ว’', + 'UฬŒ' => 'ว“', + 'uฬŒ' => 'ว”', + 'รœฬ„' => 'ว•', + 'รผฬ„' => 'ว–', + 'รœฬ' => 'ว—', + 'รผฬ' => 'ว˜', + 'รœฬŒ' => 'ว™', + 'รผฬŒ' => 'วš', + 'รœฬ€' => 'ว›', + 'รผฬ€' => 'วœ', + 'ร„ฬ„' => 'วž', + 'รคฬ„' => 'วŸ', + 'ศฆฬ„' => 'ว ', + 'ศงฬ„' => 'วก', + 'ร†ฬ„' => 'วข', + 'รฆฬ„' => 'วฃ', + 'GฬŒ' => 'วฆ', + 'gฬŒ' => 'วง', + 'KฬŒ' => 'วจ', + 'kฬŒ' => 'วฉ', + 'Oฬจ' => 'วช', + 'oฬจ' => 'วซ', + 'วชฬ„' => 'วฌ', + 'วซฬ„' => 'วญ', + 'ฦทฬŒ' => 'วฎ', + 'ส’ฬŒ' => 'วฏ', + 'jฬŒ' => 'วฐ', + 'Gฬ' => 'วด', + 'gฬ' => 'วต', + 'Nฬ€' => 'วธ', + 'nฬ€' => 'วน', + 'ร…ฬ' => 'วบ', + 'รฅฬ' => 'วป', + 'ร†ฬ' => 'วผ', + 'รฆฬ' => 'วฝ', + 'ร˜ฬ' => 'วพ', + 'รธฬ' => 'วฟ', + 'Aฬ' => 'ศ€', + 'aฬ' => 'ศ', + 'Aฬ‘' => 'ศ‚', + 'aฬ‘' => 'ศƒ', + 'Eฬ' => 'ศ„', + 'eฬ' => 'ศ…', + 'Eฬ‘' => 'ศ†', + 'eฬ‘' => 'ศ‡', + 'Iฬ' => 'ศˆ', + 'iฬ' => 'ศ‰', + 'Iฬ‘' => 'ศŠ', + 'iฬ‘' => 'ศ‹', + 'Oฬ' => 'ศŒ', + 'oฬ' => 'ศ', + 'Oฬ‘' => 'ศŽ', + 'oฬ‘' => 'ศ', + 'Rฬ' => 'ศ', + 'rฬ' => 'ศ‘', + 'Rฬ‘' => 'ศ’', + 'rฬ‘' => 'ศ“', + 'Uฬ' => 'ศ”', + 'uฬ' => 'ศ•', + 'Uฬ‘' => 'ศ–', + 'uฬ‘' => 'ศ—', + 'Sฬฆ' => 'ศ˜', + 'sฬฆ' => 'ศ™', + 'Tฬฆ' => 'ศš', + 'tฬฆ' => 'ศ›', + 'HฬŒ' => 'ศž', + 'hฬŒ' => 'ศŸ', + 'Aฬ‡' => 'ศฆ', + 'aฬ‡' => 'ศง', + 'Eฬง' => 'ศจ', + 'eฬง' => 'ศฉ', + 'ร–ฬ„' => 'ศช', + 'รถฬ„' => 'ศซ', + 'ร•ฬ„' => 'ศฌ', + 'รตฬ„' => 'ศญ', + 'Oฬ‡' => 'ศฎ', + 'oฬ‡' => 'ศฏ', + 'ศฎฬ„' => 'ศฐ', + 'ศฏฬ„' => 'ศฑ', + 'Yฬ„' => 'ศฒ', + 'yฬ„' => 'ศณ', + 'ยจฬ' => 'ฮ…', + 'ฮ‘ฬ' => 'ฮ†', + 'ฮ•ฬ' => 'ฮˆ', + 'ฮ—ฬ' => 'ฮ‰', + 'ฮ™ฬ' => 'ฮŠ', + 'ฮŸฬ' => 'ฮŒ', + 'ฮฅฬ' => 'ฮŽ', + 'ฮฉฬ' => 'ฮ', + 'ฯŠฬ' => 'ฮ', + 'ฮ™ฬˆ' => 'ฮช', + 'ฮฅฬˆ' => 'ฮซ', + 'ฮฑฬ' => 'ฮฌ', + 'ฮตฬ' => 'ฮญ', + 'ฮทฬ' => 'ฮฎ', + 'ฮนฬ' => 'ฮฏ', + 'ฯ‹ฬ' => 'ฮฐ', + 'ฮนฬˆ' => 'ฯŠ', + 'ฯ…ฬˆ' => 'ฯ‹', + 'ฮฟฬ' => 'ฯŒ', + 'ฯ…ฬ' => 'ฯ', + 'ฯ‰ฬ' => 'ฯŽ', + 'ฯ’ฬ' => 'ฯ“', + 'ฯ’ฬˆ' => 'ฯ”', + 'ะ•ฬ€' => 'ะ€', + 'ะ•ฬˆ' => 'ะ', + 'ะ“ฬ' => 'ะƒ', + 'ะ†ฬˆ' => 'ะ‡', + 'ะšฬ' => 'ะŒ', + 'ะ˜ฬ€' => 'ะ', + 'ะฃฬ†' => 'ะŽ', + 'ะ˜ฬ†' => 'ะ™', + 'ะธฬ†' => 'ะน', + 'ะตฬ€' => 'ั', + 'ะตฬˆ' => 'ั‘', + 'ะณฬ' => 'ั“', + 'ั–ฬˆ' => 'ั—', + 'ะบฬ' => 'ัœ', + 'ะธฬ€' => 'ั', + 'ัƒฬ†' => 'ัž', + 'ัดฬ' => 'ัถ', + 'ัตฬ' => 'ัท', + 'ะ–ฬ†' => 'ำ', + 'ะถฬ†' => 'ำ‚', + 'ะฬ†' => 'ำ', + 'ะฐฬ†' => 'ำ‘', + 'ะฬˆ' => 'ำ’', + 'ะฐฬˆ' => 'ำ“', + 'ะ•ฬ†' => 'ำ–', + 'ะตฬ†' => 'ำ—', + 'ำ˜ฬˆ' => 'ำš', + 'ำ™ฬˆ' => 'ำ›', + 'ะ–ฬˆ' => 'ำœ', + 'ะถฬˆ' => 'ำ', + 'ะ—ฬˆ' => 'ำž', + 'ะทฬˆ' => 'ำŸ', + 'ะ˜ฬ„' => 'ำข', + 'ะธฬ„' => 'ำฃ', + 'ะ˜ฬˆ' => 'ำค', + 'ะธฬˆ' => 'ำฅ', + 'ะžฬˆ' => 'ำฆ', + 'ะพฬˆ' => 'ำง', + 'ำจฬˆ' => 'ำช', + 'ำฉฬˆ' => 'ำซ', + 'ะญฬˆ' => 'ำฌ', + 'ัฬˆ' => 'ำญ', + 'ะฃฬ„' => 'ำฎ', + 'ัƒฬ„' => 'ำฏ', + 'ะฃฬˆ' => 'ำฐ', + 'ัƒฬˆ' => 'ำฑ', + 'ะฃฬ‹' => 'ำฒ', + 'ัƒฬ‹' => 'ำณ', + 'ะงฬˆ' => 'ำด', + 'ั‡ฬˆ' => 'ำต', + 'ะซฬˆ' => 'ำธ', + 'ั‹ฬˆ' => 'ำน', + 'ุงู“' => 'ุข', + 'ุงู”' => 'ุฃ', + 'ูˆู”' => 'ุค', + 'ุงู•' => 'ุฅ', + 'ูŠู”' => 'ุฆ', + '•ู”' => '€', + 'ู”' => '‚', + '’ู”' => '“', + 'เคจเคผ' => 'เคฉ', + 'เคฐเคผ' => 'เคฑ', + 'เคณเคผ' => 'เคด', + 'เง‡เฆพ' => 'เง‹', + 'เง‡เง—' => 'เงŒ', + 'เญ‡เญ–' => 'เญˆ', + 'เญ‡เฌพ' => 'เญ‹', + 'เญ‡เญ—' => 'เญŒ', + 'เฎ’เฏ—' => 'เฎ”', + 'เฏ†เฎพ' => 'เฏŠ', + 'เฏ‡เฎพ' => 'เฏ‹', + 'เฏ†เฏ—' => 'เฏŒ', + 'เฑ†เฑ–' => 'เฑˆ', + 'เฒฟเณ•' => 'เณ€', + 'เณ†เณ•' => 'เณ‡', + 'เณ†เณ–' => 'เณˆ', + 'เณ†เณ‚' => 'เณŠ', + 'เณŠเณ•' => 'เณ‹', + 'เต†เดพ' => 'เตŠ', + 'เต‡เดพ' => 'เต‹', + 'เต†เต—' => 'เตŒ', + 'เท™เทŠ' => 'เทš', + 'เท™เท' => 'เทœ', + 'เทœเทŠ' => 'เท', + 'เท™เทŸ' => 'เทž', + 'แ€ฅแ€ฎ' => 'แ€ฆ', + 'แฌ…แฌต' => 'แฌ†', + 'แฌ‡แฌต' => 'แฌˆ', + 'แฌ‰แฌต' => 'แฌŠ', + 'แฌ‹แฌต' => 'แฌŒ', + 'แฌแฌต' => 'แฌŽ', + 'แฌ‘แฌต' => 'แฌ’', + 'แฌบแฌต' => 'แฌป', + 'แฌผแฌต' => 'แฌฝ', + 'แฌพแฌต' => 'แญ€', + 'แฌฟแฌต' => 'แญ', + 'แญ‚แฌต' => 'แญƒ', + 'Aฬฅ' => 'แธ€', + 'aฬฅ' => 'แธ', + 'Bฬ‡' => 'แธ‚', + 'bฬ‡' => 'แธƒ', + 'Bฬฃ' => 'แธ„', + 'bฬฃ' => 'แธ…', + 'Bฬฑ' => 'แธ†', + 'bฬฑ' => 'แธ‡', + 'ร‡ฬ' => 'แธˆ', + 'รงฬ' => 'แธ‰', + 'Dฬ‡' => 'แธŠ', + 'dฬ‡' => 'แธ‹', + 'Dฬฃ' => 'แธŒ', + 'dฬฃ' => 'แธ', + 'Dฬฑ' => 'แธŽ', + 'dฬฑ' => 'แธ', + 'Dฬง' => 'แธ', + 'dฬง' => 'แธ‘', + 'Dฬญ' => 'แธ’', + 'dฬญ' => 'แธ“', + 'ฤ’ฬ€' => 'แธ”', + 'ฤ“ฬ€' => 'แธ•', + 'ฤ’ฬ' => 'แธ–', + 'ฤ“ฬ' => 'แธ—', + 'Eฬญ' => 'แธ˜', + 'eฬญ' => 'แธ™', + 'Eฬฐ' => 'แธš', + 'eฬฐ' => 'แธ›', + 'ศจฬ†' => 'แธœ', + 'ศฉฬ†' => 'แธ', + 'Fฬ‡' => 'แธž', + 'fฬ‡' => 'แธŸ', + 'Gฬ„' => 'แธ ', + 'gฬ„' => 'แธก', + 'Hฬ‡' => 'แธข', + 'hฬ‡' => 'แธฃ', + 'Hฬฃ' => 'แธค', + 'hฬฃ' => 'แธฅ', + 'Hฬˆ' => 'แธฆ', + 'hฬˆ' => 'แธง', + 'Hฬง' => 'แธจ', + 'hฬง' => 'แธฉ', + 'Hฬฎ' => 'แธช', + 'hฬฎ' => 'แธซ', + 'Iฬฐ' => 'แธฌ', + 'iฬฐ' => 'แธญ', + 'รฬ' => 'แธฎ', + 'รฏฬ' => 'แธฏ', + 'Kฬ' => 'แธฐ', + 'kฬ' => 'แธฑ', + 'Kฬฃ' => 'แธฒ', + 'kฬฃ' => 'แธณ', + 'Kฬฑ' => 'แธด', + 'kฬฑ' => 'แธต', + 'Lฬฃ' => 'แธถ', + 'lฬฃ' => 'แธท', + 'แธถฬ„' => 'แธธ', + 'แธทฬ„' => 'แธน', + 'Lฬฑ' => 'แธบ', + 'lฬฑ' => 'แธป', + 'Lฬญ' => 'แธผ', + 'lฬญ' => 'แธฝ', + 'Mฬ' => 'แธพ', + 'mฬ' => 'แธฟ', + 'Mฬ‡' => 'แน€', + 'mฬ‡' => 'แน', + 'Mฬฃ' => 'แน‚', + 'mฬฃ' => 'แนƒ', + 'Nฬ‡' => 'แน„', + 'nฬ‡' => 'แน…', + 'Nฬฃ' => 'แน†', + 'nฬฃ' => 'แน‡', + 'Nฬฑ' => 'แนˆ', + 'nฬฑ' => 'แน‰', + 'Nฬญ' => 'แนŠ', + 'nฬญ' => 'แน‹', + 'ร•ฬ' => 'แนŒ', + 'รตฬ' => 'แน', + 'ร•ฬˆ' => 'แนŽ', + 'รตฬˆ' => 'แน', + 'ลŒฬ€' => 'แน', + 'ลฬ€' => 'แน‘', + 'ลŒฬ' => 'แน’', + 'ลฬ' => 'แน“', + 'Pฬ' => 'แน”', + 'pฬ' => 'แน•', + 'Pฬ‡' => 'แน–', + 'pฬ‡' => 'แน—', + 'Rฬ‡' => 'แน˜', + 'rฬ‡' => 'แน™', + 'Rฬฃ' => 'แนš', + 'rฬฃ' => 'แน›', + 'แนšฬ„' => 'แนœ', + 'แน›ฬ„' => 'แน', + 'Rฬฑ' => 'แนž', + 'rฬฑ' => 'แนŸ', + 'Sฬ‡' => 'แน ', + 'sฬ‡' => 'แนก', + 'Sฬฃ' => 'แนข', + 'sฬฃ' => 'แนฃ', + 'ลšฬ‡' => 'แนค', + 'ล›ฬ‡' => 'แนฅ', + 'ล ฬ‡' => 'แนฆ', + 'ลกฬ‡' => 'แนง', + 'แนขฬ‡' => 'แนจ', + 'แนฃฬ‡' => 'แนฉ', + 'Tฬ‡' => 'แนช', + 'tฬ‡' => 'แนซ', + 'Tฬฃ' => 'แนฌ', + 'tฬฃ' => 'แนญ', + 'Tฬฑ' => 'แนฎ', + 'tฬฑ' => 'แนฏ', + 'Tฬญ' => 'แนฐ', + 'tฬญ' => 'แนฑ', + 'Uฬค' => 'แนฒ', + 'uฬค' => 'แนณ', + 'Uฬฐ' => 'แนด', + 'uฬฐ' => 'แนต', + 'Uฬญ' => 'แนถ', + 'uฬญ' => 'แนท', + 'ลจฬ' => 'แนธ', + 'ลฉฬ' => 'แนน', + 'ลชฬˆ' => 'แนบ', + 'ลซฬˆ' => 'แนป', + 'Vฬƒ' => 'แนผ', + 'vฬƒ' => 'แนฝ', + 'Vฬฃ' => 'แนพ', + 'vฬฃ' => 'แนฟ', + 'Wฬ€' => 'แบ€', + 'wฬ€' => 'แบ', + 'Wฬ' => 'แบ‚', + 'wฬ' => 'แบƒ', + 'Wฬˆ' => 'แบ„', + 'wฬˆ' => 'แบ…', + 'Wฬ‡' => 'แบ†', + 'wฬ‡' => 'แบ‡', + 'Wฬฃ' => 'แบˆ', + 'wฬฃ' => 'แบ‰', + 'Xฬ‡' => 'แบŠ', + 'xฬ‡' => 'แบ‹', + 'Xฬˆ' => 'แบŒ', + 'xฬˆ' => 'แบ', + 'Yฬ‡' => 'แบŽ', + 'yฬ‡' => 'แบ', + 'Zฬ‚' => 'แบ', + 'zฬ‚' => 'แบ‘', + 'Zฬฃ' => 'แบ’', + 'zฬฃ' => 'แบ“', + 'Zฬฑ' => 'แบ”', + 'zฬฑ' => 'แบ•', + 'hฬฑ' => 'แบ–', + 'tฬˆ' => 'แบ—', + 'wฬŠ' => 'แบ˜', + 'yฬŠ' => 'แบ™', + 'ลฟฬ‡' => 'แบ›', + 'Aฬฃ' => 'แบ ', + 'aฬฃ' => 'แบก', + 'Aฬ‰' => 'แบข', + 'aฬ‰' => 'แบฃ', + 'ร‚ฬ' => 'แบค', + 'รขฬ' => 'แบฅ', + 'ร‚ฬ€' => 'แบฆ', + 'รขฬ€' => 'แบง', + 'ร‚ฬ‰' => 'แบจ', + 'รขฬ‰' => 'แบฉ', + 'ร‚ฬƒ' => 'แบช', + 'รขฬƒ' => 'แบซ', + 'แบ ฬ‚' => 'แบฌ', + 'แบกฬ‚' => 'แบญ', + 'ฤ‚ฬ' => 'แบฎ', + 'ฤƒฬ' => 'แบฏ', + 'ฤ‚ฬ€' => 'แบฐ', + 'ฤƒฬ€' => 'แบฑ', + 'ฤ‚ฬ‰' => 'แบฒ', + 'ฤƒฬ‰' => 'แบณ', + 'ฤ‚ฬƒ' => 'แบด', + 'ฤƒฬƒ' => 'แบต', + 'แบ ฬ†' => 'แบถ', + 'แบกฬ†' => 'แบท', + 'Eฬฃ' => 'แบธ', + 'eฬฃ' => 'แบน', + 'Eฬ‰' => 'แบบ', + 'eฬ‰' => 'แบป', + 'Eฬƒ' => 'แบผ', + 'eฬƒ' => 'แบฝ', + 'รŠฬ' => 'แบพ', + 'รชฬ' => 'แบฟ', + 'รŠฬ€' => 'แป€', + 'รชฬ€' => 'แป', + 'รŠฬ‰' => 'แป‚', + 'รชฬ‰' => 'แปƒ', + 'รŠฬƒ' => 'แป„', + 'รชฬƒ' => 'แป…', + 'แบธฬ‚' => 'แป†', + 'แบนฬ‚' => 'แป‡', + 'Iฬ‰' => 'แปˆ', + 'iฬ‰' => 'แป‰', + 'Iฬฃ' => 'แปŠ', + 'iฬฃ' => 'แป‹', + 'Oฬฃ' => 'แปŒ', + 'oฬฃ' => 'แป', + 'Oฬ‰' => 'แปŽ', + 'oฬ‰' => 'แป', + 'ร”ฬ' => 'แป', + 'รดฬ' => 'แป‘', + 'ร”ฬ€' => 'แป’', + 'รดฬ€' => 'แป“', + 'ร”ฬ‰' => 'แป”', + 'รดฬ‰' => 'แป•', + 'ร”ฬƒ' => 'แป–', + 'รดฬƒ' => 'แป—', + 'แปŒฬ‚' => 'แป˜', + 'แปฬ‚' => 'แป™', + 'ฦ ฬ' => 'แปš', + 'ฦกฬ' => 'แป›', + 'ฦ ฬ€' => 'แปœ', + 'ฦกฬ€' => 'แป', + 'ฦ ฬ‰' => 'แปž', + 'ฦกฬ‰' => 'แปŸ', + 'ฦ ฬƒ' => 'แป ', + 'ฦกฬƒ' => 'แปก', + 'ฦ ฬฃ' => 'แปข', + 'ฦกฬฃ' => 'แปฃ', + 'Uฬฃ' => 'แปค', + 'uฬฃ' => 'แปฅ', + 'Uฬ‰' => 'แปฆ', + 'uฬ‰' => 'แปง', + 'ฦฏฬ' => 'แปจ', + 'ฦฐฬ' => 'แปฉ', + 'ฦฏฬ€' => 'แปช', + 'ฦฐฬ€' => 'แปซ', + 'ฦฏฬ‰' => 'แปฌ', + 'ฦฐฬ‰' => 'แปญ', + 'ฦฏฬƒ' => 'แปฎ', + 'ฦฐฬƒ' => 'แปฏ', + 'ฦฏฬฃ' => 'แปฐ', + 'ฦฐฬฃ' => 'แปฑ', + 'Yฬ€' => 'แปฒ', + 'yฬ€' => 'แปณ', + 'Yฬฃ' => 'แปด', + 'yฬฃ' => 'แปต', + 'Yฬ‰' => 'แปถ', + 'yฬ‰' => 'แปท', + 'Yฬƒ' => 'แปธ', + 'yฬƒ' => 'แปน', + 'ฮฑฬ“' => 'แผ€', + 'ฮฑฬ”' => 'แผ', + 'แผ€ฬ€' => 'แผ‚', + 'แผฬ€' => 'แผƒ', + 'แผ€ฬ' => 'แผ„', + 'แผฬ' => 'แผ…', + 'แผ€อ‚' => 'แผ†', + 'แผอ‚' => 'แผ‡', + 'ฮ‘ฬ“' => 'แผˆ', + 'ฮ‘ฬ”' => 'แผ‰', + 'แผˆฬ€' => 'แผŠ', + 'แผ‰ฬ€' => 'แผ‹', + 'แผˆฬ' => 'แผŒ', + 'แผ‰ฬ' => 'แผ', + 'แผˆอ‚' => 'แผŽ', + 'แผ‰อ‚' => 'แผ', + 'ฮตฬ“' => 'แผ', + 'ฮตฬ”' => 'แผ‘', + 'แผฬ€' => 'แผ’', + 'แผ‘ฬ€' => 'แผ“', + 'แผฬ' => 'แผ”', + 'แผ‘ฬ' => 'แผ•', + 'ฮ•ฬ“' => 'แผ˜', + 'ฮ•ฬ”' => 'แผ™', + 'แผ˜ฬ€' => 'แผš', + 'แผ™ฬ€' => 'แผ›', + 'แผ˜ฬ' => 'แผœ', + 'แผ™ฬ' => 'แผ', + 'ฮทฬ“' => 'แผ ', + 'ฮทฬ”' => 'แผก', + 'แผ ฬ€' => 'แผข', + 'แผกฬ€' => 'แผฃ', + 'แผ ฬ' => 'แผค', + 'แผกฬ' => 'แผฅ', + 'แผ อ‚' => 'แผฆ', + 'แผกอ‚' => 'แผง', + 'ฮ—ฬ“' => 'แผจ', + 'ฮ—ฬ”' => 'แผฉ', + 'แผจฬ€' => 'แผช', + 'แผฉฬ€' => 'แผซ', + 'แผจฬ' => 'แผฌ', + 'แผฉฬ' => 'แผญ', + 'แผจอ‚' => 'แผฎ', + 'แผฉอ‚' => 'แผฏ', + 'ฮนฬ“' => 'แผฐ', + 'ฮนฬ”' => 'แผฑ', + 'แผฐฬ€' => 'แผฒ', + 'แผฑฬ€' => 'แผณ', + 'แผฐฬ' => 'แผด', + 'แผฑฬ' => 'แผต', + 'แผฐอ‚' => 'แผถ', + 'แผฑอ‚' => 'แผท', + 'ฮ™ฬ“' => 'แผธ', + 'ฮ™ฬ”' => 'แผน', + 'แผธฬ€' => 'แผบ', + 'แผนฬ€' => 'แผป', + 'แผธฬ' => 'แผผ', + 'แผนฬ' => 'แผฝ', + 'แผธอ‚' => 'แผพ', + 'แผนอ‚' => 'แผฟ', + 'ฮฟฬ“' => 'แฝ€', + 'ฮฟฬ”' => 'แฝ', + 'แฝ€ฬ€' => 'แฝ‚', + 'แฝฬ€' => 'แฝƒ', + 'แฝ€ฬ' => 'แฝ„', + 'แฝฬ' => 'แฝ…', + 'ฮŸฬ“' => 'แฝˆ', + 'ฮŸฬ”' => 'แฝ‰', + 'แฝˆฬ€' => 'แฝŠ', + 'แฝ‰ฬ€' => 'แฝ‹', + 'แฝˆฬ' => 'แฝŒ', + 'แฝ‰ฬ' => 'แฝ', + 'ฯ…ฬ“' => 'แฝ', + 'ฯ…ฬ”' => 'แฝ‘', + 'แฝฬ€' => 'แฝ’', + 'แฝ‘ฬ€' => 'แฝ“', + 'แฝฬ' => 'แฝ”', + 'แฝ‘ฬ' => 'แฝ•', + 'แฝอ‚' => 'แฝ–', + 'แฝ‘อ‚' => 'แฝ—', + 'ฮฅฬ”' => 'แฝ™', + 'แฝ™ฬ€' => 'แฝ›', + 'แฝ™ฬ' => 'แฝ', + 'แฝ™อ‚' => 'แฝŸ', + 'ฯ‰ฬ“' => 'แฝ ', + 'ฯ‰ฬ”' => 'แฝก', + 'แฝ ฬ€' => 'แฝข', + 'แฝกฬ€' => 'แฝฃ', + 'แฝ ฬ' => 'แฝค', + 'แฝกฬ' => 'แฝฅ', + 'แฝ อ‚' => 'แฝฆ', + 'แฝกอ‚' => 'แฝง', + 'ฮฉฬ“' => 'แฝจ', + 'ฮฉฬ”' => 'แฝฉ', + 'แฝจฬ€' => 'แฝช', + 'แฝฉฬ€' => 'แฝซ', + 'แฝจฬ' => 'แฝฌ', + 'แฝฉฬ' => 'แฝญ', + 'แฝจอ‚' => 'แฝฎ', + 'แฝฉอ‚' => 'แฝฏ', + 'ฮฑฬ€' => 'แฝฐ', + 'ฮตฬ€' => 'แฝฒ', + 'ฮทฬ€' => 'แฝด', + 'ฮนฬ€' => 'แฝถ', + 'ฮฟฬ€' => 'แฝธ', + 'ฯ…ฬ€' => 'แฝบ', + 'ฯ‰ฬ€' => 'แฝผ', + 'แผ€อ…' => 'แพ€', + 'แผอ…' => 'แพ', + 'แผ‚อ…' => 'แพ‚', + 'แผƒอ…' => 'แพƒ', + 'แผ„อ…' => 'แพ„', + 'แผ…อ…' => 'แพ…', + 'แผ†อ…' => 'แพ†', + 'แผ‡อ…' => 'แพ‡', + 'แผˆอ…' => 'แพˆ', + 'แผ‰อ…' => 'แพ‰', + 'แผŠอ…' => 'แพŠ', + 'แผ‹อ…' => 'แพ‹', + 'แผŒอ…' => 'แพŒ', + 'แผอ…' => 'แพ', + 'แผŽอ…' => 'แพŽ', + 'แผอ…' => 'แพ', + 'แผ อ…' => 'แพ', + 'แผกอ…' => 'แพ‘', + 'แผขอ…' => 'แพ’', + 'แผฃอ…' => 'แพ“', + 'แผคอ…' => 'แพ”', + 'แผฅอ…' => 'แพ•', + 'แผฆอ…' => 'แพ–', + 'แผงอ…' => 'แพ—', + 'แผจอ…' => 'แพ˜', + 'แผฉอ…' => 'แพ™', + 'แผชอ…' => 'แพš', + 'แผซอ…' => 'แพ›', + 'แผฌอ…' => 'แพœ', + 'แผญอ…' => 'แพ', + 'แผฎอ…' => 'แพž', + 'แผฏอ…' => 'แพŸ', + 'แฝ อ…' => 'แพ ', + 'แฝกอ…' => 'แพก', + 'แฝขอ…' => 'แพข', + 'แฝฃอ…' => 'แพฃ', + 'แฝคอ…' => 'แพค', + 'แฝฅอ…' => 'แพฅ', + 'แฝฆอ…' => 'แพฆ', + 'แฝงอ…' => 'แพง', + 'แฝจอ…' => 'แพจ', + 'แฝฉอ…' => 'แพฉ', + 'แฝชอ…' => 'แพช', + 'แฝซอ…' => 'แพซ', + 'แฝฌอ…' => 'แพฌ', + 'แฝญอ…' => 'แพญ', + 'แฝฎอ…' => 'แพฎ', + 'แฝฏอ…' => 'แพฏ', + 'ฮฑฬ†' => 'แพฐ', + 'ฮฑฬ„' => 'แพฑ', + 'แฝฐอ…' => 'แพฒ', + 'ฮฑอ…' => 'แพณ', + 'ฮฌอ…' => 'แพด', + 'ฮฑอ‚' => 'แพถ', + 'แพถอ…' => 'แพท', + 'ฮ‘ฬ†' => 'แพธ', + 'ฮ‘ฬ„' => 'แพน', + 'ฮ‘ฬ€' => 'แพบ', + 'ฮ‘อ…' => 'แพผ', + 'ยจอ‚' => 'แฟ', + 'แฝดอ…' => 'แฟ‚', + 'ฮทอ…' => 'แฟƒ', + 'ฮฎอ…' => 'แฟ„', + 'ฮทอ‚' => 'แฟ†', + 'แฟ†อ…' => 'แฟ‡', + 'ฮ•ฬ€' => 'แฟˆ', + 'ฮ—ฬ€' => 'แฟŠ', + 'ฮ—อ…' => 'แฟŒ', + 'แพฟฬ€' => 'แฟ', + 'แพฟฬ' => 'แฟŽ', + 'แพฟอ‚' => 'แฟ', + 'ฮนฬ†' => 'แฟ', + 'ฮนฬ„' => 'แฟ‘', + 'ฯŠฬ€' => 'แฟ’', + 'ฮนอ‚' => 'แฟ–', + 'ฯŠอ‚' => 'แฟ—', + 'ฮ™ฬ†' => 'แฟ˜', + 'ฮ™ฬ„' => 'แฟ™', + 'ฮ™ฬ€' => 'แฟš', + 'แฟพฬ€' => 'แฟ', + 'แฟพฬ' => 'แฟž', + 'แฟพอ‚' => 'แฟŸ', + 'ฯ…ฬ†' => 'แฟ ', + 'ฯ…ฬ„' => 'แฟก', + 'ฯ‹ฬ€' => 'แฟข', + 'ฯฬ“' => 'แฟค', + 'ฯฬ”' => 'แฟฅ', + 'ฯ…อ‚' => 'แฟฆ', + 'ฯ‹อ‚' => 'แฟง', + 'ฮฅฬ†' => 'แฟจ', + 'ฮฅฬ„' => 'แฟฉ', + 'ฮฅฬ€' => 'แฟช', + 'ฮกฬ”' => 'แฟฌ', + 'ยจฬ€' => 'แฟญ', + 'แฝผอ…' => 'แฟฒ', + 'ฯ‰อ…' => 'แฟณ', + 'ฯŽอ…' => 'แฟด', + 'ฯ‰อ‚' => 'แฟถ', + 'แฟถอ…' => 'แฟท', + 'ฮŸฬ€' => 'แฟธ', + 'ฮฉฬ€' => 'แฟบ', + 'ฮฉอ…' => 'แฟผ', + 'โ†ฬธ' => 'โ†š', + 'โ†’ฬธ' => 'โ†›', + 'โ†”ฬธ' => 'โ†ฎ', + 'โ‡ฬธ' => 'โ‡', + 'โ‡”ฬธ' => 'โ‡Ž', + 'โ‡’ฬธ' => 'โ‡', + 'โˆƒฬธ' => 'โˆ„', + 'โˆˆฬธ' => 'โˆ‰', + 'โˆ‹ฬธ' => 'โˆŒ', + 'โˆฃฬธ' => 'โˆค', + 'โˆฅฬธ' => 'โˆฆ', + 'โˆผฬธ' => 'โ‰', + 'โ‰ƒฬธ' => 'โ‰„', + 'โ‰…ฬธ' => 'โ‰‡', + 'โ‰ˆฬธ' => 'โ‰‰', + '=ฬธ' => 'โ‰ ', + 'โ‰กฬธ' => 'โ‰ข', + 'โ‰ฬธ' => 'โ‰ญ', + '<ฬธ' => 'โ‰ฎ', + '>ฬธ' => 'โ‰ฏ', + 'โ‰คฬธ' => 'โ‰ฐ', + 'โ‰ฅฬธ' => 'โ‰ฑ', + 'โ‰ฒฬธ' => 'โ‰ด', + 'โ‰ณฬธ' => 'โ‰ต', + 'โ‰ถฬธ' => 'โ‰ธ', + 'โ‰ทฬธ' => 'โ‰น', + 'โ‰บฬธ' => 'โŠ€', + 'โ‰ปฬธ' => 'โŠ', + 'โŠ‚ฬธ' => 'โŠ„', + 'โŠƒฬธ' => 'โŠ…', + 'โŠ†ฬธ' => 'โŠˆ', + 'โŠ‡ฬธ' => 'โŠ‰', + 'โŠขฬธ' => 'โŠฌ', + 'โŠจฬธ' => 'โŠญ', + 'โŠฉฬธ' => 'โŠฎ', + 'โŠซฬธ' => 'โŠฏ', + 'โ‰ผฬธ' => 'โ‹ ', + 'โ‰ฝฬธ' => 'โ‹ก', + 'โŠ‘ฬธ' => 'โ‹ข', + 'โŠ’ฬธ' => 'โ‹ฃ', + 'โŠฒฬธ' => 'โ‹ช', + 'โŠณฬธ' => 'โ‹ซ', + 'โŠดฬธ' => 'โ‹ฌ', + 'โŠตฬธ' => 'โ‹ญ', + 'ใ‹ใ‚™' => 'ใŒ', + 'ใใ‚™' => 'ใŽ', + 'ใใ‚™' => 'ใ', + 'ใ‘ใ‚™' => 'ใ’', + 'ใ“ใ‚™' => 'ใ”', + 'ใ•ใ‚™' => 'ใ–', + 'ใ—ใ‚™' => 'ใ˜', + 'ใ™ใ‚™' => 'ใš', + 'ใ›ใ‚™' => 'ใœ', + 'ใใ‚™' => 'ใž', + 'ใŸใ‚™' => 'ใ ', + 'ใกใ‚™' => 'ใข', + 'ใคใ‚™' => 'ใฅ', + 'ใฆใ‚™' => 'ใง', + 'ใจใ‚™' => 'ใฉ', + 'ใฏใ‚™' => 'ใฐ', + 'ใฏใ‚š' => 'ใฑ', + 'ใฒใ‚™' => 'ใณ', + 'ใฒใ‚š' => 'ใด', + 'ใตใ‚™' => 'ใถ', + 'ใตใ‚š' => 'ใท', + 'ใธใ‚™' => 'ใน', + 'ใธใ‚š' => 'ใบ', + 'ใปใ‚™' => 'ใผ', + 'ใปใ‚š' => 'ใฝ', + 'ใ†ใ‚™' => 'ใ‚”', + 'ใ‚ใ‚™' => 'ใ‚ž', + 'ใ‚ซใ‚™' => 'ใ‚ฌ', + 'ใ‚ญใ‚™' => 'ใ‚ฎ', + 'ใ‚ฏใ‚™' => 'ใ‚ฐ', + 'ใ‚ฑใ‚™' => 'ใ‚ฒ', + 'ใ‚ณใ‚™' => 'ใ‚ด', + 'ใ‚ตใ‚™' => 'ใ‚ถ', + 'ใ‚ทใ‚™' => 'ใ‚ธ', + 'ใ‚นใ‚™' => 'ใ‚บ', + 'ใ‚ปใ‚™' => 'ใ‚ผ', + 'ใ‚ฝใ‚™' => 'ใ‚พ', + 'ใ‚ฟใ‚™' => 'ใƒ€', + 'ใƒใ‚™' => 'ใƒ‚', + 'ใƒ„ใ‚™' => 'ใƒ…', + 'ใƒ†ใ‚™' => 'ใƒ‡', + 'ใƒˆใ‚™' => 'ใƒ‰', + 'ใƒใ‚™' => 'ใƒ', + 'ใƒใ‚š' => 'ใƒ‘', + 'ใƒ’ใ‚™' => 'ใƒ“', + 'ใƒ’ใ‚š' => 'ใƒ”', + 'ใƒ•ใ‚™' => 'ใƒ–', + 'ใƒ•ใ‚š' => 'ใƒ—', + 'ใƒ˜ใ‚™' => 'ใƒ™', + 'ใƒ˜ใ‚š' => 'ใƒš', + 'ใƒ›ใ‚™' => 'ใƒœ', + 'ใƒ›ใ‚š' => 'ใƒ', + 'ใ‚ฆใ‚™' => 'ใƒด', + 'ใƒฏใ‚™' => 'ใƒท', + 'ใƒฐใ‚™' => 'ใƒธ', + 'ใƒฑใ‚™' => 'ใƒน', + 'ใƒฒใ‚™' => 'ใƒบ', + 'ใƒฝใ‚™' => 'ใƒพ', + '๐‘‚™๐‘‚บ' => '๐‘‚š', + '๐‘‚›๐‘‚บ' => '๐‘‚œ', + '๐‘‚ฅ๐‘‚บ' => '๐‘‚ซ', + '๐‘„ฑ๐‘„ง' => '๐‘„ฎ', + '๐‘„ฒ๐‘„ง' => '๐‘„ฏ', + '๐‘‡๐‘Œพ' => '๐‘‹', + '๐‘‡๐‘—' => '๐‘Œ', + '๐‘’น๐‘’บ' => '๐‘’ป', + '๐‘’น๐‘’ฐ' => '๐‘’ผ', + '๐‘’น๐‘’ฝ' => '๐‘’พ', + '๐‘–ธ๐‘–ฏ' => '๐‘–บ', + '๐‘–น๐‘–ฏ' => '๐‘–ป', + '๐‘คต๐‘คฐ' => '๐‘คธ', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php new file mode 100644 index 0000000..5a3e8e0 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php @@ -0,0 +1,2065 @@ + 'Aฬ€', + 'ร' => 'Aฬ', + 'ร‚' => 'Aฬ‚', + 'รƒ' => 'Aฬƒ', + 'ร„' => 'Aฬˆ', + 'ร…' => 'AฬŠ', + 'ร‡' => 'Cฬง', + 'รˆ' => 'Eฬ€', + 'ร‰' => 'Eฬ', + 'รŠ' => 'Eฬ‚', + 'ร‹' => 'Eฬˆ', + 'รŒ' => 'Iฬ€', + 'ร' => 'Iฬ', + 'รŽ' => 'Iฬ‚', + 'ร' => 'Iฬˆ', + 'ร‘' => 'Nฬƒ', + 'ร’' => 'Oฬ€', + 'ร“' => 'Oฬ', + 'ร”' => 'Oฬ‚', + 'ร•' => 'Oฬƒ', + 'ร–' => 'Oฬˆ', + 'ร™' => 'Uฬ€', + 'รš' => 'Uฬ', + 'ร›' => 'Uฬ‚', + 'รœ' => 'Uฬˆ', + 'ร' => 'Yฬ', + 'ร ' => 'aฬ€', + 'รก' => 'aฬ', + 'รข' => 'aฬ‚', + 'รฃ' => 'aฬƒ', + 'รค' => 'aฬˆ', + 'รฅ' => 'aฬŠ', + 'รง' => 'cฬง', + 'รจ' => 'eฬ€', + 'รฉ' => 'eฬ', + 'รช' => 'eฬ‚', + 'รซ' => 'eฬˆ', + 'รฌ' => 'iฬ€', + 'รญ' => 'iฬ', + 'รฎ' => 'iฬ‚', + 'รฏ' => 'iฬˆ', + 'รฑ' => 'nฬƒ', + 'รฒ' => 'oฬ€', + 'รณ' => 'oฬ', + 'รด' => 'oฬ‚', + 'รต' => 'oฬƒ', + 'รถ' => 'oฬˆ', + 'รน' => 'uฬ€', + 'รบ' => 'uฬ', + 'รป' => 'uฬ‚', + 'รผ' => 'uฬˆ', + 'รฝ' => 'yฬ', + 'รฟ' => 'yฬˆ', + 'ฤ€' => 'Aฬ„', + 'ฤ' => 'aฬ„', + 'ฤ‚' => 'Aฬ†', + 'ฤƒ' => 'aฬ†', + 'ฤ„' => 'Aฬจ', + 'ฤ…' => 'aฬจ', + 'ฤ†' => 'Cฬ', + 'ฤ‡' => 'cฬ', + 'ฤˆ' => 'Cฬ‚', + 'ฤ‰' => 'cฬ‚', + 'ฤŠ' => 'Cฬ‡', + 'ฤ‹' => 'cฬ‡', + 'ฤŒ' => 'CฬŒ', + 'ฤ' => 'cฬŒ', + 'ฤŽ' => 'DฬŒ', + 'ฤ' => 'dฬŒ', + 'ฤ’' => 'Eฬ„', + 'ฤ“' => 'eฬ„', + 'ฤ”' => 'Eฬ†', + 'ฤ•' => 'eฬ†', + 'ฤ–' => 'Eฬ‡', + 'ฤ—' => 'eฬ‡', + 'ฤ˜' => 'Eฬจ', + 'ฤ™' => 'eฬจ', + 'ฤš' => 'EฬŒ', + 'ฤ›' => 'eฬŒ', + 'ฤœ' => 'Gฬ‚', + 'ฤ' => 'gฬ‚', + 'ฤž' => 'Gฬ†', + 'ฤŸ' => 'gฬ†', + 'ฤ ' => 'Gฬ‡', + 'ฤก' => 'gฬ‡', + 'ฤข' => 'Gฬง', + 'ฤฃ' => 'gฬง', + 'ฤค' => 'Hฬ‚', + 'ฤฅ' => 'hฬ‚', + 'ฤจ' => 'Iฬƒ', + 'ฤฉ' => 'iฬƒ', + 'ฤช' => 'Iฬ„', + 'ฤซ' => 'iฬ„', + 'ฤฌ' => 'Iฬ†', + 'ฤญ' => 'iฬ†', + 'ฤฎ' => 'Iฬจ', + 'ฤฏ' => 'iฬจ', + 'ฤฐ' => 'Iฬ‡', + 'ฤด' => 'Jฬ‚', + 'ฤต' => 'jฬ‚', + 'ฤถ' => 'Kฬง', + 'ฤท' => 'kฬง', + 'ฤน' => 'Lฬ', + 'ฤบ' => 'lฬ', + 'ฤป' => 'Lฬง', + 'ฤผ' => 'lฬง', + 'ฤฝ' => 'LฬŒ', + 'ฤพ' => 'lฬŒ', + 'ลƒ' => 'Nฬ', + 'ล„' => 'nฬ', + 'ล…' => 'Nฬง', + 'ล†' => 'nฬง', + 'ล‡' => 'NฬŒ', + 'ลˆ' => 'nฬŒ', + 'ลŒ' => 'Oฬ„', + 'ล' => 'oฬ„', + 'ลŽ' => 'Oฬ†', + 'ล' => 'oฬ†', + 'ล' => 'Oฬ‹', + 'ล‘' => 'oฬ‹', + 'ล”' => 'Rฬ', + 'ล•' => 'rฬ', + 'ล–' => 'Rฬง', + 'ล—' => 'rฬง', + 'ล˜' => 'RฬŒ', + 'ล™' => 'rฬŒ', + 'ลš' => 'Sฬ', + 'ล›' => 'sฬ', + 'ลœ' => 'Sฬ‚', + 'ล' => 'sฬ‚', + 'ลž' => 'Sฬง', + 'ลŸ' => 'sฬง', + 'ล ' => 'SฬŒ', + 'ลก' => 'sฬŒ', + 'ลข' => 'Tฬง', + 'ลฃ' => 'tฬง', + 'ลค' => 'TฬŒ', + 'ลฅ' => 'tฬŒ', + 'ลจ' => 'Uฬƒ', + 'ลฉ' => 'uฬƒ', + 'ลช' => 'Uฬ„', + 'ลซ' => 'uฬ„', + 'ลฌ' => 'Uฬ†', + 'ลญ' => 'uฬ†', + 'ลฎ' => 'UฬŠ', + 'ลฏ' => 'uฬŠ', + 'ลฐ' => 'Uฬ‹', + 'ลฑ' => 'uฬ‹', + 'ลฒ' => 'Uฬจ', + 'ลณ' => 'uฬจ', + 'ลด' => 'Wฬ‚', + 'ลต' => 'wฬ‚', + 'ลถ' => 'Yฬ‚', + 'ลท' => 'yฬ‚', + 'ลธ' => 'Yฬˆ', + 'ลน' => 'Zฬ', + 'ลบ' => 'zฬ', + 'ลป' => 'Zฬ‡', + 'ลผ' => 'zฬ‡', + 'ลฝ' => 'ZฬŒ', + 'ลพ' => 'zฬŒ', + 'ฦ ' => 'Oฬ›', + 'ฦก' => 'oฬ›', + 'ฦฏ' => 'Uฬ›', + 'ฦฐ' => 'uฬ›', + 'ว' => 'AฬŒ', + 'วŽ' => 'aฬŒ', + 'ว' => 'IฬŒ', + 'ว' => 'iฬŒ', + 'ว‘' => 'OฬŒ', + 'ว’' => 'oฬŒ', + 'ว“' => 'UฬŒ', + 'ว”' => 'uฬŒ', + 'ว•' => 'Uฬˆฬ„', + 'ว–' => 'uฬˆฬ„', + 'ว—' => 'Uฬˆฬ', + 'ว˜' => 'uฬˆฬ', + 'ว™' => 'UฬˆฬŒ', + 'วš' => 'uฬˆฬŒ', + 'ว›' => 'Uฬˆฬ€', + 'วœ' => 'uฬˆฬ€', + 'วž' => 'Aฬˆฬ„', + 'วŸ' => 'aฬˆฬ„', + 'ว ' => 'Aฬ‡ฬ„', + 'วก' => 'aฬ‡ฬ„', + 'วข' => 'ร†ฬ„', + 'วฃ' => 'รฆฬ„', + 'วฆ' => 'GฬŒ', + 'วง' => 'gฬŒ', + 'วจ' => 'KฬŒ', + 'วฉ' => 'kฬŒ', + 'วช' => 'Oฬจ', + 'วซ' => 'oฬจ', + 'วฌ' => 'Oฬจฬ„', + 'วญ' => 'oฬจฬ„', + 'วฎ' => 'ฦทฬŒ', + 'วฏ' => 'ส’ฬŒ', + 'วฐ' => 'jฬŒ', + 'วด' => 'Gฬ', + 'วต' => 'gฬ', + 'วธ' => 'Nฬ€', + 'วน' => 'nฬ€', + 'วบ' => 'AฬŠฬ', + 'วป' => 'aฬŠฬ', + 'วผ' => 'ร†ฬ', + 'วฝ' => 'รฆฬ', + 'วพ' => 'ร˜ฬ', + 'วฟ' => 'รธฬ', + 'ศ€' => 'Aฬ', + 'ศ' => 'aฬ', + 'ศ‚' => 'Aฬ‘', + 'ศƒ' => 'aฬ‘', + 'ศ„' => 'Eฬ', + 'ศ…' => 'eฬ', + 'ศ†' => 'Eฬ‘', + 'ศ‡' => 'eฬ‘', + 'ศˆ' => 'Iฬ', + 'ศ‰' => 'iฬ', + 'ศŠ' => 'Iฬ‘', + 'ศ‹' => 'iฬ‘', + 'ศŒ' => 'Oฬ', + 'ศ' => 'oฬ', + 'ศŽ' => 'Oฬ‘', + 'ศ' => 'oฬ‘', + 'ศ' => 'Rฬ', + 'ศ‘' => 'rฬ', + 'ศ’' => 'Rฬ‘', + 'ศ“' => 'rฬ‘', + 'ศ”' => 'Uฬ', + 'ศ•' => 'uฬ', + 'ศ–' => 'Uฬ‘', + 'ศ—' => 'uฬ‘', + 'ศ˜' => 'Sฬฆ', + 'ศ™' => 'sฬฆ', + 'ศš' => 'Tฬฆ', + 'ศ›' => 'tฬฆ', + 'ศž' => 'HฬŒ', + 'ศŸ' => 'hฬŒ', + 'ศฆ' => 'Aฬ‡', + 'ศง' => 'aฬ‡', + 'ศจ' => 'Eฬง', + 'ศฉ' => 'eฬง', + 'ศช' => 'Oฬˆฬ„', + 'ศซ' => 'oฬˆฬ„', + 'ศฌ' => 'Oฬƒฬ„', + 'ศญ' => 'oฬƒฬ„', + 'ศฎ' => 'Oฬ‡', + 'ศฏ' => 'oฬ‡', + 'ศฐ' => 'Oฬ‡ฬ„', + 'ศฑ' => 'oฬ‡ฬ„', + 'ศฒ' => 'Yฬ„', + 'ศณ' => 'yฬ„', + 'อ€' => 'ฬ€', + 'อ' => 'ฬ', + 'อƒ' => 'ฬ“', + 'อ„' => 'ฬˆฬ', + 'อด' => 'สน', + 'อพ' => ';', + 'ฮ…' => 'ยจฬ', + 'ฮ†' => 'ฮ‘ฬ', + 'ฮ‡' => 'ยท', + 'ฮˆ' => 'ฮ•ฬ', + 'ฮ‰' => 'ฮ—ฬ', + 'ฮŠ' => 'ฮ™ฬ', + 'ฮŒ' => 'ฮŸฬ', + 'ฮŽ' => 'ฮฅฬ', + 'ฮ' => 'ฮฉฬ', + 'ฮ' => 'ฮนฬˆฬ', + 'ฮช' => 'ฮ™ฬˆ', + 'ฮซ' => 'ฮฅฬˆ', + 'ฮฌ' => 'ฮฑฬ', + 'ฮญ' => 'ฮตฬ', + 'ฮฎ' => 'ฮทฬ', + 'ฮฏ' => 'ฮนฬ', + 'ฮฐ' => 'ฯ…ฬˆฬ', + 'ฯŠ' => 'ฮนฬˆ', + 'ฯ‹' => 'ฯ…ฬˆ', + 'ฯŒ' => 'ฮฟฬ', + 'ฯ' => 'ฯ…ฬ', + 'ฯŽ' => 'ฯ‰ฬ', + 'ฯ“' => 'ฯ’ฬ', + 'ฯ”' => 'ฯ’ฬˆ', + 'ะ€' => 'ะ•ฬ€', + 'ะ' => 'ะ•ฬˆ', + 'ะƒ' => 'ะ“ฬ', + 'ะ‡' => 'ะ†ฬˆ', + 'ะŒ' => 'ะšฬ', + 'ะ' => 'ะ˜ฬ€', + 'ะŽ' => 'ะฃฬ†', + 'ะ™' => 'ะ˜ฬ†', + 'ะน' => 'ะธฬ†', + 'ั' => 'ะตฬ€', + 'ั‘' => 'ะตฬˆ', + 'ั“' => 'ะณฬ', + 'ั—' => 'ั–ฬˆ', + 'ัœ' => 'ะบฬ', + 'ั' => 'ะธฬ€', + 'ัž' => 'ัƒฬ†', + 'ัถ' => 'ัดฬ', + 'ัท' => 'ัตฬ', + 'ำ' => 'ะ–ฬ†', + 'ำ‚' => 'ะถฬ†', + 'ำ' => 'ะฬ†', + 'ำ‘' => 'ะฐฬ†', + 'ำ’' => 'ะฬˆ', + 'ำ“' => 'ะฐฬˆ', + 'ำ–' => 'ะ•ฬ†', + 'ำ—' => 'ะตฬ†', + 'ำš' => 'ำ˜ฬˆ', + 'ำ›' => 'ำ™ฬˆ', + 'ำœ' => 'ะ–ฬˆ', + 'ำ' => 'ะถฬˆ', + 'ำž' => 'ะ—ฬˆ', + 'ำŸ' => 'ะทฬˆ', + 'ำข' => 'ะ˜ฬ„', + 'ำฃ' => 'ะธฬ„', + 'ำค' => 'ะ˜ฬˆ', + 'ำฅ' => 'ะธฬˆ', + 'ำฆ' => 'ะžฬˆ', + 'ำง' => 'ะพฬˆ', + 'ำช' => 'ำจฬˆ', + 'ำซ' => 'ำฉฬˆ', + 'ำฌ' => 'ะญฬˆ', + 'ำญ' => 'ัฬˆ', + 'ำฎ' => 'ะฃฬ„', + 'ำฏ' => 'ัƒฬ„', + 'ำฐ' => 'ะฃฬˆ', + 'ำฑ' => 'ัƒฬˆ', + 'ำฒ' => 'ะฃฬ‹', + 'ำณ' => 'ัƒฬ‹', + 'ำด' => 'ะงฬˆ', + 'ำต' => 'ั‡ฬˆ', + 'ำธ' => 'ะซฬˆ', + 'ำน' => 'ั‹ฬˆ', + 'ุข' => 'ุงู“', + 'ุฃ' => 'ุงู”', + 'ุค' => 'ูˆู”', + 'ุฅ' => 'ุงู•', + 'ุฆ' => 'ูŠู”', + '€' => '•ู”', + '‚' => 'ู”', + '“' => '’ู”', + 'เคฉ' => 'เคจเคผ', + 'เคฑ' => 'เคฐเคผ', + 'เคด' => 'เคณเคผ', + 'เฅ˜' => 'เค•เคผ', + 'เฅ™' => 'เค–เคผ', + 'เฅš' => 'เค—เคผ', + 'เฅ›' => 'เคœเคผ', + 'เฅœ' => 'เคกเคผ', + 'เฅ' => 'เคขเคผ', + 'เฅž' => 'เคซเคผ', + 'เฅŸ' => 'เคฏเคผ', + 'เง‹' => 'เง‡เฆพ', + 'เงŒ' => 'เง‡เง—', + 'เงœ' => 'เฆกเฆผ', + 'เง' => 'เฆขเฆผ', + 'เงŸ' => 'เฆฏเฆผ', + 'เจณ' => 'เจฒเจผ', + 'เจถ' => 'เจธเจผ', + 'เฉ™' => 'เจ–เจผ', + 'เฉš' => 'เจ—เจผ', + 'เฉ›' => 'เจœเจผ', + 'เฉž' => 'เจซเจผ', + 'เญˆ' => 'เญ‡เญ–', + 'เญ‹' => 'เญ‡เฌพ', + 'เญŒ' => 'เญ‡เญ—', + 'เญœ' => 'เฌกเฌผ', + 'เญ' => 'เฌขเฌผ', + 'เฎ”' => 'เฎ’เฏ—', + 'เฏŠ' => 'เฏ†เฎพ', + 'เฏ‹' => 'เฏ‡เฎพ', + 'เฏŒ' => 'เฏ†เฏ—', + 'เฑˆ' => 'เฑ†เฑ–', + 'เณ€' => 'เฒฟเณ•', + 'เณ‡' => 'เณ†เณ•', + 'เณˆ' => 'เณ†เณ–', + 'เณŠ' => 'เณ†เณ‚', + 'เณ‹' => 'เณ†เณ‚เณ•', + 'เตŠ' => 'เต†เดพ', + 'เต‹' => 'เต‡เดพ', + 'เตŒ' => 'เต†เต—', + 'เทš' => 'เท™เทŠ', + 'เทœ' => 'เท™เท', + 'เท' => 'เท™เทเทŠ', + 'เทž' => 'เท™เทŸ', + 'เฝƒ' => 'เฝ‚เพท', + 'เฝ' => 'เฝŒเพท', + 'เฝ’' => 'เฝ‘เพท', + 'เฝ—' => 'เฝ–เพท', + 'เฝœ' => 'เฝ›เพท', + 'เฝฉ' => 'เฝ€เพต', + 'เฝณ' => 'เฝฑเฝฒ', + 'เฝต' => 'เฝฑเฝด', + 'เฝถ' => 'เพฒเพ€', + 'เฝธ' => 'เพณเพ€', + 'เพ' => 'เฝฑเพ€', + 'เพ“' => 'เพ’เพท', + 'เพ' => 'เพœเพท', + 'เพข' => 'เพกเพท', + 'เพง' => 'เพฆเพท', + 'เพฌ' => 'เพซเพท', + 'เพน' => 'เพเพต', + 'แ€ฆ' => 'แ€ฅแ€ฎ', + 'แฌ†' => 'แฌ…แฌต', + 'แฌˆ' => 'แฌ‡แฌต', + 'แฌŠ' => 'แฌ‰แฌต', + 'แฌŒ' => 'แฌ‹แฌต', + 'แฌŽ' => 'แฌแฌต', + 'แฌ’' => 'แฌ‘แฌต', + 'แฌป' => 'แฌบแฌต', + 'แฌฝ' => 'แฌผแฌต', + 'แญ€' => 'แฌพแฌต', + 'แญ' => 'แฌฟแฌต', + 'แญƒ' => 'แญ‚แฌต', + 'แธ€' => 'Aฬฅ', + 'แธ' => 'aฬฅ', + 'แธ‚' => 'Bฬ‡', + 'แธƒ' => 'bฬ‡', + 'แธ„' => 'Bฬฃ', + 'แธ…' => 'bฬฃ', + 'แธ†' => 'Bฬฑ', + 'แธ‡' => 'bฬฑ', + 'แธˆ' => 'Cฬงฬ', + 'แธ‰' => 'cฬงฬ', + 'แธŠ' => 'Dฬ‡', + 'แธ‹' => 'dฬ‡', + 'แธŒ' => 'Dฬฃ', + 'แธ' => 'dฬฃ', + 'แธŽ' => 'Dฬฑ', + 'แธ' => 'dฬฑ', + 'แธ' => 'Dฬง', + 'แธ‘' => 'dฬง', + 'แธ’' => 'Dฬญ', + 'แธ“' => 'dฬญ', + 'แธ”' => 'Eฬ„ฬ€', + 'แธ•' => 'eฬ„ฬ€', + 'แธ–' => 'Eฬ„ฬ', + 'แธ—' => 'eฬ„ฬ', + 'แธ˜' => 'Eฬญ', + 'แธ™' => 'eฬญ', + 'แธš' => 'Eฬฐ', + 'แธ›' => 'eฬฐ', + 'แธœ' => 'Eฬงฬ†', + 'แธ' => 'eฬงฬ†', + 'แธž' => 'Fฬ‡', + 'แธŸ' => 'fฬ‡', + 'แธ ' => 'Gฬ„', + 'แธก' => 'gฬ„', + 'แธข' => 'Hฬ‡', + 'แธฃ' => 'hฬ‡', + 'แธค' => 'Hฬฃ', + 'แธฅ' => 'hฬฃ', + 'แธฆ' => 'Hฬˆ', + 'แธง' => 'hฬˆ', + 'แธจ' => 'Hฬง', + 'แธฉ' => 'hฬง', + 'แธช' => 'Hฬฎ', + 'แธซ' => 'hฬฎ', + 'แธฌ' => 'Iฬฐ', + 'แธญ' => 'iฬฐ', + 'แธฎ' => 'Iฬˆฬ', + 'แธฏ' => 'iฬˆฬ', + 'แธฐ' => 'Kฬ', + 'แธฑ' => 'kฬ', + 'แธฒ' => 'Kฬฃ', + 'แธณ' => 'kฬฃ', + 'แธด' => 'Kฬฑ', + 'แธต' => 'kฬฑ', + 'แธถ' => 'Lฬฃ', + 'แธท' => 'lฬฃ', + 'แธธ' => 'Lฬฃฬ„', + 'แธน' => 'lฬฃฬ„', + 'แธบ' => 'Lฬฑ', + 'แธป' => 'lฬฑ', + 'แธผ' => 'Lฬญ', + 'แธฝ' => 'lฬญ', + 'แธพ' => 'Mฬ', + 'แธฟ' => 'mฬ', + 'แน€' => 'Mฬ‡', + 'แน' => 'mฬ‡', + 'แน‚' => 'Mฬฃ', + 'แนƒ' => 'mฬฃ', + 'แน„' => 'Nฬ‡', + 'แน…' => 'nฬ‡', + 'แน†' => 'Nฬฃ', + 'แน‡' => 'nฬฃ', + 'แนˆ' => 'Nฬฑ', + 'แน‰' => 'nฬฑ', + 'แนŠ' => 'Nฬญ', + 'แน‹' => 'nฬญ', + 'แนŒ' => 'Oฬƒฬ', + 'แน' => 'oฬƒฬ', + 'แนŽ' => 'Oฬƒฬˆ', + 'แน' => 'oฬƒฬˆ', + 'แน' => 'Oฬ„ฬ€', + 'แน‘' => 'oฬ„ฬ€', + 'แน’' => 'Oฬ„ฬ', + 'แน“' => 'oฬ„ฬ', + 'แน”' => 'Pฬ', + 'แน•' => 'pฬ', + 'แน–' => 'Pฬ‡', + 'แน—' => 'pฬ‡', + 'แน˜' => 'Rฬ‡', + 'แน™' => 'rฬ‡', + 'แนš' => 'Rฬฃ', + 'แน›' => 'rฬฃ', + 'แนœ' => 'Rฬฃฬ„', + 'แน' => 'rฬฃฬ„', + 'แนž' => 'Rฬฑ', + 'แนŸ' => 'rฬฑ', + 'แน ' => 'Sฬ‡', + 'แนก' => 'sฬ‡', + 'แนข' => 'Sฬฃ', + 'แนฃ' => 'sฬฃ', + 'แนค' => 'Sฬฬ‡', + 'แนฅ' => 'sฬฬ‡', + 'แนฆ' => 'SฬŒฬ‡', + 'แนง' => 'sฬŒฬ‡', + 'แนจ' => 'Sฬฃฬ‡', + 'แนฉ' => 'sฬฃฬ‡', + 'แนช' => 'Tฬ‡', + 'แนซ' => 'tฬ‡', + 'แนฌ' => 'Tฬฃ', + 'แนญ' => 'tฬฃ', + 'แนฎ' => 'Tฬฑ', + 'แนฏ' => 'tฬฑ', + 'แนฐ' => 'Tฬญ', + 'แนฑ' => 'tฬญ', + 'แนฒ' => 'Uฬค', + 'แนณ' => 'uฬค', + 'แนด' => 'Uฬฐ', + 'แนต' => 'uฬฐ', + 'แนถ' => 'Uฬญ', + 'แนท' => 'uฬญ', + 'แนธ' => 'Uฬƒฬ', + 'แนน' => 'uฬƒฬ', + 'แนบ' => 'Uฬ„ฬˆ', + 'แนป' => 'uฬ„ฬˆ', + 'แนผ' => 'Vฬƒ', + 'แนฝ' => 'vฬƒ', + 'แนพ' => 'Vฬฃ', + 'แนฟ' => 'vฬฃ', + 'แบ€' => 'Wฬ€', + 'แบ' => 'wฬ€', + 'แบ‚' => 'Wฬ', + 'แบƒ' => 'wฬ', + 'แบ„' => 'Wฬˆ', + 'แบ…' => 'wฬˆ', + 'แบ†' => 'Wฬ‡', + 'แบ‡' => 'wฬ‡', + 'แบˆ' => 'Wฬฃ', + 'แบ‰' => 'wฬฃ', + 'แบŠ' => 'Xฬ‡', + 'แบ‹' => 'xฬ‡', + 'แบŒ' => 'Xฬˆ', + 'แบ' => 'xฬˆ', + 'แบŽ' => 'Yฬ‡', + 'แบ' => 'yฬ‡', + 'แบ' => 'Zฬ‚', + 'แบ‘' => 'zฬ‚', + 'แบ’' => 'Zฬฃ', + 'แบ“' => 'zฬฃ', + 'แบ”' => 'Zฬฑ', + 'แบ•' => 'zฬฑ', + 'แบ–' => 'hฬฑ', + 'แบ—' => 'tฬˆ', + 'แบ˜' => 'wฬŠ', + 'แบ™' => 'yฬŠ', + 'แบ›' => 'ลฟฬ‡', + 'แบ ' => 'Aฬฃ', + 'แบก' => 'aฬฃ', + 'แบข' => 'Aฬ‰', + 'แบฃ' => 'aฬ‰', + 'แบค' => 'Aฬ‚ฬ', + 'แบฅ' => 'aฬ‚ฬ', + 'แบฆ' => 'Aฬ‚ฬ€', + 'แบง' => 'aฬ‚ฬ€', + 'แบจ' => 'Aฬ‚ฬ‰', + 'แบฉ' => 'aฬ‚ฬ‰', + 'แบช' => 'Aฬ‚ฬƒ', + 'แบซ' => 'aฬ‚ฬƒ', + 'แบฌ' => 'Aฬฃฬ‚', + 'แบญ' => 'aฬฃฬ‚', + 'แบฎ' => 'Aฬ†ฬ', + 'แบฏ' => 'aฬ†ฬ', + 'แบฐ' => 'Aฬ†ฬ€', + 'แบฑ' => 'aฬ†ฬ€', + 'แบฒ' => 'Aฬ†ฬ‰', + 'แบณ' => 'aฬ†ฬ‰', + 'แบด' => 'Aฬ†ฬƒ', + 'แบต' => 'aฬ†ฬƒ', + 'แบถ' => 'Aฬฃฬ†', + 'แบท' => 'aฬฃฬ†', + 'แบธ' => 'Eฬฃ', + 'แบน' => 'eฬฃ', + 'แบบ' => 'Eฬ‰', + 'แบป' => 'eฬ‰', + 'แบผ' => 'Eฬƒ', + 'แบฝ' => 'eฬƒ', + 'แบพ' => 'Eฬ‚ฬ', + 'แบฟ' => 'eฬ‚ฬ', + 'แป€' => 'Eฬ‚ฬ€', + 'แป' => 'eฬ‚ฬ€', + 'แป‚' => 'Eฬ‚ฬ‰', + 'แปƒ' => 'eฬ‚ฬ‰', + 'แป„' => 'Eฬ‚ฬƒ', + 'แป…' => 'eฬ‚ฬƒ', + 'แป†' => 'Eฬฃฬ‚', + 'แป‡' => 'eฬฃฬ‚', + 'แปˆ' => 'Iฬ‰', + 'แป‰' => 'iฬ‰', + 'แปŠ' => 'Iฬฃ', + 'แป‹' => 'iฬฃ', + 'แปŒ' => 'Oฬฃ', + 'แป' => 'oฬฃ', + 'แปŽ' => 'Oฬ‰', + 'แป' => 'oฬ‰', + 'แป' => 'Oฬ‚ฬ', + 'แป‘' => 'oฬ‚ฬ', + 'แป’' => 'Oฬ‚ฬ€', + 'แป“' => 'oฬ‚ฬ€', + 'แป”' => 'Oฬ‚ฬ‰', + 'แป•' => 'oฬ‚ฬ‰', + 'แป–' => 'Oฬ‚ฬƒ', + 'แป—' => 'oฬ‚ฬƒ', + 'แป˜' => 'Oฬฃฬ‚', + 'แป™' => 'oฬฃฬ‚', + 'แปš' => 'Oฬ›ฬ', + 'แป›' => 'oฬ›ฬ', + 'แปœ' => 'Oฬ›ฬ€', + 'แป' => 'oฬ›ฬ€', + 'แปž' => 'Oฬ›ฬ‰', + 'แปŸ' => 'oฬ›ฬ‰', + 'แป ' => 'Oฬ›ฬƒ', + 'แปก' => 'oฬ›ฬƒ', + 'แปข' => 'Oฬ›ฬฃ', + 'แปฃ' => 'oฬ›ฬฃ', + 'แปค' => 'Uฬฃ', + 'แปฅ' => 'uฬฃ', + 'แปฆ' => 'Uฬ‰', + 'แปง' => 'uฬ‰', + 'แปจ' => 'Uฬ›ฬ', + 'แปฉ' => 'uฬ›ฬ', + 'แปช' => 'Uฬ›ฬ€', + 'แปซ' => 'uฬ›ฬ€', + 'แปฌ' => 'Uฬ›ฬ‰', + 'แปญ' => 'uฬ›ฬ‰', + 'แปฎ' => 'Uฬ›ฬƒ', + 'แปฏ' => 'uฬ›ฬƒ', + 'แปฐ' => 'Uฬ›ฬฃ', + 'แปฑ' => 'uฬ›ฬฃ', + 'แปฒ' => 'Yฬ€', + 'แปณ' => 'yฬ€', + 'แปด' => 'Yฬฃ', + 'แปต' => 'yฬฃ', + 'แปถ' => 'Yฬ‰', + 'แปท' => 'yฬ‰', + 'แปธ' => 'Yฬƒ', + 'แปน' => 'yฬƒ', + 'แผ€' => 'ฮฑฬ“', + 'แผ' => 'ฮฑฬ”', + 'แผ‚' => 'ฮฑฬ“ฬ€', + 'แผƒ' => 'ฮฑฬ”ฬ€', + 'แผ„' => 'ฮฑฬ“ฬ', + 'แผ…' => 'ฮฑฬ”ฬ', + 'แผ†' => 'ฮฑฬ“อ‚', + 'แผ‡' => 'ฮฑฬ”อ‚', + 'แผˆ' => 'ฮ‘ฬ“', + 'แผ‰' => 'ฮ‘ฬ”', + 'แผŠ' => 'ฮ‘ฬ“ฬ€', + 'แผ‹' => 'ฮ‘ฬ”ฬ€', + 'แผŒ' => 'ฮ‘ฬ“ฬ', + 'แผ' => 'ฮ‘ฬ”ฬ', + 'แผŽ' => 'ฮ‘ฬ“อ‚', + 'แผ' => 'ฮ‘ฬ”อ‚', + 'แผ' => 'ฮตฬ“', + 'แผ‘' => 'ฮตฬ”', + 'แผ’' => 'ฮตฬ“ฬ€', + 'แผ“' => 'ฮตฬ”ฬ€', + 'แผ”' => 'ฮตฬ“ฬ', + 'แผ•' => 'ฮตฬ”ฬ', + 'แผ˜' => 'ฮ•ฬ“', + 'แผ™' => 'ฮ•ฬ”', + 'แผš' => 'ฮ•ฬ“ฬ€', + 'แผ›' => 'ฮ•ฬ”ฬ€', + 'แผœ' => 'ฮ•ฬ“ฬ', + 'แผ' => 'ฮ•ฬ”ฬ', + 'แผ ' => 'ฮทฬ“', + 'แผก' => 'ฮทฬ”', + 'แผข' => 'ฮทฬ“ฬ€', + 'แผฃ' => 'ฮทฬ”ฬ€', + 'แผค' => 'ฮทฬ“ฬ', + 'แผฅ' => 'ฮทฬ”ฬ', + 'แผฆ' => 'ฮทฬ“อ‚', + 'แผง' => 'ฮทฬ”อ‚', + 'แผจ' => 'ฮ—ฬ“', + 'แผฉ' => 'ฮ—ฬ”', + 'แผช' => 'ฮ—ฬ“ฬ€', + 'แผซ' => 'ฮ—ฬ”ฬ€', + 'แผฌ' => 'ฮ—ฬ“ฬ', + 'แผญ' => 'ฮ—ฬ”ฬ', + 'แผฎ' => 'ฮ—ฬ“อ‚', + 'แผฏ' => 'ฮ—ฬ”อ‚', + 'แผฐ' => 'ฮนฬ“', + 'แผฑ' => 'ฮนฬ”', + 'แผฒ' => 'ฮนฬ“ฬ€', + 'แผณ' => 'ฮนฬ”ฬ€', + 'แผด' => 'ฮนฬ“ฬ', + 'แผต' => 'ฮนฬ”ฬ', + 'แผถ' => 'ฮนฬ“อ‚', + 'แผท' => 'ฮนฬ”อ‚', + 'แผธ' => 'ฮ™ฬ“', + 'แผน' => 'ฮ™ฬ”', + 'แผบ' => 'ฮ™ฬ“ฬ€', + 'แผป' => 'ฮ™ฬ”ฬ€', + 'แผผ' => 'ฮ™ฬ“ฬ', + 'แผฝ' => 'ฮ™ฬ”ฬ', + 'แผพ' => 'ฮ™ฬ“อ‚', + 'แผฟ' => 'ฮ™ฬ”อ‚', + 'แฝ€' => 'ฮฟฬ“', + 'แฝ' => 'ฮฟฬ”', + 'แฝ‚' => 'ฮฟฬ“ฬ€', + 'แฝƒ' => 'ฮฟฬ”ฬ€', + 'แฝ„' => 'ฮฟฬ“ฬ', + 'แฝ…' => 'ฮฟฬ”ฬ', + 'แฝˆ' => 'ฮŸฬ“', + 'แฝ‰' => 'ฮŸฬ”', + 'แฝŠ' => 'ฮŸฬ“ฬ€', + 'แฝ‹' => 'ฮŸฬ”ฬ€', + 'แฝŒ' => 'ฮŸฬ“ฬ', + 'แฝ' => 'ฮŸฬ”ฬ', + 'แฝ' => 'ฯ…ฬ“', + 'แฝ‘' => 'ฯ…ฬ”', + 'แฝ’' => 'ฯ…ฬ“ฬ€', + 'แฝ“' => 'ฯ…ฬ”ฬ€', + 'แฝ”' => 'ฯ…ฬ“ฬ', + 'แฝ•' => 'ฯ…ฬ”ฬ', + 'แฝ–' => 'ฯ…ฬ“อ‚', + 'แฝ—' => 'ฯ…ฬ”อ‚', + 'แฝ™' => 'ฮฅฬ”', + 'แฝ›' => 'ฮฅฬ”ฬ€', + 'แฝ' => 'ฮฅฬ”ฬ', + 'แฝŸ' => 'ฮฅฬ”อ‚', + 'แฝ ' => 'ฯ‰ฬ“', + 'แฝก' => 'ฯ‰ฬ”', + 'แฝข' => 'ฯ‰ฬ“ฬ€', + 'แฝฃ' => 'ฯ‰ฬ”ฬ€', + 'แฝค' => 'ฯ‰ฬ“ฬ', + 'แฝฅ' => 'ฯ‰ฬ”ฬ', + 'แฝฆ' => 'ฯ‰ฬ“อ‚', + 'แฝง' => 'ฯ‰ฬ”อ‚', + 'แฝจ' => 'ฮฉฬ“', + 'แฝฉ' => 'ฮฉฬ”', + 'แฝช' => 'ฮฉฬ“ฬ€', + 'แฝซ' => 'ฮฉฬ”ฬ€', + 'แฝฌ' => 'ฮฉฬ“ฬ', + 'แฝญ' => 'ฮฉฬ”ฬ', + 'แฝฎ' => 'ฮฉฬ“อ‚', + 'แฝฏ' => 'ฮฉฬ”อ‚', + 'แฝฐ' => 'ฮฑฬ€', + 'แฝฑ' => 'ฮฑฬ', + 'แฝฒ' => 'ฮตฬ€', + 'แฝณ' => 'ฮตฬ', + 'แฝด' => 'ฮทฬ€', + 'แฝต' => 'ฮทฬ', + 'แฝถ' => 'ฮนฬ€', + 'แฝท' => 'ฮนฬ', + 'แฝธ' => 'ฮฟฬ€', + 'แฝน' => 'ฮฟฬ', + 'แฝบ' => 'ฯ…ฬ€', + 'แฝป' => 'ฯ…ฬ', + 'แฝผ' => 'ฯ‰ฬ€', + 'แฝฝ' => 'ฯ‰ฬ', + 'แพ€' => 'ฮฑฬ“อ…', + 'แพ' => 'ฮฑฬ”อ…', + 'แพ‚' => 'ฮฑฬ“ฬ€อ…', + 'แพƒ' => 'ฮฑฬ”ฬ€อ…', + 'แพ„' => 'ฮฑฬ“ฬอ…', + 'แพ…' => 'ฮฑฬ”ฬอ…', + 'แพ†' => 'ฮฑฬ“อ‚อ…', + 'แพ‡' => 'ฮฑฬ”อ‚อ…', + 'แพˆ' => 'ฮ‘ฬ“อ…', + 'แพ‰' => 'ฮ‘ฬ”อ…', + 'แพŠ' => 'ฮ‘ฬ“ฬ€อ…', + 'แพ‹' => 'ฮ‘ฬ”ฬ€อ…', + 'แพŒ' => 'ฮ‘ฬ“ฬอ…', + 'แพ' => 'ฮ‘ฬ”ฬอ…', + 'แพŽ' => 'ฮ‘ฬ“อ‚อ…', + 'แพ' => 'ฮ‘ฬ”อ‚อ…', + 'แพ' => 'ฮทฬ“อ…', + 'แพ‘' => 'ฮทฬ”อ…', + 'แพ’' => 'ฮทฬ“ฬ€อ…', + 'แพ“' => 'ฮทฬ”ฬ€อ…', + 'แพ”' => 'ฮทฬ“ฬอ…', + 'แพ•' => 'ฮทฬ”ฬอ…', + 'แพ–' => 'ฮทฬ“อ‚อ…', + 'แพ—' => 'ฮทฬ”อ‚อ…', + 'แพ˜' => 'ฮ—ฬ“อ…', + 'แพ™' => 'ฮ—ฬ”อ…', + 'แพš' => 'ฮ—ฬ“ฬ€อ…', + 'แพ›' => 'ฮ—ฬ”ฬ€อ…', + 'แพœ' => 'ฮ—ฬ“ฬอ…', + 'แพ' => 'ฮ—ฬ”ฬอ…', + 'แพž' => 'ฮ—ฬ“อ‚อ…', + 'แพŸ' => 'ฮ—ฬ”อ‚อ…', + 'แพ ' => 'ฯ‰ฬ“อ…', + 'แพก' => 'ฯ‰ฬ”อ…', + 'แพข' => 'ฯ‰ฬ“ฬ€อ…', + 'แพฃ' => 'ฯ‰ฬ”ฬ€อ…', + 'แพค' => 'ฯ‰ฬ“ฬอ…', + 'แพฅ' => 'ฯ‰ฬ”ฬอ…', + 'แพฆ' => 'ฯ‰ฬ“อ‚อ…', + 'แพง' => 'ฯ‰ฬ”อ‚อ…', + 'แพจ' => 'ฮฉฬ“อ…', + 'แพฉ' => 'ฮฉฬ”อ…', + 'แพช' => 'ฮฉฬ“ฬ€อ…', + 'แพซ' => 'ฮฉฬ”ฬ€อ…', + 'แพฌ' => 'ฮฉฬ“ฬอ…', + 'แพญ' => 'ฮฉฬ”ฬอ…', + 'แพฎ' => 'ฮฉฬ“อ‚อ…', + 'แพฏ' => 'ฮฉฬ”อ‚อ…', + 'แพฐ' => 'ฮฑฬ†', + 'แพฑ' => 'ฮฑฬ„', + 'แพฒ' => 'ฮฑฬ€อ…', + 'แพณ' => 'ฮฑอ…', + 'แพด' => 'ฮฑฬอ…', + 'แพถ' => 'ฮฑอ‚', + 'แพท' => 'ฮฑอ‚อ…', + 'แพธ' => 'ฮ‘ฬ†', + 'แพน' => 'ฮ‘ฬ„', + 'แพบ' => 'ฮ‘ฬ€', + 'แพป' => 'ฮ‘ฬ', + 'แพผ' => 'ฮ‘อ…', + 'แพพ' => 'ฮน', + 'แฟ' => 'ยจอ‚', + 'แฟ‚' => 'ฮทฬ€อ…', + 'แฟƒ' => 'ฮทอ…', + 'แฟ„' => 'ฮทฬอ…', + 'แฟ†' => 'ฮทอ‚', + 'แฟ‡' => 'ฮทอ‚อ…', + 'แฟˆ' => 'ฮ•ฬ€', + 'แฟ‰' => 'ฮ•ฬ', + 'แฟŠ' => 'ฮ—ฬ€', + 'แฟ‹' => 'ฮ—ฬ', + 'แฟŒ' => 'ฮ—อ…', + 'แฟ' => 'แพฟฬ€', + 'แฟŽ' => 'แพฟฬ', + 'แฟ' => 'แพฟอ‚', + 'แฟ' => 'ฮนฬ†', + 'แฟ‘' => 'ฮนฬ„', + 'แฟ’' => 'ฮนฬˆฬ€', + 'แฟ“' => 'ฮนฬˆฬ', + 'แฟ–' => 'ฮนอ‚', + 'แฟ—' => 'ฮนฬˆอ‚', + 'แฟ˜' => 'ฮ™ฬ†', + 'แฟ™' => 'ฮ™ฬ„', + 'แฟš' => 'ฮ™ฬ€', + 'แฟ›' => 'ฮ™ฬ', + 'แฟ' => 'แฟพฬ€', + 'แฟž' => 'แฟพฬ', + 'แฟŸ' => 'แฟพอ‚', + 'แฟ ' => 'ฯ…ฬ†', + 'แฟก' => 'ฯ…ฬ„', + 'แฟข' => 'ฯ…ฬˆฬ€', + 'แฟฃ' => 'ฯ…ฬˆฬ', + 'แฟค' => 'ฯฬ“', + 'แฟฅ' => 'ฯฬ”', + 'แฟฆ' => 'ฯ…อ‚', + 'แฟง' => 'ฯ…ฬˆอ‚', + 'แฟจ' => 'ฮฅฬ†', + 'แฟฉ' => 'ฮฅฬ„', + 'แฟช' => 'ฮฅฬ€', + 'แฟซ' => 'ฮฅฬ', + 'แฟฌ' => 'ฮกฬ”', + 'แฟญ' => 'ยจฬ€', + 'แฟฎ' => 'ยจฬ', + 'แฟฏ' => '`', + 'แฟฒ' => 'ฯ‰ฬ€อ…', + 'แฟณ' => 'ฯ‰อ…', + 'แฟด' => 'ฯ‰ฬอ…', + 'แฟถ' => 'ฯ‰อ‚', + 'แฟท' => 'ฯ‰อ‚อ…', + 'แฟธ' => 'ฮŸฬ€', + 'แฟน' => 'ฮŸฬ', + 'แฟบ' => 'ฮฉฬ€', + 'แฟป' => 'ฮฉฬ', + 'แฟผ' => 'ฮฉอ…', + 'แฟฝ' => 'ยด', + 'โ€€' => 'โ€‚', + 'โ€' => 'โ€ƒ', + 'โ„ฆ' => 'ฮฉ', + 'โ„ช' => 'K', + 'โ„ซ' => 'AฬŠ', + 'โ†š' => 'โ†ฬธ', + 'โ†›' => 'โ†’ฬธ', + 'โ†ฎ' => 'โ†”ฬธ', + 'โ‡' => 'โ‡ฬธ', + 'โ‡Ž' => 'โ‡”ฬธ', + 'โ‡' => 'โ‡’ฬธ', + 'โˆ„' => 'โˆƒฬธ', + 'โˆ‰' => 'โˆˆฬธ', + 'โˆŒ' => 'โˆ‹ฬธ', + 'โˆค' => 'โˆฃฬธ', + 'โˆฆ' => 'โˆฅฬธ', + 'โ‰' => 'โˆผฬธ', + 'โ‰„' => 'โ‰ƒฬธ', + 'โ‰‡' => 'โ‰…ฬธ', + 'โ‰‰' => 'โ‰ˆฬธ', + 'โ‰ ' => '=ฬธ', + 'โ‰ข' => 'โ‰กฬธ', + 'โ‰ญ' => 'โ‰ฬธ', + 'โ‰ฎ' => '<ฬธ', + 'โ‰ฏ' => '>ฬธ', + 'โ‰ฐ' => 'โ‰คฬธ', + 'โ‰ฑ' => 'โ‰ฅฬธ', + 'โ‰ด' => 'โ‰ฒฬธ', + 'โ‰ต' => 'โ‰ณฬธ', + 'โ‰ธ' => 'โ‰ถฬธ', + 'โ‰น' => 'โ‰ทฬธ', + 'โŠ€' => 'โ‰บฬธ', + 'โŠ' => 'โ‰ปฬธ', + 'โŠ„' => 'โŠ‚ฬธ', + 'โŠ…' => 'โŠƒฬธ', + 'โŠˆ' => 'โŠ†ฬธ', + 'โŠ‰' => 'โŠ‡ฬธ', + 'โŠฌ' => 'โŠขฬธ', + 'โŠญ' => 'โŠจฬธ', + 'โŠฎ' => 'โŠฉฬธ', + 'โŠฏ' => 'โŠซฬธ', + 'โ‹ ' => 'โ‰ผฬธ', + 'โ‹ก' => 'โ‰ฝฬธ', + 'โ‹ข' => 'โŠ‘ฬธ', + 'โ‹ฃ' => 'โŠ’ฬธ', + 'โ‹ช' => 'โŠฒฬธ', + 'โ‹ซ' => 'โŠณฬธ', + 'โ‹ฌ' => 'โŠดฬธ', + 'โ‹ญ' => 'โŠตฬธ', + 'โŒฉ' => 'ใ€ˆ', + 'โŒช' => 'ใ€‰', + 'โซœ' => 'โซฬธ', + 'ใŒ' => 'ใ‹ใ‚™', + 'ใŽ' => 'ใใ‚™', + 'ใ' => 'ใใ‚™', + 'ใ’' => 'ใ‘ใ‚™', + 'ใ”' => 'ใ“ใ‚™', + 'ใ–' => 'ใ•ใ‚™', + 'ใ˜' => 'ใ—ใ‚™', + 'ใš' => 'ใ™ใ‚™', + 'ใœ' => 'ใ›ใ‚™', + 'ใž' => 'ใใ‚™', + 'ใ ' => 'ใŸใ‚™', + 'ใข' => 'ใกใ‚™', + 'ใฅ' => 'ใคใ‚™', + 'ใง' => 'ใฆใ‚™', + 'ใฉ' => 'ใจใ‚™', + 'ใฐ' => 'ใฏใ‚™', + 'ใฑ' => 'ใฏใ‚š', + 'ใณ' => 'ใฒใ‚™', + 'ใด' => 'ใฒใ‚š', + 'ใถ' => 'ใตใ‚™', + 'ใท' => 'ใตใ‚š', + 'ใน' => 'ใธใ‚™', + 'ใบ' => 'ใธใ‚š', + 'ใผ' => 'ใปใ‚™', + 'ใฝ' => 'ใปใ‚š', + 'ใ‚”' => 'ใ†ใ‚™', + 'ใ‚ž' => 'ใ‚ใ‚™', + 'ใ‚ฌ' => 'ใ‚ซใ‚™', + 'ใ‚ฎ' => 'ใ‚ญใ‚™', + 'ใ‚ฐ' => 'ใ‚ฏใ‚™', + 'ใ‚ฒ' => 'ใ‚ฑใ‚™', + 'ใ‚ด' => 'ใ‚ณใ‚™', + 'ใ‚ถ' => 'ใ‚ตใ‚™', + 'ใ‚ธ' => 'ใ‚ทใ‚™', + 'ใ‚บ' => 'ใ‚นใ‚™', + 'ใ‚ผ' => 'ใ‚ปใ‚™', + 'ใ‚พ' => 'ใ‚ฝใ‚™', + 'ใƒ€' => 'ใ‚ฟใ‚™', + 'ใƒ‚' => 'ใƒใ‚™', + 'ใƒ…' => 'ใƒ„ใ‚™', + 'ใƒ‡' => 'ใƒ†ใ‚™', + 'ใƒ‰' => 'ใƒˆใ‚™', + 'ใƒ' => 'ใƒใ‚™', + 'ใƒ‘' => 'ใƒใ‚š', + 'ใƒ“' => 'ใƒ’ใ‚™', + 'ใƒ”' => 'ใƒ’ใ‚š', + 'ใƒ–' => 'ใƒ•ใ‚™', + 'ใƒ—' => 'ใƒ•ใ‚š', + 'ใƒ™' => 'ใƒ˜ใ‚™', + 'ใƒš' => 'ใƒ˜ใ‚š', + 'ใƒœ' => 'ใƒ›ใ‚™', + 'ใƒ' => 'ใƒ›ใ‚š', + 'ใƒด' => 'ใ‚ฆใ‚™', + 'ใƒท' => 'ใƒฏใ‚™', + 'ใƒธ' => 'ใƒฐใ‚™', + 'ใƒน' => 'ใƒฑใ‚™', + 'ใƒบ' => 'ใƒฒใ‚™', + 'ใƒพ' => 'ใƒฝใ‚™', + '๏ค€' => '่ฑˆ', + '๏ค' => 'ๆ›ด', + '๏ค‚' => '่ปŠ', + '๏คƒ' => '่ณˆ', + '๏ค„' => 'ๆป‘', + '๏ค…' => 'ไธฒ', + '๏ค†' => 'ๅฅ', + '๏ค‡' => '้พœ', + '๏คˆ' => '้พœ', + '๏ค‰' => 'ๅฅ‘', + '๏คŠ' => '้‡‘', + '๏ค‹' => 'ๅ–‡', + '๏คŒ' => 'ๅฅˆ', + '๏ค' => 'ๆ‡ถ', + '๏คŽ' => '็™ฉ', + '๏ค' => '็พ…', + '๏ค' => '่˜ฟ', + '๏ค‘' => '่žบ', + '๏ค’' => '่ฃธ', + '๏ค“' => '้‚', + '๏ค”' => 'ๆจ‚', + '๏ค•' => 'ๆด›', + '๏ค–' => '็ƒ™', + '๏ค—' => '็ž', + '๏ค˜' => '่ฝ', + '๏ค™' => '้…ช', + '๏คš' => '้งฑ', + '๏ค›' => 'ไบ‚', + '๏คœ' => 'ๅต', + '๏ค' => 'ๆฌ„', + '๏คž' => '็ˆ›', + '๏คŸ' => '่˜ญ', + '๏ค ' => '้ธž', + '๏คก' => 'ๅต', + '๏คข' => 'ๆฟซ', + '๏คฃ' => '่—', + '๏คค' => '่ฅค', + '๏คฅ' => 'ๆ‹‰', + '๏คฆ' => '่‡˜', + '๏คง' => '่ Ÿ', + '๏คจ' => 'ๅปŠ', + '๏คฉ' => 'ๆœ—', + '๏คช' => 'ๆตช', + '๏คซ' => '็‹ผ', + '๏คฌ' => '้ƒŽ', + '๏คญ' => 'ไพ†', + '๏คฎ' => 'ๅ†ท', + '๏คฏ' => 'ๅ‹ž', + '๏คฐ' => 'ๆ“„', + '๏คฑ' => 'ๆซ“', + '๏คฒ' => '็ˆ', + '๏คณ' => '็›ง', + '๏คด' => '่€', + '๏คต' => '่˜†', + '๏คถ' => '่™œ', + '๏คท' => '่ทฏ', + '๏คธ' => '้œฒ', + '๏คน' => '้ญฏ', + '๏คบ' => '้ทบ', + '๏คป' => '็ขŒ', + '๏คผ' => '็ฅฟ', + '๏คฝ' => '็ถ ', + '๏คพ' => '่‰', + '๏คฟ' => '้Œ„', + '๏ฅ€' => '้นฟ', + '๏ฅ' => '่ซ–', + '๏ฅ‚' => 'ๅฃŸ', + '๏ฅƒ' => 'ๅผ„', + '๏ฅ„' => '็ฑ ', + '๏ฅ…' => '่พ', + '๏ฅ†' => '็‰ข', + '๏ฅ‡' => '็ฃŠ', + '๏ฅˆ' => '่ณ‚', + '๏ฅ‰' => '้›ท', + '๏ฅŠ' => 'ๅฃ˜', + '๏ฅ‹' => 'ๅฑข', + '๏ฅŒ' => 'ๆจ“', + '๏ฅ' => 'ๆทš', + '๏ฅŽ' => 'ๆผ', + '๏ฅ' => '็ดฏ', + '๏ฅ' => '็ธท', + '๏ฅ‘' => '้™‹', + '๏ฅ’' => 'ๅ‹’', + '๏ฅ“' => '่‚‹', + '๏ฅ”' => 'ๅ‡œ', + '๏ฅ•' => 'ๅ‡Œ', + '๏ฅ–' => '็จœ', + '๏ฅ—' => '็ถพ', + '๏ฅ˜' => '่ฑ', + '๏ฅ™' => '้™ต', + '๏ฅš' => '่ฎ€', + '๏ฅ›' => 'ๆ‹', + '๏ฅœ' => 'ๆจ‚', + '๏ฅ' => '่ซพ', + '๏ฅž' => 'ไธน', + '๏ฅŸ' => 'ๅฏง', + '๏ฅ ' => 'ๆ€’', + '๏ฅก' => '็Ž‡', + '๏ฅข' => '็•ฐ', + '๏ฅฃ' => 'ๅŒ—', + '๏ฅค' => '็ฃป', + '๏ฅฅ' => 'ไพฟ', + '๏ฅฆ' => 'ๅพฉ', + '๏ฅง' => 'ไธ', + '๏ฅจ' => 'ๆณŒ', + '๏ฅฉ' => 'ๆ•ธ', + '๏ฅช' => '็ดข', + '๏ฅซ' => 'ๅƒ', + '๏ฅฌ' => 'ๅกž', + '๏ฅญ' => '็œ', + '๏ฅฎ' => '่‘‰', + '๏ฅฏ' => '่ชช', + '๏ฅฐ' => 'ๆฎบ', + '๏ฅฑ' => '่พฐ', + '๏ฅฒ' => 'ๆฒˆ', + '๏ฅณ' => 'ๆ‹พ', + '๏ฅด' => '่‹ฅ', + '๏ฅต' => 'ๆŽ ', + '๏ฅถ' => '็•ฅ', + '๏ฅท' => 'ไบฎ', + '๏ฅธ' => 'ๅ…ฉ', + '๏ฅน' => 'ๅ‡‰', + '๏ฅบ' => 'ๆข', + '๏ฅป' => '็ณง', + '๏ฅผ' => '่‰ฏ', + '๏ฅฝ' => '่ซ’', + '๏ฅพ' => '้‡', + '๏ฅฟ' => 'ๅ‹ต', + '๏ฆ€' => 'ๅ‘‚', + '๏ฆ' => 'ๅฅณ', + '๏ฆ‚' => 'ๅปฌ', + '๏ฆƒ' => 'ๆ—…', + '๏ฆ„' => 'ๆฟพ', + '๏ฆ…' => '็คช', + '๏ฆ†' => '้–ญ', + '๏ฆ‡' => '้ฉช', + '๏ฆˆ' => '้บ—', + '๏ฆ‰' => '้ปŽ', + '๏ฆŠ' => 'ๅŠ›', + '๏ฆ‹' => 'ๆ›†', + '๏ฆŒ' => 'ๆญท', + '๏ฆ' => '่ฝข', + '๏ฆŽ' => 'ๅนด', + '๏ฆ' => 'ๆ†', + '๏ฆ' => 'ๆˆ€', + '๏ฆ‘' => 'ๆ’š', + '๏ฆ’' => 'ๆผฃ', + '๏ฆ“' => '็…‰', + '๏ฆ”' => '็’‰', + '๏ฆ•' => '็งŠ', + '๏ฆ–' => '็ทด', + '๏ฆ—' => '่ฏ', + '๏ฆ˜' => '่ผฆ', + '๏ฆ™' => '่“ฎ', + '๏ฆš' => '้€ฃ', + '๏ฆ›' => '้Š', + '๏ฆœ' => 'ๅˆ—', + '๏ฆ' => 'ๅŠฃ', + '๏ฆž' => 'ๅ’ฝ', + '๏ฆŸ' => '็ƒˆ', + '๏ฆ ' => '่ฃ‚', + '๏ฆก' => '่ชช', + '๏ฆข' => 'ๅป‰', + '๏ฆฃ' => 'ๅฟต', + '๏ฆค' => 'ๆป', + '๏ฆฅ' => 'ๆฎฎ', + '๏ฆฆ' => '็ฐพ', + '๏ฆง' => '็ต', + '๏ฆจ' => 'ไปค', + '๏ฆฉ' => 'ๅ›น', + '๏ฆช' => 'ๅฏง', + '๏ฆซ' => 'ๅถบ', + '๏ฆฌ' => 'ๆ€œ', + '๏ฆญ' => '็Žฒ', + '๏ฆฎ' => '็‘ฉ', + '๏ฆฏ' => '็พš', + '๏ฆฐ' => '่†', + '๏ฆฑ' => '้ˆด', + '๏ฆฒ' => '้›ถ', + '๏ฆณ' => '้ˆ', + '๏ฆด' => '้ ˜', + '๏ฆต' => 'ไพ‹', + '๏ฆถ' => '็ฆฎ', + '๏ฆท' => '้†ด', + '๏ฆธ' => '้šธ', + '๏ฆน' => 'ๆƒก', + '๏ฆบ' => 'ไบ†', + '๏ฆป' => 'ๅƒš', + '๏ฆผ' => 'ๅฏฎ', + '๏ฆฝ' => 'ๅฐฟ', + '๏ฆพ' => 'ๆ–™', + '๏ฆฟ' => 'ๆจ‚', + '๏ง€' => '็‡Ž', + '๏ง' => '็™‚', + '๏ง‚' => '่“ผ', + '๏งƒ' => '้ผ', + '๏ง„' => '้พ', + '๏ง…' => 'ๆšˆ', + '๏ง†' => '้˜ฎ', + '๏ง‡' => 'ๅŠ‰', + '๏งˆ' => 'ๆป', + '๏ง‰' => 'ๆŸณ', + '๏งŠ' => 'ๆต', + '๏ง‹' => 'ๆบœ', + '๏งŒ' => '็‰', + '๏ง' => '็•™', + '๏งŽ' => '็กซ', + '๏ง' => '็ด', + '๏ง' => '้กž', + '๏ง‘' => 'ๅ…ญ', + '๏ง’' => 'ๆˆฎ', + '๏ง“' => '้™ธ', + '๏ง”' => 'ๅ€ซ', + '๏ง•' => 'ๅด™', + '๏ง–' => 'ๆทช', + '๏ง—' => '่ผช', + '๏ง˜' => 'ๅพ‹', + '๏ง™' => 'ๆ…„', + '๏งš' => 'ๆ —', + '๏ง›' => '็Ž‡', + '๏งœ' => '้š†', + '๏ง' => 'ๅˆฉ', + '๏งž' => 'ๅ', + '๏งŸ' => 'ๅฑฅ', + '๏ง ' => 'ๆ˜“', + '๏งก' => 'ๆŽ', + '๏งข' => 'ๆขจ', + '๏งฃ' => 'ๆณฅ', + '๏งค' => '็†', + '๏งฅ' => '็—ข', + '๏งฆ' => '็ฝน', + '๏งง' => '่ฃ', + '๏งจ' => '่ฃก', + '๏งฉ' => '้‡Œ', + '๏งช' => '้›ข', + '๏งซ' => 'ๅŒฟ', + '๏งฌ' => 'ๆบบ', + '๏งญ' => 'ๅ', + '๏งฎ' => '็‡', + '๏งฏ' => '็’˜', + '๏งฐ' => '่—บ', + '๏งฑ' => '้šฃ', + '๏งฒ' => '้ฑ—', + '๏งณ' => '้บŸ', + '๏งด' => 'ๆž—', + '๏งต' => 'ๆท‹', + '๏งถ' => '่‡จ', + '๏งท' => '็ซ‹', + '๏งธ' => '็ฌ ', + '๏งน' => '็ฒ’', + '๏งบ' => '็‹€', + '๏งป' => '็‚™', + '๏งผ' => '่ญ˜', + '๏งฝ' => 'ไป€', + '๏งพ' => '่Œถ', + '๏งฟ' => 'ๅˆบ', + '๏จ€' => 'ๅˆ‡', + '๏จ' => 'ๅบฆ', + '๏จ‚' => 'ๆ‹“', + '๏จƒ' => '็ณ–', + '๏จ„' => 'ๅฎ…', + '๏จ…' => 'ๆดž', + '๏จ†' => 'ๆšด', + '๏จ‡' => '่ผป', + '๏จˆ' => '่กŒ', + '๏จ‰' => '้™', + '๏จŠ' => '่ฆ‹', + '๏จ‹' => 'ๅป“', + '๏จŒ' => 'ๅ…€', + '๏จ' => 'ๅ—€', + '๏จ' => 'ๅกš', + '๏จ’' => 'ๆ™ด', + '๏จ•' => 'ๅ‡ž', + '๏จ–' => '็Œช', + '๏จ—' => '็›Š', + '๏จ˜' => '็คผ', + '๏จ™' => '็ฅž', + '๏จš' => '็ฅฅ', + '๏จ›' => '็ฆ', + '๏จœ' => '้–', + '๏จ' => '็ฒพ', + '๏จž' => '็พฝ', + '๏จ ' => '่˜’', + '๏จข' => '่ซธ', + '๏จฅ' => '้€ธ', + '๏จฆ' => '้ƒฝ', + '๏จช' => '้ฃฏ', + '๏จซ' => '้ฃผ', + '๏จฌ' => '้คจ', + '๏จญ' => '้ถด', + '๏จฎ' => '้ƒž', + '๏จฏ' => '้šท', + '๏จฐ' => 'ไพฎ', + '๏จฑ' => 'ๅƒง', + '๏จฒ' => 'ๅ…', + '๏จณ' => 'ๅ‹‰', + '๏จด' => 'ๅ‹ค', + '๏จต' => 'ๅ‘', + '๏จถ' => 'ๅ–', + '๏จท' => 'ๅ˜†', + '๏จธ' => 'ๅ™จ', + '๏จน' => 'ๅก€', + '๏จบ' => 'ๅขจ', + '๏จป' => 'ๅฑค', + '๏จผ' => 'ๅฑฎ', + '๏จฝ' => 'ๆ‚”', + '๏จพ' => 'ๆ…จ', + '๏จฟ' => 'ๆ†Ž', + '๏ฉ€' => 'ๆ‡ฒ', + '๏ฉ' => 'ๆ•', + '๏ฉ‚' => 'ๆ—ข', + '๏ฉƒ' => 'ๆš‘', + '๏ฉ„' => 'ๆข…', + '๏ฉ…' => 'ๆตท', + '๏ฉ†' => 'ๆธš', + '๏ฉ‡' => 'ๆผข', + '๏ฉˆ' => '็…ฎ', + '๏ฉ‰' => '็ˆซ', + '๏ฉŠ' => '็ข', + '๏ฉ‹' => '็ข‘', + '๏ฉŒ' => '็คพ', + '๏ฉ' => '็ฅ‰', + '๏ฉŽ' => '็ฅˆ', + '๏ฉ' => '็ฅ', + '๏ฉ' => '็ฅ–', + '๏ฉ‘' => '็ฅ', + '๏ฉ’' => '็ฆ', + '๏ฉ“' => '็ฆŽ', + '๏ฉ”' => '็ฉ€', + '๏ฉ•' => '็ช', + '๏ฉ–' => '็ฏ€', + '๏ฉ—' => '็ทด', + '๏ฉ˜' => '็ธ‰', + '๏ฉ™' => '็น', + '๏ฉš' => '็ฝฒ', + '๏ฉ›' => '่€…', + '๏ฉœ' => '่‡ญ', + '๏ฉ' => '่‰น', + '๏ฉž' => '่‰น', + '๏ฉŸ' => '่‘—', + '๏ฉ ' => '่ค', + '๏ฉก' => '่ฆ–', + '๏ฉข' => '่ฌ', + '๏ฉฃ' => '่ฌน', + '๏ฉค' => '่ณ“', + '๏ฉฅ' => '่ดˆ', + '๏ฉฆ' => '่พถ', + '๏ฉง' => '้€ธ', + '๏ฉจ' => '้›ฃ', + '๏ฉฉ' => '้Ÿฟ', + '๏ฉช' => '้ ป', + '๏ฉซ' => 'ๆต', + '๏ฉฌ' => '๐ค‹ฎ', + '๏ฉญ' => '่ˆ˜', + '๏ฉฐ' => 'ไธฆ', + '๏ฉฑ' => 'ๅ†ต', + '๏ฉฒ' => 'ๅ…จ', + '๏ฉณ' => 'ไพ€', + '๏ฉด' => 'ๅ……', + '๏ฉต' => 'ๅ†€', + '๏ฉถ' => 'ๅ‹‡', + '๏ฉท' => 'ๅ‹บ', + '๏ฉธ' => 'ๅ–', + '๏ฉน' => 'ๅ••', + '๏ฉบ' => 'ๅ–™', + '๏ฉป' => 'ๅ—ข', + '๏ฉผ' => 'ๅกš', + '๏ฉฝ' => 'ๅขณ', + '๏ฉพ' => 'ๅฅ„', + '๏ฉฟ' => 'ๅฅ”', + '๏ช€' => 'ๅฉข', + '๏ช' => 'ๅฌจ', + '๏ช‚' => 'ๅป’', + '๏ชƒ' => 'ๅป™', + '๏ช„' => 'ๅฝฉ', + '๏ช…' => 'ๅพญ', + '๏ช†' => 'ๆƒ˜', + '๏ช‡' => 'ๆ…Ž', + '๏ชˆ' => 'ๆ„ˆ', + '๏ช‰' => 'ๆ†Ž', + '๏ชŠ' => 'ๆ… ', + '๏ช‹' => 'ๆ‡ฒ', + '๏ชŒ' => 'ๆˆด', + '๏ช' => 'ๆ„', + '๏ชŽ' => 'ๆœ', + '๏ช' => 'ๆ‘’', + '๏ช' => 'ๆ•–', + '๏ช‘' => 'ๆ™ด', + '๏ช’' => 'ๆœ—', + '๏ช“' => 'ๆœ›', + '๏ช”' => 'ๆ–', + '๏ช•' => 'ๆญน', + '๏ช–' => 'ๆฎบ', + '๏ช—' => 'ๆต', + '๏ช˜' => 'ๆป›', + '๏ช™' => 'ๆป‹', + '๏ชš' => 'ๆผข', + '๏ช›' => '็€ž', + '๏ชœ' => '็…ฎ', + '๏ช' => '็žง', + '๏ชž' => '็ˆต', + '๏ชŸ' => '็Šฏ', + '๏ช ' => '็Œช', + '๏ชก' => '็‘ฑ', + '๏ชข' => '็”†', + '๏ชฃ' => '็”ป', + '๏ชค' => '็˜', + '๏ชฅ' => '็˜Ÿ', + '๏ชฆ' => '็›Š', + '๏ชง' => '็››', + '๏ชจ' => '็›ด', + '๏ชฉ' => '็Š', + '๏ชช' => '็€', + '๏ชซ' => '็ฃŒ', + '๏ชฌ' => '็ชฑ', + '๏ชญ' => '็ฏ€', + '๏ชฎ' => '็ฑป', + '๏ชฏ' => '็ต›', + '๏ชฐ' => '็ทด', + '๏ชฑ' => '็ผพ', + '๏ชฒ' => '่€…', + '๏ชณ' => '่’', + '๏ชด' => '่ฏ', + '๏ชต' => '่น', + '๏ชถ' => '่ฅ', + '๏ชท' => '่ฆ†', + '๏ชธ' => '่ฆ–', + '๏ชน' => '่ชฟ', + '๏ชบ' => '่ซธ', + '๏ชป' => '่ซ‹', + '๏ชผ' => '่ฌ', + '๏ชฝ' => '่ซพ', + '๏ชพ' => '่ซญ', + '๏ชฟ' => '่ฌน', + '๏ซ€' => '่ฎŠ', + '๏ซ' => '่ดˆ', + '๏ซ‚' => '่ผธ', + '๏ซƒ' => '้ฒ', + '๏ซ„' => '้†™', + '๏ซ…' => '้‰ถ', + '๏ซ†' => '้™ผ', + '๏ซ‡' => '้›ฃ', + '๏ซˆ' => '้–', + '๏ซ‰' => '้Ÿ›', + '๏ซŠ' => '้Ÿฟ', + '๏ซ‹' => '้ ‹', + '๏ซŒ' => '้ ป', + '๏ซ' => '้ฌ’', + '๏ซŽ' => '้พœ', + '๏ซ' => '๐ขกŠ', + '๏ซ' => '๐ขก„', + '๏ซ‘' => '๐ฃ•', + '๏ซ’' => 'ใฎ', + '๏ซ“' => 'ไ€˜', + '๏ซ”' => 'ไ€น', + '๏ซ•' => '๐ฅ‰‰', + '๏ซ–' => '๐ฅณ', + '๏ซ—' => '๐งป“', + '๏ซ˜' => '้ฝƒ', + '๏ซ™' => '้พŽ', + '๏ฌ' => 'ื™ึด', + '๏ฌŸ' => 'ืฒึท', + '๏ฌช' => 'ืฉื', + '๏ฌซ' => 'ืฉื‚', + '๏ฌฌ' => 'ืฉึผื', + '๏ฌญ' => 'ืฉึผื‚', + '๏ฌฎ' => 'ืึท', + '๏ฌฏ' => 'ืึธ', + '๏ฌฐ' => 'ืึผ', + '๏ฌฑ' => 'ื‘ึผ', + '๏ฌฒ' => 'ื’ึผ', + '๏ฌณ' => 'ื“ึผ', + '๏ฌด' => 'ื”ึผ', + '๏ฌต' => 'ื•ึผ', + '๏ฌถ' => 'ื–ึผ', + '๏ฌธ' => 'ื˜ึผ', + '๏ฌน' => 'ื™ึผ', + '๏ฌบ' => 'ืšึผ', + '๏ฌป' => 'ื›ึผ', + '๏ฌผ' => 'ืœึผ', + '๏ฌพ' => 'ืžึผ', + '๏ญ€' => 'ื ึผ', + '๏ญ' => 'ืกึผ', + '๏ญƒ' => 'ืฃึผ', + '๏ญ„' => 'ืคึผ', + '๏ญ†' => 'ืฆึผ', + '๏ญ‡' => 'ืงึผ', + '๏ญˆ' => 'ืจึผ', + '๏ญ‰' => 'ืฉึผ', + '๏ญŠ' => 'ืชึผ', + '๏ญ‹' => 'ื•ึน', + '๏ญŒ' => 'ื‘ึฟ', + '๏ญ' => 'ื›ึฟ', + '๏ญŽ' => 'ืคึฟ', + '๐‘‚š' => '๐‘‚™๐‘‚บ', + '๐‘‚œ' => '๐‘‚›๐‘‚บ', + '๐‘‚ซ' => '๐‘‚ฅ๐‘‚บ', + '๐‘„ฎ' => '๐‘„ฑ๐‘„ง', + '๐‘„ฏ' => '๐‘„ฒ๐‘„ง', + '๐‘‹' => '๐‘‡๐‘Œพ', + '๐‘Œ' => '๐‘‡๐‘—', + '๐‘’ป' => '๐‘’น๐‘’บ', + '๐‘’ผ' => '๐‘’น๐‘’ฐ', + '๐‘’พ' => '๐‘’น๐‘’ฝ', + '๐‘–บ' => '๐‘–ธ๐‘–ฏ', + '๐‘–ป' => '๐‘–น๐‘–ฏ', + '๐‘คธ' => '๐‘คต๐‘คฐ', + '๐…ž' => '๐…—๐…ฅ', + '๐…Ÿ' => '๐…˜๐…ฅ', + '๐… ' => '๐…˜๐…ฅ๐…ฎ', + '๐…ก' => '๐…˜๐…ฅ๐…ฏ', + '๐…ข' => '๐…˜๐…ฅ๐…ฐ', + '๐…ฃ' => '๐…˜๐…ฅ๐…ฑ', + '๐…ค' => '๐…˜๐…ฅ๐…ฒ', + '๐†ป' => '๐†น๐…ฅ', + '๐†ผ' => '๐†บ๐…ฅ', + '๐†ฝ' => '๐†น๐…ฅ๐…ฎ', + '๐†พ' => '๐†บ๐…ฅ๐…ฎ', + '๐†ฟ' => '๐†น๐…ฅ๐…ฏ', + '๐‡€' => '๐†บ๐…ฅ๐…ฏ', + '๐ฏ €' => 'ไธฝ', + '๐ฏ ' => 'ไธธ', + '๐ฏ ‚' => 'ไน', + '๐ฏ ƒ' => '๐ „ข', + '๐ฏ „' => 'ไฝ ', + '๐ฏ …' => 'ไพฎ', + '๐ฏ †' => 'ไพป', + '๐ฏ ‡' => 'ๅ€‚', + '๐ฏ ˆ' => 'ๅบ', + '๐ฏ ‰' => 'ๅ‚™', + '๐ฏ Š' => 'ๅƒง', + '๐ฏ ‹' => 'ๅƒ', + '๐ฏ Œ' => 'ใ’ž', + '๐ฏ ' => '๐ ˜บ', + '๐ฏ Ž' => 'ๅ…', + '๐ฏ ' => 'ๅ…”', + '๐ฏ ' => 'ๅ…ค', + '๐ฏ ‘' => 'ๅ…ท', + '๐ฏ ’' => '๐ ”œ', + '๐ฏ “' => 'ใ’น', + '๐ฏ ”' => 'ๅ…ง', + '๐ฏ •' => 'ๅ†', + '๐ฏ –' => '๐ •‹', + '๐ฏ —' => 'ๅ†—', + '๐ฏ ˜' => 'ๅ†ค', + '๐ฏ ™' => 'ไปŒ', + '๐ฏ š' => 'ๅ†ฌ', + '๐ฏ ›' => 'ๅ†ต', + '๐ฏ œ' => '๐ฉ‡Ÿ', + '๐ฏ ' => 'ๅ‡ต', + '๐ฏ ž' => 'ๅˆƒ', + '๐ฏ Ÿ' => 'ใ“Ÿ', + '๐ฏ  ' => 'ๅˆป', + '๐ฏ ก' => 'ๅ‰†', + '๐ฏ ข' => 'ๅ‰ฒ', + '๐ฏ ฃ' => 'ๅ‰ท', + '๐ฏ ค' => 'ใ”•', + '๐ฏ ฅ' => 'ๅ‹‡', + '๐ฏ ฆ' => 'ๅ‹‰', + '๐ฏ ง' => 'ๅ‹ค', + '๐ฏ จ' => 'ๅ‹บ', + '๐ฏ ฉ' => 'ๅŒ…', + '๐ฏ ช' => 'ๅŒ†', + '๐ฏ ซ' => 'ๅŒ—', + '๐ฏ ฌ' => 'ๅ‰', + '๐ฏ ญ' => 'ๅ‘', + '๐ฏ ฎ' => 'ๅš', + '๐ฏ ฏ' => 'ๅณ', + '๐ฏ ฐ' => 'ๅฝ', + '๐ฏ ฑ' => 'ๅฟ', + '๐ฏ ฒ' => 'ๅฟ', + '๐ฏ ณ' => 'ๅฟ', + '๐ฏ ด' => '๐ จฌ', + '๐ฏ ต' => '็ฐ', + '๐ฏ ถ' => 'ๅŠ', + '๐ฏ ท' => 'ๅŸ', + '๐ฏ ธ' => '๐ ญฃ', + '๐ฏ น' => 'ๅซ', + '๐ฏ บ' => 'ๅฑ', + '๐ฏ ป' => 'ๅ†', + '๐ฏ ผ' => 'ๅ’ž', + '๐ฏ ฝ' => 'ๅธ', + '๐ฏ พ' => 'ๅ‘ˆ', + '๐ฏ ฟ' => 'ๅ‘จ', + '๐ฏก€' => 'ๅ’ข', + '๐ฏก' => 'ๅ“ถ', + '๐ฏก‚' => 'ๅ”', + '๐ฏกƒ' => 'ๅ•“', + '๐ฏก„' => 'ๅ•ฃ', + '๐ฏก…' => 'ๅ–„', + '๐ฏก†' => 'ๅ–„', + '๐ฏก‡' => 'ๅ–™', + '๐ฏกˆ' => 'ๅ–ซ', + '๐ฏก‰' => 'ๅ–ณ', + '๐ฏกŠ' => 'ๅ—‚', + '๐ฏก‹' => 'ๅœ–', + '๐ฏกŒ' => 'ๅ˜†', + '๐ฏก' => 'ๅœ—', + '๐ฏกŽ' => 'ๅ™‘', + '๐ฏก' => 'ๅ™ด', + '๐ฏก' => 'ๅˆ‡', + '๐ฏก‘' => 'ๅฃฎ', + '๐ฏก’' => 'ๅŸŽ', + '๐ฏก“' => 'ๅŸด', + '๐ฏก”' => 'ๅ ', + '๐ฏก•' => 'ๅž‹', + '๐ฏก–' => 'ๅ ฒ', + '๐ฏก—' => 'ๅ ฑ', + '๐ฏก˜' => 'ๅขฌ', + '๐ฏก™' => '๐ก“ค', + '๐ฏกš' => 'ๅฃฒ', + '๐ฏก›' => 'ๅฃท', + '๐ฏกœ' => 'ๅค†', + '๐ฏก' => 'ๅคš', + '๐ฏกž' => 'ๅคข', + '๐ฏกŸ' => 'ๅฅข', + '๐ฏก ' => '๐กšจ', + '๐ฏกก' => '๐ก›ช', + '๐ฏกข' => 'ๅงฌ', + '๐ฏกฃ' => 'ๅจ›', + '๐ฏกค' => 'ๅจง', + '๐ฏกฅ' => 'ๅง˜', + '๐ฏกฆ' => 'ๅฉฆ', + '๐ฏกง' => 'ใ›ฎ', + '๐ฏกจ' => 'ใ›ผ', + '๐ฏกฉ' => 'ๅฌˆ', + '๐ฏกช' => 'ๅฌพ', + '๐ฏกซ' => 'ๅฌพ', + '๐ฏกฌ' => '๐กงˆ', + '๐ฏกญ' => 'ๅฏƒ', + '๐ฏกฎ' => 'ๅฏ˜', + '๐ฏกฏ' => 'ๅฏง', + '๐ฏกฐ' => 'ๅฏณ', + '๐ฏกฑ' => '๐กฌ˜', + '๐ฏกฒ' => 'ๅฏฟ', + '๐ฏกณ' => 'ๅฐ†', + '๐ฏกด' => 'ๅฝ“', + '๐ฏกต' => 'ๅฐข', + '๐ฏกถ' => 'ใž', + '๐ฏกท' => 'ๅฑ ', + '๐ฏกธ' => 'ๅฑฎ', + '๐ฏกน' => 'ๅณ€', + '๐ฏกบ' => 'ๅฒ', + '๐ฏกป' => '๐กทค', + '๐ฏกผ' => 'ๅตƒ', + '๐ฏกฝ' => '๐กทฆ', + '๐ฏกพ' => 'ๅตฎ', + '๐ฏกฟ' => 'ๅตซ', + '๐ฏข€' => 'ๅตผ', + '๐ฏข' => 'ๅทก', + '๐ฏข‚' => 'ๅทข', + '๐ฏขƒ' => 'ใ ฏ', + '๐ฏข„' => 'ๅทฝ', + '๐ฏข…' => 'ๅธจ', + '๐ฏข†' => 'ๅธฝ', + '๐ฏข‡' => 'ๅนฉ', + '๐ฏขˆ' => 'ใกข', + '๐ฏข‰' => '๐ข†ƒ', + '๐ฏขŠ' => 'ใกผ', + '๐ฏข‹' => 'ๅบฐ', + '๐ฏขŒ' => 'ๅบณ', + '๐ฏข' => 'ๅบถ', + '๐ฏขŽ' => 'ๅปŠ', + '๐ฏข' => '๐ชŽ’', + '๐ฏข' => 'ๅปพ', + '๐ฏข‘' => '๐ขŒฑ', + '๐ฏข’' => '๐ขŒฑ', + '๐ฏข“' => '่ˆ', + '๐ฏข”' => 'ๅผข', + '๐ฏข•' => 'ๅผข', + '๐ฏข–' => 'ใฃ‡', + '๐ฏข—' => '๐ฃŠธ', + '๐ฏข˜' => '๐ฆ‡š', + '๐ฏข™' => 'ๅฝข', + '๐ฏขš' => 'ๅฝซ', + '๐ฏข›' => 'ใฃฃ', + '๐ฏขœ' => 'ๅพš', + '๐ฏข' => 'ๅฟ', + '๐ฏขž' => 'ๅฟ—', + '๐ฏขŸ' => 'ๅฟน', + '๐ฏข ' => 'ๆ‚', + '๐ฏขก' => 'ใคบ', + '๐ฏขข' => 'ใคœ', + '๐ฏขฃ' => 'ๆ‚”', + '๐ฏขค' => '๐ข›”', + '๐ฏขฅ' => 'ๆƒ‡', + '๐ฏขฆ' => 'ๆ…ˆ', + '๐ฏขง' => 'ๆ…Œ', + '๐ฏขจ' => 'ๆ…Ž', + '๐ฏขฉ' => 'ๆ…Œ', + '๐ฏขช' => 'ๆ…บ', + '๐ฏขซ' => 'ๆ†Ž', + '๐ฏขฌ' => 'ๆ†ฒ', + '๐ฏขญ' => 'ๆ†ค', + '๐ฏขฎ' => 'ๆ†ฏ', + '๐ฏขฏ' => 'ๆ‡ž', + '๐ฏขฐ' => 'ๆ‡ฒ', + '๐ฏขฑ' => 'ๆ‡ถ', + '๐ฏขฒ' => 'ๆˆ', + '๐ฏขณ' => 'ๆˆ›', + '๐ฏขด' => 'ๆ‰', + '๐ฏขต' => 'ๆŠฑ', + '๐ฏขถ' => 'ๆ‹”', + '๐ฏขท' => 'ๆ', + '๐ฏขธ' => '๐ขฌŒ', + '๐ฏขน' => 'ๆŒฝ', + '๐ฏขบ' => 'ๆ‹ผ', + '๐ฏขป' => 'ๆจ', + '๐ฏขผ' => 'ๆŽƒ', + '๐ฏขฝ' => 'ๆค', + '๐ฏขพ' => '๐ขฏฑ', + '๐ฏขฟ' => 'ๆข', + '๐ฏฃ€' => 'ๆ…', + '๐ฏฃ' => 'ๆŽฉ', + '๐ฏฃ‚' => 'ใจฎ', + '๐ฏฃƒ' => 'ๆ‘ฉ', + '๐ฏฃ„' => 'ๆ‘พ', + '๐ฏฃ…' => 'ๆ’', + '๐ฏฃ†' => 'ๆ‘ท', + '๐ฏฃ‡' => 'ใฉฌ', + '๐ฏฃˆ' => 'ๆ•', + '๐ฏฃ‰' => 'ๆ•ฌ', + '๐ฏฃŠ' => '๐ฃ€Š', + '๐ฏฃ‹' => 'ๆ—ฃ', + '๐ฏฃŒ' => 'ๆ›ธ', + '๐ฏฃ' => 'ๆ™‰', + '๐ฏฃŽ' => 'ใฌ™', + '๐ฏฃ' => 'ๆš‘', + '๐ฏฃ' => 'ใฌˆ', + '๐ฏฃ‘' => 'ใซค', + '๐ฏฃ’' => 'ๅ†’', + '๐ฏฃ“' => 'ๅ†•', + '๐ฏฃ”' => 'ๆœ€', + '๐ฏฃ•' => 'ๆšœ', + '๐ฏฃ–' => '่‚ญ', + '๐ฏฃ—' => 'ไ™', + '๐ฏฃ˜' => 'ๆœ—', + '๐ฏฃ™' => 'ๆœ›', + '๐ฏฃš' => 'ๆœก', + '๐ฏฃ›' => 'ๆž', + '๐ฏฃœ' => 'ๆ“', + '๐ฏฃ' => '๐ฃƒ', + '๐ฏฃž' => 'ใญ‰', + '๐ฏฃŸ' => 'ๆŸบ', + '๐ฏฃ ' => 'ๆž…', + '๐ฏฃก' => 'ๆก’', + '๐ฏฃข' => 'ๆข…', + '๐ฏฃฃ' => '๐ฃ‘ญ', + '๐ฏฃค' => 'ๆขŽ', + '๐ฏฃฅ' => 'ๆ Ÿ', + '๐ฏฃฆ' => 'ๆค”', + '๐ฏฃง' => 'ใฎ', + '๐ฏฃจ' => 'ๆฅ‚', + '๐ฏฃฉ' => 'ๆฆฃ', + '๐ฏฃช' => 'ๆงช', + '๐ฏฃซ' => 'ๆชจ', + '๐ฏฃฌ' => '๐ฃšฃ', + '๐ฏฃญ' => 'ๆซ›', + '๐ฏฃฎ' => 'ใฐ˜', + '๐ฏฃฏ' => 'ๆฌก', + '๐ฏฃฐ' => '๐ฃขง', + '๐ฏฃฑ' => 'ๆญ”', + '๐ฏฃฒ' => 'ใฑŽ', + '๐ฏฃณ' => 'ๆญฒ', + '๐ฏฃด' => 'ๆฎŸ', + '๐ฏฃต' => 'ๆฎบ', + '๐ฏฃถ' => 'ๆฎป', + '๐ฏฃท' => '๐ฃช', + '๐ฏฃธ' => '๐กด‹', + '๐ฏฃน' => '๐ฃซบ', + '๐ฏฃบ' => 'ๆฑŽ', + '๐ฏฃป' => '๐ฃฒผ', + '๐ฏฃผ' => 'ๆฒฟ', + '๐ฏฃฝ' => 'ๆณ', + '๐ฏฃพ' => 'ๆฑง', + '๐ฏฃฟ' => 'ๆด–', + '๐ฏค€' => 'ๆดพ', + '๐ฏค' => 'ๆตท', + '๐ฏค‚' => 'ๆต', + '๐ฏคƒ' => 'ๆตฉ', + '๐ฏค„' => 'ๆตธ', + '๐ฏค…' => 'ๆถ…', + '๐ฏค†' => '๐ฃดž', + '๐ฏค‡' => 'ๆดด', + '๐ฏคˆ' => 'ๆธฏ', + '๐ฏค‰' => 'ๆนฎ', + '๐ฏคŠ' => 'ใดณ', + '๐ฏค‹' => 'ๆป‹', + '๐ฏคŒ' => 'ๆป‡', + '๐ฏค' => '๐ฃป‘', + '๐ฏคŽ' => 'ๆทน', + '๐ฏค' => 'ๆฝฎ', + '๐ฏค' => '๐ฃฝž', + '๐ฏค‘' => '๐ฃพŽ', + '๐ฏค’' => 'ๆฟ†', + '๐ฏค“' => '็€น', + '๐ฏค”' => '็€ž', + '๐ฏค•' => '็€›', + '๐ฏค–' => 'ใถ–', + '๐ฏค—' => '็Š', + '๐ฏค˜' => '็ฝ', + '๐ฏค™' => '็ท', + '๐ฏคš' => '็‚ญ', + '๐ฏค›' => '๐ ”ฅ', + '๐ฏคœ' => '็……', + '๐ฏค' => '๐ค‰ฃ', + '๐ฏคž' => '็†œ', + '๐ฏคŸ' => '๐คŽซ', + '๐ฏค ' => '็ˆจ', + '๐ฏคก' => '็ˆต', + '๐ฏคข' => '็‰', + '๐ฏคฃ' => '๐ค˜ˆ', + '๐ฏคค' => '็Š€', + '๐ฏคฅ' => '็Š•', + '๐ฏคฆ' => '๐คœต', + '๐ฏคง' => '๐ค ”', + '๐ฏคจ' => '็บ', + '๐ฏคฉ' => '็Ž‹', + '๐ฏคช' => 'ใบฌ', + '๐ฏคซ' => '็Žฅ', + '๐ฏคฌ' => 'ใบธ', + '๐ฏคญ' => 'ใบธ', + '๐ฏคฎ' => '็‘‡', + '๐ฏคฏ' => '็‘œ', + '๐ฏคฐ' => '็‘ฑ', + '๐ฏคฑ' => '็’…', + '๐ฏคฒ' => '็“Š', + '๐ฏคณ' => 'ใผ›', + '๐ฏคด' => '็”ค', + '๐ฏคต' => '๐คฐถ', + '๐ฏคถ' => '็”พ', + '๐ฏคท' => '๐คฒ’', + '๐ฏคธ' => '็•ฐ', + '๐ฏคน' => '๐ข†Ÿ', + '๐ฏคบ' => '็˜', + '๐ฏคป' => '๐คพก', + '๐ฏคผ' => '๐คพธ', + '๐ฏคฝ' => '๐ฅ„', + '๐ฏคพ' => 'ใฟผ', + '๐ฏคฟ' => 'ไ€ˆ', + '๐ฏฅ€' => '็›ด', + '๐ฏฅ' => '๐ฅƒณ', + '๐ฏฅ‚' => '๐ฅƒฒ', + '๐ฏฅƒ' => '๐ฅ„™', + '๐ฏฅ„' => '๐ฅ„ณ', + '๐ฏฅ…' => '็œž', + '๐ฏฅ†' => '็œŸ', + '๐ฏฅ‡' => '็œŸ', + '๐ฏฅˆ' => '็Š', + '๐ฏฅ‰' => 'ไ€น', + '๐ฏฅŠ' => '็ž‹', + '๐ฏฅ‹' => 'ไ†', + '๐ฏฅŒ' => 'ไ‚–', + '๐ฏฅ' => '๐ฅ', + '๐ฏฅŽ' => '็กŽ', + '๐ฏฅ' => '็ขŒ', + '๐ฏฅ' => '็ฃŒ', + '๐ฏฅ‘' => 'ไƒฃ', + '๐ฏฅ’' => '๐ฅ˜ฆ', + '๐ฏฅ“' => '็ฅ–', + '๐ฏฅ”' => '๐ฅšš', + '๐ฏฅ•' => '๐ฅ›…', + '๐ฏฅ–' => '็ฆ', + '๐ฏฅ—' => '็งซ', + '๐ฏฅ˜' => 'ไ„ฏ', + '๐ฏฅ™' => '็ฉ€', + '๐ฏฅš' => '็ฉŠ', + '๐ฏฅ›' => '็ฉ', + '๐ฏฅœ' => '๐ฅฅผ', + '๐ฏฅ' => '๐ฅชง', + '๐ฏฅž' => '๐ฅชง', + '๐ฏฅŸ' => '็ซฎ', + '๐ฏฅ ' => 'ไˆ‚', + '๐ฏฅก' => '๐ฅฎซ', + '๐ฏฅข' => '็ฏ†', + '๐ฏฅฃ' => '็ฏ‰', + '๐ฏฅค' => 'ไˆง', + '๐ฏฅฅ' => '๐ฅฒ€', + '๐ฏฅฆ' => '็ณ’', + '๐ฏฅง' => 'ไŠ ', + '๐ฏฅจ' => '็ณจ', + '๐ฏฅฉ' => '็ณฃ', + '๐ฏฅช' => '็ด€', + '๐ฏฅซ' => '๐ฅพ†', + '๐ฏฅฌ' => '็ตฃ', + '๐ฏฅญ' => 'ไŒ', + '๐ฏฅฎ' => '็ท‡', + '๐ฏฅฏ' => '็ธ‚', + '๐ฏฅฐ' => '็น…', + '๐ฏฅฑ' => 'ไŒด', + '๐ฏฅฒ' => '๐ฆˆจ', + '๐ฏฅณ' => '๐ฆ‰‡', + '๐ฏฅด' => 'ไ™', + '๐ฏฅต' => '๐ฆ‹™', + '๐ฏฅถ' => '็ฝบ', + '๐ฏฅท' => '๐ฆŒพ', + '๐ฏฅธ' => '็พ•', + '๐ฏฅน' => '็ฟบ', + '๐ฏฅบ' => '่€…', + '๐ฏฅป' => '๐ฆ“š', + '๐ฏฅผ' => '๐ฆ”ฃ', + '๐ฏฅฝ' => '่ ', + '๐ฏฅพ' => '๐ฆ–จ', + '๐ฏฅฟ' => '่ฐ', + '๐ฏฆ€' => '๐ฃŸ', + '๐ฏฆ' => 'ไ•', + '๐ฏฆ‚' => '่‚ฒ', + '๐ฏฆƒ' => '่„ƒ', + '๐ฏฆ„' => 'ไ‹', + '๐ฏฆ…' => '่„พ', + '๐ฏฆ†' => 'ๅชต', + '๐ฏฆ‡' => '๐ฆžง', + '๐ฏฆˆ' => '๐ฆžต', + '๐ฏฆ‰' => '๐ฃŽ“', + '๐ฏฆŠ' => '๐ฃŽœ', + '๐ฏฆ‹' => '่ˆ', + '๐ฏฆŒ' => '่ˆ„', + '๐ฏฆ' => '่พž', + '๐ฏฆŽ' => 'ไ‘ซ', + '๐ฏฆ' => '่Š‘', + '๐ฏฆ' => '่Š‹', + '๐ฏฆ‘' => '่Š', + '๐ฏฆ’' => 'ๅŠณ', + '๐ฏฆ“' => '่Šฑ', + '๐ฏฆ”' => '่Šณ', + '๐ฏฆ•' => '่Šฝ', + '๐ฏฆ–' => '่‹ฆ', + '๐ฏฆ—' => '๐ฆฌผ', + '๐ฏฆ˜' => '่‹ฅ', + '๐ฏฆ™' => '่Œ', + '๐ฏฆš' => '่ฃ', + '๐ฏฆ›' => '่Žญ', + '๐ฏฆœ' => '่Œฃ', + '๐ฏฆ' => '่Žฝ', + '๐ฏฆž' => '่ง', + '๐ฏฆŸ' => '่‘—', + '๐ฏฆ ' => '่“', + '๐ฏฆก' => '่Š', + '๐ฏฆข' => '่Œ', + '๐ฏฆฃ' => '่œ', + '๐ฏฆค' => '๐ฆฐถ', + '๐ฏฆฅ' => '๐ฆตซ', + '๐ฏฆฆ' => '๐ฆณ•', + '๐ฏฆง' => 'ไ”ซ', + '๐ฏฆจ' => '่“ฑ', + '๐ฏฆฉ' => '่“ณ', + '๐ฏฆช' => '่”–', + '๐ฏฆซ' => '๐งŠ', + '๐ฏฆฌ' => '่•ค', + '๐ฏฆญ' => '๐ฆผฌ', + '๐ฏฆฎ' => 'ไ•', + '๐ฏฆฏ' => 'ไ•ก', + '๐ฏฆฐ' => '๐ฆพฑ', + '๐ฏฆฑ' => '๐งƒ’', + '๐ฏฆฒ' => 'ไ•ซ', + '๐ฏฆณ' => '่™', + '๐ฏฆด' => '่™œ', + '๐ฏฆต' => '่™ง', + '๐ฏฆถ' => '่™ฉ', + '๐ฏฆท' => '่šฉ', + '๐ฏฆธ' => '่šˆ', + '๐ฏฆน' => '่œŽ', + '๐ฏฆบ' => '่›ข', + '๐ฏฆป' => '่น', + '๐ฏฆผ' => '่œจ', + '๐ฏฆฝ' => '่ซ', + '๐ฏฆพ' => '่ž†', + '๐ฏฆฟ' => 'ไ——', + '๐ฏง€' => '่Ÿก', + '๐ฏง' => '่ ', + '๐ฏง‚' => 'ไ—น', + '๐ฏงƒ' => '่ก ', + '๐ฏง„' => '่กฃ', + '๐ฏง…' => '๐ง™ง', + '๐ฏง†' => '่ฃ—', + '๐ฏง‡' => '่ฃž', + '๐ฏงˆ' => 'ไ˜ต', + '๐ฏง‰' => '่ฃบ', + '๐ฏงŠ' => 'ใ’ป', + '๐ฏง‹' => '๐งขฎ', + '๐ฏงŒ' => '๐งฅฆ', + '๐ฏง' => 'ไšพ', + '๐ฏงŽ' => 'ไ›‡', + '๐ฏง' => '่ช ', + '๐ฏง' => '่ซญ', + '๐ฏง‘' => '่ฎŠ', + '๐ฏง’' => '่ฑ•', + '๐ฏง“' => '๐งฒจ', + '๐ฏง”' => '่ฒซ', + '๐ฏง•' => '่ณ', + '๐ฏง–' => '่ด›', + '๐ฏง—' => '่ตท', + '๐ฏง˜' => '๐งผฏ', + '๐ฏง™' => '๐  „', + '๐ฏงš' => '่ท‹', + '๐ฏง›' => '่ถผ', + '๐ฏงœ' => '่ทฐ', + '๐ฏง' => '๐ ฃž', + '๐ฏงž' => '่ป”', + '๐ฏงŸ' => '่ผธ', + '๐ฏง ' => '๐จ—’', + '๐ฏงก' => '๐จ—ญ', + '๐ฏงข' => '้‚”', + '๐ฏงฃ' => '้ƒฑ', + '๐ฏงค' => '้„‘', + '๐ฏงฅ' => '๐จœฎ', + '๐ฏงฆ' => '้„›', + '๐ฏงง' => '้ˆธ', + '๐ฏงจ' => '้‹—', + '๐ฏงฉ' => '้‹˜', + '๐ฏงช' => '้‰ผ', + '๐ฏงซ' => '้น', + '๐ฏงฌ' => '้•', + '๐ฏงญ' => '๐จฏบ', + '๐ฏงฎ' => '้–‹', + '๐ฏงฏ' => 'ไฆ•', + '๐ฏงฐ' => '้–ท', + '๐ฏงฑ' => '๐จตท', + '๐ฏงฒ' => 'ไงฆ', + '๐ฏงณ' => '้›ƒ', + '๐ฏงด' => 'ๅถฒ', + '๐ฏงต' => '้œฃ', + '๐ฏงถ' => '๐ฉ……', + '๐ฏงท' => '๐ฉˆš', + '๐ฏงธ' => 'ไฉฎ', + '๐ฏงน' => 'ไฉถ', + '๐ฏงบ' => '้Ÿ ', + '๐ฏงป' => '๐ฉŠ', + '๐ฏงผ' => 'ไชฒ', + '๐ฏงฝ' => '๐ฉ’–', + '๐ฏงพ' => '้ ‹', + '๐ฏงฟ' => '้ ‹', + '๐ฏจ€' => '้ ฉ', + '๐ฏจ' => '๐ฉ–ถ', + '๐ฏจ‚' => '้ฃข', + '๐ฏจƒ' => 'ไฌณ', + '๐ฏจ„' => '้คฉ', + '๐ฏจ…' => '้ฆง', + '๐ฏจ†' => '้ง‚', + '๐ฏจ‡' => '้งพ', + '๐ฏจˆ' => 'ไฏŽ', + '๐ฏจ‰' => '๐ฉฌฐ', + '๐ฏจŠ' => '้ฌ’', + '๐ฏจ‹' => '้ฑ€', + '๐ฏจŒ' => '้ณฝ', + '๐ฏจ' => 'ไณŽ', + '๐ฏจŽ' => 'ไณญ', + '๐ฏจ' => '้ตง', + '๐ฏจ' => '๐ชƒŽ', + '๐ฏจ‘' => 'ไณธ', + '๐ฏจ’' => '๐ช„…', + '๐ฏจ“' => '๐ชˆŽ', + '๐ฏจ”' => '๐ชŠ‘', + '๐ฏจ•' => '้บป', + '๐ฏจ–' => 'ไต–', + '๐ฏจ—' => '้ปน', + '๐ฏจ˜' => '้ปพ', + '๐ฏจ™' => '้ผ…', + '๐ฏจš' => '้ผ', + '๐ฏจ›' => '้ผ–', + '๐ฏจœ' => '้ผป', + '๐ฏจ' => '๐ช˜€', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php new file mode 100644 index 0000000..ec90f36 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php @@ -0,0 +1,876 @@ + 230, + 'ฬ' => 230, + 'ฬ‚' => 230, + 'ฬƒ' => 230, + 'ฬ„' => 230, + 'ฬ…' => 230, + 'ฬ†' => 230, + 'ฬ‡' => 230, + 'ฬˆ' => 230, + 'ฬ‰' => 230, + 'ฬŠ' => 230, + 'ฬ‹' => 230, + 'ฬŒ' => 230, + 'ฬ' => 230, + 'ฬŽ' => 230, + 'ฬ' => 230, + 'ฬ' => 230, + 'ฬ‘' => 230, + 'ฬ’' => 230, + 'ฬ“' => 230, + 'ฬ”' => 230, + 'ฬ•' => 232, + 'ฬ–' => 220, + 'ฬ—' => 220, + 'ฬ˜' => 220, + 'ฬ™' => 220, + 'ฬš' => 232, + 'ฬ›' => 216, + 'ฬœ' => 220, + 'ฬ' => 220, + 'ฬž' => 220, + 'ฬŸ' => 220, + 'ฬ ' => 220, + 'ฬก' => 202, + 'ฬข' => 202, + 'ฬฃ' => 220, + 'ฬค' => 220, + 'ฬฅ' => 220, + 'ฬฆ' => 220, + 'ฬง' => 202, + 'ฬจ' => 202, + 'ฬฉ' => 220, + 'ฬช' => 220, + 'ฬซ' => 220, + 'ฬฌ' => 220, + 'ฬญ' => 220, + 'ฬฎ' => 220, + 'ฬฏ' => 220, + 'ฬฐ' => 220, + 'ฬฑ' => 220, + 'ฬฒ' => 220, + 'ฬณ' => 220, + 'ฬด' => 1, + 'ฬต' => 1, + 'ฬถ' => 1, + 'ฬท' => 1, + 'ฬธ' => 1, + 'ฬน' => 220, + 'ฬบ' => 220, + 'ฬป' => 220, + 'ฬผ' => 220, + 'ฬฝ' => 230, + 'ฬพ' => 230, + 'ฬฟ' => 230, + 'อ€' => 230, + 'อ' => 230, + 'อ‚' => 230, + 'อƒ' => 230, + 'อ„' => 230, + 'อ…' => 240, + 'อ†' => 230, + 'อ‡' => 220, + 'อˆ' => 220, + 'อ‰' => 220, + 'อŠ' => 230, + 'อ‹' => 230, + 'อŒ' => 230, + 'อ' => 220, + 'อŽ' => 220, + 'อ' => 230, + 'อ‘' => 230, + 'อ’' => 230, + 'อ“' => 220, + 'อ”' => 220, + 'อ•' => 220, + 'อ–' => 220, + 'อ—' => 230, + 'อ˜' => 232, + 'อ™' => 220, + 'อš' => 220, + 'อ›' => 230, + 'อœ' => 233, + 'อ' => 234, + 'อž' => 234, + 'อŸ' => 233, + 'อ ' => 234, + 'อก' => 234, + 'อข' => 233, + 'อฃ' => 230, + 'อค' => 230, + 'อฅ' => 230, + 'อฆ' => 230, + 'อง' => 230, + 'อจ' => 230, + 'อฉ' => 230, + 'อช' => 230, + 'อซ' => 230, + 'อฌ' => 230, + 'อญ' => 230, + 'อฎ' => 230, + 'อฏ' => 230, + 'าƒ' => 230, + 'า„' => 230, + 'า…' => 230, + 'า†' => 230, + 'า‡' => 230, + 'ึ‘' => 220, + 'ึ’' => 230, + 'ึ“' => 230, + 'ึ”' => 230, + 'ึ•' => 230, + 'ึ–' => 220, + 'ึ—' => 230, + 'ึ˜' => 230, + 'ึ™' => 230, + 'ึš' => 222, + 'ึ›' => 220, + 'ึœ' => 230, + 'ึ' => 230, + 'ึž' => 230, + 'ึŸ' => 230, + 'ึ ' => 230, + 'ึก' => 230, + 'ึข' => 220, + 'ึฃ' => 220, + 'ึค' => 220, + 'ึฅ' => 220, + 'ึฆ' => 220, + 'ึง' => 220, + 'ึจ' => 230, + 'ึฉ' => 230, + 'ึช' => 220, + 'ึซ' => 230, + 'ึฌ' => 230, + 'ึญ' => 222, + 'ึฎ' => 228, + 'ึฏ' => 230, + 'ึฐ' => 10, + 'ึฑ' => 11, + 'ึฒ' => 12, + 'ึณ' => 13, + 'ึด' => 14, + 'ึต' => 15, + 'ึถ' => 16, + 'ึท' => 17, + 'ึธ' => 18, + 'ึน' => 19, + 'ึบ' => 19, + 'ึป' => 20, + 'ึผ' => 21, + 'ึฝ' => 22, + 'ึฟ' => 23, + 'ื' => 24, + 'ื‚' => 25, + 'ื„' => 230, + 'ื…' => 220, + 'ื‡' => 18, + 'ุ' => 230, + 'ุ‘' => 230, + 'ุ’' => 230, + 'ุ“' => 230, + 'ุ”' => 230, + 'ุ•' => 230, + 'ุ–' => 230, + 'ุ—' => 230, + 'ุ˜' => 30, + 'ุ™' => 31, + 'ุš' => 32, + 'ู‹' => 27, + 'ูŒ' => 28, + 'ู' => 29, + 'ูŽ' => 30, + 'ู' => 31, + 'ู' => 32, + 'ู‘' => 33, + 'ู’' => 34, + 'ู“' => 230, + 'ู”' => 230, + 'ู•' => 220, + 'ู–' => 220, + 'ู—' => 230, + 'ู˜' => 230, + 'ู™' => 230, + 'ูš' => 230, + 'ู›' => 230, + 'ูœ' => 220, + 'ู' => 230, + 'ูž' => 230, + 'ูŸ' => 220, + 'ูฐ' => 35, + '–' => 230, + '—' => 230, + '˜' => 230, + '™' => 230, + 'š' => 230, + '›' => 230, + 'œ' => 230, + 'Ÿ' => 230, + ' ' => 230, + 'ก' => 230, + 'ข' => 230, + 'ฃ' => 220, + 'ค' => 230, + 'ง' => 230, + 'จ' => 230, + 'ช' => 220, + 'ซ' => 230, + 'ฌ' => 230, + 'ญ' => 220, + '‘' => 36, + 'ฐ' => 230, + 'ฑ' => 220, + 'ฒ' => 230, + 'ณ' => 230, + 'ด' => 220, + 'ต' => 230, + 'ถ' => 230, + 'ท' => 220, + 'ธ' => 220, + 'น' => 220, + 'บ' => 230, + 'ป' => 220, + 'ผ' => 220, + 'ฝ' => 230, + 'พ' => 220, + 'ฟ' => 230, + '€' => 230, + '' => 230, + '‚' => 220, + 'ƒ' => 230, + '„' => 220, + '…' => 230, + '†' => 220, + '‡' => 230, + 'ˆ' => 220, + '‰' => 230, + 'Š' => 230, + '฿ซ' => 230, + '฿ฌ' => 230, + '฿ญ' => 230, + '฿ฎ' => 230, + '฿ฏ' => 230, + '฿ฐ' => 230, + '฿ฑ' => 230, + '฿ฒ' => 220, + '฿ณ' => 230, + '฿ฝ' => 220, + 'เ –' => 230, + 'เ —' => 230, + 'เ ˜' => 230, + 'เ ™' => 230, + 'เ ›' => 230, + 'เ œ' => 230, + 'เ ' => 230, + 'เ ž' => 230, + 'เ Ÿ' => 230, + 'เ  ' => 230, + 'เ ก' => 230, + 'เ ข' => 230, + 'เ ฃ' => 230, + 'เ ฅ' => 230, + 'เ ฆ' => 230, + 'เ ง' => 230, + 'เ ฉ' => 230, + 'เ ช' => 230, + 'เ ซ' => 230, + 'เ ฌ' => 230, + 'เ ญ' => 230, + 'เก™' => 220, + 'เกš' => 220, + 'เก›' => 220, + 'เฃ“' => 220, + 'เฃ”' => 230, + 'เฃ•' => 230, + 'เฃ–' => 230, + 'เฃ—' => 230, + 'เฃ˜' => 230, + 'เฃ™' => 230, + 'เฃš' => 230, + 'เฃ›' => 230, + 'เฃœ' => 230, + 'เฃ' => 230, + 'เฃž' => 230, + 'เฃŸ' => 230, + 'เฃ ' => 230, + 'เฃก' => 230, + 'เฃฃ' => 220, + 'เฃค' => 230, + 'เฃฅ' => 230, + 'เฃฆ' => 220, + 'เฃง' => 230, + 'เฃจ' => 230, + 'เฃฉ' => 220, + 'เฃช' => 230, + 'เฃซ' => 230, + 'เฃฌ' => 230, + 'เฃญ' => 220, + 'เฃฎ' => 220, + 'เฃฏ' => 220, + 'เฃฐ' => 27, + 'เฃฑ' => 28, + 'เฃฒ' => 29, + 'เฃณ' => 230, + 'เฃด' => 230, + 'เฃต' => 230, + 'เฃถ' => 220, + 'เฃท' => 230, + 'เฃธ' => 230, + 'เฃน' => 220, + 'เฃบ' => 220, + 'เฃป' => 230, + 'เฃผ' => 230, + 'เฃฝ' => 230, + 'เฃพ' => 230, + 'เฃฟ' => 230, + 'เคผ' => 7, + 'เฅ' => 9, + 'เฅ‘' => 230, + 'เฅ’' => 220, + 'เฅ“' => 230, + 'เฅ”' => 230, + 'เฆผ' => 7, + 'เง' => 9, + 'เงพ' => 230, + 'เจผ' => 7, + 'เฉ' => 9, + 'เชผ' => 7, + 'เซ' => 9, + 'เฌผ' => 7, + 'เญ' => 9, + 'เฏ' => 9, + 'เฑ' => 9, + 'เฑ•' => 84, + 'เฑ–' => 91, + 'เฒผ' => 7, + 'เณ' => 9, + 'เดป' => 9, + 'เดผ' => 9, + 'เต' => 9, + 'เทŠ' => 9, + 'เธธ' => 103, + 'เธน' => 103, + 'เธบ' => 9, + 'เนˆ' => 107, + 'เน‰' => 107, + 'เนŠ' => 107, + 'เน‹' => 107, + 'เบธ' => 118, + 'เบน' => 118, + 'เบบ' => 9, + 'เปˆ' => 122, + 'เป‰' => 122, + 'เปŠ' => 122, + 'เป‹' => 122, + 'เผ˜' => 220, + 'เผ™' => 220, + 'เผต' => 220, + 'เผท' => 220, + 'เผน' => 216, + 'เฝฑ' => 129, + 'เฝฒ' => 130, + 'เฝด' => 132, + 'เฝบ' => 130, + 'เฝป' => 130, + 'เฝผ' => 130, + 'เฝฝ' => 130, + 'เพ€' => 130, + 'เพ‚' => 230, + 'เพƒ' => 230, + 'เพ„' => 9, + 'เพ†' => 230, + 'เพ‡' => 230, + 'เฟ†' => 220, + 'แ€ท' => 7, + 'แ€น' => 9, + 'แ€บ' => 9, + 'แ‚' => 220, + 'แ' => 230, + 'แž' => 230, + 'แŸ' => 230, + 'แœ”' => 9, + 'แœด' => 9, + 'แŸ’' => 9, + 'แŸ' => 230, + 'แขฉ' => 228, + 'แคน' => 222, + 'แคบ' => 230, + 'แคป' => 220, + 'แจ—' => 230, + 'แจ˜' => 220, + 'แฉ ' => 9, + 'แฉต' => 230, + 'แฉถ' => 230, + 'แฉท' => 230, + 'แฉธ' => 230, + 'แฉน' => 230, + 'แฉบ' => 230, + 'แฉป' => 230, + 'แฉผ' => 230, + 'แฉฟ' => 220, + 'แชฐ' => 230, + 'แชฑ' => 230, + 'แชฒ' => 230, + 'แชณ' => 230, + 'แชด' => 230, + 'แชต' => 220, + 'แชถ' => 220, + 'แชท' => 220, + 'แชธ' => 220, + 'แชน' => 220, + 'แชบ' => 220, + 'แชป' => 230, + 'แชผ' => 230, + 'แชฝ' => 220, + 'แชฟ' => 220, + 'แซ€' => 220, + 'แฌด' => 7, + 'แญ„' => 9, + 'แญซ' => 230, + 'แญฌ' => 220, + 'แญญ' => 230, + 'แญฎ' => 230, + 'แญฏ' => 230, + 'แญฐ' => 230, + 'แญฑ' => 230, + 'แญฒ' => 230, + 'แญณ' => 230, + 'แฎช' => 9, + 'แฎซ' => 9, + 'แฏฆ' => 7, + 'แฏฒ' => 9, + 'แฏณ' => 9, + 'แฐท' => 7, + 'แณ' => 230, + 'แณ‘' => 230, + 'แณ’' => 230, + 'แณ”' => 1, + 'แณ•' => 220, + 'แณ–' => 220, + 'แณ—' => 220, + 'แณ˜' => 220, + 'แณ™' => 220, + 'แณš' => 230, + 'แณ›' => 230, + 'แณœ' => 220, + 'แณ' => 220, + 'แณž' => 220, + 'แณŸ' => 220, + 'แณ ' => 230, + 'แณข' => 1, + 'แณฃ' => 1, + 'แณค' => 1, + 'แณฅ' => 1, + 'แณฆ' => 1, + 'แณง' => 1, + 'แณจ' => 1, + 'แณญ' => 220, + 'แณด' => 230, + 'แณธ' => 230, + 'แณน' => 230, + 'แท€' => 230, + 'แท' => 230, + 'แท‚' => 220, + 'แทƒ' => 230, + 'แท„' => 230, + 'แท…' => 230, + 'แท†' => 230, + 'แท‡' => 230, + 'แทˆ' => 230, + 'แท‰' => 230, + 'แทŠ' => 220, + 'แท‹' => 230, + 'แทŒ' => 230, + 'แท' => 234, + 'แทŽ' => 214, + 'แท' => 220, + 'แท' => 202, + 'แท‘' => 230, + 'แท’' => 230, + 'แท“' => 230, + 'แท”' => 230, + 'แท•' => 230, + 'แท–' => 230, + 'แท—' => 230, + 'แท˜' => 230, + 'แท™' => 230, + 'แทš' => 230, + 'แท›' => 230, + 'แทœ' => 230, + 'แท' => 230, + 'แทž' => 230, + 'แทŸ' => 230, + 'แท ' => 230, + 'แทก' => 230, + 'แทข' => 230, + 'แทฃ' => 230, + 'แทค' => 230, + 'แทฅ' => 230, + 'แทฆ' => 230, + 'แทง' => 230, + 'แทจ' => 230, + 'แทฉ' => 230, + 'แทช' => 230, + 'แทซ' => 230, + 'แทฌ' => 230, + 'แทญ' => 230, + 'แทฎ' => 230, + 'แทฏ' => 230, + 'แทฐ' => 230, + 'แทฑ' => 230, + 'แทฒ' => 230, + 'แทณ' => 230, + 'แทด' => 230, + 'แทต' => 230, + 'แทถ' => 232, + 'แทท' => 228, + 'แทธ' => 228, + 'แทน' => 220, + 'แทป' => 230, + 'แทผ' => 233, + 'แทฝ' => 220, + 'แทพ' => 230, + 'แทฟ' => 220, + 'โƒ' => 230, + 'โƒ‘' => 230, + 'โƒ’' => 1, + 'โƒ“' => 1, + 'โƒ”' => 230, + 'โƒ•' => 230, + 'โƒ–' => 230, + 'โƒ—' => 230, + 'โƒ˜' => 1, + 'โƒ™' => 1, + 'โƒš' => 1, + 'โƒ›' => 230, + 'โƒœ' => 230, + 'โƒก' => 230, + 'โƒฅ' => 1, + 'โƒฆ' => 1, + 'โƒง' => 230, + 'โƒจ' => 220, + 'โƒฉ' => 230, + 'โƒช' => 1, + 'โƒซ' => 1, + 'โƒฌ' => 220, + 'โƒญ' => 220, + 'โƒฎ' => 220, + 'โƒฏ' => 220, + 'โƒฐ' => 230, + 'โณฏ' => 230, + 'โณฐ' => 230, + 'โณฑ' => 230, + 'โตฟ' => 9, + 'โท ' => 230, + 'โทก' => 230, + 'โทข' => 230, + 'โทฃ' => 230, + 'โทค' => 230, + 'โทฅ' => 230, + 'โทฆ' => 230, + 'โทง' => 230, + 'โทจ' => 230, + 'โทฉ' => 230, + 'โทช' => 230, + 'โทซ' => 230, + 'โทฌ' => 230, + 'โทญ' => 230, + 'โทฎ' => 230, + 'โทฏ' => 230, + 'โทฐ' => 230, + 'โทฑ' => 230, + 'โทฒ' => 230, + 'โทณ' => 230, + 'โทด' => 230, + 'โทต' => 230, + 'โทถ' => 230, + 'โทท' => 230, + 'โทธ' => 230, + 'โทน' => 230, + 'โทบ' => 230, + 'โทป' => 230, + 'โทผ' => 230, + 'โทฝ' => 230, + 'โทพ' => 230, + 'โทฟ' => 230, + 'ใ€ช' => 218, + 'ใ€ซ' => 228, + 'ใ€ฌ' => 232, + 'ใ€ญ' => 222, + 'ใ€ฎ' => 224, + 'ใ€ฏ' => 224, + 'ใ‚™' => 8, + 'ใ‚š' => 8, + '๊™ฏ' => 230, + '๊™ด' => 230, + '๊™ต' => 230, + '๊™ถ' => 230, + '๊™ท' => 230, + '๊™ธ' => 230, + '๊™น' => 230, + '๊™บ' => 230, + '๊™ป' => 230, + '๊™ผ' => 230, + '๊™ฝ' => 230, + '๊šž' => 230, + '๊šŸ' => 230, + '๊›ฐ' => 230, + '๊›ฑ' => 230, + '๊ †' => 9, + '๊ ฌ' => 9, + '๊ฃ„' => 9, + '๊ฃ ' => 230, + '๊ฃก' => 230, + '๊ฃข' => 230, + '๊ฃฃ' => 230, + '๊ฃค' => 230, + '๊ฃฅ' => 230, + '๊ฃฆ' => 230, + '๊ฃง' => 230, + '๊ฃจ' => 230, + '๊ฃฉ' => 230, + '๊ฃช' => 230, + '๊ฃซ' => 230, + '๊ฃฌ' => 230, + '๊ฃญ' => 230, + '๊ฃฎ' => 230, + '๊ฃฏ' => 230, + '๊ฃฐ' => 230, + '๊ฃฑ' => 230, + '๊คซ' => 220, + '๊คฌ' => 220, + '๊คญ' => 220, + '๊ฅ“' => 9, + '๊ฆณ' => 7, + '๊ง€' => 9, + '๊ชฐ' => 230, + '๊ชฒ' => 230, + '๊ชณ' => 230, + '๊ชด' => 220, + '๊ชท' => 230, + '๊ชธ' => 230, + '๊ชพ' => 230, + '๊ชฟ' => 230, + '๊ซ' => 230, + '๊ซถ' => 9, + '๊ฏญ' => 9, + '๏ฌž' => 26, + '๏ธ ' => 230, + '๏ธก' => 230, + '๏ธข' => 230, + '๏ธฃ' => 230, + '๏ธค' => 230, + '๏ธฅ' => 230, + '๏ธฆ' => 230, + '๏ธง' => 220, + '๏ธจ' => 220, + '๏ธฉ' => 220, + '๏ธช' => 220, + '๏ธซ' => 220, + '๏ธฌ' => 220, + '๏ธญ' => 220, + '๏ธฎ' => 230, + '๏ธฏ' => 230, + '๐‡ฝ' => 220, + '๐‹ ' => 220, + '๐ถ' => 230, + '๐ท' => 230, + '๐ธ' => 230, + '๐น' => 230, + '๐บ' => 230, + '๐จ' => 220, + '๐จ' => 230, + '๐จธ' => 230, + '๐จน' => 1, + '๐จบ' => 220, + '๐จฟ' => 9, + '๐ซฅ' => 230, + '๐ซฆ' => 220, + '๐ดค' => 230, + '๐ดฅ' => 230, + '๐ดฆ' => 230, + '๐ดง' => 230, + '๐บซ' => 230, + '๐บฌ' => 230, + '๐ฝ†' => 220, + '๐ฝ‡' => 220, + '๐ฝˆ' => 230, + '๐ฝ‰' => 230, + '๐ฝŠ' => 230, + '๐ฝ‹' => 220, + '๐ฝŒ' => 230, + '๐ฝ' => 220, + '๐ฝŽ' => 220, + '๐ฝ' => 220, + '๐ฝ' => 220, + '๐‘†' => 9, + '๐‘ฟ' => 9, + '๐‘‚น' => 9, + '๐‘‚บ' => 7, + '๐‘„€' => 230, + '๐‘„' => 230, + '๐‘„‚' => 230, + '๐‘„ณ' => 9, + '๐‘„ด' => 9, + '๐‘…ณ' => 7, + '๐‘‡€' => 9, + '๐‘‡Š' => 7, + '๐‘ˆต' => 9, + '๐‘ˆถ' => 7, + '๐‘‹ฉ' => 7, + '๐‘‹ช' => 9, + '๐‘Œป' => 7, + '๐‘Œผ' => 7, + '๐‘' => 9, + '๐‘ฆ' => 230, + '๐‘ง' => 230, + '๐‘จ' => 230, + '๐‘ฉ' => 230, + '๐‘ช' => 230, + '๐‘ซ' => 230, + '๐‘ฌ' => 230, + '๐‘ฐ' => 230, + '๐‘ฑ' => 230, + '๐‘ฒ' => 230, + '๐‘ณ' => 230, + '๐‘ด' => 230, + '๐‘‘‚' => 9, + '๐‘‘†' => 7, + '๐‘‘ž' => 230, + '๐‘“‚' => 9, + '๐‘“ƒ' => 7, + '๐‘–ฟ' => 9, + '๐‘—€' => 7, + '๐‘˜ฟ' => 9, + '๐‘šถ' => 9, + '๐‘šท' => 7, + '๐‘œซ' => 9, + '๐‘ น' => 9, + '๐‘ บ' => 7, + '๐‘คฝ' => 9, + '๐‘คพ' => 9, + '๐‘ฅƒ' => 7, + '๐‘ง ' => 9, + '๐‘จด' => 9, + '๐‘ฉ‡' => 9, + '๐‘ช™' => 9, + '๐‘ฐฟ' => 9, + '๐‘ต‚' => 7, + '๐‘ต„' => 9, + '๐‘ต…' => 9, + '๐‘ถ—' => 9, + '๐–ซฐ' => 1, + '๐–ซฑ' => 1, + '๐–ซฒ' => 1, + '๐–ซณ' => 1, + '๐–ซด' => 1, + '๐–ฌฐ' => 230, + '๐–ฌฑ' => 230, + '๐–ฌฒ' => 230, + '๐–ฌณ' => 230, + '๐–ฌด' => 230, + '๐–ฌต' => 230, + '๐–ฌถ' => 230, + '๐–ฟฐ' => 6, + '๐–ฟฑ' => 6, + '๐›ฒž' => 1, + '๐…ฅ' => 216, + '๐…ฆ' => 216, + '๐…ง' => 1, + '๐…จ' => 1, + '๐…ฉ' => 1, + '๐…ญ' => 226, + '๐…ฎ' => 216, + '๐…ฏ' => 216, + '๐…ฐ' => 216, + '๐…ฑ' => 216, + '๐…ฒ' => 216, + '๐…ป' => 220, + '๐…ผ' => 220, + '๐…ฝ' => 220, + '๐…พ' => 220, + '๐…ฟ' => 220, + '๐†€' => 220, + '๐†' => 220, + '๐†‚' => 220, + '๐†…' => 230, + '๐††' => 230, + '๐†‡' => 230, + '๐†ˆ' => 230, + '๐†‰' => 230, + '๐†Š' => 220, + '๐†‹' => 220, + '๐†ช' => 230, + '๐†ซ' => 230, + '๐†ฌ' => 230, + '๐†ญ' => 230, + '๐‰‚' => 230, + '๐‰ƒ' => 230, + '๐‰„' => 230, + '๐ž€€' => 230, + '๐ž€' => 230, + '๐ž€‚' => 230, + '๐ž€ƒ' => 230, + '๐ž€„' => 230, + '๐ž€…' => 230, + '๐ž€†' => 230, + '๐ž€ˆ' => 230, + '๐ž€‰' => 230, + '๐ž€Š' => 230, + '๐ž€‹' => 230, + '๐ž€Œ' => 230, + '๐ž€' => 230, + '๐ž€Ž' => 230, + '๐ž€' => 230, + '๐ž€' => 230, + '๐ž€‘' => 230, + '๐ž€’' => 230, + '๐ž€“' => 230, + '๐ž€”' => 230, + '๐ž€•' => 230, + '๐ž€–' => 230, + '๐ž€—' => 230, + '๐ž€˜' => 230, + '๐ž€›' => 230, + '๐ž€œ' => 230, + '๐ž€' => 230, + '๐ž€ž' => 230, + '๐ž€Ÿ' => 230, + '๐ž€ ' => 230, + '๐ž€ก' => 230, + '๐ž€ฃ' => 230, + '๐ž€ค' => 230, + '๐ž€ฆ' => 230, + '๐ž€ง' => 230, + '๐ž€จ' => 230, + '๐ž€ฉ' => 230, + '๐ž€ช' => 230, + '๐ž„ฐ' => 230, + '๐ž„ฑ' => 230, + '๐ž„ฒ' => 230, + '๐ž„ณ' => 230, + '๐ž„ด' => 230, + '๐ž„ต' => 230, + '๐ž„ถ' => 230, + '๐ž‹ฌ' => 230, + '๐ž‹ญ' => 230, + '๐ž‹ฎ' => 230, + '๐ž‹ฏ' => 230, + '๐žฃ' => 220, + '๐žฃ‘' => 220, + '๐žฃ’' => 220, + '๐žฃ“' => 220, + '๐žฃ”' => 220, + '๐žฃ•' => 220, + '๐žฃ–' => 220, + '๐žฅ„' => 230, + '๐žฅ…' => 230, + '๐žฅ†' => 230, + '๐žฅ‡' => 230, + '๐žฅˆ' => 230, + '๐žฅ‰' => 230, + '๐žฅŠ' => 7, +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php new file mode 100644 index 0000000..1574902 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php @@ -0,0 +1,3695 @@ + ' ', + 'ยจ' => ' ฬˆ', + 'ยช' => 'a', + 'ยฏ' => ' ฬ„', + 'ยฒ' => '2', + 'ยณ' => '3', + 'ยด' => ' ฬ', + 'ยต' => 'ฮผ', + 'ยธ' => ' ฬง', + 'ยน' => '1', + 'ยบ' => 'o', + 'ยผ' => '1โ„4', + 'ยฝ' => '1โ„2', + 'ยพ' => '3โ„4', + 'ฤฒ' => 'IJ', + 'ฤณ' => 'ij', + 'ฤฟ' => 'Lยท', + 'ล€' => 'lยท', + 'ล‰' => 'สผn', + 'ลฟ' => 's', + 'ว„' => 'DZฬŒ', + 'ว…' => 'DzฬŒ', + 'ว†' => 'dzฬŒ', + 'ว‡' => 'LJ', + 'วˆ' => 'Lj', + 'ว‰' => 'lj', + 'วŠ' => 'NJ', + 'ว‹' => 'Nj', + 'วŒ' => 'nj', + 'วฑ' => 'DZ', + 'วฒ' => 'Dz', + 'วณ' => 'dz', + 'สฐ' => 'h', + 'สฑ' => 'ษฆ', + 'สฒ' => 'j', + 'สณ' => 'r', + 'สด' => 'ษน', + 'สต' => 'ษป', + 'สถ' => 'ส', + 'สท' => 'w', + 'สธ' => 'y', + 'ห˜' => ' ฬ†', + 'ห™' => ' ฬ‡', + 'หš' => ' ฬŠ', + 'ห›' => ' ฬจ', + 'หœ' => ' ฬƒ', + 'ห' => ' ฬ‹', + 'ห ' => 'ษฃ', + 'หก' => 'l', + 'หข' => 's', + 'หฃ' => 'x', + 'หค' => 'ส•', + 'อบ' => ' อ…', + 'ฮ„' => ' ฬ', + 'ฮ…' => ' ฬˆฬ', + 'ฯ' => 'ฮฒ', + 'ฯ‘' => 'ฮธ', + 'ฯ’' => 'ฮฅ', + 'ฯ“' => 'ฮฅฬ', + 'ฯ”' => 'ฮฅฬˆ', + 'ฯ•' => 'ฯ†', + 'ฯ–' => 'ฯ€', + 'ฯฐ' => 'ฮบ', + 'ฯฑ' => 'ฯ', + 'ฯฒ' => 'ฯ‚', + 'ฯด' => 'ฮ˜', + 'ฯต' => 'ฮต', + 'ฯน' => 'ฮฃ', + 'ึ‡' => 'ีฅึ‚', + 'ูต' => 'ุงูด', + 'ูถ' => 'ูˆูด', + 'ูท' => '‡ูด', + 'ูธ' => 'ูŠูด', + 'เธณ' => 'เนเธฒ', + 'เบณ' => 'เปเบฒ', + 'เปœ' => 'เบซเบ™', + 'เป' => 'เบซเบก', + 'เผŒ' => 'เผ‹', + 'เฝท' => 'เพฒเฝฑเพ€', + 'เฝน' => 'เพณเฝฑเพ€', + 'แƒผ' => 'แƒœ', + 'แดฌ' => 'A', + 'แดญ' => 'ร†', + 'แดฎ' => 'B', + 'แดฐ' => 'D', + 'แดฑ' => 'E', + 'แดฒ' => 'ฦŽ', + 'แดณ' => 'G', + 'แดด' => 'H', + 'แดต' => 'I', + 'แดถ' => 'J', + 'แดท' => 'K', + 'แดธ' => 'L', + 'แดน' => 'M', + 'แดบ' => 'N', + 'แดผ' => 'O', + 'แดฝ' => 'ศข', + 'แดพ' => 'P', + 'แดฟ' => 'R', + 'แต€' => 'T', + 'แต' => 'U', + 'แต‚' => 'W', + 'แตƒ' => 'a', + 'แต„' => 'ษ', + 'แต…' => 'ษ‘', + 'แต†' => 'แด‚', + 'แต‡' => 'b', + 'แตˆ' => 'd', + 'แต‰' => 'e', + 'แตŠ' => 'ษ™', + 'แต‹' => 'ษ›', + 'แตŒ' => 'ษœ', + 'แต' => 'g', + 'แต' => 'k', + 'แต' => 'm', + 'แต‘' => 'ล‹', + 'แต’' => 'o', + 'แต“' => 'ษ”', + 'แต”' => 'แด–', + 'แต•' => 'แด—', + 'แต–' => 'p', + 'แต—' => 't', + 'แต˜' => 'u', + 'แต™' => 'แด', + 'แตš' => 'ษฏ', + 'แต›' => 'v', + 'แตœ' => 'แดฅ', + 'แต' => 'ฮฒ', + 'แตž' => 'ฮณ', + 'แตŸ' => 'ฮด', + 'แต ' => 'ฯ†', + 'แตก' => 'ฯ‡', + 'แตข' => 'i', + 'แตฃ' => 'r', + 'แตค' => 'u', + 'แตฅ' => 'v', + 'แตฆ' => 'ฮฒ', + 'แตง' => 'ฮณ', + 'แตจ' => 'ฯ', + 'แตฉ' => 'ฯ†', + 'แตช' => 'ฯ‡', + 'แตธ' => 'ะฝ', + 'แถ›' => 'ษ’', + 'แถœ' => 'c', + 'แถ' => 'ษ•', + 'แถž' => 'รฐ', + 'แถŸ' => 'ษœ', + 'แถ ' => 'f', + 'แถก' => 'ษŸ', + 'แถข' => 'ษก', + 'แถฃ' => 'ษฅ', + 'แถค' => 'ษจ', + 'แถฅ' => 'ษฉ', + 'แถฆ' => 'ษช', + 'แถง' => 'แตป', + 'แถจ' => 'ส', + 'แถฉ' => 'ษญ', + 'แถช' => 'แถ…', + 'แถซ' => 'สŸ', + 'แถฌ' => 'ษฑ', + 'แถญ' => 'ษฐ', + 'แถฎ' => 'ษฒ', + 'แถฏ' => 'ษณ', + 'แถฐ' => 'ษด', + 'แถฑ' => 'ษต', + 'แถฒ' => 'ษธ', + 'แถณ' => 'ส‚', + 'แถด' => 'สƒ', + 'แถต' => 'ฦซ', + 'แถถ' => 'ส‰', + 'แถท' => 'สŠ', + 'แถธ' => 'แดœ', + 'แถน' => 'ส‹', + 'แถบ' => 'สŒ', + 'แถป' => 'z', + 'แถผ' => 'ส', + 'แถฝ' => 'ส‘', + 'แถพ' => 'ส’', + 'แถฟ' => 'ฮธ', + 'แบš' => 'aสพ', + 'แบ›' => 'sฬ‡', + 'แพฝ' => ' ฬ“', + 'แพฟ' => ' ฬ“', + 'แฟ€' => ' อ‚', + 'แฟ' => ' ฬˆอ‚', + 'แฟ' => ' ฬ“ฬ€', + 'แฟŽ' => ' ฬ“ฬ', + 'แฟ' => ' ฬ“อ‚', + 'แฟ' => ' ฬ”ฬ€', + 'แฟž' => ' ฬ”ฬ', + 'แฟŸ' => ' ฬ”อ‚', + 'แฟญ' => ' ฬˆฬ€', + 'แฟฎ' => ' ฬˆฬ', + 'แฟฝ' => ' ฬ', + 'แฟพ' => ' ฬ”', + 'โ€€' => ' ', + 'โ€' => ' ', + 'โ€‚' => ' ', + 'โ€ƒ' => ' ', + 'โ€„' => ' ', + 'โ€…' => ' ', + 'โ€†' => ' ', + 'โ€‡' => ' ', + 'โ€ˆ' => ' ', + 'โ€‰' => ' ', + 'โ€Š' => ' ', + 'โ€‘' => 'โ€', + 'โ€—' => ' ฬณ', + 'โ€ค' => '.', + 'โ€ฅ' => '..', + 'โ€ฆ' => '...', + 'โ€ฏ' => ' ', + 'โ€ณ' => 'โ€ฒโ€ฒ', + 'โ€ด' => 'โ€ฒโ€ฒโ€ฒ', + 'โ€ถ' => 'โ€ตโ€ต', + 'โ€ท' => 'โ€ตโ€ตโ€ต', + 'โ€ผ' => '!!', + 'โ€พ' => ' ฬ…', + 'โ‡' => '??', + 'โˆ' => '?!', + 'โ‰' => '!?', + 'โ—' => 'โ€ฒโ€ฒโ€ฒโ€ฒ', + 'โŸ' => ' ', + 'โฐ' => '0', + 'โฑ' => 'i', + 'โด' => '4', + 'โต' => '5', + 'โถ' => '6', + 'โท' => '7', + 'โธ' => '8', + 'โน' => '9', + 'โบ' => '+', + 'โป' => 'โˆ’', + 'โผ' => '=', + 'โฝ' => '(', + 'โพ' => ')', + 'โฟ' => 'n', + 'โ‚€' => '0', + 'โ‚' => '1', + 'โ‚‚' => '2', + 'โ‚ƒ' => '3', + 'โ‚„' => '4', + 'โ‚…' => '5', + 'โ‚†' => '6', + 'โ‚‡' => '7', + 'โ‚ˆ' => '8', + 'โ‚‰' => '9', + 'โ‚Š' => '+', + 'โ‚‹' => 'โˆ’', + 'โ‚Œ' => '=', + 'โ‚' => '(', + 'โ‚Ž' => ')', + 'โ‚' => 'a', + 'โ‚‘' => 'e', + 'โ‚’' => 'o', + 'โ‚“' => 'x', + 'โ‚”' => 'ษ™', + 'โ‚•' => 'h', + 'โ‚–' => 'k', + 'โ‚—' => 'l', + 'โ‚˜' => 'm', + 'โ‚™' => 'n', + 'โ‚š' => 'p', + 'โ‚›' => 's', + 'โ‚œ' => 't', + 'โ‚จ' => 'Rs', + 'โ„€' => 'a/c', + 'โ„' => 'a/s', + 'โ„‚' => 'C', + 'โ„ƒ' => 'ยฐC', + 'โ„…' => 'c/o', + 'โ„†' => 'c/u', + 'โ„‡' => 'ฦ', + 'โ„‰' => 'ยฐF', + 'โ„Š' => 'g', + 'โ„‹' => 'H', + 'โ„Œ' => 'H', + 'โ„' => 'H', + 'โ„Ž' => 'h', + 'โ„' => 'ฤง', + 'โ„' => 'I', + 'โ„‘' => 'I', + 'โ„’' => 'L', + 'โ„“' => 'l', + 'โ„•' => 'N', + 'โ„–' => 'No', + 'โ„™' => 'P', + 'โ„š' => 'Q', + 'โ„›' => 'R', + 'โ„œ' => 'R', + 'โ„' => 'R', + 'โ„ ' => 'SM', + 'โ„ก' => 'TEL', + 'โ„ข' => 'TM', + 'โ„ค' => 'Z', + 'โ„จ' => 'Z', + 'โ„ฌ' => 'B', + 'โ„ญ' => 'C', + 'โ„ฏ' => 'e', + 'โ„ฐ' => 'E', + 'โ„ฑ' => 'F', + 'โ„ณ' => 'M', + 'โ„ด' => 'o', + 'โ„ต' => 'ื', + 'โ„ถ' => 'ื‘', + 'โ„ท' => 'ื’', + 'โ„ธ' => 'ื“', + 'โ„น' => 'i', + 'โ„ป' => 'FAX', + 'โ„ผ' => 'ฯ€', + 'โ„ฝ' => 'ฮณ', + 'โ„พ' => 'ฮ“', + 'โ„ฟ' => 'ฮ ', + 'โ…€' => 'โˆ‘', + 'โ……' => 'D', + 'โ…†' => 'd', + 'โ…‡' => 'e', + 'โ…ˆ' => 'i', + 'โ…‰' => 'j', + 'โ…' => '1โ„7', + 'โ…‘' => '1โ„9', + 'โ…’' => '1โ„10', + 'โ…“' => '1โ„3', + 'โ…”' => '2โ„3', + 'โ…•' => '1โ„5', + 'โ…–' => '2โ„5', + 'โ…—' => '3โ„5', + 'โ…˜' => '4โ„5', + 'โ…™' => '1โ„6', + 'โ…š' => '5โ„6', + 'โ…›' => '1โ„8', + 'โ…œ' => '3โ„8', + 'โ…' => '5โ„8', + 'โ…ž' => '7โ„8', + 'โ…Ÿ' => '1โ„', + 'โ… ' => 'I', + 'โ…ก' => 'II', + 'โ…ข' => 'III', + 'โ…ฃ' => 'IV', + 'โ…ค' => 'V', + 'โ…ฅ' => 'VI', + 'โ…ฆ' => 'VII', + 'โ…ง' => 'VIII', + 'โ…จ' => 'IX', + 'โ…ฉ' => 'X', + 'โ…ช' => 'XI', + 'โ…ซ' => 'XII', + 'โ…ฌ' => 'L', + 'โ…ญ' => 'C', + 'โ…ฎ' => 'D', + 'โ…ฏ' => 'M', + 'โ…ฐ' => 'i', + 'โ…ฑ' => 'ii', + 'โ…ฒ' => 'iii', + 'โ…ณ' => 'iv', + 'โ…ด' => 'v', + 'โ…ต' => 'vi', + 'โ…ถ' => 'vii', + 'โ…ท' => 'viii', + 'โ…ธ' => 'ix', + 'โ…น' => 'x', + 'โ…บ' => 'xi', + 'โ…ป' => 'xii', + 'โ…ผ' => 'l', + 'โ…ฝ' => 'c', + 'โ…พ' => 'd', + 'โ…ฟ' => 'm', + 'โ†‰' => '0โ„3', + 'โˆฌ' => 'โˆซโˆซ', + 'โˆญ' => 'โˆซโˆซโˆซ', + 'โˆฏ' => 'โˆฎโˆฎ', + 'โˆฐ' => 'โˆฎโˆฎโˆฎ', + 'โ‘ ' => '1', + 'โ‘ก' => '2', + 'โ‘ข' => '3', + 'โ‘ฃ' => '4', + 'โ‘ค' => '5', + 'โ‘ฅ' => '6', + 'โ‘ฆ' => '7', + 'โ‘ง' => '8', + 'โ‘จ' => '9', + 'โ‘ฉ' => '10', + 'โ‘ช' => '11', + 'โ‘ซ' => '12', + 'โ‘ฌ' => '13', + 'โ‘ญ' => '14', + 'โ‘ฎ' => '15', + 'โ‘ฏ' => '16', + 'โ‘ฐ' => '17', + 'โ‘ฑ' => '18', + 'โ‘ฒ' => '19', + 'โ‘ณ' => '20', + 'โ‘ด' => '(1)', + 'โ‘ต' => '(2)', + 'โ‘ถ' => '(3)', + 'โ‘ท' => '(4)', + 'โ‘ธ' => '(5)', + 'โ‘น' => '(6)', + 'โ‘บ' => '(7)', + 'โ‘ป' => '(8)', + 'โ‘ผ' => '(9)', + 'โ‘ฝ' => '(10)', + 'โ‘พ' => '(11)', + 'โ‘ฟ' => '(12)', + 'โ’€' => '(13)', + 'โ’' => '(14)', + 'โ’‚' => '(15)', + 'โ’ƒ' => '(16)', + 'โ’„' => '(17)', + 'โ’…' => '(18)', + 'โ’†' => '(19)', + 'โ’‡' => '(20)', + 'โ’ˆ' => '1.', + 'โ’‰' => '2.', + 'โ’Š' => '3.', + 'โ’‹' => '4.', + 'โ’Œ' => '5.', + 'โ’' => '6.', + 'โ’Ž' => '7.', + 'โ’' => '8.', + 'โ’' => '9.', + 'โ’‘' => '10.', + 'โ’’' => '11.', + 'โ’“' => '12.', + 'โ’”' => '13.', + 'โ’•' => '14.', + 'โ’–' => '15.', + 'โ’—' => '16.', + 'โ’˜' => '17.', + 'โ’™' => '18.', + 'โ’š' => '19.', + 'โ’›' => '20.', + 'โ’œ' => '(a)', + 'โ’' => '(b)', + 'โ’ž' => '(c)', + 'โ’Ÿ' => '(d)', + 'โ’ ' => '(e)', + 'โ’ก' => '(f)', + 'โ’ข' => '(g)', + 'โ’ฃ' => '(h)', + 'โ’ค' => '(i)', + 'โ’ฅ' => '(j)', + 'โ’ฆ' => '(k)', + 'โ’ง' => '(l)', + 'โ’จ' => '(m)', + 'โ’ฉ' => '(n)', + 'โ’ช' => '(o)', + 'โ’ซ' => '(p)', + 'โ’ฌ' => '(q)', + 'โ’ญ' => '(r)', + 'โ’ฎ' => '(s)', + 'โ’ฏ' => '(t)', + 'โ’ฐ' => '(u)', + 'โ’ฑ' => '(v)', + 'โ’ฒ' => '(w)', + 'โ’ณ' => '(x)', + 'โ’ด' => '(y)', + 'โ’ต' => '(z)', + 'โ’ถ' => 'A', + 'โ’ท' => 'B', + 'โ’ธ' => 'C', + 'โ’น' => 'D', + 'โ’บ' => 'E', + 'โ’ป' => 'F', + 'โ’ผ' => 'G', + 'โ’ฝ' => 'H', + 'โ’พ' => 'I', + 'โ’ฟ' => 'J', + 'โ“€' => 'K', + 'โ“' => 'L', + 'โ“‚' => 'M', + 'โ“ƒ' => 'N', + 'โ“„' => 'O', + 'โ“…' => 'P', + 'โ“†' => 'Q', + 'โ“‡' => 'R', + 'โ“ˆ' => 'S', + 'โ“‰' => 'T', + 'โ“Š' => 'U', + 'โ“‹' => 'V', + 'โ“Œ' => 'W', + 'โ“' => 'X', + 'โ“Ž' => 'Y', + 'โ“' => 'Z', + 'โ“' => 'a', + 'โ“‘' => 'b', + 'โ“’' => 'c', + 'โ““' => 'd', + 'โ“”' => 'e', + 'โ“•' => 'f', + 'โ“–' => 'g', + 'โ“—' => 'h', + 'โ“˜' => 'i', + 'โ“™' => 'j', + 'โ“š' => 'k', + 'โ“›' => 'l', + 'โ“œ' => 'm', + 'โ“' => 'n', + 'โ“ž' => 'o', + 'โ“Ÿ' => 'p', + 'โ“ ' => 'q', + 'โ“ก' => 'r', + 'โ“ข' => 's', + 'โ“ฃ' => 't', + 'โ“ค' => 'u', + 'โ“ฅ' => 'v', + 'โ“ฆ' => 'w', + 'โ“ง' => 'x', + 'โ“จ' => 'y', + 'โ“ฉ' => 'z', + 'โ“ช' => '0', + 'โจŒ' => 'โˆซโˆซโˆซโˆซ', + 'โฉด' => '::=', + 'โฉต' => '==', + 'โฉถ' => '===', + 'โฑผ' => 'j', + 'โฑฝ' => 'V', + 'โตฏ' => 'โตก', + 'โบŸ' => 'ๆฏ', + 'โปณ' => '้พŸ', + 'โผ€' => 'ไธ€', + 'โผ' => 'ไธจ', + 'โผ‚' => 'ไธถ', + 'โผƒ' => 'ไธฟ', + 'โผ„' => 'ไน™', + 'โผ…' => 'ไบ…', + 'โผ†' => 'ไบŒ', + 'โผ‡' => 'ไบ ', + 'โผˆ' => 'ไบบ', + 'โผ‰' => 'ๅ„ฟ', + 'โผŠ' => 'ๅ…ฅ', + 'โผ‹' => 'ๅ…ซ', + 'โผŒ' => 'ๅ†‚', + 'โผ' => 'ๅ†–', + 'โผŽ' => 'ๅ†ซ', + 'โผ' => 'ๅ‡ ', + 'โผ' => 'ๅ‡ต', + 'โผ‘' => 'ๅˆ€', + 'โผ’' => 'ๅŠ›', + 'โผ“' => 'ๅ‹น', + 'โผ”' => 'ๅŒ•', + 'โผ•' => 'ๅŒš', + 'โผ–' => 'ๅŒธ', + 'โผ—' => 'ๅ', + 'โผ˜' => 'ๅœ', + 'โผ™' => 'ๅฉ', + 'โผš' => 'ๅŽ‚', + 'โผ›' => 'ๅŽถ', + 'โผœ' => 'ๅˆ', + 'โผ' => 'ๅฃ', + 'โผž' => 'ๅ›—', + 'โผŸ' => 'ๅœŸ', + 'โผ ' => 'ๅฃซ', + 'โผก' => 'ๅค‚', + 'โผข' => 'ๅคŠ', + 'โผฃ' => 'ๅค•', + 'โผค' => 'ๅคง', + 'โผฅ' => 'ๅฅณ', + 'โผฆ' => 'ๅญ', + 'โผง' => 'ๅฎ€', + 'โผจ' => 'ๅฏธ', + 'โผฉ' => 'ๅฐ', + 'โผช' => 'ๅฐข', + 'โผซ' => 'ๅฐธ', + 'โผฌ' => 'ๅฑฎ', + 'โผญ' => 'ๅฑฑ', + 'โผฎ' => 'ๅท›', + 'โผฏ' => 'ๅทฅ', + 'โผฐ' => 'ๅทฑ', + 'โผฑ' => 'ๅทพ', + 'โผฒ' => 'ๅนฒ', + 'โผณ' => 'ๅนบ', + 'โผด' => 'ๅนฟ', + 'โผต' => 'ๅปด', + 'โผถ' => 'ๅปพ', + 'โผท' => 'ๅผ‹', + 'โผธ' => 'ๅผ“', + 'โผน' => 'ๅฝ', + 'โผบ' => 'ๅฝก', + 'โผป' => 'ๅฝณ', + 'โผผ' => 'ๅฟƒ', + 'โผฝ' => 'ๆˆˆ', + 'โผพ' => 'ๆˆถ', + 'โผฟ' => 'ๆ‰‹', + 'โฝ€' => 'ๆ”ฏ', + 'โฝ' => 'ๆ”ด', + 'โฝ‚' => 'ๆ–‡', + 'โฝƒ' => 'ๆ–—', + 'โฝ„' => 'ๆ–ค', + 'โฝ…' => 'ๆ–น', + 'โฝ†' => 'ๆ— ', + 'โฝ‡' => 'ๆ—ฅ', + 'โฝˆ' => 'ๆ›ฐ', + 'โฝ‰' => 'ๆœˆ', + 'โฝŠ' => 'ๆœจ', + 'โฝ‹' => 'ๆฌ ', + 'โฝŒ' => 'ๆญข', + 'โฝ' => 'ๆญน', + 'โฝŽ' => 'ๆฎณ', + 'โฝ' => 'ๆฏ‹', + 'โฝ' => 'ๆฏ”', + 'โฝ‘' => 'ๆฏ›', + 'โฝ’' => 'ๆฐ', + 'โฝ“' => 'ๆฐ”', + 'โฝ”' => 'ๆฐด', + 'โฝ•' => '็ซ', + 'โฝ–' => '็ˆช', + 'โฝ—' => '็ˆถ', + 'โฝ˜' => '็ˆป', + 'โฝ™' => '็ˆฟ', + 'โฝš' => '็‰‡', + 'โฝ›' => '็‰™', + 'โฝœ' => '็‰›', + 'โฝ' => '็Šฌ', + 'โฝž' => '็Ž„', + 'โฝŸ' => '็Ž‰', + 'โฝ ' => '็“œ', + 'โฝก' => '็“ฆ', + 'โฝข' => '็”˜', + 'โฝฃ' => '็”Ÿ', + 'โฝค' => '็”จ', + 'โฝฅ' => '็”ฐ', + 'โฝฆ' => '็–‹', + 'โฝง' => '็–’', + 'โฝจ' => '็™ถ', + 'โฝฉ' => '็™ฝ', + 'โฝช' => '็šฎ', + 'โฝซ' => '็šฟ', + 'โฝฌ' => '็›ฎ', + 'โฝญ' => '็Ÿ›', + 'โฝฎ' => '็Ÿข', + 'โฝฏ' => '็Ÿณ', + 'โฝฐ' => '็คบ', + 'โฝฑ' => '็ฆธ', + 'โฝฒ' => '็ฆพ', + 'โฝณ' => '็ฉด', + 'โฝด' => '็ซ‹', + 'โฝต' => '็ซน', + 'โฝถ' => '็ฑณ', + 'โฝท' => '็ณธ', + 'โฝธ' => '็ผถ', + 'โฝน' => '็ฝ‘', + 'โฝบ' => '็พŠ', + 'โฝป' => '็พฝ', + 'โฝผ' => '่€', + 'โฝฝ' => '่€Œ', + 'โฝพ' => '่€’', + 'โฝฟ' => '่€ณ', + 'โพ€' => '่ฟ', + 'โพ' => '่‚‰', + 'โพ‚' => '่‡ฃ', + 'โพƒ' => '่‡ช', + 'โพ„' => '่‡ณ', + 'โพ…' => '่‡ผ', + 'โพ†' => '่ˆŒ', + 'โพ‡' => '่ˆ›', + 'โพˆ' => '่ˆŸ', + 'โพ‰' => '่‰ฎ', + 'โพŠ' => '่‰ฒ', + 'โพ‹' => '่‰ธ', + 'โพŒ' => '่™', + 'โพ' => '่™ซ', + 'โพŽ' => '่ก€', + 'โพ' => '่กŒ', + 'โพ' => '่กฃ', + 'โพ‘' => '่ฅพ', + 'โพ’' => '่ฆ‹', + 'โพ“' => '่ง’', + 'โพ”' => '่จ€', + 'โพ•' => '่ฐท', + 'โพ–' => '่ฑ†', + 'โพ—' => '่ฑ•', + 'โพ˜' => '่ฑธ', + 'โพ™' => '่ฒ', + 'โพš' => '่ตค', + 'โพ›' => '่ตฐ', + 'โพœ' => '่ถณ', + 'โพ' => '่บซ', + 'โพž' => '่ปŠ', + 'โพŸ' => '่พ›', + 'โพ ' => '่พฐ', + 'โพก' => '่พต', + 'โพข' => '้‚‘', + 'โพฃ' => '้…‰', + 'โพค' => '้‡†', + 'โพฅ' => '้‡Œ', + 'โพฆ' => '้‡‘', + 'โพง' => '้•ท', + 'โพจ' => '้–€', + 'โพฉ' => '้˜œ', + 'โพช' => '้šถ', + 'โพซ' => '้šน', + 'โพฌ' => '้›จ', + 'โพญ' => '้‘', + 'โพฎ' => '้ž', + 'โพฏ' => '้ข', + 'โพฐ' => '้ฉ', + 'โพฑ' => '้Ÿ‹', + 'โพฒ' => '้Ÿญ', + 'โพณ' => '้Ÿณ', + 'โพด' => '้ ', + 'โพต' => '้ขจ', + 'โพถ' => '้ฃ›', + 'โพท' => '้ฃŸ', + 'โพธ' => '้ฆ–', + 'โพน' => '้ฆ™', + 'โพบ' => '้ฆฌ', + 'โพป' => '้ชจ', + 'โพผ' => '้ซ˜', + 'โพฝ' => '้ซŸ', + 'โพพ' => '้ฌฅ', + 'โพฟ' => '้ฌฏ', + 'โฟ€' => '้ฌฒ', + 'โฟ' => '้ฌผ', + 'โฟ‚' => '้ญš', + 'โฟƒ' => '้ณฅ', + 'โฟ„' => '้นต', + 'โฟ…' => '้นฟ', + 'โฟ†' => '้บฅ', + 'โฟ‡' => '้บป', + 'โฟˆ' => '้ปƒ', + 'โฟ‰' => '้ป', + 'โฟŠ' => '้ป‘', + 'โฟ‹' => '้ปน', + 'โฟŒ' => '้ปฝ', + 'โฟ' => '้ผŽ', + 'โฟŽ' => '้ผ“', + 'โฟ' => '้ผ ', + 'โฟ' => '้ผป', + 'โฟ‘' => '้ฝŠ', + 'โฟ’' => '้ฝ’', + 'โฟ“' => '้พ', + 'โฟ”' => '้พœ', + 'โฟ•' => '้พ ', + 'ใ€€' => ' ', + 'ใ€ถ' => 'ใ€’', + 'ใ€ธ' => 'ๅ', + 'ใ€น' => 'ๅ„', + 'ใ€บ' => 'ๅ…', + 'ใ‚›' => ' ใ‚™', + 'ใ‚œ' => ' ใ‚š', + 'ใ‚Ÿ' => 'ใ‚ˆใ‚Š', + 'ใƒฟ' => 'ใ‚ณใƒˆ', + 'ใ„ฑ' => 'แ„€', + 'ใ„ฒ' => 'แ„', + 'ใ„ณ' => 'แ†ช', + 'ใ„ด' => 'แ„‚', + 'ใ„ต' => 'แ†ฌ', + 'ใ„ถ' => 'แ†ญ', + 'ใ„ท' => 'แ„ƒ', + 'ใ„ธ' => 'แ„„', + 'ใ„น' => 'แ„…', + 'ใ„บ' => 'แ†ฐ', + 'ใ„ป' => 'แ†ฑ', + 'ใ„ผ' => 'แ†ฒ', + 'ใ„ฝ' => 'แ†ณ', + 'ใ„พ' => 'แ†ด', + 'ใ„ฟ' => 'แ†ต', + 'ใ…€' => 'แ„š', + 'ใ…' => 'แ„†', + 'ใ…‚' => 'แ„‡', + 'ใ…ƒ' => 'แ„ˆ', + 'ใ…„' => 'แ„ก', + 'ใ……' => 'แ„‰', + 'ใ…†' => 'แ„Š', + 'ใ…‡' => 'แ„‹', + 'ใ…ˆ' => 'แ„Œ', + 'ใ…‰' => 'แ„', + 'ใ…Š' => 'แ„Ž', + 'ใ…‹' => 'แ„', + 'ใ…Œ' => 'แ„', + 'ใ…' => 'แ„‘', + 'ใ…Ž' => 'แ„’', + 'ใ…' => 'แ…ก', + 'ใ…' => 'แ…ข', + 'ใ…‘' => 'แ…ฃ', + 'ใ…’' => 'แ…ค', + 'ใ…“' => 'แ…ฅ', + 'ใ…”' => 'แ…ฆ', + 'ใ…•' => 'แ…ง', + 'ใ…–' => 'แ…จ', + 'ใ…—' => 'แ…ฉ', + 'ใ…˜' => 'แ…ช', + 'ใ…™' => 'แ…ซ', + 'ใ…š' => 'แ…ฌ', + 'ใ…›' => 'แ…ญ', + 'ใ…œ' => 'แ…ฎ', + 'ใ…' => 'แ…ฏ', + 'ใ…ž' => 'แ…ฐ', + 'ใ…Ÿ' => 'แ…ฑ', + 'ใ… ' => 'แ…ฒ', + 'ใ…ก' => 'แ…ณ', + 'ใ…ข' => 'แ…ด', + 'ใ…ฃ' => 'แ…ต', + 'ใ…ค' => 'แ… ', + 'ใ…ฅ' => 'แ„”', + 'ใ…ฆ' => 'แ„•', + 'ใ…ง' => 'แ‡‡', + 'ใ…จ' => 'แ‡ˆ', + 'ใ…ฉ' => 'แ‡Œ', + 'ใ…ช' => 'แ‡Ž', + 'ใ…ซ' => 'แ‡“', + 'ใ…ฌ' => 'แ‡—', + 'ใ…ญ' => 'แ‡™', + 'ใ…ฎ' => 'แ„œ', + 'ใ…ฏ' => 'แ‡', + 'ใ…ฐ' => 'แ‡Ÿ', + 'ใ…ฑ' => 'แ„', + 'ใ…ฒ' => 'แ„ž', + 'ใ…ณ' => 'แ„ ', + 'ใ…ด' => 'แ„ข', + 'ใ…ต' => 'แ„ฃ', + 'ใ…ถ' => 'แ„ง', + 'ใ…ท' => 'แ„ฉ', + 'ใ…ธ' => 'แ„ซ', + 'ใ…น' => 'แ„ฌ', + 'ใ…บ' => 'แ„ญ', + 'ใ…ป' => 'แ„ฎ', + 'ใ…ผ' => 'แ„ฏ', + 'ใ…ฝ' => 'แ„ฒ', + 'ใ…พ' => 'แ„ถ', + 'ใ…ฟ' => 'แ…€', + 'ใ†€' => 'แ…‡', + 'ใ†' => 'แ…Œ', + 'ใ†‚' => 'แ‡ฑ', + 'ใ†ƒ' => 'แ‡ฒ', + 'ใ†„' => 'แ…—', + 'ใ†…' => 'แ…˜', + 'ใ††' => 'แ…™', + 'ใ†‡' => 'แ†„', + 'ใ†ˆ' => 'แ†…', + 'ใ†‰' => 'แ†ˆ', + 'ใ†Š' => 'แ†‘', + 'ใ†‹' => 'แ†’', + 'ใ†Œ' => 'แ†”', + 'ใ†' => 'แ†ž', + 'ใ†Ž' => 'แ†ก', + 'ใ†’' => 'ไธ€', + 'ใ†“' => 'ไบŒ', + 'ใ†”' => 'ไธ‰', + 'ใ†•' => 'ๅ››', + 'ใ†–' => 'ไธŠ', + 'ใ†—' => 'ไธญ', + 'ใ†˜' => 'ไธ‹', + 'ใ†™' => '็”ฒ', + 'ใ†š' => 'ไน™', + 'ใ†›' => 'ไธ™', + 'ใ†œ' => 'ไธ', + 'ใ†' => 'ๅคฉ', + 'ใ†ž' => 'ๅœฐ', + 'ใ†Ÿ' => 'ไบบ', + 'ใˆ€' => '(แ„€)', + 'ใˆ' => '(แ„‚)', + 'ใˆ‚' => '(แ„ƒ)', + 'ใˆƒ' => '(แ„…)', + 'ใˆ„' => '(แ„†)', + 'ใˆ…' => '(แ„‡)', + 'ใˆ†' => '(แ„‰)', + 'ใˆ‡' => '(แ„‹)', + 'ใˆˆ' => '(แ„Œ)', + 'ใˆ‰' => '(แ„Ž)', + 'ใˆŠ' => '(แ„)', + 'ใˆ‹' => '(แ„)', + 'ใˆŒ' => '(แ„‘)', + 'ใˆ' => '(แ„’)', + 'ใˆŽ' => '(แ„€แ…ก)', + 'ใˆ' => '(แ„‚แ…ก)', + 'ใˆ' => '(แ„ƒแ…ก)', + 'ใˆ‘' => '(แ„…แ…ก)', + 'ใˆ’' => '(แ„†แ…ก)', + 'ใˆ“' => '(แ„‡แ…ก)', + 'ใˆ”' => '(แ„‰แ…ก)', + 'ใˆ•' => '(แ„‹แ…ก)', + 'ใˆ–' => '(แ„Œแ…ก)', + 'ใˆ—' => '(แ„Žแ…ก)', + 'ใˆ˜' => '(แ„แ…ก)', + 'ใˆ™' => '(แ„แ…ก)', + 'ใˆš' => '(แ„‘แ…ก)', + 'ใˆ›' => '(แ„’แ…ก)', + 'ใˆœ' => '(แ„Œแ…ฎ)', + 'ใˆ' => '(แ„‹แ…ฉแ„Œแ…ฅแ†ซ)', + 'ใˆž' => '(แ„‹แ…ฉแ„’แ…ฎ)', + 'ใˆ ' => '(ไธ€)', + 'ใˆก' => '(ไบŒ)', + 'ใˆข' => '(ไธ‰)', + 'ใˆฃ' => '(ๅ››)', + 'ใˆค' => '(ไบ”)', + 'ใˆฅ' => '(ๅ…ญ)', + 'ใˆฆ' => '(ไธƒ)', + 'ใˆง' => '(ๅ…ซ)', + 'ใˆจ' => '(ไน)', + 'ใˆฉ' => '(ๅ)', + 'ใˆช' => '(ๆœˆ)', + 'ใˆซ' => '(็ซ)', + 'ใˆฌ' => '(ๆฐด)', + 'ใˆญ' => '(ๆœจ)', + 'ใˆฎ' => '(้‡‘)', + 'ใˆฏ' => '(ๅœŸ)', + 'ใˆฐ' => '(ๆ—ฅ)', + 'ใˆฑ' => '(ๆ ช)', + 'ใˆฒ' => '(ๆœ‰)', + 'ใˆณ' => '(็คพ)', + 'ใˆด' => '(ๅ)', + 'ใˆต' => '(็‰น)', + 'ใˆถ' => '(่ฒก)', + 'ใˆท' => '(็ฅ)', + 'ใˆธ' => '(ๅŠด)', + 'ใˆน' => '(ไปฃ)', + 'ใˆบ' => '(ๅ‘ผ)', + 'ใˆป' => '(ๅญฆ)', + 'ใˆผ' => '(็›ฃ)', + 'ใˆฝ' => '(ไผ)', + 'ใˆพ' => '(่ณ‡)', + 'ใˆฟ' => '(ๅ”)', + 'ใ‰€' => '(็ฅญ)', + 'ใ‰' => '(ไผ‘)', + 'ใ‰‚' => '(่‡ช)', + 'ใ‰ƒ' => '(่‡ณ)', + 'ใ‰„' => 'ๅ•', + 'ใ‰…' => 'ๅนผ', + 'ใ‰†' => 'ๆ–‡', + 'ใ‰‡' => '็ฎ', + 'ใ‰' => 'PTE', + 'ใ‰‘' => '21', + 'ใ‰’' => '22', + 'ใ‰“' => '23', + 'ใ‰”' => '24', + 'ใ‰•' => '25', + 'ใ‰–' => '26', + 'ใ‰—' => '27', + 'ใ‰˜' => '28', + 'ใ‰™' => '29', + 'ใ‰š' => '30', + 'ใ‰›' => '31', + 'ใ‰œ' => '32', + 'ใ‰' => '33', + 'ใ‰ž' => '34', + 'ใ‰Ÿ' => '35', + 'ใ‰ ' => 'แ„€', + 'ใ‰ก' => 'แ„‚', + 'ใ‰ข' => 'แ„ƒ', + 'ใ‰ฃ' => 'แ„…', + 'ใ‰ค' => 'แ„†', + 'ใ‰ฅ' => 'แ„‡', + 'ใ‰ฆ' => 'แ„‰', + 'ใ‰ง' => 'แ„‹', + 'ใ‰จ' => 'แ„Œ', + 'ใ‰ฉ' => 'แ„Ž', + 'ใ‰ช' => 'แ„', + 'ใ‰ซ' => 'แ„', + 'ใ‰ฌ' => 'แ„‘', + 'ใ‰ญ' => 'แ„’', + 'ใ‰ฎ' => 'แ„€แ…ก', + 'ใ‰ฏ' => 'แ„‚แ…ก', + 'ใ‰ฐ' => 'แ„ƒแ…ก', + 'ใ‰ฑ' => 'แ„…แ…ก', + 'ใ‰ฒ' => 'แ„†แ…ก', + 'ใ‰ณ' => 'แ„‡แ…ก', + 'ใ‰ด' => 'แ„‰แ…ก', + 'ใ‰ต' => 'แ„‹แ…ก', + 'ใ‰ถ' => 'แ„Œแ…ก', + 'ใ‰ท' => 'แ„Žแ…ก', + 'ใ‰ธ' => 'แ„แ…ก', + 'ใ‰น' => 'แ„แ…ก', + 'ใ‰บ' => 'แ„‘แ…ก', + 'ใ‰ป' => 'แ„’แ…ก', + 'ใ‰ผ' => 'แ„Žแ…กแ†ทแ„€แ…ฉ', + 'ใ‰ฝ' => 'แ„Œแ…ฎแ„‹แ…ด', + 'ใ‰พ' => 'แ„‹แ…ฎ', + 'ใŠ€' => 'ไธ€', + 'ใŠ' => 'ไบŒ', + 'ใŠ‚' => 'ไธ‰', + 'ใŠƒ' => 'ๅ››', + 'ใŠ„' => 'ไบ”', + 'ใŠ…' => 'ๅ…ญ', + 'ใŠ†' => 'ไธƒ', + 'ใŠ‡' => 'ๅ…ซ', + 'ใŠˆ' => 'ไน', + 'ใŠ‰' => 'ๅ', + 'ใŠŠ' => 'ๆœˆ', + 'ใŠ‹' => '็ซ', + 'ใŠŒ' => 'ๆฐด', + 'ใŠ' => 'ๆœจ', + 'ใŠŽ' => '้‡‘', + 'ใŠ' => 'ๅœŸ', + 'ใŠ' => 'ๆ—ฅ', + 'ใŠ‘' => 'ๆ ช', + 'ใŠ’' => 'ๆœ‰', + 'ใŠ“' => '็คพ', + 'ใŠ”' => 'ๅ', + 'ใŠ•' => '็‰น', + 'ใŠ–' => '่ฒก', + 'ใŠ—' => '็ฅ', + 'ใŠ˜' => 'ๅŠด', + 'ใŠ™' => '็ง˜', + 'ใŠš' => '็”ท', + 'ใŠ›' => 'ๅฅณ', + 'ใŠœ' => '้ฉ', + 'ใŠ' => 'ๅ„ช', + 'ใŠž' => 'ๅฐ', + 'ใŠŸ' => 'ๆณจ', + 'ใŠ ' => '้ …', + 'ใŠก' => 'ไผ‘', + 'ใŠข' => 'ๅ†™', + 'ใŠฃ' => 'ๆญฃ', + 'ใŠค' => 'ไธŠ', + 'ใŠฅ' => 'ไธญ', + 'ใŠฆ' => 'ไธ‹', + 'ใŠง' => 'ๅทฆ', + 'ใŠจ' => 'ๅณ', + 'ใŠฉ' => 'ๅŒป', + 'ใŠช' => 'ๅฎ—', + 'ใŠซ' => 'ๅญฆ', + 'ใŠฌ' => '็›ฃ', + 'ใŠญ' => 'ไผ', + 'ใŠฎ' => '่ณ‡', + 'ใŠฏ' => 'ๅ”', + 'ใŠฐ' => 'ๅคœ', + 'ใŠฑ' => '36', + 'ใŠฒ' => '37', + 'ใŠณ' => '38', + 'ใŠด' => '39', + 'ใŠต' => '40', + 'ใŠถ' => '41', + 'ใŠท' => '42', + 'ใŠธ' => '43', + 'ใŠน' => '44', + 'ใŠบ' => '45', + 'ใŠป' => '46', + 'ใŠผ' => '47', + 'ใŠฝ' => '48', + 'ใŠพ' => '49', + 'ใŠฟ' => '50', + 'ใ‹€' => '1ๆœˆ', + 'ใ‹' => '2ๆœˆ', + 'ใ‹‚' => '3ๆœˆ', + 'ใ‹ƒ' => '4ๆœˆ', + 'ใ‹„' => '5ๆœˆ', + 'ใ‹…' => '6ๆœˆ', + 'ใ‹†' => '7ๆœˆ', + 'ใ‹‡' => '8ๆœˆ', + 'ใ‹ˆ' => '9ๆœˆ', + 'ใ‹‰' => '10ๆœˆ', + 'ใ‹Š' => '11ๆœˆ', + 'ใ‹‹' => '12ๆœˆ', + 'ใ‹Œ' => 'Hg', + 'ใ‹' => 'erg', + 'ใ‹Ž' => 'eV', + 'ใ‹' => 'LTD', + 'ใ‹' => 'ใ‚ข', + 'ใ‹‘' => 'ใ‚ค', + 'ใ‹’' => 'ใ‚ฆ', + 'ใ‹“' => 'ใ‚จ', + 'ใ‹”' => 'ใ‚ช', + 'ใ‹•' => 'ใ‚ซ', + 'ใ‹–' => 'ใ‚ญ', + 'ใ‹—' => 'ใ‚ฏ', + 'ใ‹˜' => 'ใ‚ฑ', + 'ใ‹™' => 'ใ‚ณ', + 'ใ‹š' => 'ใ‚ต', + 'ใ‹›' => 'ใ‚ท', + 'ใ‹œ' => 'ใ‚น', + 'ใ‹' => 'ใ‚ป', + 'ใ‹ž' => 'ใ‚ฝ', + 'ใ‹Ÿ' => 'ใ‚ฟ', + 'ใ‹ ' => 'ใƒ', + 'ใ‹ก' => 'ใƒ„', + 'ใ‹ข' => 'ใƒ†', + 'ใ‹ฃ' => 'ใƒˆ', + 'ใ‹ค' => 'ใƒŠ', + 'ใ‹ฅ' => 'ใƒ‹', + 'ใ‹ฆ' => 'ใƒŒ', + 'ใ‹ง' => 'ใƒ', + 'ใ‹จ' => 'ใƒŽ', + 'ใ‹ฉ' => 'ใƒ', + 'ใ‹ช' => 'ใƒ’', + 'ใ‹ซ' => 'ใƒ•', + 'ใ‹ฌ' => 'ใƒ˜', + 'ใ‹ญ' => 'ใƒ›', + 'ใ‹ฎ' => 'ใƒž', + 'ใ‹ฏ' => 'ใƒŸ', + 'ใ‹ฐ' => 'ใƒ ', + 'ใ‹ฑ' => 'ใƒก', + 'ใ‹ฒ' => 'ใƒข', + 'ใ‹ณ' => 'ใƒค', + 'ใ‹ด' => 'ใƒฆ', + 'ใ‹ต' => 'ใƒจ', + 'ใ‹ถ' => 'ใƒฉ', + 'ใ‹ท' => 'ใƒช', + 'ใ‹ธ' => 'ใƒซ', + 'ใ‹น' => 'ใƒฌ', + 'ใ‹บ' => 'ใƒญ', + 'ใ‹ป' => 'ใƒฏ', + 'ใ‹ผ' => 'ใƒฐ', + 'ใ‹ฝ' => 'ใƒฑ', + 'ใ‹พ' => 'ใƒฒ', + 'ใ‹ฟ' => 'ไปคๅ’Œ', + 'ใŒ€' => 'ใ‚ขใƒใ‚šใƒผใƒˆ', + 'ใŒ' => 'ใ‚ขใƒซใƒ•ใ‚ก', + 'ใŒ‚' => 'ใ‚ขใƒณใƒ˜ใ‚šใ‚ข', + 'ใŒƒ' => 'ใ‚ขใƒผใƒซ', + 'ใŒ„' => 'ใ‚คใƒ‹ใƒณใ‚ฏใ‚™', + 'ใŒ…' => 'ใ‚คใƒณใƒ', + 'ใŒ†' => 'ใ‚ฆใ‚ฉใƒณ', + 'ใŒ‡' => 'ใ‚จใ‚นใ‚ฏใƒผใƒˆใ‚™', + 'ใŒˆ' => 'ใ‚จใƒผใ‚ซใƒผ', + 'ใŒ‰' => 'ใ‚ชใƒณใ‚น', + 'ใŒŠ' => 'ใ‚ชใƒผใƒ ', + 'ใŒ‹' => 'ใ‚ซใ‚คใƒช', + 'ใŒŒ' => 'ใ‚ซใƒฉใƒƒใƒˆ', + 'ใŒ' => 'ใ‚ซใƒญใƒชใƒผ', + 'ใŒŽ' => 'ใ‚ซใ‚™ใƒญใƒณ', + 'ใŒ' => 'ใ‚ซใ‚™ใƒณใƒž', + 'ใŒ' => 'ใ‚ญใ‚™ใ‚ซใ‚™', + 'ใŒ‘' => 'ใ‚ญใ‚™ใƒ‹ใƒผ', + 'ใŒ’' => 'ใ‚ญใƒฅใƒชใƒผ', + 'ใŒ“' => 'ใ‚ญใ‚™ใƒซใ‚ฟใ‚™ใƒผ', + 'ใŒ”' => 'ใ‚ญใƒญ', + 'ใŒ•' => 'ใ‚ญใƒญใ‚ฏใ‚™ใƒฉใƒ ', + 'ใŒ–' => 'ใ‚ญใƒญใƒกใƒผใƒˆใƒซ', + 'ใŒ—' => 'ใ‚ญใƒญใƒฏใƒƒใƒˆ', + 'ใŒ˜' => 'ใ‚ฏใ‚™ใƒฉใƒ ', + 'ใŒ™' => 'ใ‚ฏใ‚™ใƒฉใƒ ใƒˆใƒณ', + 'ใŒš' => 'ใ‚ฏใƒซใ‚ปใ‚™ใ‚คใƒญ', + 'ใŒ›' => 'ใ‚ฏใƒญใƒผใƒ', + 'ใŒœ' => 'ใ‚ฑใƒผใ‚น', + 'ใŒ' => 'ใ‚ณใƒซใƒŠ', + 'ใŒž' => 'ใ‚ณใƒผใƒ›ใ‚š', + 'ใŒŸ' => 'ใ‚ตใ‚คใ‚ฏใƒซ', + 'ใŒ ' => 'ใ‚ตใƒณใƒใƒผใƒ ', + 'ใŒก' => 'ใ‚ทใƒชใƒณใ‚ฏใ‚™', + 'ใŒข' => 'ใ‚ปใƒณใƒ', + 'ใŒฃ' => 'ใ‚ปใƒณใƒˆ', + 'ใŒค' => 'ใ‚ฟใ‚™ใƒผใ‚น', + 'ใŒฅ' => 'ใƒ†ใ‚™ใ‚ท', + 'ใŒฆ' => 'ใƒˆใ‚™ใƒซ', + 'ใŒง' => 'ใƒˆใƒณ', + 'ใŒจ' => 'ใƒŠใƒŽ', + 'ใŒฉ' => 'ใƒŽใƒƒใƒˆ', + 'ใŒช' => 'ใƒใ‚คใƒ„', + 'ใŒซ' => 'ใƒใ‚šใƒผใ‚ปใƒณใƒˆ', + 'ใŒฌ' => 'ใƒใ‚šใƒผใƒ„', + 'ใŒญ' => 'ใƒใ‚™ใƒผใƒฌใƒซ', + 'ใŒฎ' => 'ใƒ’ใ‚šใ‚ขใ‚นใƒˆใƒซ', + 'ใŒฏ' => 'ใƒ’ใ‚šใ‚ฏใƒซ', + 'ใŒฐ' => 'ใƒ’ใ‚šใ‚ณ', + 'ใŒฑ' => 'ใƒ’ใ‚™ใƒซ', + 'ใŒฒ' => 'ใƒ•ใ‚กใƒฉใƒƒใƒˆใ‚™', + 'ใŒณ' => 'ใƒ•ใ‚ฃใƒผใƒˆ', + 'ใŒด' => 'ใƒ•ใ‚™ใƒƒใ‚ทใ‚งใƒซ', + 'ใŒต' => 'ใƒ•ใƒฉใƒณ', + 'ใŒถ' => 'ใƒ˜ใ‚ฏใ‚ฟใƒผใƒซ', + 'ใŒท' => 'ใƒ˜ใ‚šใ‚ฝ', + 'ใŒธ' => 'ใƒ˜ใ‚šใƒ‹ใƒ’', + 'ใŒน' => 'ใƒ˜ใƒซใƒ„', + 'ใŒบ' => 'ใƒ˜ใ‚šใƒณใ‚น', + 'ใŒป' => 'ใƒ˜ใ‚šใƒผใ‚ทใ‚™', + 'ใŒผ' => 'ใƒ˜ใ‚™ใƒผใ‚ฟ', + 'ใŒฝ' => 'ใƒ›ใ‚šใ‚คใƒณใƒˆ', + 'ใŒพ' => 'ใƒ›ใ‚™ใƒซใƒˆ', + 'ใŒฟ' => 'ใƒ›ใƒณ', + 'ใ€' => 'ใƒ›ใ‚šใƒณใƒˆใ‚™', + 'ใ' => 'ใƒ›ใƒผใƒซ', + 'ใ‚' => 'ใƒ›ใƒผใƒณ', + 'ใƒ' => 'ใƒžใ‚คใ‚ฏใƒญ', + 'ใ„' => 'ใƒžใ‚คใƒซ', + 'ใ…' => 'ใƒžใƒƒใƒ', + 'ใ†' => 'ใƒžใƒซใ‚ฏ', + 'ใ‡' => 'ใƒžใƒณใ‚ทใƒงใƒณ', + 'ใˆ' => 'ใƒŸใ‚ฏใƒญใƒณ', + 'ใ‰' => 'ใƒŸใƒช', + 'ใŠ' => 'ใƒŸใƒชใƒใ‚™ใƒผใƒซ', + 'ใ‹' => 'ใƒกใ‚ซใ‚™', + 'ใŒ' => 'ใƒกใ‚ซใ‚™ใƒˆใƒณ', + 'ใ' => 'ใƒกใƒผใƒˆใƒซ', + 'ใŽ' => 'ใƒคใƒผใƒˆใ‚™', + 'ใ' => 'ใƒคใƒผใƒซ', + 'ใ' => 'ใƒฆใ‚ขใƒณ', + 'ใ‘' => 'ใƒชใƒƒใƒˆใƒซ', + 'ใ’' => 'ใƒชใƒฉ', + 'ใ“' => 'ใƒซใƒ’ใ‚šใƒผ', + 'ใ”' => 'ใƒซใƒผใƒ•ใ‚™ใƒซ', + 'ใ•' => 'ใƒฌใƒ ', + 'ใ–' => 'ใƒฌใƒณใƒˆใ‚ฑใ‚™ใƒณ', + 'ใ—' => 'ใƒฏใƒƒใƒˆ', + 'ใ˜' => '0็‚น', + 'ใ™' => '1็‚น', + 'ใš' => '2็‚น', + 'ใ›' => '3็‚น', + 'ใœ' => '4็‚น', + 'ใ' => '5็‚น', + 'ใž' => '6็‚น', + 'ใŸ' => '7็‚น', + 'ใ ' => '8็‚น', + 'ใก' => '9็‚น', + 'ใข' => '10็‚น', + 'ใฃ' => '11็‚น', + 'ใค' => '12็‚น', + 'ใฅ' => '13็‚น', + 'ใฆ' => '14็‚น', + 'ใง' => '15็‚น', + 'ใจ' => '16็‚น', + 'ใฉ' => '17็‚น', + 'ใช' => '18็‚น', + 'ใซ' => '19็‚น', + 'ใฌ' => '20็‚น', + 'ใญ' => '21็‚น', + 'ใฎ' => '22็‚น', + 'ใฏ' => '23็‚น', + 'ใฐ' => '24็‚น', + 'ใฑ' => 'hPa', + 'ใฒ' => 'da', + 'ใณ' => 'AU', + 'ใด' => 'bar', + 'ใต' => 'oV', + 'ใถ' => 'pc', + 'ใท' => 'dm', + 'ใธ' => 'dm2', + 'ใน' => 'dm3', + 'ใบ' => 'IU', + 'ใป' => 'ๅนณๆˆ', + 'ใผ' => 'ๆ˜ญๅ’Œ', + 'ใฝ' => 'ๅคงๆญฃ', + 'ใพ' => 'ๆ˜Žๆฒป', + 'ใฟ' => 'ๆ ชๅผไผš็คพ', + 'ใŽ€' => 'pA', + 'ใŽ' => 'nA', + 'ใŽ‚' => 'ฮผA', + 'ใŽƒ' => 'mA', + 'ใŽ„' => 'kA', + 'ใŽ…' => 'KB', + 'ใŽ†' => 'MB', + 'ใŽ‡' => 'GB', + 'ใŽˆ' => 'cal', + 'ใŽ‰' => 'kcal', + 'ใŽŠ' => 'pF', + 'ใŽ‹' => 'nF', + 'ใŽŒ' => 'ฮผF', + 'ใŽ' => 'ฮผg', + 'ใŽŽ' => 'mg', + 'ใŽ' => 'kg', + 'ใŽ' => 'Hz', + 'ใŽ‘' => 'kHz', + 'ใŽ’' => 'MHz', + 'ใŽ“' => 'GHz', + 'ใŽ”' => 'THz', + 'ใŽ•' => 'ฮผl', + 'ใŽ–' => 'ml', + 'ใŽ—' => 'dl', + 'ใŽ˜' => 'kl', + 'ใŽ™' => 'fm', + 'ใŽš' => 'nm', + 'ใŽ›' => 'ฮผm', + 'ใŽœ' => 'mm', + 'ใŽ' => 'cm', + 'ใŽž' => 'km', + 'ใŽŸ' => 'mm2', + 'ใŽ ' => 'cm2', + 'ใŽก' => 'm2', + 'ใŽข' => 'km2', + 'ใŽฃ' => 'mm3', + 'ใŽค' => 'cm3', + 'ใŽฅ' => 'm3', + 'ใŽฆ' => 'km3', + 'ใŽง' => 'mโˆ•s', + 'ใŽจ' => 'mโˆ•s2', + 'ใŽฉ' => 'Pa', + 'ใŽช' => 'kPa', + 'ใŽซ' => 'MPa', + 'ใŽฌ' => 'GPa', + 'ใŽญ' => 'rad', + 'ใŽฎ' => 'radโˆ•s', + 'ใŽฏ' => 'radโˆ•s2', + 'ใŽฐ' => 'ps', + 'ใŽฑ' => 'ns', + 'ใŽฒ' => 'ฮผs', + 'ใŽณ' => 'ms', + 'ใŽด' => 'pV', + 'ใŽต' => 'nV', + 'ใŽถ' => 'ฮผV', + 'ใŽท' => 'mV', + 'ใŽธ' => 'kV', + 'ใŽน' => 'MV', + 'ใŽบ' => 'pW', + 'ใŽป' => 'nW', + 'ใŽผ' => 'ฮผW', + 'ใŽฝ' => 'mW', + 'ใŽพ' => 'kW', + 'ใŽฟ' => 'MW', + 'ใ€' => 'kฮฉ', + 'ใ' => 'Mฮฉ', + 'ใ‚' => 'a.m.', + 'ใƒ' => 'Bq', + 'ใ„' => 'cc', + 'ใ…' => 'cd', + 'ใ†' => 'Cโˆ•kg', + 'ใ‡' => 'Co.', + 'ใˆ' => 'dB', + 'ใ‰' => 'Gy', + 'ใŠ' => 'ha', + 'ใ‹' => 'HP', + 'ใŒ' => 'in', + 'ใ' => 'KK', + 'ใŽ' => 'KM', + 'ใ' => 'kt', + 'ใ' => 'lm', + 'ใ‘' => 'ln', + 'ใ’' => 'log', + 'ใ“' => 'lx', + 'ใ”' => 'mb', + 'ใ•' => 'mil', + 'ใ–' => 'mol', + 'ใ—' => 'PH', + 'ใ˜' => 'p.m.', + 'ใ™' => 'PPM', + 'ใš' => 'PR', + 'ใ›' => 'sr', + 'ใœ' => 'Sv', + 'ใ' => 'Wb', + 'ใž' => 'Vโˆ•m', + 'ใŸ' => 'Aโˆ•m', + 'ใ ' => '1ๆ—ฅ', + 'ใก' => '2ๆ—ฅ', + 'ใข' => '3ๆ—ฅ', + 'ใฃ' => '4ๆ—ฅ', + 'ใค' => '5ๆ—ฅ', + 'ใฅ' => '6ๆ—ฅ', + 'ใฆ' => '7ๆ—ฅ', + 'ใง' => '8ๆ—ฅ', + 'ใจ' => '9ๆ—ฅ', + 'ใฉ' => '10ๆ—ฅ', + 'ใช' => '11ๆ—ฅ', + 'ใซ' => '12ๆ—ฅ', + 'ใฌ' => '13ๆ—ฅ', + 'ใญ' => '14ๆ—ฅ', + 'ใฎ' => '15ๆ—ฅ', + 'ใฏ' => '16ๆ—ฅ', + 'ใฐ' => '17ๆ—ฅ', + 'ใฑ' => '18ๆ—ฅ', + 'ใฒ' => '19ๆ—ฅ', + 'ใณ' => '20ๆ—ฅ', + 'ใด' => '21ๆ—ฅ', + 'ใต' => '22ๆ—ฅ', + 'ใถ' => '23ๆ—ฅ', + 'ใท' => '24ๆ—ฅ', + 'ใธ' => '25ๆ—ฅ', + 'ใน' => '26ๆ—ฅ', + 'ใบ' => '27ๆ—ฅ', + 'ใป' => '28ๆ—ฅ', + 'ใผ' => '29ๆ—ฅ', + 'ใฝ' => '30ๆ—ฅ', + 'ใพ' => '31ๆ—ฅ', + 'ใฟ' => 'gal', + '๊šœ' => 'ัŠ', + '๊š' => 'ัŒ', + '๊ฐ' => '๊ฏ', + '๊Ÿธ' => 'ฤฆ', + '๊Ÿน' => 'ล“', + '๊ญœ' => '๊œง', + '๊ญ' => '๊ฌท', + '๊ญž' => 'ษซ', + '๊ญŸ' => '๊ญ’', + '๊ญฉ' => 'ส', + '๏ฌ€' => 'ff', + '๏ฌ' => 'fi', + '๏ฌ‚' => 'fl', + '๏ฌƒ' => 'ffi', + '๏ฌ„' => 'ffl', + '๏ฌ…' => 'st', + '๏ฌ†' => 'st', + '๏ฌ“' => 'ีดีถ', + '๏ฌ”' => 'ีดีฅ', + '๏ฌ•' => 'ีดีซ', + '๏ฌ–' => 'ีพีถ', + '๏ฌ—' => 'ีดีญ', + '๏ฌ ' => 'ืข', + '๏ฌก' => 'ื', + '๏ฌข' => 'ื“', + '๏ฌฃ' => 'ื”', + '๏ฌค' => 'ื›', + '๏ฌฅ' => 'ืœ', + '๏ฌฆ' => 'ื', + '๏ฌง' => 'ืจ', + '๏ฌจ' => 'ืช', + '๏ฌฉ' => '+', + '๏ญ' => 'ืืœ', + '๏ญ' => 'ูฑ', + '๏ญ‘' => 'ูฑ', + '๏ญ’' => 'ูป', + '๏ญ“' => 'ูป', + '๏ญ”' => 'ูป', + '๏ญ•' => 'ูป', + '๏ญ–' => 'ูพ', + '๏ญ—' => 'ูพ', + '๏ญ˜' => 'ูพ', + '๏ญ™' => 'ูพ', + '๏ญš' => 'ฺ€', + '๏ญ›' => 'ฺ€', + '๏ญœ' => 'ฺ€', + '๏ญ' => 'ฺ€', + '๏ญž' => 'ูบ', + '๏ญŸ' => 'ูบ', + '๏ญ ' => 'ูบ', + '๏ญก' => 'ูบ', + '๏ญข' => 'ูฟ', + '๏ญฃ' => 'ูฟ', + '๏ญค' => 'ูฟ', + '๏ญฅ' => 'ูฟ', + '๏ญฆ' => 'ูน', + '๏ญง' => 'ูน', + '๏ญจ' => 'ูน', + '๏ญฉ' => 'ูน', + '๏ญช' => 'ฺค', + '๏ญซ' => 'ฺค', + '๏ญฌ' => 'ฺค', + '๏ญญ' => 'ฺค', + '๏ญฎ' => 'ฺฆ', + '๏ญฏ' => 'ฺฆ', + '๏ญฐ' => 'ฺฆ', + '๏ญฑ' => 'ฺฆ', + '๏ญฒ' => 'ฺ„', + '๏ญณ' => 'ฺ„', + '๏ญด' => 'ฺ„', + '๏ญต' => 'ฺ„', + '๏ญถ' => 'ฺƒ', + '๏ญท' => 'ฺƒ', + '๏ญธ' => 'ฺƒ', + '๏ญน' => 'ฺƒ', + '๏ญบ' => 'ฺ†', + '๏ญป' => 'ฺ†', + '๏ญผ' => 'ฺ†', + '๏ญฝ' => 'ฺ†', + '๏ญพ' => 'ฺ‡', + '๏ญฟ' => 'ฺ‡', + '๏ฎ€' => 'ฺ‡', + '๏ฎ' => 'ฺ‡', + '๏ฎ‚' => 'ฺ', + '๏ฎƒ' => 'ฺ', + '๏ฎ„' => 'ฺŒ', + '๏ฎ…' => 'ฺŒ', + '๏ฎ†' => 'ฺŽ', + '๏ฎ‡' => 'ฺŽ', + '๏ฎˆ' => 'ฺˆ', + '๏ฎ‰' => 'ฺˆ', + '๏ฎŠ' => 'ฺ˜', + '๏ฎ‹' => 'ฺ˜', + '๏ฎŒ' => 'ฺ‘', + '๏ฎ' => 'ฺ‘', + '๏ฎŽ' => 'ฺฉ', + '๏ฎ' => 'ฺฉ', + '๏ฎ' => 'ฺฉ', + '๏ฎ‘' => 'ฺฉ', + '๏ฎ’' => 'ฺฏ', + '๏ฎ“' => 'ฺฏ', + '๏ฎ”' => 'ฺฏ', + '๏ฎ•' => 'ฺฏ', + '๏ฎ–' => 'ฺณ', + '๏ฎ—' => 'ฺณ', + '๏ฎ˜' => 'ฺณ', + '๏ฎ™' => 'ฺณ', + '๏ฎš' => 'ฺฑ', + '๏ฎ›' => 'ฺฑ', + '๏ฎœ' => 'ฺฑ', + '๏ฎ' => 'ฺฑ', + '๏ฎž' => 'ฺบ', + '๏ฎŸ' => 'ฺบ', + '๏ฎ ' => 'ฺป', + '๏ฎก' => 'ฺป', + '๏ฎข' => 'ฺป', + '๏ฎฃ' => 'ฺป', + '๏ฎค' => '•ู”', + '๏ฎฅ' => '•ู”', + '๏ฎฆ' => '', + '๏ฎง' => '', + '๏ฎจ' => '', + '๏ฎฉ' => '', + '๏ฎช' => 'ฺพ', + '๏ฎซ' => 'ฺพ', + '๏ฎฌ' => 'ฺพ', + '๏ฎญ' => 'ฺพ', + '๏ฎฎ' => '’', + '๏ฎฏ' => '’', + '๏ฎฐ' => '’ู”', + '๏ฎฑ' => '’ู”', + '๏ฏ“' => 'ฺญ', + '๏ฏ”' => 'ฺญ', + '๏ฏ•' => 'ฺญ', + '๏ฏ–' => 'ฺญ', + '๏ฏ—' => '‡', + '๏ฏ˜' => '‡', + '๏ฏ™' => '†', + '๏ฏš' => '†', + '๏ฏ›' => 'ˆ', + '๏ฏœ' => 'ˆ', + '๏ฏ' => '‡ูด', + '๏ฏž' => '‹', + '๏ฏŸ' => '‹', + '๏ฏ ' => '…', + '๏ฏก' => '…', + '๏ฏข' => '‰', + '๏ฏฃ' => '‰', + '๏ฏค' => '', + '๏ฏฅ' => '', + '๏ฏฆ' => '', + '๏ฏง' => '', + '๏ฏจ' => 'ู‰', + '๏ฏฉ' => 'ู‰', + '๏ฏช' => 'ูŠู”ุง', + '๏ฏซ' => 'ูŠู”ุง', + '๏ฏฌ' => 'ูŠู”•', + '๏ฏญ' => 'ูŠู”•', + '๏ฏฎ' => 'ูŠู”ูˆ', + '๏ฏฏ' => 'ูŠู”ูˆ', + '๏ฏฐ' => 'ูŠู”‡', + '๏ฏฑ' => 'ูŠู”‡', + '๏ฏฒ' => 'ูŠู”†', + '๏ฏณ' => 'ูŠู”†', + '๏ฏด' => 'ูŠู”ˆ', + '๏ฏต' => 'ูŠู”ˆ', + '๏ฏถ' => 'ูŠู”', + '๏ฏท' => 'ูŠู”', + '๏ฏธ' => 'ูŠู”', + '๏ฏน' => 'ูŠู”ู‰', + '๏ฏบ' => 'ูŠู”ู‰', + '๏ฏป' => 'ูŠู”ู‰', + '๏ฏผ' => 'Œ', + '๏ฏฝ' => 'Œ', + '๏ฏพ' => 'Œ', + '๏ฏฟ' => 'Œ', + '๏ฐ€' => 'ูŠู”ุฌ', + '๏ฐ' => 'ูŠู”ุญ', + '๏ฐ‚' => 'ูŠู”ู…', + '๏ฐƒ' => 'ูŠู”ู‰', + '๏ฐ„' => 'ูŠู”ูŠ', + '๏ฐ…' => 'ุจุฌ', + '๏ฐ†' => 'ุจุญ', + '๏ฐ‡' => 'ุจุฎ', + '๏ฐˆ' => 'ุจู…', + '๏ฐ‰' => 'ุจู‰', + '๏ฐŠ' => 'ุจูŠ', + '๏ฐ‹' => 'ุชุฌ', + '๏ฐŒ' => 'ุชุญ', + '๏ฐ' => 'ุชุฎ', + '๏ฐŽ' => 'ุชู…', + '๏ฐ' => 'ุชู‰', + '๏ฐ' => 'ุชูŠ', + '๏ฐ‘' => 'ุซุฌ', + '๏ฐ’' => 'ุซู…', + '๏ฐ“' => 'ุซู‰', + '๏ฐ”' => 'ุซูŠ', + '๏ฐ•' => 'ุฌุญ', + '๏ฐ–' => 'ุฌู…', + '๏ฐ—' => 'ุญุฌ', + '๏ฐ˜' => 'ุญู…', + '๏ฐ™' => 'ุฎุฌ', + '๏ฐš' => 'ุฎุญ', + '๏ฐ›' => 'ุฎู…', + '๏ฐœ' => 'ุณุฌ', + '๏ฐ' => 'ุณุญ', + '๏ฐž' => 'ุณุฎ', + '๏ฐŸ' => 'ุณู…', + '๏ฐ ' => 'ุตุญ', + '๏ฐก' => 'ุตู…', + '๏ฐข' => 'ุถุฌ', + '๏ฐฃ' => 'ุถุญ', + '๏ฐค' => 'ุถุฎ', + '๏ฐฅ' => 'ุถู…', + '๏ฐฆ' => 'ุทุญ', + '๏ฐง' => 'ุทู…', + '๏ฐจ' => 'ุธู…', + '๏ฐฉ' => 'ุนุฌ', + '๏ฐช' => 'ุนู…', + '๏ฐซ' => 'ุบุฌ', + '๏ฐฌ' => 'ุบู…', + '๏ฐญ' => 'ูุฌ', + '๏ฐฎ' => 'ูุญ', + '๏ฐฏ' => 'ูุฎ', + '๏ฐฐ' => 'ูู…', + '๏ฐฑ' => 'ูู‰', + '๏ฐฒ' => 'ููŠ', + '๏ฐณ' => 'ู‚ุญ', + '๏ฐด' => 'ู‚ู…', + '๏ฐต' => 'ู‚ู‰', + '๏ฐถ' => 'ู‚ูŠ', + '๏ฐท' => 'ูƒุง', + '๏ฐธ' => 'ูƒุฌ', + '๏ฐน' => 'ูƒุญ', + '๏ฐบ' => 'ูƒุฎ', + '๏ฐป' => 'ูƒู„', + '๏ฐผ' => 'ูƒู…', + '๏ฐฝ' => 'ูƒู‰', + '๏ฐพ' => 'ูƒูŠ', + '๏ฐฟ' => 'ู„ุฌ', + '๏ฑ€' => 'ู„ุญ', + '๏ฑ' => 'ู„ุฎ', + '๏ฑ‚' => 'ู„ู…', + '๏ฑƒ' => 'ู„ู‰', + '๏ฑ„' => 'ู„ูŠ', + '๏ฑ…' => 'ู…ุฌ', + '๏ฑ†' => 'ู…ุญ', + '๏ฑ‡' => 'ู…ุฎ', + '๏ฑˆ' => 'ู…ู…', + '๏ฑ‰' => 'ู…ู‰', + '๏ฑŠ' => 'ู…ูŠ', + '๏ฑ‹' => 'ู†ุฌ', + '๏ฑŒ' => 'ู†ุญ', + '๏ฑ' => 'ู†ุฎ', + '๏ฑŽ' => 'ู†ู…', + '๏ฑ' => 'ู†ู‰', + '๏ฑ' => 'ู†ูŠ', + '๏ฑ‘' => 'ู‡ุฌ', + '๏ฑ’' => 'ู‡ู…', + '๏ฑ“' => 'ู‡ู‰', + '๏ฑ”' => 'ู‡ูŠ', + '๏ฑ•' => 'ูŠุฌ', + '๏ฑ–' => 'ูŠุญ', + '๏ฑ—' => 'ูŠุฎ', + '๏ฑ˜' => 'ูŠู…', + '๏ฑ™' => 'ูŠู‰', + '๏ฑš' => 'ูŠูŠ', + '๏ฑ›' => 'ุฐูฐ', + '๏ฑœ' => 'ุฑูฐ', + '๏ฑ' => 'ู‰ูฐ', + '๏ฑž' => ' ูŒู‘', + '๏ฑŸ' => ' ูู‘', + '๏ฑ ' => ' ูŽู‘', + '๏ฑก' => ' ูู‘', + '๏ฑข' => ' ูู‘', + '๏ฑฃ' => ' ู‘ูฐ', + '๏ฑค' => 'ูŠู”ุฑ', + '๏ฑฅ' => 'ูŠู”ุฒ', + '๏ฑฆ' => 'ูŠู”ู…', + '๏ฑง' => 'ูŠู”ู†', + '๏ฑจ' => 'ูŠู”ู‰', + '๏ฑฉ' => 'ูŠู”ูŠ', + '๏ฑช' => 'ุจุฑ', + '๏ฑซ' => 'ุจุฒ', + '๏ฑฌ' => 'ุจู…', + '๏ฑญ' => 'ุจู†', + '๏ฑฎ' => 'ุจู‰', + '๏ฑฏ' => 'ุจูŠ', + '๏ฑฐ' => 'ุชุฑ', + '๏ฑฑ' => 'ุชุฒ', + '๏ฑฒ' => 'ุชู…', + '๏ฑณ' => 'ุชู†', + '๏ฑด' => 'ุชู‰', + '๏ฑต' => 'ุชูŠ', + '๏ฑถ' => 'ุซุฑ', + '๏ฑท' => 'ุซุฒ', + '๏ฑธ' => 'ุซู…', + '๏ฑน' => 'ุซู†', + '๏ฑบ' => 'ุซู‰', + '๏ฑป' => 'ุซูŠ', + '๏ฑผ' => 'ูู‰', + '๏ฑฝ' => 'ููŠ', + '๏ฑพ' => 'ู‚ู‰', + '๏ฑฟ' => 'ู‚ูŠ', + '๏ฒ€' => 'ูƒุง', + '๏ฒ' => 'ูƒู„', + '๏ฒ‚' => 'ูƒู…', + '๏ฒƒ' => 'ูƒู‰', + '๏ฒ„' => 'ูƒูŠ', + '๏ฒ…' => 'ู„ู…', + '๏ฒ†' => 'ู„ู‰', + '๏ฒ‡' => 'ู„ูŠ', + '๏ฒˆ' => 'ู…ุง', + '๏ฒ‰' => 'ู…ู…', + '๏ฒŠ' => 'ู†ุฑ', + '๏ฒ‹' => 'ู†ุฒ', + '๏ฒŒ' => 'ู†ู…', + '๏ฒ' => 'ู†ู†', + '๏ฒŽ' => 'ู†ู‰', + '๏ฒ' => 'ู†ูŠ', + '๏ฒ' => 'ู‰ูฐ', + '๏ฒ‘' => 'ูŠุฑ', + '๏ฒ’' => 'ูŠุฒ', + '๏ฒ“' => 'ูŠู…', + '๏ฒ”' => 'ูŠู†', + '๏ฒ•' => 'ูŠู‰', + '๏ฒ–' => 'ูŠูŠ', + '๏ฒ—' => 'ูŠู”ุฌ', + '๏ฒ˜' => 'ูŠู”ุญ', + '๏ฒ™' => 'ูŠู”ุฎ', + '๏ฒš' => 'ูŠู”ู…', + '๏ฒ›' => 'ูŠู”ู‡', + '๏ฒœ' => 'ุจุฌ', + '๏ฒ' => 'ุจุญ', + '๏ฒž' => 'ุจุฎ', + '๏ฒŸ' => 'ุจู…', + '๏ฒ ' => 'ุจู‡', + '๏ฒก' => 'ุชุฌ', + '๏ฒข' => 'ุชุญ', + '๏ฒฃ' => 'ุชุฎ', + '๏ฒค' => 'ุชู…', + '๏ฒฅ' => 'ุชู‡', + '๏ฒฆ' => 'ุซู…', + '๏ฒง' => 'ุฌุญ', + '๏ฒจ' => 'ุฌู…', + '๏ฒฉ' => 'ุญุฌ', + '๏ฒช' => 'ุญู…', + '๏ฒซ' => 'ุฎุฌ', + '๏ฒฌ' => 'ุฎู…', + '๏ฒญ' => 'ุณุฌ', + '๏ฒฎ' => 'ุณุญ', + '๏ฒฏ' => 'ุณุฎ', + '๏ฒฐ' => 'ุณู…', + '๏ฒฑ' => 'ุตุญ', + '๏ฒฒ' => 'ุตุฎ', + '๏ฒณ' => 'ุตู…', + '๏ฒด' => 'ุถุฌ', + '๏ฒต' => 'ุถุญ', + '๏ฒถ' => 'ุถุฎ', + '๏ฒท' => 'ุถู…', + '๏ฒธ' => 'ุทุญ', + '๏ฒน' => 'ุธู…', + '๏ฒบ' => 'ุนุฌ', + '๏ฒป' => 'ุนู…', + '๏ฒผ' => 'ุบุฌ', + '๏ฒฝ' => 'ุบู…', + '๏ฒพ' => 'ูุฌ', + '๏ฒฟ' => 'ูุญ', + '๏ณ€' => 'ูุฎ', + '๏ณ' => 'ูู…', + '๏ณ‚' => 'ู‚ุญ', + '๏ณƒ' => 'ู‚ู…', + '๏ณ„' => 'ูƒุฌ', + '๏ณ…' => 'ูƒุญ', + '๏ณ†' => 'ูƒุฎ', + '๏ณ‡' => 'ูƒู„', + '๏ณˆ' => 'ูƒู…', + '๏ณ‰' => 'ู„ุฌ', + '๏ณŠ' => 'ู„ุญ', + '๏ณ‹' => 'ู„ุฎ', + '๏ณŒ' => 'ู„ู…', + '๏ณ' => 'ู„ู‡', + '๏ณŽ' => 'ู…ุฌ', + '๏ณ' => 'ู…ุญ', + '๏ณ' => 'ู…ุฎ', + '๏ณ‘' => 'ู…ู…', + '๏ณ’' => 'ู†ุฌ', + '๏ณ“' => 'ู†ุญ', + '๏ณ”' => 'ู†ุฎ', + '๏ณ•' => 'ู†ู…', + '๏ณ–' => 'ู†ู‡', + '๏ณ—' => 'ู‡ุฌ', + '๏ณ˜' => 'ู‡ู…', + '๏ณ™' => 'ู‡ูฐ', + '๏ณš' => 'ูŠุฌ', + '๏ณ›' => 'ูŠุญ', + '๏ณœ' => 'ูŠุฎ', + '๏ณ' => 'ูŠู…', + '๏ณž' => 'ูŠู‡', + '๏ณŸ' => 'ูŠู”ู…', + '๏ณ ' => 'ูŠู”ู‡', + '๏ณก' => 'ุจู…', + '๏ณข' => 'ุจู‡', + '๏ณฃ' => 'ุชู…', + '๏ณค' => 'ุชู‡', + '๏ณฅ' => 'ุซู…', + '๏ณฆ' => 'ุซู‡', + '๏ณง' => 'ุณู…', + '๏ณจ' => 'ุณู‡', + '๏ณฉ' => 'ุดู…', + '๏ณช' => 'ุดู‡', + '๏ณซ' => 'ูƒู„', + '๏ณฌ' => 'ูƒู…', + '๏ณญ' => 'ู„ู…', + '๏ณฎ' => 'ู†ู…', + '๏ณฏ' => 'ู†ู‡', + '๏ณฐ' => 'ูŠู…', + '๏ณฑ' => 'ูŠู‡', + '๏ณฒ' => 'ู€ูŽู‘', + '๏ณณ' => 'ู€ูู‘', + '๏ณด' => 'ู€ูู‘', + '๏ณต' => 'ุทู‰', + '๏ณถ' => 'ุทูŠ', + '๏ณท' => 'ุนู‰', + '๏ณธ' => 'ุนูŠ', + '๏ณน' => 'ุบู‰', + '๏ณบ' => 'ุบูŠ', + '๏ณป' => 'ุณู‰', + '๏ณผ' => 'ุณูŠ', + '๏ณฝ' => 'ุดู‰', + '๏ณพ' => 'ุดูŠ', + '๏ณฟ' => 'ุญู‰', + '๏ด€' => 'ุญูŠ', + '๏ด' => 'ุฌู‰', + '๏ด‚' => 'ุฌูŠ', + '๏ดƒ' => 'ุฎู‰', + '๏ด„' => 'ุฎูŠ', + '๏ด…' => 'ุตู‰', + '๏ด†' => 'ุตูŠ', + '๏ด‡' => 'ุถู‰', + '๏ดˆ' => 'ุถูŠ', + '๏ด‰' => 'ุดุฌ', + '๏ดŠ' => 'ุดุญ', + '๏ด‹' => 'ุดุฎ', + '๏ดŒ' => 'ุดู…', + '๏ด' => 'ุดุฑ', + '๏ดŽ' => 'ุณุฑ', + '๏ด' => 'ุตุฑ', + '๏ด' => 'ุถุฑ', + '๏ด‘' => 'ุทู‰', + '๏ด’' => 'ุทูŠ', + '๏ด“' => 'ุนู‰', + '๏ด”' => 'ุนูŠ', + '๏ด•' => 'ุบู‰', + '๏ด–' => 'ุบูŠ', + '๏ด—' => 'ุณู‰', + '๏ด˜' => 'ุณูŠ', + '๏ด™' => 'ุดู‰', + '๏ดš' => 'ุดูŠ', + '๏ด›' => 'ุญู‰', + '๏ดœ' => 'ุญูŠ', + '๏ด' => 'ุฌู‰', + '๏ดž' => 'ุฌูŠ', + '๏ดŸ' => 'ุฎู‰', + '๏ด ' => 'ุฎูŠ', + '๏ดก' => 'ุตู‰', + '๏ดข' => 'ุตูŠ', + '๏ดฃ' => 'ุถู‰', + '๏ดค' => 'ุถูŠ', + '๏ดฅ' => 'ุดุฌ', + '๏ดฆ' => 'ุดุญ', + '๏ดง' => 'ุดุฎ', + '๏ดจ' => 'ุดู…', + '๏ดฉ' => 'ุดุฑ', + '๏ดช' => 'ุณุฑ', + '๏ดซ' => 'ุตุฑ', + '๏ดฌ' => 'ุถุฑ', + '๏ดญ' => 'ุดุฌ', + '๏ดฎ' => 'ุดุญ', + '๏ดฏ' => 'ุดุฎ', + '๏ดฐ' => 'ุดู…', + '๏ดฑ' => 'ุณู‡', + '๏ดฒ' => 'ุดู‡', + '๏ดณ' => 'ุทู…', + '๏ดด' => 'ุณุฌ', + '๏ดต' => 'ุณุญ', + '๏ดถ' => 'ุณุฎ', + '๏ดท' => 'ุดุฌ', + '๏ดธ' => 'ุดุญ', + '๏ดน' => 'ุดุฎ', + '๏ดบ' => 'ุทู…', + '๏ดป' => 'ุธู…', + '๏ดผ' => 'ุงู‹', + '๏ดฝ' => 'ุงู‹', + '๏ต' => 'ุชุฌู…', + '๏ต‘' => 'ุชุญุฌ', + '๏ต’' => 'ุชุญุฌ', + '๏ต“' => 'ุชุญู…', + '๏ต”' => 'ุชุฎู…', + '๏ต•' => 'ุชู…ุฌ', + '๏ต–' => 'ุชู…ุญ', + '๏ต—' => 'ุชู…ุฎ', + '๏ต˜' => 'ุฌู…ุญ', + '๏ต™' => 'ุฌู…ุญ', + '๏ตš' => 'ุญู…ูŠ', + '๏ต›' => 'ุญู…ู‰', + '๏ตœ' => 'ุณุญุฌ', + '๏ต' => 'ุณุฌุญ', + '๏ตž' => 'ุณุฌู‰', + '๏ตŸ' => 'ุณู…ุญ', + '๏ต ' => 'ุณู…ุญ', + '๏ตก' => 'ุณู…ุฌ', + '๏ตข' => 'ุณู…ู…', + '๏ตฃ' => 'ุณู…ู…', + '๏ตค' => 'ุตุญุญ', + '๏ตฅ' => 'ุตุญุญ', + '๏ตฆ' => 'ุตู…ู…', + '๏ตง' => 'ุดุญู…', + '๏ตจ' => 'ุดุญู…', + '๏ตฉ' => 'ุดุฌูŠ', + '๏ตช' => 'ุดู…ุฎ', + '๏ตซ' => 'ุดู…ุฎ', + '๏ตฌ' => 'ุดู…ู…', + '๏ตญ' => 'ุดู…ู…', + '๏ตฎ' => 'ุถุญู‰', + '๏ตฏ' => 'ุถุฎู…', + '๏ตฐ' => 'ุถุฎู…', + '๏ตฑ' => 'ุทู…ุญ', + '๏ตฒ' => 'ุทู…ุญ', + '๏ตณ' => 'ุทู…ู…', + '๏ตด' => 'ุทู…ูŠ', + '๏ตต' => 'ุนุฌู…', + '๏ตถ' => 'ุนู…ู…', + '๏ตท' => 'ุนู…ู…', + '๏ตธ' => 'ุนู…ู‰', + '๏ตน' => 'ุบู…ู…', + '๏ตบ' => 'ุบู…ูŠ', + '๏ตป' => 'ุบู…ู‰', + '๏ตผ' => 'ูุฎู…', + '๏ตฝ' => 'ูุฎู…', + '๏ตพ' => 'ู‚ู…ุญ', + '๏ตฟ' => 'ู‚ู…ู…', + '๏ถ€' => 'ู„ุญู…', + '๏ถ' => 'ู„ุญูŠ', + '๏ถ‚' => 'ู„ุญู‰', + '๏ถƒ' => 'ู„ุฌุฌ', + '๏ถ„' => 'ู„ุฌุฌ', + '๏ถ…' => 'ู„ุฎู…', + '๏ถ†' => 'ู„ุฎู…', + '๏ถ‡' => 'ู„ู…ุญ', + '๏ถˆ' => 'ู„ู…ุญ', + '๏ถ‰' => 'ู…ุญุฌ', + '๏ถŠ' => 'ู…ุญู…', + '๏ถ‹' => 'ู…ุญูŠ', + '๏ถŒ' => 'ู…ุฌุญ', + '๏ถ' => 'ู…ุฌู…', + '๏ถŽ' => 'ู…ุฎุฌ', + '๏ถ' => 'ู…ุฎู…', + '๏ถ’' => 'ู…ุฌุฎ', + '๏ถ“' => 'ู‡ู…ุฌ', + '๏ถ”' => 'ู‡ู…ู…', + '๏ถ•' => 'ู†ุญู…', + '๏ถ–' => 'ู†ุญู‰', + '๏ถ—' => 'ู†ุฌู…', + '๏ถ˜' => 'ู†ุฌู…', + '๏ถ™' => 'ู†ุฌู‰', + '๏ถš' => 'ู†ู…ูŠ', + '๏ถ›' => 'ู†ู…ู‰', + '๏ถœ' => 'ูŠู…ู…', + '๏ถ' => 'ูŠู…ู…', + '๏ถž' => 'ุจุฎูŠ', + '๏ถŸ' => 'ุชุฌูŠ', + '๏ถ ' => 'ุชุฌู‰', + '๏ถก' => 'ุชุฎูŠ', + '๏ถข' => 'ุชุฎู‰', + '๏ถฃ' => 'ุชู…ูŠ', + '๏ถค' => 'ุชู…ู‰', + '๏ถฅ' => 'ุฌู…ูŠ', + '๏ถฆ' => 'ุฌุญู‰', + '๏ถง' => 'ุฌู…ู‰', + '๏ถจ' => 'ุณุฎู‰', + '๏ถฉ' => 'ุตุญูŠ', + '๏ถช' => 'ุดุญูŠ', + '๏ถซ' => 'ุถุญูŠ', + '๏ถฌ' => 'ู„ุฌูŠ', + '๏ถญ' => 'ู„ู…ูŠ', + '๏ถฎ' => 'ูŠุญูŠ', + '๏ถฏ' => 'ูŠุฌูŠ', + '๏ถฐ' => 'ูŠู…ูŠ', + '๏ถฑ' => 'ู…ู…ูŠ', + '๏ถฒ' => 'ู‚ู…ูŠ', + '๏ถณ' => 'ู†ุญูŠ', + '๏ถด' => 'ู‚ู…ุญ', + '๏ถต' => 'ู„ุญู…', + '๏ถถ' => 'ุนู…ูŠ', + '๏ถท' => 'ูƒู…ูŠ', + '๏ถธ' => 'ู†ุฌุญ', + '๏ถน' => 'ู…ุฎูŠ', + '๏ถบ' => 'ู„ุฌู…', + '๏ถป' => 'ูƒู…ู…', + '๏ถผ' => 'ู„ุฌู…', + '๏ถฝ' => 'ู†ุฌุญ', + '๏ถพ' => 'ุฌุญูŠ', + '๏ถฟ' => 'ุญุฌูŠ', + '๏ท€' => 'ู…ุฌูŠ', + '๏ท' => 'ูู…ูŠ', + '๏ท‚' => 'ุจุญูŠ', + '๏ทƒ' => 'ูƒู…ู…', + '๏ท„' => 'ุนุฌู…', + '๏ท…' => 'ุตู…ู…', + '๏ท†' => 'ุณุฎูŠ', + '๏ท‡' => 'ู†ุฌูŠ', + '๏ทฐ' => 'ุตู„’', + '๏ทฑ' => 'ู‚ู„’', + '๏ทฒ' => 'ุงู„ู„ู‡', + '๏ทณ' => 'ุงูƒุจุฑ', + '๏ทด' => 'ู…ุญู…ุฏ', + '๏ทต' => 'ุตู„ุนู…', + '๏ทถ' => 'ุฑุณูˆู„', + '๏ทท' => 'ุนู„ูŠู‡', + '๏ทธ' => 'ูˆุณู„ู…', + '๏ทน' => 'ุตู„ู‰', + '๏ทบ' => 'ุตู„ู‰ ุงู„ู„ู‡ ุนู„ูŠู‡ ูˆุณู„ู…', + '๏ทป' => 'ุฌู„ ุฌู„ุงู„ู‡', + '๏ทผ' => 'ุฑŒุงู„', + '๏ธ' => ',', + '๏ธ‘' => 'ใ€', + '๏ธ’' => 'ใ€‚', + '๏ธ“' => ':', + '๏ธ”' => ';', + '๏ธ•' => '!', + '๏ธ–' => '?', + '๏ธ—' => 'ใ€–', + '๏ธ˜' => 'ใ€—', + '๏ธ™' => '...', + '๏ธฐ' => '..', + '๏ธฑ' => 'โ€”', + '๏ธฒ' => 'โ€“', + '๏ธณ' => '_', + '๏ธด' => '_', + '๏ธต' => '(', + '๏ธถ' => ')', + '๏ธท' => '{', + '๏ธธ' => '}', + '๏ธน' => 'ใ€”', + '๏ธบ' => 'ใ€•', + '๏ธป' => 'ใ€', + '๏ธผ' => 'ใ€‘', + '๏ธฝ' => 'ใ€Š', + '๏ธพ' => 'ใ€‹', + '๏ธฟ' => 'ใ€ˆ', + '๏น€' => 'ใ€‰', + '๏น' => 'ใ€Œ', + '๏น‚' => 'ใ€', + '๏นƒ' => 'ใ€Ž', + '๏น„' => 'ใ€', + '๏น‡' => '[', + '๏นˆ' => ']', + '๏น‰' => ' ฬ…', + '๏นŠ' => ' ฬ…', + '๏น‹' => ' ฬ…', + '๏นŒ' => ' ฬ…', + '๏น' => '_', + '๏นŽ' => '_', + '๏น' => '_', + '๏น' => ',', + '๏น‘' => 'ใ€', + '๏น’' => '.', + '๏น”' => ';', + '๏น•' => ':', + '๏น–' => '?', + '๏น—' => '!', + '๏น˜' => 'โ€”', + '๏น™' => '(', + '๏นš' => ')', + '๏น›' => '{', + '๏นœ' => '}', + '๏น' => 'ใ€”', + '๏นž' => 'ใ€•', + '๏นŸ' => '#', + '๏น ' => '&', + '๏นก' => '*', + '๏นข' => '+', + '๏นฃ' => '-', + '๏นค' => '<', + '๏นฅ' => '>', + '๏นฆ' => '=', + '๏นจ' => '\\', + '๏นฉ' => '$', + '๏นช' => '%', + '๏นซ' => '@', + '๏นฐ' => ' ู‹', + '๏นฑ' => 'ู€ู‹', + '๏นฒ' => ' ูŒ', + '๏นด' => ' ู', + '๏นถ' => ' ูŽ', + '๏นท' => 'ู€ูŽ', + '๏นธ' => ' ู', + '๏นน' => 'ู€ู', + '๏นบ' => ' ู', + '๏นป' => 'ู€ู', + '๏นผ' => ' ู‘', + '๏นฝ' => 'ู€ู‘', + '๏นพ' => ' ู’', + '๏นฟ' => 'ู€ู’', + '๏บ€' => 'ุก', + '๏บ' => 'ุงู“', + '๏บ‚' => 'ุงู“', + '๏บƒ' => 'ุงู”', + '๏บ„' => 'ุงู”', + '๏บ…' => 'ูˆู”', + '๏บ†' => 'ูˆู”', + '๏บ‡' => 'ุงู•', + '๏บˆ' => 'ุงู•', + '๏บ‰' => 'ูŠู”', + '๏บŠ' => 'ูŠู”', + '๏บ‹' => 'ูŠู”', + '๏บŒ' => 'ูŠู”', + '๏บ' => 'ุง', + '๏บŽ' => 'ุง', + '๏บ' => 'ุจ', + '๏บ' => 'ุจ', + '๏บ‘' => 'ุจ', + '๏บ’' => 'ุจ', + '๏บ“' => 'ุฉ', + '๏บ”' => 'ุฉ', + '๏บ•' => 'ุช', + '๏บ–' => 'ุช', + '๏บ—' => 'ุช', + '๏บ˜' => 'ุช', + '๏บ™' => 'ุซ', + '๏บš' => 'ุซ', + '๏บ›' => 'ุซ', + '๏บœ' => 'ุซ', + '๏บ' => 'ุฌ', + '๏บž' => 'ุฌ', + '๏บŸ' => 'ุฌ', + '๏บ ' => 'ุฌ', + '๏บก' => 'ุญ', + '๏บข' => 'ุญ', + '๏บฃ' => 'ุญ', + '๏บค' => 'ุญ', + '๏บฅ' => 'ุฎ', + '๏บฆ' => 'ุฎ', + '๏บง' => 'ุฎ', + '๏บจ' => 'ุฎ', + '๏บฉ' => 'ุฏ', + '๏บช' => 'ุฏ', + '๏บซ' => 'ุฐ', + '๏บฌ' => 'ุฐ', + '๏บญ' => 'ุฑ', + '๏บฎ' => 'ุฑ', + '๏บฏ' => 'ุฒ', + '๏บฐ' => 'ุฒ', + '๏บฑ' => 'ุณ', + '๏บฒ' => 'ุณ', + '๏บณ' => 'ุณ', + '๏บด' => 'ุณ', + '๏บต' => 'ุด', + '๏บถ' => 'ุด', + '๏บท' => 'ุด', + '๏บธ' => 'ุด', + '๏บน' => 'ุต', + '๏บบ' => 'ุต', + '๏บป' => 'ุต', + '๏บผ' => 'ุต', + '๏บฝ' => 'ุถ', + '๏บพ' => 'ุถ', + '๏บฟ' => 'ุถ', + '๏ป€' => 'ุถ', + '๏ป' => 'ุท', + '๏ป‚' => 'ุท', + '๏ปƒ' => 'ุท', + '๏ป„' => 'ุท', + '๏ป…' => 'ุธ', + '๏ป†' => 'ุธ', + '๏ป‡' => 'ุธ', + '๏ปˆ' => 'ุธ', + '๏ป‰' => 'ุน', + '๏ปŠ' => 'ุน', + '๏ป‹' => 'ุน', + '๏ปŒ' => 'ุน', + '๏ป' => 'ุบ', + '๏ปŽ' => 'ุบ', + '๏ป' => 'ุบ', + '๏ป' => 'ุบ', + '๏ป‘' => 'ู', + '๏ป’' => 'ู', + '๏ป“' => 'ู', + '๏ป”' => 'ู', + '๏ป•' => 'ู‚', + '๏ป–' => 'ู‚', + '๏ป—' => 'ู‚', + '๏ป˜' => 'ู‚', + '๏ป™' => 'ูƒ', + '๏ปš' => 'ูƒ', + '๏ป›' => 'ูƒ', + '๏ปœ' => 'ูƒ', + '๏ป' => 'ู„', + '๏ปž' => 'ู„', + '๏ปŸ' => 'ู„', + '๏ป ' => 'ู„', + '๏ปก' => 'ู…', + '๏ปข' => 'ู…', + '๏ปฃ' => 'ู…', + '๏ปค' => 'ู…', + '๏ปฅ' => 'ู†', + '๏ปฆ' => 'ู†', + '๏ปง' => 'ู†', + '๏ปจ' => 'ู†', + '๏ปฉ' => 'ู‡', + '๏ปช' => 'ู‡', + '๏ปซ' => 'ู‡', + '๏ปฌ' => 'ู‡', + '๏ปญ' => 'ูˆ', + '๏ปฎ' => 'ูˆ', + '๏ปฏ' => 'ู‰', + '๏ปฐ' => 'ู‰', + '๏ปฑ' => 'ูŠ', + '๏ปฒ' => 'ูŠ', + '๏ปณ' => 'ูŠ', + '๏ปด' => 'ูŠ', + '๏ปต' => 'ู„ุงู“', + '๏ปถ' => 'ู„ุงู“', + '๏ปท' => 'ู„ุงู”', + '๏ปธ' => 'ู„ุงู”', + '๏ปน' => 'ู„ุงู•', + '๏ปบ' => 'ู„ุงู•', + '๏ปป' => 'ู„ุง', + '๏ปผ' => 'ู„ุง', + '๏ผ' => '!', + '๏ผ‚' => '"', + '๏ผƒ' => '#', + '๏ผ„' => '$', + '๏ผ…' => '%', + '๏ผ†' => '&', + '๏ผ‡' => '\'', + '๏ผˆ' => '(', + '๏ผ‰' => ')', + '๏ผŠ' => '*', + '๏ผ‹' => '+', + '๏ผŒ' => ',', + '๏ผ' => '-', + '๏ผŽ' => '.', + '๏ผ' => '/', + '๏ผ' => '0', + '๏ผ‘' => '1', + '๏ผ’' => '2', + '๏ผ“' => '3', + '๏ผ”' => '4', + '๏ผ•' => '5', + '๏ผ–' => '6', + '๏ผ—' => '7', + '๏ผ˜' => '8', + '๏ผ™' => '9', + '๏ผš' => ':', + '๏ผ›' => ';', + '๏ผœ' => '<', + '๏ผ' => '=', + '๏ผž' => '>', + '๏ผŸ' => '?', + '๏ผ ' => '@', + '๏ผก' => 'A', + '๏ผข' => 'B', + '๏ผฃ' => 'C', + '๏ผค' => 'D', + '๏ผฅ' => 'E', + '๏ผฆ' => 'F', + '๏ผง' => 'G', + '๏ผจ' => 'H', + '๏ผฉ' => 'I', + '๏ผช' => 'J', + '๏ผซ' => 'K', + '๏ผฌ' => 'L', + '๏ผญ' => 'M', + '๏ผฎ' => 'N', + '๏ผฏ' => 'O', + '๏ผฐ' => 'P', + '๏ผฑ' => 'Q', + '๏ผฒ' => 'R', + '๏ผณ' => 'S', + '๏ผด' => 'T', + '๏ผต' => 'U', + '๏ผถ' => 'V', + '๏ผท' => 'W', + '๏ผธ' => 'X', + '๏ผน' => 'Y', + '๏ผบ' => 'Z', + '๏ผป' => '[', + '๏ผผ' => '\\', + '๏ผฝ' => ']', + '๏ผพ' => '^', + '๏ผฟ' => '_', + '๏ฝ€' => '`', + '๏ฝ' => 'a', + '๏ฝ‚' => 'b', + '๏ฝƒ' => 'c', + '๏ฝ„' => 'd', + '๏ฝ…' => 'e', + '๏ฝ†' => 'f', + '๏ฝ‡' => 'g', + '๏ฝˆ' => 'h', + '๏ฝ‰' => 'i', + '๏ฝŠ' => 'j', + '๏ฝ‹' => 'k', + '๏ฝŒ' => 'l', + '๏ฝ' => 'm', + '๏ฝŽ' => 'n', + '๏ฝ' => 'o', + '๏ฝ' => 'p', + '๏ฝ‘' => 'q', + '๏ฝ’' => 'r', + '๏ฝ“' => 's', + '๏ฝ”' => 't', + '๏ฝ•' => 'u', + '๏ฝ–' => 'v', + '๏ฝ—' => 'w', + '๏ฝ˜' => 'x', + '๏ฝ™' => 'y', + '๏ฝš' => 'z', + '๏ฝ›' => '{', + '๏ฝœ' => '|', + '๏ฝ' => '}', + '๏ฝž' => '~', + '๏ฝŸ' => 'โฆ…', + '๏ฝ ' => 'โฆ†', + '๏ฝก' => 'ใ€‚', + '๏ฝข' => 'ใ€Œ', + '๏ฝฃ' => 'ใ€', + '๏ฝค' => 'ใ€', + '๏ฝฅ' => 'ใƒป', + '๏ฝฆ' => 'ใƒฒ', + '๏ฝง' => 'ใ‚ก', + '๏ฝจ' => 'ใ‚ฃ', + '๏ฝฉ' => 'ใ‚ฅ', + '๏ฝช' => 'ใ‚ง', + '๏ฝซ' => 'ใ‚ฉ', + '๏ฝฌ' => 'ใƒฃ', + '๏ฝญ' => 'ใƒฅ', + '๏ฝฎ' => 'ใƒง', + '๏ฝฏ' => 'ใƒƒ', + '๏ฝฐ' => 'ใƒผ', + '๏ฝฑ' => 'ใ‚ข', + '๏ฝฒ' => 'ใ‚ค', + '๏ฝณ' => 'ใ‚ฆ', + '๏ฝด' => 'ใ‚จ', + '๏ฝต' => 'ใ‚ช', + '๏ฝถ' => 'ใ‚ซ', + '๏ฝท' => 'ใ‚ญ', + '๏ฝธ' => 'ใ‚ฏ', + '๏ฝน' => 'ใ‚ฑ', + '๏ฝบ' => 'ใ‚ณ', + '๏ฝป' => 'ใ‚ต', + '๏ฝผ' => 'ใ‚ท', + '๏ฝฝ' => 'ใ‚น', + '๏ฝพ' => 'ใ‚ป', + '๏ฝฟ' => 'ใ‚ฝ', + '๏พ€' => 'ใ‚ฟ', + '๏พ' => 'ใƒ', + '๏พ‚' => 'ใƒ„', + '๏พƒ' => 'ใƒ†', + '๏พ„' => 'ใƒˆ', + '๏พ…' => 'ใƒŠ', + '๏พ†' => 'ใƒ‹', + '๏พ‡' => 'ใƒŒ', + '๏พˆ' => 'ใƒ', + '๏พ‰' => 'ใƒŽ', + '๏พŠ' => 'ใƒ', + '๏พ‹' => 'ใƒ’', + '๏พŒ' => 'ใƒ•', + '๏พ' => 'ใƒ˜', + '๏พŽ' => 'ใƒ›', + '๏พ' => 'ใƒž', + '๏พ' => 'ใƒŸ', + '๏พ‘' => 'ใƒ ', + '๏พ’' => 'ใƒก', + '๏พ“' => 'ใƒข', + '๏พ”' => 'ใƒค', + '๏พ•' => 'ใƒฆ', + '๏พ–' => 'ใƒจ', + '๏พ—' => 'ใƒฉ', + '๏พ˜' => 'ใƒช', + '๏พ™' => 'ใƒซ', + '๏พš' => 'ใƒฌ', + '๏พ›' => 'ใƒญ', + '๏พœ' => 'ใƒฏ', + '๏พ' => 'ใƒณ', + '๏พž' => 'ใ‚™', + '๏พŸ' => 'ใ‚š', + '๏พ ' => 'แ… ', + '๏พก' => 'แ„€', + '๏พข' => 'แ„', + '๏พฃ' => 'แ†ช', + '๏พค' => 'แ„‚', + '๏พฅ' => 'แ†ฌ', + '๏พฆ' => 'แ†ญ', + '๏พง' => 'แ„ƒ', + '๏พจ' => 'แ„„', + '๏พฉ' => 'แ„…', + '๏พช' => 'แ†ฐ', + '๏พซ' => 'แ†ฑ', + '๏พฌ' => 'แ†ฒ', + '๏พญ' => 'แ†ณ', + '๏พฎ' => 'แ†ด', + '๏พฏ' => 'แ†ต', + '๏พฐ' => 'แ„š', + '๏พฑ' => 'แ„†', + '๏พฒ' => 'แ„‡', + '๏พณ' => 'แ„ˆ', + '๏พด' => 'แ„ก', + '๏พต' => 'แ„‰', + '๏พถ' => 'แ„Š', + '๏พท' => 'แ„‹', + '๏พธ' => 'แ„Œ', + '๏พน' => 'แ„', + '๏พบ' => 'แ„Ž', + '๏พป' => 'แ„', + '๏พผ' => 'แ„', + '๏พฝ' => 'แ„‘', + '๏พพ' => 'แ„’', + '๏ฟ‚' => 'แ…ก', + '๏ฟƒ' => 'แ…ข', + '๏ฟ„' => 'แ…ฃ', + '๏ฟ…' => 'แ…ค', + '๏ฟ†' => 'แ…ฅ', + '๏ฟ‡' => 'แ…ฆ', + '๏ฟŠ' => 'แ…ง', + '๏ฟ‹' => 'แ…จ', + '๏ฟŒ' => 'แ…ฉ', + '๏ฟ' => 'แ…ช', + '๏ฟŽ' => 'แ…ซ', + '๏ฟ' => 'แ…ฌ', + '๏ฟ’' => 'แ…ญ', + '๏ฟ“' => 'แ…ฎ', + '๏ฟ”' => 'แ…ฏ', + '๏ฟ•' => 'แ…ฐ', + '๏ฟ–' => 'แ…ฑ', + '๏ฟ—' => 'แ…ฒ', + '๏ฟš' => 'แ…ณ', + '๏ฟ›' => 'แ…ด', + '๏ฟœ' => 'แ…ต', + '๏ฟ ' => 'ยข', + '๏ฟก' => 'ยฃ', + '๏ฟข' => 'ยฌ', + '๏ฟฃ' => ' ฬ„', + '๏ฟค' => 'ยฆ', + '๏ฟฅ' => 'ยฅ', + '๏ฟฆ' => 'โ‚ฉ', + '๏ฟจ' => 'โ”‚', + '๏ฟฉ' => 'โ†', + '๏ฟช' => 'โ†‘', + '๏ฟซ' => 'โ†’', + '๏ฟฌ' => 'โ†“', + '๏ฟญ' => 'โ– ', + '๏ฟฎ' => 'โ—‹', + '๐€' => 'A', + '๐' => 'B', + '๐‚' => 'C', + '๐ƒ' => 'D', + '๐„' => 'E', + '๐…' => 'F', + '๐†' => 'G', + '๐‡' => 'H', + '๐ˆ' => 'I', + '๐‰' => 'J', + '๐Š' => 'K', + '๐‹' => 'L', + '๐Œ' => 'M', + '๐' => 'N', + '๐Ž' => 'O', + '๐' => 'P', + '๐' => 'Q', + '๐‘' => 'R', + '๐’' => 'S', + '๐“' => 'T', + '๐”' => 'U', + '๐•' => 'V', + '๐–' => 'W', + '๐—' => 'X', + '๐˜' => 'Y', + '๐™' => 'Z', + '๐š' => 'a', + '๐›' => 'b', + '๐œ' => 'c', + '๐' => 'd', + '๐ž' => 'e', + '๐Ÿ' => 'f', + '๐ ' => 'g', + '๐ก' => 'h', + '๐ข' => 'i', + '๐ฃ' => 'j', + '๐ค' => 'k', + '๐ฅ' => 'l', + '๐ฆ' => 'm', + '๐ง' => 'n', + '๐จ' => 'o', + '๐ฉ' => 'p', + '๐ช' => 'q', + '๐ซ' => 'r', + '๐ฌ' => 's', + '๐ญ' => 't', + '๐ฎ' => 'u', + '๐ฏ' => 'v', + '๐ฐ' => 'w', + '๐ฑ' => 'x', + '๐ฒ' => 'y', + '๐ณ' => 'z', + '๐ด' => 'A', + '๐ต' => 'B', + '๐ถ' => 'C', + '๐ท' => 'D', + '๐ธ' => 'E', + '๐น' => 'F', + '๐บ' => 'G', + '๐ป' => 'H', + '๐ผ' => 'I', + '๐ฝ' => 'J', + '๐พ' => 'K', + '๐ฟ' => 'L', + '๐‘€' => 'M', + '๐‘' => 'N', + '๐‘‚' => 'O', + '๐‘ƒ' => 'P', + '๐‘„' => 'Q', + '๐‘…' => 'R', + '๐‘†' => 'S', + '๐‘‡' => 'T', + '๐‘ˆ' => 'U', + '๐‘‰' => 'V', + '๐‘Š' => 'W', + '๐‘‹' => 'X', + '๐‘Œ' => 'Y', + '๐‘' => 'Z', + '๐‘Ž' => 'a', + '๐‘' => 'b', + '๐‘' => 'c', + '๐‘‘' => 'd', + '๐‘’' => 'e', + '๐‘“' => 'f', + '๐‘”' => 'g', + '๐‘–' => 'i', + '๐‘—' => 'j', + '๐‘˜' => 'k', + '๐‘™' => 'l', + '๐‘š' => 'm', + '๐‘›' => 'n', + '๐‘œ' => 'o', + '๐‘' => 'p', + '๐‘ž' => 'q', + '๐‘Ÿ' => 'r', + '๐‘ ' => 's', + '๐‘ก' => 't', + '๐‘ข' => 'u', + '๐‘ฃ' => 'v', + '๐‘ค' => 'w', + '๐‘ฅ' => 'x', + '๐‘ฆ' => 'y', + '๐‘ง' => 'z', + '๐‘จ' => 'A', + '๐‘ฉ' => 'B', + '๐‘ช' => 'C', + '๐‘ซ' => 'D', + '๐‘ฌ' => 'E', + '๐‘ญ' => 'F', + '๐‘ฎ' => 'G', + '๐‘ฏ' => 'H', + '๐‘ฐ' => 'I', + '๐‘ฑ' => 'J', + '๐‘ฒ' => 'K', + '๐‘ณ' => 'L', + '๐‘ด' => 'M', + '๐‘ต' => 'N', + '๐‘ถ' => 'O', + '๐‘ท' => 'P', + '๐‘ธ' => 'Q', + '๐‘น' => 'R', + '๐‘บ' => 'S', + '๐‘ป' => 'T', + '๐‘ผ' => 'U', + '๐‘ฝ' => 'V', + '๐‘พ' => 'W', + '๐‘ฟ' => 'X', + '๐’€' => 'Y', + '๐’' => 'Z', + '๐’‚' => 'a', + '๐’ƒ' => 'b', + '๐’„' => 'c', + '๐’…' => 'd', + '๐’†' => 'e', + '๐’‡' => 'f', + '๐’ˆ' => 'g', + '๐’‰' => 'h', + '๐’Š' => 'i', + '๐’‹' => 'j', + '๐’Œ' => 'k', + '๐’' => 'l', + '๐’Ž' => 'm', + '๐’' => 'n', + '๐’' => 'o', + '๐’‘' => 'p', + '๐’’' => 'q', + '๐’“' => 'r', + '๐’”' => 's', + '๐’•' => 't', + '๐’–' => 'u', + '๐’—' => 'v', + '๐’˜' => 'w', + '๐’™' => 'x', + '๐’š' => 'y', + '๐’›' => 'z', + '๐’œ' => 'A', + '๐’ž' => 'C', + '๐’Ÿ' => 'D', + '๐’ข' => 'G', + '๐’ฅ' => 'J', + '๐’ฆ' => 'K', + '๐’ฉ' => 'N', + '๐’ช' => 'O', + '๐’ซ' => 'P', + '๐’ฌ' => 'Q', + '๐’ฎ' => 'S', + '๐’ฏ' => 'T', + '๐’ฐ' => 'U', + '๐’ฑ' => 'V', + '๐’ฒ' => 'W', + '๐’ณ' => 'X', + '๐’ด' => 'Y', + '๐’ต' => 'Z', + '๐’ถ' => 'a', + '๐’ท' => 'b', + '๐’ธ' => 'c', + '๐’น' => 'd', + '๐’ป' => 'f', + '๐’ฝ' => 'h', + '๐’พ' => 'i', + '๐’ฟ' => 'j', + '๐“€' => 'k', + '๐“' => 'l', + '๐“‚' => 'm', + '๐“ƒ' => 'n', + '๐“…' => 'p', + '๐“†' => 'q', + '๐“‡' => 'r', + '๐“ˆ' => 's', + '๐“‰' => 't', + '๐“Š' => 'u', + '๐“‹' => 'v', + '๐“Œ' => 'w', + '๐“' => 'x', + '๐“Ž' => 'y', + '๐“' => 'z', + '๐“' => 'A', + '๐“‘' => 'B', + '๐“’' => 'C', + '๐““' => 'D', + '๐“”' => 'E', + '๐“•' => 'F', + '๐“–' => 'G', + '๐“—' => 'H', + '๐“˜' => 'I', + '๐“™' => 'J', + '๐“š' => 'K', + '๐“›' => 'L', + '๐“œ' => 'M', + '๐“' => 'N', + '๐“ž' => 'O', + '๐“Ÿ' => 'P', + '๐“ ' => 'Q', + '๐“ก' => 'R', + '๐“ข' => 'S', + '๐“ฃ' => 'T', + '๐“ค' => 'U', + '๐“ฅ' => 'V', + '๐“ฆ' => 'W', + '๐“ง' => 'X', + '๐“จ' => 'Y', + '๐“ฉ' => 'Z', + '๐“ช' => 'a', + '๐“ซ' => 'b', + '๐“ฌ' => 'c', + '๐“ญ' => 'd', + '๐“ฎ' => 'e', + '๐“ฏ' => 'f', + '๐“ฐ' => 'g', + '๐“ฑ' => 'h', + '๐“ฒ' => 'i', + '๐“ณ' => 'j', + '๐“ด' => 'k', + '๐“ต' => 'l', + '๐“ถ' => 'm', + '๐“ท' => 'n', + '๐“ธ' => 'o', + '๐“น' => 'p', + '๐“บ' => 'q', + '๐“ป' => 'r', + '๐“ผ' => 's', + '๐“ฝ' => 't', + '๐“พ' => 'u', + '๐“ฟ' => 'v', + '๐”€' => 'w', + '๐”' => 'x', + '๐”‚' => 'y', + '๐”ƒ' => 'z', + '๐”„' => 'A', + '๐”…' => 'B', + '๐”‡' => 'D', + '๐”ˆ' => 'E', + '๐”‰' => 'F', + '๐”Š' => 'G', + '๐”' => 'J', + '๐”Ž' => 'K', + '๐”' => 'L', + '๐”' => 'M', + '๐”‘' => 'N', + '๐”’' => 'O', + '๐”“' => 'P', + '๐””' => 'Q', + '๐”–' => 'S', + '๐”—' => 'T', + '๐”˜' => 'U', + '๐”™' => 'V', + '๐”š' => 'W', + '๐”›' => 'X', + '๐”œ' => 'Y', + '๐”ž' => 'a', + '๐”Ÿ' => 'b', + '๐” ' => 'c', + '๐”ก' => 'd', + '๐”ข' => 'e', + '๐”ฃ' => 'f', + '๐”ค' => 'g', + '๐”ฅ' => 'h', + '๐”ฆ' => 'i', + '๐”ง' => 'j', + '๐”จ' => 'k', + '๐”ฉ' => 'l', + '๐”ช' => 'm', + '๐”ซ' => 'n', + '๐”ฌ' => 'o', + '๐”ญ' => 'p', + '๐”ฎ' => 'q', + '๐”ฏ' => 'r', + '๐”ฐ' => 's', + '๐”ฑ' => 't', + '๐”ฒ' => 'u', + '๐”ณ' => 'v', + '๐”ด' => 'w', + '๐”ต' => 'x', + '๐”ถ' => 'y', + '๐”ท' => 'z', + '๐”ธ' => 'A', + '๐”น' => 'B', + '๐”ป' => 'D', + '๐”ผ' => 'E', + '๐”ฝ' => 'F', + '๐”พ' => 'G', + '๐•€' => 'I', + '๐•' => 'J', + '๐•‚' => 'K', + '๐•ƒ' => 'L', + '๐•„' => 'M', + '๐•†' => 'O', + '๐•Š' => 'S', + '๐•‹' => 'T', + '๐•Œ' => 'U', + '๐•' => 'V', + '๐•Ž' => 'W', + '๐•' => 'X', + '๐•' => 'Y', + '๐•’' => 'a', + '๐•“' => 'b', + '๐•”' => 'c', + '๐••' => 'd', + '๐•–' => 'e', + '๐•—' => 'f', + '๐•˜' => 'g', + '๐•™' => 'h', + '๐•š' => 'i', + '๐•›' => 'j', + '๐•œ' => 'k', + '๐•' => 'l', + '๐•ž' => 'm', + '๐•Ÿ' => 'n', + '๐• ' => 'o', + '๐•ก' => 'p', + '๐•ข' => 'q', + '๐•ฃ' => 'r', + '๐•ค' => 's', + '๐•ฅ' => 't', + '๐•ฆ' => 'u', + '๐•ง' => 'v', + '๐•จ' => 'w', + '๐•ฉ' => 'x', + '๐•ช' => 'y', + '๐•ซ' => 'z', + '๐•ฌ' => 'A', + '๐•ญ' => 'B', + '๐•ฎ' => 'C', + '๐•ฏ' => 'D', + '๐•ฐ' => 'E', + '๐•ฑ' => 'F', + '๐•ฒ' => 'G', + '๐•ณ' => 'H', + '๐•ด' => 'I', + '๐•ต' => 'J', + '๐•ถ' => 'K', + '๐•ท' => 'L', + '๐•ธ' => 'M', + '๐•น' => 'N', + '๐•บ' => 'O', + '๐•ป' => 'P', + '๐•ผ' => 'Q', + '๐•ฝ' => 'R', + '๐•พ' => 'S', + '๐•ฟ' => 'T', + '๐–€' => 'U', + '๐–' => 'V', + '๐–‚' => 'W', + '๐–ƒ' => 'X', + '๐–„' => 'Y', + '๐–…' => 'Z', + '๐–†' => 'a', + '๐–‡' => 'b', + '๐–ˆ' => 'c', + '๐–‰' => 'd', + '๐–Š' => 'e', + '๐–‹' => 'f', + '๐–Œ' => 'g', + '๐–' => 'h', + '๐–Ž' => 'i', + '๐–' => 'j', + '๐–' => 'k', + '๐–‘' => 'l', + '๐–’' => 'm', + '๐–“' => 'n', + '๐–”' => 'o', + '๐–•' => 'p', + '๐––' => 'q', + '๐–—' => 'r', + '๐–˜' => 's', + '๐–™' => 't', + '๐–š' => 'u', + '๐–›' => 'v', + '๐–œ' => 'w', + '๐–' => 'x', + '๐–ž' => 'y', + '๐–Ÿ' => 'z', + '๐– ' => 'A', + '๐–ก' => 'B', + '๐–ข' => 'C', + '๐–ฃ' => 'D', + '๐–ค' => 'E', + '๐–ฅ' => 'F', + '๐–ฆ' => 'G', + '๐–ง' => 'H', + '๐–จ' => 'I', + '๐–ฉ' => 'J', + '๐–ช' => 'K', + '๐–ซ' => 'L', + '๐–ฌ' => 'M', + '๐–ญ' => 'N', + '๐–ฎ' => 'O', + '๐–ฏ' => 'P', + '๐–ฐ' => 'Q', + '๐–ฑ' => 'R', + '๐–ฒ' => 'S', + '๐–ณ' => 'T', + '๐–ด' => 'U', + '๐–ต' => 'V', + '๐–ถ' => 'W', + '๐–ท' => 'X', + '๐–ธ' => 'Y', + '๐–น' => 'Z', + '๐–บ' => 'a', + '๐–ป' => 'b', + '๐–ผ' => 'c', + '๐–ฝ' => 'd', + '๐–พ' => 'e', + '๐–ฟ' => 'f', + '๐—€' => 'g', + '๐—' => 'h', + '๐—‚' => 'i', + '๐—ƒ' => 'j', + '๐—„' => 'k', + '๐—…' => 'l', + '๐—†' => 'm', + '๐—‡' => 'n', + '๐—ˆ' => 'o', + '๐—‰' => 'p', + '๐—Š' => 'q', + '๐—‹' => 'r', + '๐—Œ' => 's', + '๐—' => 't', + '๐—Ž' => 'u', + '๐—' => 'v', + '๐—' => 'w', + '๐—‘' => 'x', + '๐—’' => 'y', + '๐—“' => 'z', + '๐—”' => 'A', + '๐—•' => 'B', + '๐—–' => 'C', + '๐——' => 'D', + '๐—˜' => 'E', + '๐—™' => 'F', + '๐—š' => 'G', + '๐—›' => 'H', + '๐—œ' => 'I', + '๐—' => 'J', + '๐—ž' => 'K', + '๐—Ÿ' => 'L', + '๐— ' => 'M', + '๐—ก' => 'N', + '๐—ข' => 'O', + '๐—ฃ' => 'P', + '๐—ค' => 'Q', + '๐—ฅ' => 'R', + '๐—ฆ' => 'S', + '๐—ง' => 'T', + '๐—จ' => 'U', + '๐—ฉ' => 'V', + '๐—ช' => 'W', + '๐—ซ' => 'X', + '๐—ฌ' => 'Y', + '๐—ญ' => 'Z', + '๐—ฎ' => 'a', + '๐—ฏ' => 'b', + '๐—ฐ' => 'c', + '๐—ฑ' => 'd', + '๐—ฒ' => 'e', + '๐—ณ' => 'f', + '๐—ด' => 'g', + '๐—ต' => 'h', + '๐—ถ' => 'i', + '๐—ท' => 'j', + '๐—ธ' => 'k', + '๐—น' => 'l', + '๐—บ' => 'm', + '๐—ป' => 'n', + '๐—ผ' => 'o', + '๐—ฝ' => 'p', + '๐—พ' => 'q', + '๐—ฟ' => 'r', + '๐˜€' => 's', + '๐˜' => 't', + '๐˜‚' => 'u', + '๐˜ƒ' => 'v', + '๐˜„' => 'w', + '๐˜…' => 'x', + '๐˜†' => 'y', + '๐˜‡' => 'z', + '๐˜ˆ' => 'A', + '๐˜‰' => 'B', + '๐˜Š' => 'C', + '๐˜‹' => 'D', + '๐˜Œ' => 'E', + '๐˜' => 'F', + '๐˜Ž' => 'G', + '๐˜' => 'H', + '๐˜' => 'I', + '๐˜‘' => 'J', + '๐˜’' => 'K', + '๐˜“' => 'L', + '๐˜”' => 'M', + '๐˜•' => 'N', + '๐˜–' => 'O', + '๐˜—' => 'P', + '๐˜˜' => 'Q', + '๐˜™' => 'R', + '๐˜š' => 'S', + '๐˜›' => 'T', + '๐˜œ' => 'U', + '๐˜' => 'V', + '๐˜ž' => 'W', + '๐˜Ÿ' => 'X', + '๐˜ ' => 'Y', + '๐˜ก' => 'Z', + '๐˜ข' => 'a', + '๐˜ฃ' => 'b', + '๐˜ค' => 'c', + '๐˜ฅ' => 'd', + '๐˜ฆ' => 'e', + '๐˜ง' => 'f', + '๐˜จ' => 'g', + '๐˜ฉ' => 'h', + '๐˜ช' => 'i', + '๐˜ซ' => 'j', + '๐˜ฌ' => 'k', + '๐˜ญ' => 'l', + '๐˜ฎ' => 'm', + '๐˜ฏ' => 'n', + '๐˜ฐ' => 'o', + '๐˜ฑ' => 'p', + '๐˜ฒ' => 'q', + '๐˜ณ' => 'r', + '๐˜ด' => 's', + '๐˜ต' => 't', + '๐˜ถ' => 'u', + '๐˜ท' => 'v', + '๐˜ธ' => 'w', + '๐˜น' => 'x', + '๐˜บ' => 'y', + '๐˜ป' => 'z', + '๐˜ผ' => 'A', + '๐˜ฝ' => 'B', + '๐˜พ' => 'C', + '๐˜ฟ' => 'D', + '๐™€' => 'E', + '๐™' => 'F', + '๐™‚' => 'G', + '๐™ƒ' => 'H', + '๐™„' => 'I', + '๐™…' => 'J', + '๐™†' => 'K', + '๐™‡' => 'L', + '๐™ˆ' => 'M', + '๐™‰' => 'N', + '๐™Š' => 'O', + '๐™‹' => 'P', + '๐™Œ' => 'Q', + '๐™' => 'R', + '๐™Ž' => 'S', + '๐™' => 'T', + '๐™' => 'U', + '๐™‘' => 'V', + '๐™’' => 'W', + '๐™“' => 'X', + '๐™”' => 'Y', + '๐™•' => 'Z', + '๐™–' => 'a', + '๐™—' => 'b', + '๐™˜' => 'c', + '๐™™' => 'd', + '๐™š' => 'e', + '๐™›' => 'f', + '๐™œ' => 'g', + '๐™' => 'h', + '๐™ž' => 'i', + '๐™Ÿ' => 'j', + '๐™ ' => 'k', + '๐™ก' => 'l', + '๐™ข' => 'm', + '๐™ฃ' => 'n', + '๐™ค' => 'o', + '๐™ฅ' => 'p', + '๐™ฆ' => 'q', + '๐™ง' => 'r', + '๐™จ' => 's', + '๐™ฉ' => 't', + '๐™ช' => 'u', + '๐™ซ' => 'v', + '๐™ฌ' => 'w', + '๐™ญ' => 'x', + '๐™ฎ' => 'y', + '๐™ฏ' => 'z', + '๐™ฐ' => 'A', + '๐™ฑ' => 'B', + '๐™ฒ' => 'C', + '๐™ณ' => 'D', + '๐™ด' => 'E', + '๐™ต' => 'F', + '๐™ถ' => 'G', + '๐™ท' => 'H', + '๐™ธ' => 'I', + '๐™น' => 'J', + '๐™บ' => 'K', + '๐™ป' => 'L', + '๐™ผ' => 'M', + '๐™ฝ' => 'N', + '๐™พ' => 'O', + '๐™ฟ' => 'P', + '๐š€' => 'Q', + '๐š' => 'R', + '๐š‚' => 'S', + '๐šƒ' => 'T', + '๐š„' => 'U', + '๐š…' => 'V', + '๐š†' => 'W', + '๐š‡' => 'X', + '๐šˆ' => 'Y', + '๐š‰' => 'Z', + '๐šŠ' => 'a', + '๐š‹' => 'b', + '๐šŒ' => 'c', + '๐š' => 'd', + '๐šŽ' => 'e', + '๐š' => 'f', + '๐š' => 'g', + '๐š‘' => 'h', + '๐š’' => 'i', + '๐š“' => 'j', + '๐š”' => 'k', + '๐š•' => 'l', + '๐š–' => 'm', + '๐š—' => 'n', + '๐š˜' => 'o', + '๐š™' => 'p', + '๐šš' => 'q', + '๐š›' => 'r', + '๐šœ' => 's', + '๐š' => 't', + '๐šž' => 'u', + '๐šŸ' => 'v', + '๐š ' => 'w', + '๐šก' => 'x', + '๐šข' => 'y', + '๐šฃ' => 'z', + '๐šค' => 'ฤฑ', + '๐šฅ' => 'ศท', + '๐šจ' => 'ฮ‘', + '๐šฉ' => 'ฮ’', + '๐šช' => 'ฮ“', + '๐šซ' => 'ฮ”', + '๐šฌ' => 'ฮ•', + '๐šญ' => 'ฮ–', + '๐šฎ' => 'ฮ—', + '๐šฏ' => 'ฮ˜', + '๐šฐ' => 'ฮ™', + '๐šฑ' => 'ฮš', + '๐šฒ' => 'ฮ›', + '๐šณ' => 'ฮœ', + '๐šด' => 'ฮ', + '๐šต' => 'ฮž', + '๐šถ' => 'ฮŸ', + '๐šท' => 'ฮ ', + '๐šธ' => 'ฮก', + '๐šน' => 'ฮ˜', + '๐šบ' => 'ฮฃ', + '๐šป' => 'ฮค', + '๐šผ' => 'ฮฅ', + '๐šฝ' => 'ฮฆ', + '๐šพ' => 'ฮง', + '๐šฟ' => 'ฮจ', + '๐›€' => 'ฮฉ', + '๐›' => 'โˆ‡', + '๐›‚' => 'ฮฑ', + '๐›ƒ' => 'ฮฒ', + '๐›„' => 'ฮณ', + '๐›…' => 'ฮด', + '๐›†' => 'ฮต', + '๐›‡' => 'ฮถ', + '๐›ˆ' => 'ฮท', + '๐›‰' => 'ฮธ', + '๐›Š' => 'ฮน', + '๐›‹' => 'ฮบ', + '๐›Œ' => 'ฮป', + '๐›' => 'ฮผ', + '๐›Ž' => 'ฮฝ', + '๐›' => 'ฮพ', + '๐›' => 'ฮฟ', + '๐›‘' => 'ฯ€', + '๐›’' => 'ฯ', + '๐›“' => 'ฯ‚', + '๐›”' => 'ฯƒ', + '๐›•' => 'ฯ„', + '๐›–' => 'ฯ…', + '๐›—' => 'ฯ†', + '๐›˜' => 'ฯ‡', + '๐›™' => 'ฯˆ', + '๐›š' => 'ฯ‰', + '๐››' => 'โˆ‚', + '๐›œ' => 'ฮต', + '๐›' => 'ฮธ', + '๐›ž' => 'ฮบ', + '๐›Ÿ' => 'ฯ†', + '๐› ' => 'ฯ', + '๐›ก' => 'ฯ€', + '๐›ข' => 'ฮ‘', + '๐›ฃ' => 'ฮ’', + '๐›ค' => 'ฮ“', + '๐›ฅ' => 'ฮ”', + '๐›ฆ' => 'ฮ•', + '๐›ง' => 'ฮ–', + '๐›จ' => 'ฮ—', + '๐›ฉ' => 'ฮ˜', + '๐›ช' => 'ฮ™', + '๐›ซ' => 'ฮš', + '๐›ฌ' => 'ฮ›', + '๐›ญ' => 'ฮœ', + '๐›ฎ' => 'ฮ', + '๐›ฏ' => 'ฮž', + '๐›ฐ' => 'ฮŸ', + '๐›ฑ' => 'ฮ ', + '๐›ฒ' => 'ฮก', + '๐›ณ' => 'ฮ˜', + '๐›ด' => 'ฮฃ', + '๐›ต' => 'ฮค', + '๐›ถ' => 'ฮฅ', + '๐›ท' => 'ฮฆ', + '๐›ธ' => 'ฮง', + '๐›น' => 'ฮจ', + '๐›บ' => 'ฮฉ', + '๐›ป' => 'โˆ‡', + '๐›ผ' => 'ฮฑ', + '๐›ฝ' => 'ฮฒ', + '๐›พ' => 'ฮณ', + '๐›ฟ' => 'ฮด', + '๐œ€' => 'ฮต', + '๐œ' => 'ฮถ', + '๐œ‚' => 'ฮท', + '๐œƒ' => 'ฮธ', + '๐œ„' => 'ฮน', + '๐œ…' => 'ฮบ', + '๐œ†' => 'ฮป', + '๐œ‡' => 'ฮผ', + '๐œˆ' => 'ฮฝ', + '๐œ‰' => 'ฮพ', + '๐œŠ' => 'ฮฟ', + '๐œ‹' => 'ฯ€', + '๐œŒ' => 'ฯ', + '๐œ' => 'ฯ‚', + '๐œŽ' => 'ฯƒ', + '๐œ' => 'ฯ„', + '๐œ' => 'ฯ…', + '๐œ‘' => 'ฯ†', + '๐œ’' => 'ฯ‡', + '๐œ“' => 'ฯˆ', + '๐œ”' => 'ฯ‰', + '๐œ•' => 'โˆ‚', + '๐œ–' => 'ฮต', + '๐œ—' => 'ฮธ', + '๐œ˜' => 'ฮบ', + '๐œ™' => 'ฯ†', + '๐œš' => 'ฯ', + '๐œ›' => 'ฯ€', + '๐œœ' => 'ฮ‘', + '๐œ' => 'ฮ’', + '๐œž' => 'ฮ“', + '๐œŸ' => 'ฮ”', + '๐œ ' => 'ฮ•', + '๐œก' => 'ฮ–', + '๐œข' => 'ฮ—', + '๐œฃ' => 'ฮ˜', + '๐œค' => 'ฮ™', + '๐œฅ' => 'ฮš', + '๐œฆ' => 'ฮ›', + '๐œง' => 'ฮœ', + '๐œจ' => 'ฮ', + '๐œฉ' => 'ฮž', + '๐œช' => 'ฮŸ', + '๐œซ' => 'ฮ ', + '๐œฌ' => 'ฮก', + '๐œญ' => 'ฮ˜', + '๐œฎ' => 'ฮฃ', + '๐œฏ' => 'ฮค', + '๐œฐ' => 'ฮฅ', + '๐œฑ' => 'ฮฆ', + '๐œฒ' => 'ฮง', + '๐œณ' => 'ฮจ', + '๐œด' => 'ฮฉ', + '๐œต' => 'โˆ‡', + '๐œถ' => 'ฮฑ', + '๐œท' => 'ฮฒ', + '๐œธ' => 'ฮณ', + '๐œน' => 'ฮด', + '๐œบ' => 'ฮต', + '๐œป' => 'ฮถ', + '๐œผ' => 'ฮท', + '๐œฝ' => 'ฮธ', + '๐œพ' => 'ฮน', + '๐œฟ' => 'ฮบ', + '๐€' => 'ฮป', + '๐' => 'ฮผ', + '๐‚' => 'ฮฝ', + '๐ƒ' => 'ฮพ', + '๐„' => 'ฮฟ', + '๐…' => 'ฯ€', + '๐†' => 'ฯ', + '๐‡' => 'ฯ‚', + '๐ˆ' => 'ฯƒ', + '๐‰' => 'ฯ„', + '๐Š' => 'ฯ…', + '๐‹' => 'ฯ†', + '๐Œ' => 'ฯ‡', + '๐' => 'ฯˆ', + '๐Ž' => 'ฯ‰', + '๐' => 'โˆ‚', + '๐' => 'ฮต', + '๐‘' => 'ฮธ', + '๐’' => 'ฮบ', + '๐“' => 'ฯ†', + '๐”' => 'ฯ', + '๐•' => 'ฯ€', + '๐–' => 'ฮ‘', + '๐—' => 'ฮ’', + '๐˜' => 'ฮ“', + '๐™' => 'ฮ”', + '๐š' => 'ฮ•', + '๐›' => 'ฮ–', + '๐œ' => 'ฮ—', + '๐' => 'ฮ˜', + '๐ž' => 'ฮ™', + '๐Ÿ' => 'ฮš', + '๐ ' => 'ฮ›', + '๐ก' => 'ฮœ', + '๐ข' => 'ฮ', + '๐ฃ' => 'ฮž', + '๐ค' => 'ฮŸ', + '๐ฅ' => 'ฮ ', + '๐ฆ' => 'ฮก', + '๐ง' => 'ฮ˜', + '๐จ' => 'ฮฃ', + '๐ฉ' => 'ฮค', + '๐ช' => 'ฮฅ', + '๐ซ' => 'ฮฆ', + '๐ฌ' => 'ฮง', + '๐ญ' => 'ฮจ', + '๐ฎ' => 'ฮฉ', + '๐ฏ' => 'โˆ‡', + '๐ฐ' => 'ฮฑ', + '๐ฑ' => 'ฮฒ', + '๐ฒ' => 'ฮณ', + '๐ณ' => 'ฮด', + '๐ด' => 'ฮต', + '๐ต' => 'ฮถ', + '๐ถ' => 'ฮท', + '๐ท' => 'ฮธ', + '๐ธ' => 'ฮน', + '๐น' => 'ฮบ', + '๐บ' => 'ฮป', + '๐ป' => 'ฮผ', + '๐ผ' => 'ฮฝ', + '๐ฝ' => 'ฮพ', + '๐พ' => 'ฮฟ', + '๐ฟ' => 'ฯ€', + '๐ž€' => 'ฯ', + '๐ž' => 'ฯ‚', + '๐ž‚' => 'ฯƒ', + '๐žƒ' => 'ฯ„', + '๐ž„' => 'ฯ…', + '๐ž…' => 'ฯ†', + '๐ž†' => 'ฯ‡', + '๐ž‡' => 'ฯˆ', + '๐žˆ' => 'ฯ‰', + '๐ž‰' => 'โˆ‚', + '๐žŠ' => 'ฮต', + '๐ž‹' => 'ฮธ', + '๐žŒ' => 'ฮบ', + '๐ž' => 'ฯ†', + '๐žŽ' => 'ฯ', + '๐ž' => 'ฯ€', + '๐ž' => 'ฮ‘', + '๐ž‘' => 'ฮ’', + '๐ž’' => 'ฮ“', + '๐ž“' => 'ฮ”', + '๐ž”' => 'ฮ•', + '๐ž•' => 'ฮ–', + '๐ž–' => 'ฮ—', + '๐ž—' => 'ฮ˜', + '๐ž˜' => 'ฮ™', + '๐ž™' => 'ฮš', + '๐žš' => 'ฮ›', + '๐ž›' => 'ฮœ', + '๐žœ' => 'ฮ', + '๐ž' => 'ฮž', + '๐žž' => 'ฮŸ', + '๐žŸ' => 'ฮ ', + '๐ž ' => 'ฮก', + '๐žก' => 'ฮ˜', + '๐žข' => 'ฮฃ', + '๐žฃ' => 'ฮค', + '๐žค' => 'ฮฅ', + '๐žฅ' => 'ฮฆ', + '๐žฆ' => 'ฮง', + '๐žง' => 'ฮจ', + '๐žจ' => 'ฮฉ', + '๐žฉ' => 'โˆ‡', + '๐žช' => 'ฮฑ', + '๐žซ' => 'ฮฒ', + '๐žฌ' => 'ฮณ', + '๐žญ' => 'ฮด', + '๐žฎ' => 'ฮต', + '๐žฏ' => 'ฮถ', + '๐žฐ' => 'ฮท', + '๐žฑ' => 'ฮธ', + '๐žฒ' => 'ฮน', + '๐žณ' => 'ฮบ', + '๐žด' => 'ฮป', + '๐žต' => 'ฮผ', + '๐žถ' => 'ฮฝ', + '๐žท' => 'ฮพ', + '๐žธ' => 'ฮฟ', + '๐žน' => 'ฯ€', + '๐žบ' => 'ฯ', + '๐žป' => 'ฯ‚', + '๐žผ' => 'ฯƒ', + '๐žฝ' => 'ฯ„', + '๐žพ' => 'ฯ…', + '๐žฟ' => 'ฯ†', + '๐Ÿ€' => 'ฯ‡', + '๐Ÿ' => 'ฯˆ', + '๐Ÿ‚' => 'ฯ‰', + '๐Ÿƒ' => 'โˆ‚', + '๐Ÿ„' => 'ฮต', + '๐Ÿ…' => 'ฮธ', + '๐Ÿ†' => 'ฮบ', + '๐Ÿ‡' => 'ฯ†', + '๐Ÿˆ' => 'ฯ', + '๐Ÿ‰' => 'ฯ€', + '๐ŸŠ' => 'ฯœ', + '๐Ÿ‹' => 'ฯ', + '๐ŸŽ' => '0', + '๐Ÿ' => '1', + '๐Ÿ' => '2', + '๐Ÿ‘' => '3', + '๐Ÿ’' => '4', + '๐Ÿ“' => '5', + '๐Ÿ”' => '6', + '๐Ÿ•' => '7', + '๐Ÿ–' => '8', + '๐Ÿ—' => '9', + '๐Ÿ˜' => '0', + '๐Ÿ™' => '1', + '๐Ÿš' => '2', + '๐Ÿ›' => '3', + '๐Ÿœ' => '4', + '๐Ÿ' => '5', + '๐Ÿž' => '6', + '๐ŸŸ' => '7', + '๐Ÿ ' => '8', + '๐Ÿก' => '9', + '๐Ÿข' => '0', + '๐Ÿฃ' => '1', + '๐Ÿค' => '2', + '๐Ÿฅ' => '3', + '๐Ÿฆ' => '4', + '๐Ÿง' => '5', + '๐Ÿจ' => '6', + '๐Ÿฉ' => '7', + '๐Ÿช' => '8', + '๐Ÿซ' => '9', + '๐Ÿฌ' => '0', + '๐Ÿญ' => '1', + '๐Ÿฎ' => '2', + '๐Ÿฏ' => '3', + '๐Ÿฐ' => '4', + '๐Ÿฑ' => '5', + '๐Ÿฒ' => '6', + '๐Ÿณ' => '7', + '๐Ÿด' => '8', + '๐Ÿต' => '9', + '๐Ÿถ' => '0', + '๐Ÿท' => '1', + '๐Ÿธ' => '2', + '๐Ÿน' => '3', + '๐Ÿบ' => '4', + '๐Ÿป' => '5', + '๐Ÿผ' => '6', + '๐Ÿฝ' => '7', + '๐Ÿพ' => '8', + '๐Ÿฟ' => '9', + '๐žธ€' => 'ุง', + '๐žธ' => 'ุจ', + '๐žธ‚' => 'ุฌ', + '๐žธƒ' => 'ุฏ', + '๐žธ…' => 'ูˆ', + '๐žธ†' => 'ุฒ', + '๐žธ‡' => 'ุญ', + '๐žธˆ' => 'ุท', + '๐žธ‰' => 'ูŠ', + '๐žธŠ' => 'ูƒ', + '๐žธ‹' => 'ู„', + '๐žธŒ' => 'ู…', + '๐žธ' => 'ู†', + '๐žธŽ' => 'ุณ', + '๐žธ' => 'ุน', + '๐žธ' => 'ู', + '๐žธ‘' => 'ุต', + '๐žธ’' => 'ู‚', + '๐žธ“' => 'ุฑ', + '๐žธ”' => 'ุด', + '๐žธ•' => 'ุช', + '๐žธ–' => 'ุซ', + '๐žธ—' => 'ุฎ', + '๐žธ˜' => 'ุฐ', + '๐žธ™' => 'ุถ', + '๐žธš' => 'ุธ', + '๐žธ›' => 'ุบ', + '๐žธœ' => 'ูฎ', + '๐žธ' => 'ฺบ', + '๐žธž' => 'ฺก', + '๐žธŸ' => 'ูฏ', + '๐žธก' => 'ุจ', + '๐žธข' => 'ุฌ', + '๐žธค' => 'ู‡', + '๐žธง' => 'ุญ', + '๐žธฉ' => 'ูŠ', + '๐žธช' => 'ูƒ', + '๐žธซ' => 'ู„', + '๐žธฌ' => 'ู…', + '๐žธญ' => 'ู†', + '๐žธฎ' => 'ุณ', + '๐žธฏ' => 'ุน', + '๐žธฐ' => 'ู', + '๐žธฑ' => 'ุต', + '๐žธฒ' => 'ู‚', + '๐žธด' => 'ุด', + '๐žธต' => 'ุช', + '๐žธถ' => 'ุซ', + '๐žธท' => 'ุฎ', + '๐žธน' => 'ุถ', + '๐žธป' => 'ุบ', + '๐žน‚' => 'ุฌ', + '๐žน‡' => 'ุญ', + '๐žน‰' => 'ูŠ', + '๐žน‹' => 'ู„', + '๐žน' => 'ู†', + '๐žนŽ' => 'ุณ', + '๐žน' => 'ุน', + '๐žน‘' => 'ุต', + '๐žน’' => 'ู‚', + '๐žน”' => 'ุด', + '๐žน—' => 'ุฎ', + '๐žน™' => 'ุถ', + '๐žน›' => 'ุบ', + '๐žน' => 'ฺบ', + '๐žนŸ' => 'ูฏ', + '๐žนก' => 'ุจ', + '๐žนข' => 'ุฌ', + '๐žนค' => 'ู‡', + '๐žนง' => 'ุญ', + '๐žนจ' => 'ุท', + '๐žนฉ' => 'ูŠ', + '๐žนช' => 'ูƒ', + '๐žนฌ' => 'ู…', + '๐žนญ' => 'ู†', + '๐žนฎ' => 'ุณ', + '๐žนฏ' => 'ุน', + '๐žนฐ' => 'ู', + '๐žนฑ' => 'ุต', + '๐žนฒ' => 'ู‚', + '๐žนด' => 'ุด', + '๐žนต' => 'ุช', + '๐žนถ' => 'ุซ', + '๐žนท' => 'ุฎ', + '๐žนน' => 'ุถ', + '๐žนบ' => 'ุธ', + '๐žนป' => 'ุบ', + '๐žนผ' => 'ูฎ', + '๐žนพ' => 'ฺก', + '๐žบ€' => 'ุง', + '๐žบ' => 'ุจ', + '๐žบ‚' => 'ุฌ', + '๐žบƒ' => 'ุฏ', + '๐žบ„' => 'ู‡', + '๐žบ…' => 'ูˆ', + '๐žบ†' => 'ุฒ', + '๐žบ‡' => 'ุญ', + '๐žบˆ' => 'ุท', + '๐žบ‰' => 'ูŠ', + '๐žบ‹' => 'ู„', + '๐žบŒ' => 'ู…', + '๐žบ' => 'ู†', + '๐žบŽ' => 'ุณ', + '๐žบ' => 'ุน', + '๐žบ' => 'ู', + '๐žบ‘' => 'ุต', + '๐žบ’' => 'ู‚', + '๐žบ“' => 'ุฑ', + '๐žบ”' => 'ุด', + '๐žบ•' => 'ุช', + '๐žบ–' => 'ุซ', + '๐žบ—' => 'ุฎ', + '๐žบ˜' => 'ุฐ', + '๐žบ™' => 'ุถ', + '๐žบš' => 'ุธ', + '๐žบ›' => 'ุบ', + '๐žบก' => 'ุจ', + '๐žบข' => 'ุฌ', + '๐žบฃ' => 'ุฏ', + '๐žบฅ' => 'ูˆ', + '๐žบฆ' => 'ุฒ', + '๐žบง' => 'ุญ', + '๐žบจ' => 'ุท', + '๐žบฉ' => 'ูŠ', + '๐žบซ' => 'ู„', + '๐žบฌ' => 'ู…', + '๐žบญ' => 'ู†', + '๐žบฎ' => 'ุณ', + '๐žบฏ' => 'ุน', + '๐žบฐ' => 'ู', + '๐žบฑ' => 'ุต', + '๐žบฒ' => 'ู‚', + '๐žบณ' => 'ุฑ', + '๐žบด' => 'ุด', + '๐žบต' => 'ุช', + '๐žบถ' => 'ุซ', + '๐žบท' => 'ุฎ', + '๐žบธ' => 'ุฐ', + '๐žบน' => 'ุถ', + '๐žบบ' => 'ุธ', + '๐žบป' => 'ุบ', + '๐Ÿ„€' => '0.', + '๐Ÿ„' => '0,', + '๐Ÿ„‚' => '1,', + '๐Ÿ„ƒ' => '2,', + '๐Ÿ„„' => '3,', + '๐Ÿ„…' => '4,', + '๐Ÿ„†' => '5,', + '๐Ÿ„‡' => '6,', + '๐Ÿ„ˆ' => '7,', + '๐Ÿ„‰' => '8,', + '๐Ÿ„Š' => '9,', + '๐Ÿ„' => '(A)', + '๐Ÿ„‘' => '(B)', + '๐Ÿ„’' => '(C)', + '๐Ÿ„“' => '(D)', + '๐Ÿ„”' => '(E)', + '๐Ÿ„•' => '(F)', + '๐Ÿ„–' => '(G)', + '๐Ÿ„—' => '(H)', + '๐Ÿ„˜' => '(I)', + '๐Ÿ„™' => '(J)', + '๐Ÿ„š' => '(K)', + '๐Ÿ„›' => '(L)', + '๐Ÿ„œ' => '(M)', + '๐Ÿ„' => '(N)', + '๐Ÿ„ž' => '(O)', + '๐Ÿ„Ÿ' => '(P)', + '๐Ÿ„ ' => '(Q)', + '๐Ÿ„ก' => '(R)', + '๐Ÿ„ข' => '(S)', + '๐Ÿ„ฃ' => '(T)', + '๐Ÿ„ค' => '(U)', + '๐Ÿ„ฅ' => '(V)', + '๐Ÿ„ฆ' => '(W)', + '๐Ÿ„ง' => '(X)', + '๐Ÿ„จ' => '(Y)', + '๐Ÿ„ฉ' => '(Z)', + '๐Ÿ„ช' => 'ใ€”Sใ€•', + '๐Ÿ„ซ' => 'C', + '๐Ÿ„ฌ' => 'R', + '๐Ÿ„ญ' => 'CD', + '๐Ÿ„ฎ' => 'WZ', + '๐Ÿ„ฐ' => 'A', + '๐Ÿ„ฑ' => 'B', + '๐Ÿ„ฒ' => 'C', + '๐Ÿ„ณ' => 'D', + '๐Ÿ„ด' => 'E', + '๐Ÿ„ต' => 'F', + '๐Ÿ„ถ' => 'G', + '๐Ÿ„ท' => 'H', + '๐Ÿ„ธ' => 'I', + '๐Ÿ„น' => 'J', + '๐Ÿ„บ' => 'K', + '๐Ÿ„ป' => 'L', + '๐Ÿ„ผ' => 'M', + '๐Ÿ„ฝ' => 'N', + '๐Ÿ„พ' => 'O', + '๐Ÿ„ฟ' => 'P', + '๐Ÿ…€' => 'Q', + '๐Ÿ…' => 'R', + '๐Ÿ…‚' => 'S', + '๐Ÿ…ƒ' => 'T', + '๐Ÿ…„' => 'U', + '๐Ÿ……' => 'V', + '๐Ÿ…†' => 'W', + '๐Ÿ…‡' => 'X', + '๐Ÿ…ˆ' => 'Y', + '๐Ÿ…‰' => 'Z', + '๐Ÿ…Š' => 'HV', + '๐Ÿ…‹' => 'MV', + '๐Ÿ…Œ' => 'SD', + '๐Ÿ…' => 'SS', + '๐Ÿ…Ž' => 'PPV', + '๐Ÿ…' => 'WC', + '๐Ÿ…ช' => 'MC', + '๐Ÿ…ซ' => 'MD', + '๐Ÿ…ฌ' => 'MR', + '๐Ÿ†' => 'DJ', + '๐Ÿˆ€' => 'ใปใ‹', + '๐Ÿˆ' => 'ใ‚ณใ‚ณ', + '๐Ÿˆ‚' => 'ใ‚ต', + '๐Ÿˆ' => 'ๆ‰‹', + '๐Ÿˆ‘' => 'ๅญ—', + '๐Ÿˆ’' => 'ๅŒ', + '๐Ÿˆ“' => 'ใƒ†ใ‚™', + '๐Ÿˆ”' => 'ไบŒ', + '๐Ÿˆ•' => 'ๅคš', + '๐Ÿˆ–' => '่งฃ', + '๐Ÿˆ—' => 'ๅคฉ', + '๐Ÿˆ˜' => 'ไบค', + '๐Ÿˆ™' => 'ๆ˜ ', + '๐Ÿˆš' => '็„ก', + '๐Ÿˆ›' => 'ๆ–™', + '๐Ÿˆœ' => 'ๅ‰', + '๐Ÿˆ' => 'ๅพŒ', + '๐Ÿˆž' => 'ๅ†', + '๐ŸˆŸ' => 'ๆ–ฐ', + '๐Ÿˆ ' => 'ๅˆ', + '๐Ÿˆก' => '็ต‚', + '๐Ÿˆข' => '็”Ÿ', + '๐Ÿˆฃ' => '่ฒฉ', + '๐Ÿˆค' => 'ๅฃฐ', + '๐Ÿˆฅ' => 'ๅน', + '๐Ÿˆฆ' => 'ๆผ”', + '๐Ÿˆง' => 'ๆŠ•', + '๐Ÿˆจ' => 'ๆ•', + '๐Ÿˆฉ' => 'ไธ€', + '๐Ÿˆช' => 'ไธ‰', + '๐Ÿˆซ' => '้Š', + '๐Ÿˆฌ' => 'ๅทฆ', + '๐Ÿˆญ' => 'ไธญ', + '๐Ÿˆฎ' => 'ๅณ', + '๐Ÿˆฏ' => 'ๆŒ‡', + '๐Ÿˆฐ' => '่ตฐ', + '๐Ÿˆฑ' => 'ๆ‰“', + '๐Ÿˆฒ' => '็ฆ', + '๐Ÿˆณ' => '็ฉบ', + '๐Ÿˆด' => 'ๅˆ', + '๐Ÿˆต' => 'ๆบ€', + '๐Ÿˆถ' => 'ๆœ‰', + '๐Ÿˆท' => 'ๆœˆ', + '๐Ÿˆธ' => '็”ณ', + '๐Ÿˆน' => 'ๅ‰ฒ', + '๐Ÿˆบ' => 'ๅ–ถ', + '๐Ÿˆป' => '้…', + '๐Ÿ‰€' => 'ใ€”ๆœฌใ€•', + '๐Ÿ‰' => 'ใ€”ไธ‰ใ€•', + '๐Ÿ‰‚' => 'ใ€”ไบŒใ€•', + '๐Ÿ‰ƒ' => 'ใ€”ๅฎ‰ใ€•', + '๐Ÿ‰„' => 'ใ€”็‚นใ€•', + '๐Ÿ‰…' => 'ใ€”ๆ‰“ใ€•', + '๐Ÿ‰†' => 'ใ€”็›—ใ€•', + '๐Ÿ‰‡' => 'ใ€”ๅ‹ใ€•', + '๐Ÿ‰ˆ' => 'ใ€”ๆ•—ใ€•', + '๐Ÿ‰' => 'ๅพ—', + '๐Ÿ‰‘' => 'ๅฏ', + '๐Ÿฏฐ' => '0', + '๐Ÿฏฑ' => '1', + '๐Ÿฏฒ' => '2', + '๐Ÿฏณ' => '3', + '๐Ÿฏด' => '4', + '๐Ÿฏต' => '5', + '๐Ÿฏถ' => '6', + '๐Ÿฏท' => '7', + '๐Ÿฏธ' => '8', + '๐Ÿฏน' => '9', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/bootstrap.php b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/bootstrap.php new file mode 100644 index 0000000..3608e5c --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/bootstrap.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Normalizer as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('normalizer_is_normalized')) { + function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); } +} +if (!function_exists('normalizer_normalize')) { + function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php new file mode 100644 index 0000000..e36d1a9 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Normalizer as p; + +if (!function_exists('normalizer_is_normalized')) { + function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); } +} +if (!function_exists('normalizer_normalize')) { + function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/composer.json b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/composer.json new file mode 100644 index 0000000..1b93573 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-intl-normalizer/composer.json @@ -0,0 +1,36 @@ +{ + "name": "symfony/polyfill-intl-normalizer", + "type": "library", + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "normalizer"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, + "files": [ "bootstrap.php" ], + "classmap": [ "Resources/stubs" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/LICENSE b/tests/php_test_files/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..6e3afce --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-present Fabien Potencier + +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/symfony/polyfill-mbstring/Mbstring.php b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..1ad33a8 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,996 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * - mb_ucfirst - Make a string's first character uppercase + * - mb_lcfirst - Make a string's first character lowercase + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + public const MB_CASE_FOLD = \PHP_INT_MAX; + + private const SIMPLE_CASE_FOLD = [ + ['ยต', 'ลฟ', "\xCD\x85", 'ฯ‚', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], + ['ฮผ', 's', 'ฮน', 'ฯƒ', 'ฮฒ', 'ฮธ', 'ฯ†', 'ฯ€', 'ฮบ', 'ฯ', 'ฮต', "\xE1\xB9\xA1", 'ฮน'], + ]; + + private static $encodingList = ['ASCII', 'UTF-8']; + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($s)) { + if (PHP_VERSION_ID < 70200) { + trigger_error('mb_convert_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); + + return null; + } + + $r = []; + foreach ($s as $str) { + $r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding); + } + + return $r; + } + + if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) + { + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return self::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (\MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); + } else { + if (\MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + static $caseFolding = null; + if (null === $caseFolding) { + $caseFolding = self::getData('caseFolding'); + } + $s = strtr($s, $caseFolding); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $normalizedEncoding = self::getEncoding($encoding); + + if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) { + self::$internalEncoding = $normalizedEncoding; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($normalizedLang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $normalizedLang; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); + } + + public static function mb_list_encodings() + { + return ['UTF-8']; + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return ['utf8']; + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (\PHP_VERSION_ID < 70200 && \is_array($var)) { + trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); + + return null; + } + + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + if (!\is_array($var)) { + return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var); + } + + foreach ($var as $key => $value) { + if (!self::mb_check_encoding($key, $encoding)) { + return false; + } + if (!self::mb_check_encoding($value, $encoding)) { + return false; + } + } + + return true; + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + if (80000 > \PHP_VERSION_ID) { + trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); + + return false; + } + + return 0; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = '' !== $needle || 80000 > \PHP_VERSION_ID + ? iconv_strrpos($haystack, $needle, $encoding) + : self::mb_strlen($haystack, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + if (80000 > \PHP_VERSION_ID) { + trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); + + return false; + } + + throw new \ValueError('Argument #2 ($length) must be greater than 0'); + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + $rx = '/('; + while (65535 < $split_length) { + $rx .= '.{65535}'; + $split_length -= 65535; + } + $rx .= '.{'.$split_length.'})/us'; + + return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); + } + + $result = []; + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (null === $c) { + return 'none'; + } + if (0 === strcasecmp($c, 'none')) { + return true; + } + if (80000 > \PHP_VERSION_ID) { + return false; + } + if (\is_int($c) || 'long' === $c || 'entity' === $c) { + return false; + } + + throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + [$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [ + self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding), + self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding), + ]); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + $pos = strrpos($haystack, $needle); + } else { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + } + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding); + $needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding); + + $haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack); + $needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = [ + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ]; + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null): string + { + if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { + throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); + } + + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given'); + } + + if (self::mb_strlen($pad_string, $encoding) <= 0) { + throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string'); + } + + $paddingRequired = $length - self::mb_strlen($string, $encoding); + + if ($paddingRequired < 1) { + return $string; + } + + switch ($pad_type) { + case \STR_PAD_LEFT: + return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string; + case \STR_PAD_RIGHT: + return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); + default: + $leftPaddingLength = floor($paddingRequired / 2); + $rightPaddingLength = $paddingRequired - $leftPaddingLength; + + return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); + } + } + + public static function mb_ucfirst(string $string, ?string $encoding = null): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_ucfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); + } + + $firstChar = mb_substr($string, 0, 1, $encoding); + $firstChar = mb_convert_case($firstChar, \MB_CASE_TITLE, $encoding); + + return $firstChar.mb_substr($string, 1, null, $encoding); + } + + public static function mb_lcfirst(string $string, ?string $encoding = null): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_lcfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); + } + + $firstChar = mb_substr($string, 0, 1, $encoding); + $firstChar = mb_convert_case($firstChar, \MB_CASE_LOWER, $encoding); + + return $firstChar.mb_substr($string, 1, null, $encoding); + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } + + private static function assertEncoding(string $encoding, string $errorFormat): void + { + try { + $validEncoding = @self::mb_check_encoding('', $encoding); + } catch (\ValueError $e) { + throw new \ValueError(\sprintf($errorFormat, $encoding)); + } + + // BC for PHP 7.3 and lower + if (!$validEncoding) { + throw new \ValueError(\sprintf($errorFormat, $encoding)); + } + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/README.md b/tests/php_test_files/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 0000000..478b40d --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](https://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php new file mode 100644 index 0000000..512bba0 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php @@ -0,0 +1,119 @@ + 'iฬ‡', + 'ยต' => 'ฮผ', + 'ลฟ' => 's', + 'อ…' => 'ฮน', + 'ฯ‚' => 'ฯƒ', + 'ฯ' => 'ฮฒ', + 'ฯ‘' => 'ฮธ', + 'ฯ•' => 'ฯ†', + 'ฯ–' => 'ฯ€', + 'ฯฐ' => 'ฮบ', + 'ฯฑ' => 'ฯ', + 'ฯต' => 'ฮต', + 'แบ›' => 'แนก', + 'แพพ' => 'ฮน', + 'รŸ' => 'ss', + 'ล‰' => 'สผn', + 'วฐ' => 'วฐ', + 'ฮ' => 'ฮ', + 'ฮฐ' => 'ฮฐ', + 'ึ‡' => 'ีฅึ‚', + 'แบ–' => 'แบ–', + 'แบ—' => 'แบ—', + 'แบ˜' => 'แบ˜', + 'แบ™' => 'แบ™', + 'แบš' => 'aสพ', + 'แบž' => 'ss', + 'แฝ' => 'แฝ', + 'แฝ’' => 'แฝ’', + 'แฝ”' => 'แฝ”', + 'แฝ–' => 'แฝ–', + 'แพ€' => 'แผ€ฮน', + 'แพ' => 'แผฮน', + 'แพ‚' => 'แผ‚ฮน', + 'แพƒ' => 'แผƒฮน', + 'แพ„' => 'แผ„ฮน', + 'แพ…' => 'แผ…ฮน', + 'แพ†' => 'แผ†ฮน', + 'แพ‡' => 'แผ‡ฮน', + 'แพˆ' => 'แผ€ฮน', + 'แพ‰' => 'แผฮน', + 'แพŠ' => 'แผ‚ฮน', + 'แพ‹' => 'แผƒฮน', + 'แพŒ' => 'แผ„ฮน', + 'แพ' => 'แผ…ฮน', + 'แพŽ' => 'แผ†ฮน', + 'แพ' => 'แผ‡ฮน', + 'แพ' => 'แผ ฮน', + 'แพ‘' => 'แผกฮน', + 'แพ’' => 'แผขฮน', + 'แพ“' => 'แผฃฮน', + 'แพ”' => 'แผคฮน', + 'แพ•' => 'แผฅฮน', + 'แพ–' => 'แผฆฮน', + 'แพ—' => 'แผงฮน', + 'แพ˜' => 'แผ ฮน', + 'แพ™' => 'แผกฮน', + 'แพš' => 'แผขฮน', + 'แพ›' => 'แผฃฮน', + 'แพœ' => 'แผคฮน', + 'แพ' => 'แผฅฮน', + 'แพž' => 'แผฆฮน', + 'แพŸ' => 'แผงฮน', + 'แพ ' => 'แฝ ฮน', + 'แพก' => 'แฝกฮน', + 'แพข' => 'แฝขฮน', + 'แพฃ' => 'แฝฃฮน', + 'แพค' => 'แฝคฮน', + 'แพฅ' => 'แฝฅฮน', + 'แพฆ' => 'แฝฆฮน', + 'แพง' => 'แฝงฮน', + 'แพจ' => 'แฝ ฮน', + 'แพฉ' => 'แฝกฮน', + 'แพช' => 'แฝขฮน', + 'แพซ' => 'แฝฃฮน', + 'แพฌ' => 'แฝคฮน', + 'แพญ' => 'แฝฅฮน', + 'แพฎ' => 'แฝฆฮน', + 'แพฏ' => 'แฝงฮน', + 'แพฒ' => 'แฝฐฮน', + 'แพณ' => 'ฮฑฮน', + 'แพด' => 'ฮฌฮน', + 'แพถ' => 'แพถ', + 'แพท' => 'แพถฮน', + 'แพผ' => 'ฮฑฮน', + 'แฟ‚' => 'แฝดฮน', + 'แฟƒ' => 'ฮทฮน', + 'แฟ„' => 'ฮฎฮน', + 'แฟ†' => 'แฟ†', + 'แฟ‡' => 'แฟ†ฮน', + 'แฟŒ' => 'ฮทฮน', + 'แฟ’' => 'แฟ’', + 'แฟ–' => 'แฟ–', + 'แฟ—' => 'แฟ—', + 'แฟข' => 'แฟข', + 'แฟค' => 'แฟค', + 'แฟฆ' => 'แฟฆ', + 'แฟง' => 'แฟง', + 'แฟฒ' => 'แฝผฮน', + 'แฟณ' => 'ฯ‰ฮน', + 'แฟด' => 'ฯŽฮน', + 'แฟถ' => 'แฟถ', + 'แฟท' => 'แฟถฮน', + 'แฟผ' => 'ฯ‰ฮน', + '๏ฌ€' => 'ff', + '๏ฌ' => 'fi', + '๏ฌ‚' => 'fl', + '๏ฌƒ' => 'ffi', + '๏ฌ„' => 'ffl', + '๏ฌ…' => 'st', + '๏ฌ†' => 'st', + '๏ฌ“' => 'ีดีถ', + '๏ฌ”' => 'ีดีฅ', + '๏ฌ•' => 'ีดีซ', + '๏ฌ–' => 'ีพีถ', + '๏ฌ—' => 'ีดีญ', +]; diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..fac60b0 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1397 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'ร€' => 'ร ', + 'ร' => 'รก', + 'ร‚' => 'รข', + 'รƒ' => 'รฃ', + 'ร„' => 'รค', + 'ร…' => 'รฅ', + 'ร†' => 'รฆ', + 'ร‡' => 'รง', + 'รˆ' => 'รจ', + 'ร‰' => 'รฉ', + 'รŠ' => 'รช', + 'ร‹' => 'รซ', + 'รŒ' => 'รฌ', + 'ร' => 'รญ', + 'รŽ' => 'รฎ', + 'ร' => 'รฏ', + 'ร' => 'รฐ', + 'ร‘' => 'รฑ', + 'ร’' => 'รฒ', + 'ร“' => 'รณ', + 'ร”' => 'รด', + 'ร•' => 'รต', + 'ร–' => 'รถ', + 'ร˜' => 'รธ', + 'ร™' => 'รน', + 'รš' => 'รบ', + 'ร›' => 'รป', + 'รœ' => 'รผ', + 'ร' => 'รฝ', + 'รž' => 'รพ', + 'ฤ€' => 'ฤ', + 'ฤ‚' => 'ฤƒ', + 'ฤ„' => 'ฤ…', + 'ฤ†' => 'ฤ‡', + 'ฤˆ' => 'ฤ‰', + 'ฤŠ' => 'ฤ‹', + 'ฤŒ' => 'ฤ', + 'ฤŽ' => 'ฤ', + 'ฤ' => 'ฤ‘', + 'ฤ’' => 'ฤ“', + 'ฤ”' => 'ฤ•', + 'ฤ–' => 'ฤ—', + 'ฤ˜' => 'ฤ™', + 'ฤš' => 'ฤ›', + 'ฤœ' => 'ฤ', + 'ฤž' => 'ฤŸ', + 'ฤ ' => 'ฤก', + 'ฤข' => 'ฤฃ', + 'ฤค' => 'ฤฅ', + 'ฤฆ' => 'ฤง', + 'ฤจ' => 'ฤฉ', + 'ฤช' => 'ฤซ', + 'ฤฌ' => 'ฤญ', + 'ฤฎ' => 'ฤฏ', + 'ฤฐ' => 'iฬ‡', + 'ฤฒ' => 'ฤณ', + 'ฤด' => 'ฤต', + 'ฤถ' => 'ฤท', + 'ฤน' => 'ฤบ', + 'ฤป' => 'ฤผ', + 'ฤฝ' => 'ฤพ', + 'ฤฟ' => 'ล€', + 'ล' => 'ล‚', + 'ลƒ' => 'ล„', + 'ล…' => 'ล†', + 'ล‡' => 'ลˆ', + 'ลŠ' => 'ล‹', + 'ลŒ' => 'ล', + 'ลŽ' => 'ล', + 'ล' => 'ล‘', + 'ล’' => 'ล“', + 'ล”' => 'ล•', + 'ล–' => 'ล—', + 'ล˜' => 'ล™', + 'ลš' => 'ล›', + 'ลœ' => 'ล', + 'ลž' => 'ลŸ', + 'ล ' => 'ลก', + 'ลข' => 'ลฃ', + 'ลค' => 'ลฅ', + 'ลฆ' => 'ลง', + 'ลจ' => 'ลฉ', + 'ลช' => 'ลซ', + 'ลฌ' => 'ลญ', + 'ลฎ' => 'ลฏ', + 'ลฐ' => 'ลฑ', + 'ลฒ' => 'ลณ', + 'ลด' => 'ลต', + 'ลถ' => 'ลท', + 'ลธ' => 'รฟ', + 'ลน' => 'ลบ', + 'ลป' => 'ลผ', + 'ลฝ' => 'ลพ', + 'ฦ' => 'ษ“', + 'ฦ‚' => 'ฦƒ', + 'ฦ„' => 'ฦ…', + 'ฦ†' => 'ษ”', + 'ฦ‡' => 'ฦˆ', + 'ฦ‰' => 'ษ–', + 'ฦŠ' => 'ษ—', + 'ฦ‹' => 'ฦŒ', + 'ฦŽ' => 'ว', + 'ฦ' => 'ษ™', + 'ฦ' => 'ษ›', + 'ฦ‘' => 'ฦ’', + 'ฦ“' => 'ษ ', + 'ฦ”' => 'ษฃ', + 'ฦ–' => 'ษฉ', + 'ฦ—' => 'ษจ', + 'ฦ˜' => 'ฦ™', + 'ฦœ' => 'ษฏ', + 'ฦ' => 'ษฒ', + 'ฦŸ' => 'ษต', + 'ฦ ' => 'ฦก', + 'ฦข' => 'ฦฃ', + 'ฦค' => 'ฦฅ', + 'ฦฆ' => 'ส€', + 'ฦง' => 'ฦจ', + 'ฦฉ' => 'สƒ', + 'ฦฌ' => 'ฦญ', + 'ฦฎ' => 'สˆ', + 'ฦฏ' => 'ฦฐ', + 'ฦฑ' => 'สŠ', + 'ฦฒ' => 'ส‹', + 'ฦณ' => 'ฦด', + 'ฦต' => 'ฦถ', + 'ฦท' => 'ส’', + 'ฦธ' => 'ฦน', + 'ฦผ' => 'ฦฝ', + 'ว„' => 'ว†', + 'ว…' => 'ว†', + 'ว‡' => 'ว‰', + 'วˆ' => 'ว‰', + 'วŠ' => 'วŒ', + 'ว‹' => 'วŒ', + 'ว' => 'วŽ', + 'ว' => 'ว', + 'ว‘' => 'ว’', + 'ว“' => 'ว”', + 'ว•' => 'ว–', + 'ว—' => 'ว˜', + 'ว™' => 'วš', + 'ว›' => 'วœ', + 'วž' => 'วŸ', + 'ว ' => 'วก', + 'วข' => 'วฃ', + 'วค' => 'วฅ', + 'วฆ' => 'วง', + 'วจ' => 'วฉ', + 'วช' => 'วซ', + 'วฌ' => 'วญ', + 'วฎ' => 'วฏ', + 'วฑ' => 'วณ', + 'วฒ' => 'วณ', + 'วด' => 'วต', + 'วถ' => 'ฦ•', + 'วท' => 'ฦฟ', + 'วธ' => 'วน', + 'วบ' => 'วป', + 'วผ' => 'วฝ', + 'วพ' => 'วฟ', + 'ศ€' => 'ศ', + 'ศ‚' => 'ศƒ', + 'ศ„' => 'ศ…', + 'ศ†' => 'ศ‡', + 'ศˆ' => 'ศ‰', + 'ศŠ' => 'ศ‹', + 'ศŒ' => 'ศ', + 'ศŽ' => 'ศ', + 'ศ' => 'ศ‘', + 'ศ’' => 'ศ“', + 'ศ”' => 'ศ•', + 'ศ–' => 'ศ—', + 'ศ˜' => 'ศ™', + 'ศš' => 'ศ›', + 'ศœ' => 'ศ', + 'ศž' => 'ศŸ', + 'ศ ' => 'ฦž', + 'ศข' => 'ศฃ', + 'ศค' => 'ศฅ', + 'ศฆ' => 'ศง', + 'ศจ' => 'ศฉ', + 'ศช' => 'ศซ', + 'ศฌ' => 'ศญ', + 'ศฎ' => 'ศฏ', + 'ศฐ' => 'ศฑ', + 'ศฒ' => 'ศณ', + 'ศบ' => 'โฑฅ', + 'ศป' => 'ศผ', + 'ศฝ' => 'ฦš', + 'ศพ' => 'โฑฆ', + 'ษ' => 'ษ‚', + 'ษƒ' => 'ฦ€', + 'ษ„' => 'ส‰', + 'ษ…' => 'สŒ', + 'ษ†' => 'ษ‡', + 'ษˆ' => 'ษ‰', + 'ษŠ' => 'ษ‹', + 'ษŒ' => 'ษ', + 'ษŽ' => 'ษ', + 'อฐ' => 'อฑ', + 'อฒ' => 'อณ', + 'อถ' => 'อท', + 'อฟ' => 'ฯณ', + 'ฮ†' => 'ฮฌ', + 'ฮˆ' => 'ฮญ', + 'ฮ‰' => 'ฮฎ', + 'ฮŠ' => 'ฮฏ', + 'ฮŒ' => 'ฯŒ', + 'ฮŽ' => 'ฯ', + 'ฮ' => 'ฯŽ', + 'ฮ‘' => 'ฮฑ', + 'ฮ’' => 'ฮฒ', + 'ฮ“' => 'ฮณ', + 'ฮ”' => 'ฮด', + 'ฮ•' => 'ฮต', + 'ฮ–' => 'ฮถ', + 'ฮ—' => 'ฮท', + 'ฮ˜' => 'ฮธ', + 'ฮ™' => 'ฮน', + 'ฮš' => 'ฮบ', + 'ฮ›' => 'ฮป', + 'ฮœ' => 'ฮผ', + 'ฮ' => 'ฮฝ', + 'ฮž' => 'ฮพ', + 'ฮŸ' => 'ฮฟ', + 'ฮ ' => 'ฯ€', + 'ฮก' => 'ฯ', + 'ฮฃ' => 'ฯƒ', + 'ฮค' => 'ฯ„', + 'ฮฅ' => 'ฯ…', + 'ฮฆ' => 'ฯ†', + 'ฮง' => 'ฯ‡', + 'ฮจ' => 'ฯˆ', + 'ฮฉ' => 'ฯ‰', + 'ฮช' => 'ฯŠ', + 'ฮซ' => 'ฯ‹', + 'ฯ' => 'ฯ—', + 'ฯ˜' => 'ฯ™', + 'ฯš' => 'ฯ›', + 'ฯœ' => 'ฯ', + 'ฯž' => 'ฯŸ', + 'ฯ ' => 'ฯก', + 'ฯข' => 'ฯฃ', + 'ฯค' => 'ฯฅ', + 'ฯฆ' => 'ฯง', + 'ฯจ' => 'ฯฉ', + 'ฯช' => 'ฯซ', + 'ฯฌ' => 'ฯญ', + 'ฯฎ' => 'ฯฏ', + 'ฯด' => 'ฮธ', + 'ฯท' => 'ฯธ', + 'ฯน' => 'ฯฒ', + 'ฯบ' => 'ฯป', + 'ฯฝ' => 'อป', + 'ฯพ' => 'อผ', + 'ฯฟ' => 'อฝ', + 'ะ€' => 'ั', + 'ะ' => 'ั‘', + 'ะ‚' => 'ั’', + 'ะƒ' => 'ั“', + 'ะ„' => 'ั”', + 'ะ…' => 'ั•', + 'ะ†' => 'ั–', + 'ะ‡' => 'ั—', + 'ะˆ' => 'ั˜', + 'ะ‰' => 'ั™', + 'ะŠ' => 'ัš', + 'ะ‹' => 'ั›', + 'ะŒ' => 'ัœ', + 'ะ' => 'ั', + 'ะŽ' => 'ัž', + 'ะ' => 'ัŸ', + 'ะ' => 'ะฐ', + 'ะ‘' => 'ะฑ', + 'ะ’' => 'ะฒ', + 'ะ“' => 'ะณ', + 'ะ”' => 'ะด', + 'ะ•' => 'ะต', + 'ะ–' => 'ะถ', + 'ะ—' => 'ะท', + 'ะ˜' => 'ะธ', + 'ะ™' => 'ะน', + 'ะš' => 'ะบ', + 'ะ›' => 'ะป', + 'ะœ' => 'ะผ', + 'ะ' => 'ะฝ', + 'ะž' => 'ะพ', + 'ะŸ' => 'ะฟ', + 'ะ ' => 'ั€', + 'ะก' => 'ั', + 'ะข' => 'ั‚', + 'ะฃ' => 'ัƒ', + 'ะค' => 'ั„', + 'ะฅ' => 'ั…', + 'ะฆ' => 'ั†', + 'ะง' => 'ั‡', + 'ะจ' => 'ัˆ', + 'ะฉ' => 'ั‰', + 'ะช' => 'ัŠ', + 'ะซ' => 'ั‹', + 'ะฌ' => 'ัŒ', + 'ะญ' => 'ั', + 'ะฎ' => 'ัŽ', + 'ะฏ' => 'ั', + 'ั ' => 'ัก', + 'ัข' => 'ัฃ', + 'ัค' => 'ัฅ', + 'ัฆ' => 'ัง', + 'ัจ' => 'ัฉ', + 'ัช' => 'ัซ', + 'ัฌ' => 'ัญ', + 'ัฎ' => 'ัฏ', + 'ัฐ' => 'ัฑ', + 'ัฒ' => 'ัณ', + 'ัด' => 'ัต', + 'ัถ' => 'ัท', + 'ัธ' => 'ัน', + 'ับ' => 'ัป', + 'ัผ' => 'ัฝ', + 'ัพ' => 'ัฟ', + 'า€' => 'า', + 'าŠ' => 'า‹', + 'าŒ' => 'า', + 'าŽ' => 'า', + 'า' => 'า‘', + 'า’' => 'า“', + 'า”' => 'า•', + 'า–' => 'า—', + 'า˜' => 'า™', + 'าš' => 'า›', + 'าœ' => 'า', + 'าž' => 'าŸ', + 'า ' => 'าก', + 'าข' => 'าฃ', + 'าค' => 'าฅ', + 'าฆ' => 'าง', + 'าจ' => 'าฉ', + 'าช' => 'าซ', + 'าฌ' => 'าญ', + 'าฎ' => 'าฏ', + 'าฐ' => 'าฑ', + 'าฒ' => 'าณ', + 'าด' => 'าต', + 'าถ' => 'าท', + 'าธ' => 'าน', + 'าบ' => 'าป', + 'าผ' => 'าฝ', + 'าพ' => 'าฟ', + 'ำ€' => 'ำ', + 'ำ' => 'ำ‚', + 'ำƒ' => 'ำ„', + 'ำ…' => 'ำ†', + 'ำ‡' => 'ำˆ', + 'ำ‰' => 'ำŠ', + 'ำ‹' => 'ำŒ', + 'ำ' => 'ำŽ', + 'ำ' => 'ำ‘', + 'ำ’' => 'ำ“', + 'ำ”' => 'ำ•', + 'ำ–' => 'ำ—', + 'ำ˜' => 'ำ™', + 'ำš' => 'ำ›', + 'ำœ' => 'ำ', + 'ำž' => 'ำŸ', + 'ำ ' => 'ำก', + 'ำข' => 'ำฃ', + 'ำค' => 'ำฅ', + 'ำฆ' => 'ำง', + 'ำจ' => 'ำฉ', + 'ำช' => 'ำซ', + 'ำฌ' => 'ำญ', + 'ำฎ' => 'ำฏ', + 'ำฐ' => 'ำฑ', + 'ำฒ' => 'ำณ', + 'ำด' => 'ำต', + 'ำถ' => 'ำท', + 'ำธ' => 'ำน', + 'ำบ' => 'ำป', + 'ำผ' => 'ำฝ', + 'ำพ' => 'ำฟ', + 'ิ€' => 'ิ', + 'ิ‚' => 'ิƒ', + 'ิ„' => 'ิ…', + 'ิ†' => 'ิ‡', + 'ิˆ' => 'ิ‰', + 'ิŠ' => 'ิ‹', + 'ิŒ' => 'ิ', + 'ิŽ' => 'ิ', + 'ิ' => 'ิ‘', + 'ิ’' => 'ิ“', + 'ิ”' => 'ิ•', + 'ิ–' => 'ิ—', + 'ิ˜' => 'ิ™', + 'ิš' => 'ิ›', + 'ิœ' => 'ิ', + 'ิž' => 'ิŸ', + 'ิ ' => 'ิก', + 'ิข' => 'ิฃ', + 'ิค' => 'ิฅ', + 'ิฆ' => 'ิง', + 'ิจ' => 'ิฉ', + 'ิช' => 'ิซ', + 'ิฌ' => 'ิญ', + 'ิฎ' => 'ิฏ', + 'ิฑ' => 'ีก', + 'ิฒ' => 'ีข', + 'ิณ' => 'ีฃ', + 'ิด' => 'ีค', + 'ิต' => 'ีฅ', + 'ิถ' => 'ีฆ', + 'ิท' => 'ีง', + 'ิธ' => 'ีจ', + 'ิน' => 'ีฉ', + 'ิบ' => 'ีช', + 'ิป' => 'ีซ', + 'ิผ' => 'ีฌ', + 'ิฝ' => 'ีญ', + 'ิพ' => 'ีฎ', + 'ิฟ' => 'ีฏ', + 'ี€' => 'ีฐ', + 'ี' => 'ีฑ', + 'ี‚' => 'ีฒ', + 'ีƒ' => 'ีณ', + 'ี„' => 'ีด', + 'ี…' => 'ีต', + 'ี†' => 'ีถ', + 'ี‡' => 'ีท', + 'ีˆ' => 'ีธ', + 'ี‰' => 'ีน', + 'ีŠ' => 'ีบ', + 'ี‹' => 'ีป', + 'ีŒ' => 'ีผ', + 'ี' => 'ีฝ', + 'ีŽ' => 'ีพ', + 'ี' => 'ีฟ', + 'ี' => 'ึ€', + 'ี‘' => 'ึ', + 'ี’' => 'ึ‚', + 'ี“' => 'ึƒ', + 'ี”' => 'ึ„', + 'ี•' => 'ึ…', + 'ี–' => 'ึ†', + 'แ‚ ' => 'โด€', + 'แ‚ก' => 'โด', + 'แ‚ข' => 'โด‚', + 'แ‚ฃ' => 'โดƒ', + 'แ‚ค' => 'โด„', + 'แ‚ฅ' => 'โด…', + 'แ‚ฆ' => 'โด†', + 'แ‚ง' => 'โด‡', + 'แ‚จ' => 'โดˆ', + 'แ‚ฉ' => 'โด‰', + 'แ‚ช' => 'โดŠ', + 'แ‚ซ' => 'โด‹', + 'แ‚ฌ' => 'โดŒ', + 'แ‚ญ' => 'โด', + 'แ‚ฎ' => 'โดŽ', + 'แ‚ฏ' => 'โด', + 'แ‚ฐ' => 'โด', + 'แ‚ฑ' => 'โด‘', + 'แ‚ฒ' => 'โด’', + 'แ‚ณ' => 'โด“', + 'แ‚ด' => 'โด”', + 'แ‚ต' => 'โด•', + 'แ‚ถ' => 'โด–', + 'แ‚ท' => 'โด—', + 'แ‚ธ' => 'โด˜', + 'แ‚น' => 'โด™', + 'แ‚บ' => 'โดš', + 'แ‚ป' => 'โด›', + 'แ‚ผ' => 'โดœ', + 'แ‚ฝ' => 'โด', + 'แ‚พ' => 'โดž', + 'แ‚ฟ' => 'โดŸ', + 'แƒ€' => 'โด ', + 'แƒ' => 'โดก', + 'แƒ‚' => 'โดข', + 'แƒƒ' => 'โดฃ', + 'แƒ„' => 'โดค', + 'แƒ…' => 'โดฅ', + 'แƒ‡' => 'โดง', + 'แƒ' => 'โดญ', + 'แŽ ' => '๊ญฐ', + 'แŽก' => '๊ญฑ', + 'แŽข' => '๊ญฒ', + 'แŽฃ' => '๊ญณ', + 'แŽค' => '๊ญด', + 'แŽฅ' => '๊ญต', + 'แŽฆ' => '๊ญถ', + 'แŽง' => '๊ญท', + 'แŽจ' => '๊ญธ', + 'แŽฉ' => '๊ญน', + 'แŽช' => '๊ญบ', + 'แŽซ' => '๊ญป', + 'แŽฌ' => '๊ญผ', + 'แŽญ' => '๊ญฝ', + 'แŽฎ' => '๊ญพ', + 'แŽฏ' => '๊ญฟ', + 'แŽฐ' => '๊ฎ€', + 'แŽฑ' => '๊ฎ', + 'แŽฒ' => '๊ฎ‚', + 'แŽณ' => '๊ฎƒ', + 'แŽด' => '๊ฎ„', + 'แŽต' => '๊ฎ…', + 'แŽถ' => '๊ฎ†', + 'แŽท' => '๊ฎ‡', + 'แŽธ' => '๊ฎˆ', + 'แŽน' => '๊ฎ‰', + 'แŽบ' => '๊ฎŠ', + 'แŽป' => '๊ฎ‹', + 'แŽผ' => '๊ฎŒ', + 'แŽฝ' => '๊ฎ', + 'แŽพ' => '๊ฎŽ', + 'แŽฟ' => '๊ฎ', + 'แ€' => '๊ฎ', + 'แ' => '๊ฎ‘', + 'แ‚' => '๊ฎ’', + 'แƒ' => '๊ฎ“', + 'แ„' => '๊ฎ”', + 'แ…' => '๊ฎ•', + 'แ†' => '๊ฎ–', + 'แ‡' => '๊ฎ—', + 'แˆ' => '๊ฎ˜', + 'แ‰' => '๊ฎ™', + 'แŠ' => '๊ฎš', + 'แ‹' => '๊ฎ›', + 'แŒ' => '๊ฎœ', + 'แ' => '๊ฎ', + 'แŽ' => '๊ฎž', + 'แ' => '๊ฎŸ', + 'แ' => '๊ฎ ', + 'แ‘' => '๊ฎก', + 'แ’' => '๊ฎข', + 'แ“' => '๊ฎฃ', + 'แ”' => '๊ฎค', + 'แ•' => '๊ฎฅ', + 'แ–' => '๊ฎฆ', + 'แ—' => '๊ฎง', + 'แ˜' => '๊ฎจ', + 'แ™' => '๊ฎฉ', + 'แš' => '๊ฎช', + 'แ›' => '๊ฎซ', + 'แœ' => '๊ฎฌ', + 'แ' => '๊ฎญ', + 'แž' => '๊ฎฎ', + 'แŸ' => '๊ฎฏ', + 'แ ' => '๊ฎฐ', + 'แก' => '๊ฎฑ', + 'แข' => '๊ฎฒ', + 'แฃ' => '๊ฎณ', + 'แค' => '๊ฎด', + 'แฅ' => '๊ฎต', + 'แฆ' => '๊ฎถ', + 'แง' => '๊ฎท', + 'แจ' => '๊ฎธ', + 'แฉ' => '๊ฎน', + 'แช' => '๊ฎบ', + 'แซ' => '๊ฎป', + 'แฌ' => '๊ฎผ', + 'แญ' => '๊ฎฝ', + 'แฎ' => '๊ฎพ', + 'แฏ' => '๊ฎฟ', + 'แฐ' => 'แธ', + 'แฑ' => 'แน', + 'แฒ' => 'แบ', + 'แณ' => 'แป', + 'แด' => 'แผ', + 'แต' => 'แฝ', + 'แฒ' => 'แƒ', + 'แฒ‘' => 'แƒ‘', + 'แฒ’' => 'แƒ’', + 'แฒ“' => 'แƒ“', + 'แฒ”' => 'แƒ”', + 'แฒ•' => 'แƒ•', + 'แฒ–' => 'แƒ–', + 'แฒ—' => 'แƒ—', + 'แฒ˜' => 'แƒ˜', + 'แฒ™' => 'แƒ™', + 'แฒš' => 'แƒš', + 'แฒ›' => 'แƒ›', + 'แฒœ' => 'แƒœ', + 'แฒ' => 'แƒ', + 'แฒž' => 'แƒž', + 'แฒŸ' => 'แƒŸ', + 'แฒ ' => 'แƒ ', + 'แฒก' => 'แƒก', + 'แฒข' => 'แƒข', + 'แฒฃ' => 'แƒฃ', + 'แฒค' => 'แƒค', + 'แฒฅ' => 'แƒฅ', + 'แฒฆ' => 'แƒฆ', + 'แฒง' => 'แƒง', + 'แฒจ' => 'แƒจ', + 'แฒฉ' => 'แƒฉ', + 'แฒช' => 'แƒช', + 'แฒซ' => 'แƒซ', + 'แฒฌ' => 'แƒฌ', + 'แฒญ' => 'แƒญ', + 'แฒฎ' => 'แƒฎ', + 'แฒฏ' => 'แƒฏ', + 'แฒฐ' => 'แƒฐ', + 'แฒฑ' => 'แƒฑ', + 'แฒฒ' => 'แƒฒ', + 'แฒณ' => 'แƒณ', + 'แฒด' => 'แƒด', + 'แฒต' => 'แƒต', + 'แฒถ' => 'แƒถ', + 'แฒท' => 'แƒท', + 'แฒธ' => 'แƒธ', + 'แฒน' => 'แƒน', + 'แฒบ' => 'แƒบ', + 'แฒฝ' => 'แƒฝ', + 'แฒพ' => 'แƒพ', + 'แฒฟ' => 'แƒฟ', + 'แธ€' => 'แธ', + 'แธ‚' => 'แธƒ', + 'แธ„' => 'แธ…', + 'แธ†' => 'แธ‡', + 'แธˆ' => 'แธ‰', + 'แธŠ' => 'แธ‹', + 'แธŒ' => 'แธ', + 'แธŽ' => 'แธ', + 'แธ' => 'แธ‘', + 'แธ’' => 'แธ“', + 'แธ”' => 'แธ•', + 'แธ–' => 'แธ—', + 'แธ˜' => 'แธ™', + 'แธš' => 'แธ›', + 'แธœ' => 'แธ', + 'แธž' => 'แธŸ', + 'แธ ' => 'แธก', + 'แธข' => 'แธฃ', + 'แธค' => 'แธฅ', + 'แธฆ' => 'แธง', + 'แธจ' => 'แธฉ', + 'แธช' => 'แธซ', + 'แธฌ' => 'แธญ', + 'แธฎ' => 'แธฏ', + 'แธฐ' => 'แธฑ', + 'แธฒ' => 'แธณ', + 'แธด' => 'แธต', + 'แธถ' => 'แธท', + 'แธธ' => 'แธน', + 'แธบ' => 'แธป', + 'แธผ' => 'แธฝ', + 'แธพ' => 'แธฟ', + 'แน€' => 'แน', + 'แน‚' => 'แนƒ', + 'แน„' => 'แน…', + 'แน†' => 'แน‡', + 'แนˆ' => 'แน‰', + 'แนŠ' => 'แน‹', + 'แนŒ' => 'แน', + 'แนŽ' => 'แน', + 'แน' => 'แน‘', + 'แน’' => 'แน“', + 'แน”' => 'แน•', + 'แน–' => 'แน—', + 'แน˜' => 'แน™', + 'แนš' => 'แน›', + 'แนœ' => 'แน', + 'แนž' => 'แนŸ', + 'แน ' => 'แนก', + 'แนข' => 'แนฃ', + 'แนค' => 'แนฅ', + 'แนฆ' => 'แนง', + 'แนจ' => 'แนฉ', + 'แนช' => 'แนซ', + 'แนฌ' => 'แนญ', + 'แนฎ' => 'แนฏ', + 'แนฐ' => 'แนฑ', + 'แนฒ' => 'แนณ', + 'แนด' => 'แนต', + 'แนถ' => 'แนท', + 'แนธ' => 'แนน', + 'แนบ' => 'แนป', + 'แนผ' => 'แนฝ', + 'แนพ' => 'แนฟ', + 'แบ€' => 'แบ', + 'แบ‚' => 'แบƒ', + 'แบ„' => 'แบ…', + 'แบ†' => 'แบ‡', + 'แบˆ' => 'แบ‰', + 'แบŠ' => 'แบ‹', + 'แบŒ' => 'แบ', + 'แบŽ' => 'แบ', + 'แบ' => 'แบ‘', + 'แบ’' => 'แบ“', + 'แบ”' => 'แบ•', + 'แบž' => 'รŸ', + 'แบ ' => 'แบก', + 'แบข' => 'แบฃ', + 'แบค' => 'แบฅ', + 'แบฆ' => 'แบง', + 'แบจ' => 'แบฉ', + 'แบช' => 'แบซ', + 'แบฌ' => 'แบญ', + 'แบฎ' => 'แบฏ', + 'แบฐ' => 'แบฑ', + 'แบฒ' => 'แบณ', + 'แบด' => 'แบต', + 'แบถ' => 'แบท', + 'แบธ' => 'แบน', + 'แบบ' => 'แบป', + 'แบผ' => 'แบฝ', + 'แบพ' => 'แบฟ', + 'แป€' => 'แป', + 'แป‚' => 'แปƒ', + 'แป„' => 'แป…', + 'แป†' => 'แป‡', + 'แปˆ' => 'แป‰', + 'แปŠ' => 'แป‹', + 'แปŒ' => 'แป', + 'แปŽ' => 'แป', + 'แป' => 'แป‘', + 'แป’' => 'แป“', + 'แป”' => 'แป•', + 'แป–' => 'แป—', + 'แป˜' => 'แป™', + 'แปš' => 'แป›', + 'แปœ' => 'แป', + 'แปž' => 'แปŸ', + 'แป ' => 'แปก', + 'แปข' => 'แปฃ', + 'แปค' => 'แปฅ', + 'แปฆ' => 'แปง', + 'แปจ' => 'แปฉ', + 'แปช' => 'แปซ', + 'แปฌ' => 'แปญ', + 'แปฎ' => 'แปฏ', + 'แปฐ' => 'แปฑ', + 'แปฒ' => 'แปณ', + 'แปด' => 'แปต', + 'แปถ' => 'แปท', + 'แปธ' => 'แปน', + 'แปบ' => 'แปป', + 'แปผ' => 'แปฝ', + 'แปพ' => 'แปฟ', + 'แผˆ' => 'แผ€', + 'แผ‰' => 'แผ', + 'แผŠ' => 'แผ‚', + 'แผ‹' => 'แผƒ', + 'แผŒ' => 'แผ„', + 'แผ' => 'แผ…', + 'แผŽ' => 'แผ†', + 'แผ' => 'แผ‡', + 'แผ˜' => 'แผ', + 'แผ™' => 'แผ‘', + 'แผš' => 'แผ’', + 'แผ›' => 'แผ“', + 'แผœ' => 'แผ”', + 'แผ' => 'แผ•', + 'แผจ' => 'แผ ', + 'แผฉ' => 'แผก', + 'แผช' => 'แผข', + 'แผซ' => 'แผฃ', + 'แผฌ' => 'แผค', + 'แผญ' => 'แผฅ', + 'แผฎ' => 'แผฆ', + 'แผฏ' => 'แผง', + 'แผธ' => 'แผฐ', + 'แผน' => 'แผฑ', + 'แผบ' => 'แผฒ', + 'แผป' => 'แผณ', + 'แผผ' => 'แผด', + 'แผฝ' => 'แผต', + 'แผพ' => 'แผถ', + 'แผฟ' => 'แผท', + 'แฝˆ' => 'แฝ€', + 'แฝ‰' => 'แฝ', + 'แฝŠ' => 'แฝ‚', + 'แฝ‹' => 'แฝƒ', + 'แฝŒ' => 'แฝ„', + 'แฝ' => 'แฝ…', + 'แฝ™' => 'แฝ‘', + 'แฝ›' => 'แฝ“', + 'แฝ' => 'แฝ•', + 'แฝŸ' => 'แฝ—', + 'แฝจ' => 'แฝ ', + 'แฝฉ' => 'แฝก', + 'แฝช' => 'แฝข', + 'แฝซ' => 'แฝฃ', + 'แฝฌ' => 'แฝค', + 'แฝญ' => 'แฝฅ', + 'แฝฎ' => 'แฝฆ', + 'แฝฏ' => 'แฝง', + 'แพˆ' => 'แพ€', + 'แพ‰' => 'แพ', + 'แพŠ' => 'แพ‚', + 'แพ‹' => 'แพƒ', + 'แพŒ' => 'แพ„', + 'แพ' => 'แพ…', + 'แพŽ' => 'แพ†', + 'แพ' => 'แพ‡', + 'แพ˜' => 'แพ', + 'แพ™' => 'แพ‘', + 'แพš' => 'แพ’', + 'แพ›' => 'แพ“', + 'แพœ' => 'แพ”', + 'แพ' => 'แพ•', + 'แพž' => 'แพ–', + 'แพŸ' => 'แพ—', + 'แพจ' => 'แพ ', + 'แพฉ' => 'แพก', + 'แพช' => 'แพข', + 'แพซ' => 'แพฃ', + 'แพฌ' => 'แพค', + 'แพญ' => 'แพฅ', + 'แพฎ' => 'แพฆ', + 'แพฏ' => 'แพง', + 'แพธ' => 'แพฐ', + 'แพน' => 'แพฑ', + 'แพบ' => 'แฝฐ', + 'แพป' => 'แฝฑ', + 'แพผ' => 'แพณ', + 'แฟˆ' => 'แฝฒ', + 'แฟ‰' => 'แฝณ', + 'แฟŠ' => 'แฝด', + 'แฟ‹' => 'แฝต', + 'แฟŒ' => 'แฟƒ', + 'แฟ˜' => 'แฟ', + 'แฟ™' => 'แฟ‘', + 'แฟš' => 'แฝถ', + 'แฟ›' => 'แฝท', + 'แฟจ' => 'แฟ ', + 'แฟฉ' => 'แฟก', + 'แฟช' => 'แฝบ', + 'แฟซ' => 'แฝป', + 'แฟฌ' => 'แฟฅ', + 'แฟธ' => 'แฝธ', + 'แฟน' => 'แฝน', + 'แฟบ' => 'แฝผ', + 'แฟป' => 'แฝฝ', + 'แฟผ' => 'แฟณ', + 'โ„ฆ' => 'ฯ‰', + 'โ„ช' => 'k', + 'โ„ซ' => 'รฅ', + 'โ„ฒ' => 'โ…Ž', + 'โ… ' => 'โ…ฐ', + 'โ…ก' => 'โ…ฑ', + 'โ…ข' => 'โ…ฒ', + 'โ…ฃ' => 'โ…ณ', + 'โ…ค' => 'โ…ด', + 'โ…ฅ' => 'โ…ต', + 'โ…ฆ' => 'โ…ถ', + 'โ…ง' => 'โ…ท', + 'โ…จ' => 'โ…ธ', + 'โ…ฉ' => 'โ…น', + 'โ…ช' => 'โ…บ', + 'โ…ซ' => 'โ…ป', + 'โ…ฌ' => 'โ…ผ', + 'โ…ญ' => 'โ…ฝ', + 'โ…ฎ' => 'โ…พ', + 'โ…ฏ' => 'โ…ฟ', + 'โ†ƒ' => 'โ†„', + 'โ’ถ' => 'โ“', + 'โ’ท' => 'โ“‘', + 'โ’ธ' => 'โ“’', + 'โ’น' => 'โ““', + 'โ’บ' => 'โ“”', + 'โ’ป' => 'โ“•', + 'โ’ผ' => 'โ“–', + 'โ’ฝ' => 'โ“—', + 'โ’พ' => 'โ“˜', + 'โ’ฟ' => 'โ“™', + 'โ“€' => 'โ“š', + 'โ“' => 'โ“›', + 'โ“‚' => 'โ“œ', + 'โ“ƒ' => 'โ“', + 'โ“„' => 'โ“ž', + 'โ“…' => 'โ“Ÿ', + 'โ“†' => 'โ“ ', + 'โ“‡' => 'โ“ก', + 'โ“ˆ' => 'โ“ข', + 'โ“‰' => 'โ“ฃ', + 'โ“Š' => 'โ“ค', + 'โ“‹' => 'โ“ฅ', + 'โ“Œ' => 'โ“ฆ', + 'โ“' => 'โ“ง', + 'โ“Ž' => 'โ“จ', + 'โ“' => 'โ“ฉ', + 'โฐ€' => 'โฐฐ', + 'โฐ' => 'โฐฑ', + 'โฐ‚' => 'โฐฒ', + 'โฐƒ' => 'โฐณ', + 'โฐ„' => 'โฐด', + 'โฐ…' => 'โฐต', + 'โฐ†' => 'โฐถ', + 'โฐ‡' => 'โฐท', + 'โฐˆ' => 'โฐธ', + 'โฐ‰' => 'โฐน', + 'โฐŠ' => 'โฐบ', + 'โฐ‹' => 'โฐป', + 'โฐŒ' => 'โฐผ', + 'โฐ' => 'โฐฝ', + 'โฐŽ' => 'โฐพ', + 'โฐ' => 'โฐฟ', + 'โฐ' => 'โฑ€', + 'โฐ‘' => 'โฑ', + 'โฐ’' => 'โฑ‚', + 'โฐ“' => 'โฑƒ', + 'โฐ”' => 'โฑ„', + 'โฐ•' => 'โฑ…', + 'โฐ–' => 'โฑ†', + 'โฐ—' => 'โฑ‡', + 'โฐ˜' => 'โฑˆ', + 'โฐ™' => 'โฑ‰', + 'โฐš' => 'โฑŠ', + 'โฐ›' => 'โฑ‹', + 'โฐœ' => 'โฑŒ', + 'โฐ' => 'โฑ', + 'โฐž' => 'โฑŽ', + 'โฐŸ' => 'โฑ', + 'โฐ ' => 'โฑ', + 'โฐก' => 'โฑ‘', + 'โฐข' => 'โฑ’', + 'โฐฃ' => 'โฑ“', + 'โฐค' => 'โฑ”', + 'โฐฅ' => 'โฑ•', + 'โฐฆ' => 'โฑ–', + 'โฐง' => 'โฑ—', + 'โฐจ' => 'โฑ˜', + 'โฐฉ' => 'โฑ™', + 'โฐช' => 'โฑš', + 'โฐซ' => 'โฑ›', + 'โฐฌ' => 'โฑœ', + 'โฐญ' => 'โฑ', + 'โฐฎ' => 'โฑž', + 'โฑ ' => 'โฑก', + 'โฑข' => 'ษซ', + 'โฑฃ' => 'แตฝ', + 'โฑค' => 'ษฝ', + 'โฑง' => 'โฑจ', + 'โฑฉ' => 'โฑช', + 'โฑซ' => 'โฑฌ', + 'โฑญ' => 'ษ‘', + 'โฑฎ' => 'ษฑ', + 'โฑฏ' => 'ษ', + 'โฑฐ' => 'ษ’', + 'โฑฒ' => 'โฑณ', + 'โฑต' => 'โฑถ', + 'โฑพ' => 'ศฟ', + 'โฑฟ' => 'ษ€', + 'โฒ€' => 'โฒ', + 'โฒ‚' => 'โฒƒ', + 'โฒ„' => 'โฒ…', + 'โฒ†' => 'โฒ‡', + 'โฒˆ' => 'โฒ‰', + 'โฒŠ' => 'โฒ‹', + 'โฒŒ' => 'โฒ', + 'โฒŽ' => 'โฒ', + 'โฒ' => 'โฒ‘', + 'โฒ’' => 'โฒ“', + 'โฒ”' => 'โฒ•', + 'โฒ–' => 'โฒ—', + 'โฒ˜' => 'โฒ™', + 'โฒš' => 'โฒ›', + 'โฒœ' => 'โฒ', + 'โฒž' => 'โฒŸ', + 'โฒ ' => 'โฒก', + 'โฒข' => 'โฒฃ', + 'โฒค' => 'โฒฅ', + 'โฒฆ' => 'โฒง', + 'โฒจ' => 'โฒฉ', + 'โฒช' => 'โฒซ', + 'โฒฌ' => 'โฒญ', + 'โฒฎ' => 'โฒฏ', + 'โฒฐ' => 'โฒฑ', + 'โฒฒ' => 'โฒณ', + 'โฒด' => 'โฒต', + 'โฒถ' => 'โฒท', + 'โฒธ' => 'โฒน', + 'โฒบ' => 'โฒป', + 'โฒผ' => 'โฒฝ', + 'โฒพ' => 'โฒฟ', + 'โณ€' => 'โณ', + 'โณ‚' => 'โณƒ', + 'โณ„' => 'โณ…', + 'โณ†' => 'โณ‡', + 'โณˆ' => 'โณ‰', + 'โณŠ' => 'โณ‹', + 'โณŒ' => 'โณ', + 'โณŽ' => 'โณ', + 'โณ' => 'โณ‘', + 'โณ’' => 'โณ“', + 'โณ”' => 'โณ•', + 'โณ–' => 'โณ—', + 'โณ˜' => 'โณ™', + 'โณš' => 'โณ›', + 'โณœ' => 'โณ', + 'โณž' => 'โณŸ', + 'โณ ' => 'โณก', + 'โณข' => 'โณฃ', + 'โณซ' => 'โณฌ', + 'โณญ' => 'โณฎ', + 'โณฒ' => 'โณณ', + '๊™€' => '๊™', + '๊™‚' => '๊™ƒ', + '๊™„' => '๊™…', + '๊™†' => '๊™‡', + '๊™ˆ' => '๊™‰', + '๊™Š' => '๊™‹', + '๊™Œ' => '๊™', + '๊™Ž' => '๊™', + '๊™' => '๊™‘', + '๊™’' => '๊™“', + '๊™”' => '๊™•', + '๊™–' => '๊™—', + '๊™˜' => '๊™™', + '๊™š' => '๊™›', + '๊™œ' => '๊™', + '๊™ž' => '๊™Ÿ', + '๊™ ' => '๊™ก', + '๊™ข' => '๊™ฃ', + '๊™ค' => '๊™ฅ', + '๊™ฆ' => '๊™ง', + '๊™จ' => '๊™ฉ', + '๊™ช' => '๊™ซ', + '๊™ฌ' => '๊™ญ', + '๊š€' => '๊š', + '๊š‚' => '๊šƒ', + '๊š„' => '๊š…', + '๊š†' => '๊š‡', + '๊šˆ' => '๊š‰', + '๊šŠ' => '๊š‹', + '๊šŒ' => '๊š', + '๊šŽ' => '๊š', + '๊š' => '๊š‘', + '๊š’' => '๊š“', + '๊š”' => '๊š•', + '๊š–' => '๊š—', + '๊š˜' => '๊š™', + '๊šš' => '๊š›', + '๊œข' => '๊œฃ', + '๊œค' => '๊œฅ', + '๊œฆ' => '๊œง', + '๊œจ' => '๊œฉ', + '๊œช' => '๊œซ', + '๊œฌ' => '๊œญ', + '๊œฎ' => '๊œฏ', + '๊œฒ' => '๊œณ', + '๊œด' => '๊œต', + '๊œถ' => '๊œท', + '๊œธ' => '๊œน', + '๊œบ' => '๊œป', + '๊œผ' => '๊œฝ', + '๊œพ' => '๊œฟ', + '๊€' => '๊', + '๊‚' => '๊ƒ', + '๊„' => '๊…', + '๊†' => '๊‡', + '๊ˆ' => '๊‰', + '๊Š' => '๊‹', + '๊Œ' => '๊', + '๊Ž' => '๊', + '๊' => '๊‘', + '๊’' => '๊“', + '๊”' => '๊•', + '๊–' => '๊—', + '๊˜' => '๊™', + '๊š' => '๊›', + '๊œ' => '๊', + '๊ž' => '๊Ÿ', + '๊ ' => '๊ก', + '๊ข' => '๊ฃ', + '๊ค' => '๊ฅ', + '๊ฆ' => '๊ง', + '๊จ' => '๊ฉ', + '๊ช' => '๊ซ', + '๊ฌ' => '๊ญ', + '๊ฎ' => '๊ฏ', + '๊น' => '๊บ', + '๊ป' => '๊ผ', + '๊ฝ' => 'แตน', + '๊พ' => '๊ฟ', + '๊ž€' => '๊ž', + '๊ž‚' => '๊žƒ', + '๊ž„' => '๊ž…', + '๊ž†' => '๊ž‡', + '๊ž‹' => '๊žŒ', + '๊ž' => 'ษฅ', + '๊ž' => '๊ž‘', + '๊ž’' => '๊ž“', + '๊ž–' => '๊ž—', + '๊ž˜' => '๊ž™', + '๊žš' => '๊ž›', + '๊žœ' => '๊ž', + '๊žž' => '๊žŸ', + '๊ž ' => '๊žก', + '๊žข' => '๊žฃ', + '๊žค' => '๊žฅ', + '๊žฆ' => '๊žง', + '๊žจ' => '๊žฉ', + '๊žช' => 'ษฆ', + '๊žซ' => 'ษœ', + '๊žฌ' => 'ษก', + '๊žญ' => 'ษฌ', + '๊žฎ' => 'ษช', + '๊žฐ' => 'สž', + '๊žฑ' => 'ส‡', + '๊žฒ' => 'ส', + '๊žณ' => '๊ญ“', + '๊žด' => '๊žต', + '๊žถ' => '๊žท', + '๊žธ' => '๊žน', + '๊žบ' => '๊žป', + '๊žผ' => '๊žฝ', + '๊žพ' => '๊žฟ', + '๊Ÿ‚' => '๊Ÿƒ', + '๊Ÿ„' => '๊ž”', + '๊Ÿ…' => 'ส‚', + '๊Ÿ†' => 'แถŽ', + '๊Ÿ‡' => '๊Ÿˆ', + '๊Ÿ‰' => '๊ŸŠ', + '๊Ÿต' => '๊Ÿถ', + '๏ผก' => '๏ฝ', + '๏ผข' => '๏ฝ‚', + '๏ผฃ' => '๏ฝƒ', + '๏ผค' => '๏ฝ„', + '๏ผฅ' => '๏ฝ…', + '๏ผฆ' => '๏ฝ†', + '๏ผง' => '๏ฝ‡', + '๏ผจ' => '๏ฝˆ', + '๏ผฉ' => '๏ฝ‰', + '๏ผช' => '๏ฝŠ', + '๏ผซ' => '๏ฝ‹', + '๏ผฌ' => '๏ฝŒ', + '๏ผญ' => '๏ฝ', + '๏ผฎ' => '๏ฝŽ', + '๏ผฏ' => '๏ฝ', + '๏ผฐ' => '๏ฝ', + '๏ผฑ' => '๏ฝ‘', + '๏ผฒ' => '๏ฝ’', + '๏ผณ' => '๏ฝ“', + '๏ผด' => '๏ฝ”', + '๏ผต' => '๏ฝ•', + '๏ผถ' => '๏ฝ–', + '๏ผท' => '๏ฝ—', + '๏ผธ' => '๏ฝ˜', + '๏ผน' => '๏ฝ™', + '๏ผบ' => '๏ฝš', + '๐€' => '๐จ', + '๐' => '๐ฉ', + '๐‚' => '๐ช', + '๐ƒ' => '๐ซ', + '๐„' => '๐ฌ', + '๐…' => '๐ญ', + '๐†' => '๐ฎ', + '๐‡' => '๐ฏ', + '๐ˆ' => '๐ฐ', + '๐‰' => '๐ฑ', + '๐Š' => '๐ฒ', + '๐‹' => '๐ณ', + '๐Œ' => '๐ด', + '๐' => '๐ต', + '๐Ž' => '๐ถ', + '๐' => '๐ท', + '๐' => '๐ธ', + '๐‘' => '๐น', + '๐’' => '๐บ', + '๐“' => '๐ป', + '๐”' => '๐ผ', + '๐•' => '๐ฝ', + '๐–' => '๐พ', + '๐—' => '๐ฟ', + '๐˜' => '๐‘€', + '๐™' => '๐‘', + '๐š' => '๐‘‚', + '๐›' => '๐‘ƒ', + '๐œ' => '๐‘„', + '๐' => '๐‘…', + '๐ž' => '๐‘†', + '๐Ÿ' => '๐‘‡', + '๐ ' => '๐‘ˆ', + '๐ก' => '๐‘‰', + '๐ข' => '๐‘Š', + '๐ฃ' => '๐‘‹', + '๐ค' => '๐‘Œ', + '๐ฅ' => '๐‘', + '๐ฆ' => '๐‘Ž', + '๐ง' => '๐‘', + '๐’ฐ' => '๐“˜', + '๐’ฑ' => '๐“™', + '๐’ฒ' => '๐“š', + '๐’ณ' => '๐“›', + '๐’ด' => '๐“œ', + '๐’ต' => '๐“', + '๐’ถ' => '๐“ž', + '๐’ท' => '๐“Ÿ', + '๐’ธ' => '๐“ ', + '๐’น' => '๐“ก', + '๐’บ' => '๐“ข', + '๐’ป' => '๐“ฃ', + '๐’ผ' => '๐“ค', + '๐’ฝ' => '๐“ฅ', + '๐’พ' => '๐“ฆ', + '๐’ฟ' => '๐“ง', + '๐“€' => '๐“จ', + '๐“' => '๐“ฉ', + '๐“‚' => '๐“ช', + '๐“ƒ' => '๐“ซ', + '๐“„' => '๐“ฌ', + '๐“…' => '๐“ญ', + '๐“†' => '๐“ฎ', + '๐“‡' => '๐“ฏ', + '๐“ˆ' => '๐“ฐ', + '๐“‰' => '๐“ฑ', + '๐“Š' => '๐“ฒ', + '๐“‹' => '๐“ณ', + '๐“Œ' => '๐“ด', + '๐“' => '๐“ต', + '๐“Ž' => '๐“ถ', + '๐“' => '๐“ท', + '๐“' => '๐“ธ', + '๐“‘' => '๐“น', + '๐“’' => '๐“บ', + '๐““' => '๐“ป', + '๐ฒ€' => '๐ณ€', + '๐ฒ' => '๐ณ', + '๐ฒ‚' => '๐ณ‚', + '๐ฒƒ' => '๐ณƒ', + '๐ฒ„' => '๐ณ„', + '๐ฒ…' => '๐ณ…', + '๐ฒ†' => '๐ณ†', + '๐ฒ‡' => '๐ณ‡', + '๐ฒˆ' => '๐ณˆ', + '๐ฒ‰' => '๐ณ‰', + '๐ฒŠ' => '๐ณŠ', + '๐ฒ‹' => '๐ณ‹', + '๐ฒŒ' => '๐ณŒ', + '๐ฒ' => '๐ณ', + '๐ฒŽ' => '๐ณŽ', + '๐ฒ' => '๐ณ', + '๐ฒ' => '๐ณ', + '๐ฒ‘' => '๐ณ‘', + '๐ฒ’' => '๐ณ’', + '๐ฒ“' => '๐ณ“', + '๐ฒ”' => '๐ณ”', + '๐ฒ•' => '๐ณ•', + '๐ฒ–' => '๐ณ–', + '๐ฒ—' => '๐ณ—', + '๐ฒ˜' => '๐ณ˜', + '๐ฒ™' => '๐ณ™', + '๐ฒš' => '๐ณš', + '๐ฒ›' => '๐ณ›', + '๐ฒœ' => '๐ณœ', + '๐ฒ' => '๐ณ', + '๐ฒž' => '๐ณž', + '๐ฒŸ' => '๐ณŸ', + '๐ฒ ' => '๐ณ ', + '๐ฒก' => '๐ณก', + '๐ฒข' => '๐ณข', + '๐ฒฃ' => '๐ณฃ', + '๐ฒค' => '๐ณค', + '๐ฒฅ' => '๐ณฅ', + '๐ฒฆ' => '๐ณฆ', + '๐ฒง' => '๐ณง', + '๐ฒจ' => '๐ณจ', + '๐ฒฉ' => '๐ณฉ', + '๐ฒช' => '๐ณช', + '๐ฒซ' => '๐ณซ', + '๐ฒฌ' => '๐ณฌ', + '๐ฒญ' => '๐ณญ', + '๐ฒฎ' => '๐ณฎ', + '๐ฒฏ' => '๐ณฏ', + '๐ฒฐ' => '๐ณฐ', + '๐ฒฑ' => '๐ณฑ', + '๐ฒฒ' => '๐ณฒ', + '๐‘ข ' => '๐‘ฃ€', + '๐‘ขก' => '๐‘ฃ', + '๐‘ขข' => '๐‘ฃ‚', + '๐‘ขฃ' => '๐‘ฃƒ', + '๐‘ขค' => '๐‘ฃ„', + '๐‘ขฅ' => '๐‘ฃ…', + '๐‘ขฆ' => '๐‘ฃ†', + '๐‘ขง' => '๐‘ฃ‡', + '๐‘ขจ' => '๐‘ฃˆ', + '๐‘ขฉ' => '๐‘ฃ‰', + '๐‘ขช' => '๐‘ฃŠ', + '๐‘ขซ' => '๐‘ฃ‹', + '๐‘ขฌ' => '๐‘ฃŒ', + '๐‘ขญ' => '๐‘ฃ', + '๐‘ขฎ' => '๐‘ฃŽ', + '๐‘ขฏ' => '๐‘ฃ', + '๐‘ขฐ' => '๐‘ฃ', + '๐‘ขฑ' => '๐‘ฃ‘', + '๐‘ขฒ' => '๐‘ฃ’', + '๐‘ขณ' => '๐‘ฃ“', + '๐‘ขด' => '๐‘ฃ”', + '๐‘ขต' => '๐‘ฃ•', + '๐‘ขถ' => '๐‘ฃ–', + '๐‘ขท' => '๐‘ฃ—', + '๐‘ขธ' => '๐‘ฃ˜', + '๐‘ขน' => '๐‘ฃ™', + '๐‘ขบ' => '๐‘ฃš', + '๐‘ขป' => '๐‘ฃ›', + '๐‘ขผ' => '๐‘ฃœ', + '๐‘ขฝ' => '๐‘ฃ', + '๐‘ขพ' => '๐‘ฃž', + '๐‘ขฟ' => '๐‘ฃŸ', + '๐–น€' => '๐–น ', + '๐–น' => '๐–นก', + '๐–น‚' => '๐–นข', + '๐–นƒ' => '๐–นฃ', + '๐–น„' => '๐–นค', + '๐–น…' => '๐–นฅ', + '๐–น†' => '๐–นฆ', + '๐–น‡' => '๐–นง', + '๐–นˆ' => '๐–นจ', + '๐–น‰' => '๐–นฉ', + '๐–นŠ' => '๐–นช', + '๐–น‹' => '๐–นซ', + '๐–นŒ' => '๐–นฌ', + '๐–น' => '๐–นญ', + '๐–นŽ' => '๐–นฎ', + '๐–น' => '๐–นฏ', + '๐–น' => '๐–นฐ', + '๐–น‘' => '๐–นฑ', + '๐–น’' => '๐–นฒ', + '๐–น“' => '๐–นณ', + '๐–น”' => '๐–นด', + '๐–น•' => '๐–นต', + '๐–น–' => '๐–นถ', + '๐–น—' => '๐–นท', + '๐–น˜' => '๐–นธ', + '๐–น™' => '๐–นน', + '๐–นš' => '๐–นบ', + '๐–น›' => '๐–นป', + '๐–นœ' => '๐–นผ', + '๐–น' => '๐–นฝ', + '๐–นž' => '๐–นพ', + '๐–นŸ' => '๐–นฟ', + '๐žค€' => '๐žคข', + '๐žค' => '๐žคฃ', + '๐žค‚' => '๐žคค', + '๐žคƒ' => '๐žคฅ', + '๐žค„' => '๐žคฆ', + '๐žค…' => '๐žคง', + '๐žค†' => '๐žคจ', + '๐žค‡' => '๐žคฉ', + '๐žคˆ' => '๐žคช', + '๐žค‰' => '๐žคซ', + '๐žคŠ' => '๐žคฌ', + '๐žค‹' => '๐žคญ', + '๐žคŒ' => '๐žคฎ', + '๐žค' => '๐žคฏ', + '๐žคŽ' => '๐žคฐ', + '๐žค' => '๐žคฑ', + '๐žค' => '๐žคฒ', + '๐žค‘' => '๐žคณ', + '๐žค’' => '๐žคด', + '๐žค“' => '๐žคต', + '๐žค”' => '๐žคถ', + '๐žค•' => '๐žคท', + '๐žค–' => '๐žคธ', + '๐žค—' => '๐žคน', + '๐žค˜' => '๐žคบ', + '๐žค™' => '๐žคป', + '๐žคš' => '๐žคผ', + '๐žค›' => '๐žคฝ', + '๐žคœ' => '๐žคพ', + '๐žค' => '๐žคฟ', + '๐žคž' => '๐žฅ€', + '๐žคŸ' => '๐žฅ', + '๐žค ' => '๐žฅ‚', + '๐žคก' => '๐žฅƒ', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..2a8f6e7 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'ยต' => 'ฮœ', + 'ร ' => 'ร€', + 'รก' => 'ร', + 'รข' => 'ร‚', + 'รฃ' => 'รƒ', + 'รค' => 'ร„', + 'รฅ' => 'ร…', + 'รฆ' => 'ร†', + 'รง' => 'ร‡', + 'รจ' => 'รˆ', + 'รฉ' => 'ร‰', + 'รช' => 'รŠ', + 'รซ' => 'ร‹', + 'รฌ' => 'รŒ', + 'รญ' => 'ร', + 'รฎ' => 'รŽ', + 'รฏ' => 'ร', + 'รฐ' => 'ร', + 'รฑ' => 'ร‘', + 'รฒ' => 'ร’', + 'รณ' => 'ร“', + 'รด' => 'ร”', + 'รต' => 'ร•', + 'รถ' => 'ร–', + 'รธ' => 'ร˜', + 'รน' => 'ร™', + 'รบ' => 'รš', + 'รป' => 'ร›', + 'รผ' => 'รœ', + 'รฝ' => 'ร', + 'รพ' => 'รž', + 'รฟ' => 'ลธ', + 'ฤ' => 'ฤ€', + 'ฤƒ' => 'ฤ‚', + 'ฤ…' => 'ฤ„', + 'ฤ‡' => 'ฤ†', + 'ฤ‰' => 'ฤˆ', + 'ฤ‹' => 'ฤŠ', + 'ฤ' => 'ฤŒ', + 'ฤ' => 'ฤŽ', + 'ฤ‘' => 'ฤ', + 'ฤ“' => 'ฤ’', + 'ฤ•' => 'ฤ”', + 'ฤ—' => 'ฤ–', + 'ฤ™' => 'ฤ˜', + 'ฤ›' => 'ฤš', + 'ฤ' => 'ฤœ', + 'ฤŸ' => 'ฤž', + 'ฤก' => 'ฤ ', + 'ฤฃ' => 'ฤข', + 'ฤฅ' => 'ฤค', + 'ฤง' => 'ฤฆ', + 'ฤฉ' => 'ฤจ', + 'ฤซ' => 'ฤช', + 'ฤญ' => 'ฤฌ', + 'ฤฏ' => 'ฤฎ', + 'ฤฑ' => 'I', + 'ฤณ' => 'ฤฒ', + 'ฤต' => 'ฤด', + 'ฤท' => 'ฤถ', + 'ฤบ' => 'ฤน', + 'ฤผ' => 'ฤป', + 'ฤพ' => 'ฤฝ', + 'ล€' => 'ฤฟ', + 'ล‚' => 'ล', + 'ล„' => 'ลƒ', + 'ล†' => 'ล…', + 'ลˆ' => 'ล‡', + 'ล‹' => 'ลŠ', + 'ล' => 'ลŒ', + 'ล' => 'ลŽ', + 'ล‘' => 'ล', + 'ล“' => 'ล’', + 'ล•' => 'ล”', + 'ล—' => 'ล–', + 'ล™' => 'ล˜', + 'ล›' => 'ลš', + 'ล' => 'ลœ', + 'ลŸ' => 'ลž', + 'ลก' => 'ล ', + 'ลฃ' => 'ลข', + 'ลฅ' => 'ลค', + 'ลง' => 'ลฆ', + 'ลฉ' => 'ลจ', + 'ลซ' => 'ลช', + 'ลญ' => 'ลฌ', + 'ลฏ' => 'ลฎ', + 'ลฑ' => 'ลฐ', + 'ลณ' => 'ลฒ', + 'ลต' => 'ลด', + 'ลท' => 'ลถ', + 'ลบ' => 'ลน', + 'ลผ' => 'ลป', + 'ลพ' => 'ลฝ', + 'ลฟ' => 'S', + 'ฦ€' => 'ษƒ', + 'ฦƒ' => 'ฦ‚', + 'ฦ…' => 'ฦ„', + 'ฦˆ' => 'ฦ‡', + 'ฦŒ' => 'ฦ‹', + 'ฦ’' => 'ฦ‘', + 'ฦ•' => 'วถ', + 'ฦ™' => 'ฦ˜', + 'ฦš' => 'ศฝ', + 'ฦž' => 'ศ ', + 'ฦก' => 'ฦ ', + 'ฦฃ' => 'ฦข', + 'ฦฅ' => 'ฦค', + 'ฦจ' => 'ฦง', + 'ฦญ' => 'ฦฌ', + 'ฦฐ' => 'ฦฏ', + 'ฦด' => 'ฦณ', + 'ฦถ' => 'ฦต', + 'ฦน' => 'ฦธ', + 'ฦฝ' => 'ฦผ', + 'ฦฟ' => 'วท', + 'ว…' => 'ว„', + 'ว†' => 'ว„', + 'วˆ' => 'ว‡', + 'ว‰' => 'ว‡', + 'ว‹' => 'วŠ', + 'วŒ' => 'วŠ', + 'วŽ' => 'ว', + 'ว' => 'ว', + 'ว’' => 'ว‘', + 'ว”' => 'ว“', + 'ว–' => 'ว•', + 'ว˜' => 'ว—', + 'วš' => 'ว™', + 'วœ' => 'ว›', + 'ว' => 'ฦŽ', + 'วŸ' => 'วž', + 'วก' => 'ว ', + 'วฃ' => 'วข', + 'วฅ' => 'วค', + 'วง' => 'วฆ', + 'วฉ' => 'วจ', + 'วซ' => 'วช', + 'วญ' => 'วฌ', + 'วฏ' => 'วฎ', + 'วฒ' => 'วฑ', + 'วณ' => 'วฑ', + 'วต' => 'วด', + 'วน' => 'วธ', + 'วป' => 'วบ', + 'วฝ' => 'วผ', + 'วฟ' => 'วพ', + 'ศ' => 'ศ€', + 'ศƒ' => 'ศ‚', + 'ศ…' => 'ศ„', + 'ศ‡' => 'ศ†', + 'ศ‰' => 'ศˆ', + 'ศ‹' => 'ศŠ', + 'ศ' => 'ศŒ', + 'ศ' => 'ศŽ', + 'ศ‘' => 'ศ', + 'ศ“' => 'ศ’', + 'ศ•' => 'ศ”', + 'ศ—' => 'ศ–', + 'ศ™' => 'ศ˜', + 'ศ›' => 'ศš', + 'ศ' => 'ศœ', + 'ศŸ' => 'ศž', + 'ศฃ' => 'ศข', + 'ศฅ' => 'ศค', + 'ศง' => 'ศฆ', + 'ศฉ' => 'ศจ', + 'ศซ' => 'ศช', + 'ศญ' => 'ศฌ', + 'ศฏ' => 'ศฎ', + 'ศฑ' => 'ศฐ', + 'ศณ' => 'ศฒ', + 'ศผ' => 'ศป', + 'ศฟ' => 'โฑพ', + 'ษ€' => 'โฑฟ', + 'ษ‚' => 'ษ', + 'ษ‡' => 'ษ†', + 'ษ‰' => 'ษˆ', + 'ษ‹' => 'ษŠ', + 'ษ' => 'ษŒ', + 'ษ' => 'ษŽ', + 'ษ' => 'โฑฏ', + 'ษ‘' => 'โฑญ', + 'ษ’' => 'โฑฐ', + 'ษ“' => 'ฦ', + 'ษ”' => 'ฦ†', + 'ษ–' => 'ฦ‰', + 'ษ—' => 'ฦŠ', + 'ษ™' => 'ฦ', + 'ษ›' => 'ฦ', + 'ษœ' => '๊žซ', + 'ษ ' => 'ฦ“', + 'ษก' => '๊žฌ', + 'ษฃ' => 'ฦ”', + 'ษฅ' => '๊ž', + 'ษฆ' => '๊žช', + 'ษจ' => 'ฦ—', + 'ษฉ' => 'ฦ–', + 'ษช' => '๊žฎ', + 'ษซ' => 'โฑข', + 'ษฌ' => '๊žญ', + 'ษฏ' => 'ฦœ', + 'ษฑ' => 'โฑฎ', + 'ษฒ' => 'ฦ', + 'ษต' => 'ฦŸ', + 'ษฝ' => 'โฑค', + 'ส€' => 'ฦฆ', + 'ส‚' => '๊Ÿ…', + 'สƒ' => 'ฦฉ', + 'ส‡' => '๊žฑ', + 'สˆ' => 'ฦฎ', + 'ส‰' => 'ษ„', + 'สŠ' => 'ฦฑ', + 'ส‹' => 'ฦฒ', + 'สŒ' => 'ษ…', + 'ส’' => 'ฦท', + 'ส' => '๊žฒ', + 'สž' => '๊žฐ', + 'อ…' => 'ฮ™', + 'อฑ' => 'อฐ', + 'อณ' => 'อฒ', + 'อท' => 'อถ', + 'อป' => 'ฯฝ', + 'อผ' => 'ฯพ', + 'อฝ' => 'ฯฟ', + 'ฮฌ' => 'ฮ†', + 'ฮญ' => 'ฮˆ', + 'ฮฎ' => 'ฮ‰', + 'ฮฏ' => 'ฮŠ', + 'ฮฑ' => 'ฮ‘', + 'ฮฒ' => 'ฮ’', + 'ฮณ' => 'ฮ“', + 'ฮด' => 'ฮ”', + 'ฮต' => 'ฮ•', + 'ฮถ' => 'ฮ–', + 'ฮท' => 'ฮ—', + 'ฮธ' => 'ฮ˜', + 'ฮน' => 'ฮ™', + 'ฮบ' => 'ฮš', + 'ฮป' => 'ฮ›', + 'ฮผ' => 'ฮœ', + 'ฮฝ' => 'ฮ', + 'ฮพ' => 'ฮž', + 'ฮฟ' => 'ฮŸ', + 'ฯ€' => 'ฮ ', + 'ฯ' => 'ฮก', + 'ฯ‚' => 'ฮฃ', + 'ฯƒ' => 'ฮฃ', + 'ฯ„' => 'ฮค', + 'ฯ…' => 'ฮฅ', + 'ฯ†' => 'ฮฆ', + 'ฯ‡' => 'ฮง', + 'ฯˆ' => 'ฮจ', + 'ฯ‰' => 'ฮฉ', + 'ฯŠ' => 'ฮช', + 'ฯ‹' => 'ฮซ', + 'ฯŒ' => 'ฮŒ', + 'ฯ' => 'ฮŽ', + 'ฯŽ' => 'ฮ', + 'ฯ' => 'ฮ’', + 'ฯ‘' => 'ฮ˜', + 'ฯ•' => 'ฮฆ', + 'ฯ–' => 'ฮ ', + 'ฯ—' => 'ฯ', + 'ฯ™' => 'ฯ˜', + 'ฯ›' => 'ฯš', + 'ฯ' => 'ฯœ', + 'ฯŸ' => 'ฯž', + 'ฯก' => 'ฯ ', + 'ฯฃ' => 'ฯข', + 'ฯฅ' => 'ฯค', + 'ฯง' => 'ฯฆ', + 'ฯฉ' => 'ฯจ', + 'ฯซ' => 'ฯช', + 'ฯญ' => 'ฯฌ', + 'ฯฏ' => 'ฯฎ', + 'ฯฐ' => 'ฮš', + 'ฯฑ' => 'ฮก', + 'ฯฒ' => 'ฯน', + 'ฯณ' => 'อฟ', + 'ฯต' => 'ฮ•', + 'ฯธ' => 'ฯท', + 'ฯป' => 'ฯบ', + 'ะฐ' => 'ะ', + 'ะฑ' => 'ะ‘', + 'ะฒ' => 'ะ’', + 'ะณ' => 'ะ“', + 'ะด' => 'ะ”', + 'ะต' => 'ะ•', + 'ะถ' => 'ะ–', + 'ะท' => 'ะ—', + 'ะธ' => 'ะ˜', + 'ะน' => 'ะ™', + 'ะบ' => 'ะš', + 'ะป' => 'ะ›', + 'ะผ' => 'ะœ', + 'ะฝ' => 'ะ', + 'ะพ' => 'ะž', + 'ะฟ' => 'ะŸ', + 'ั€' => 'ะ ', + 'ั' => 'ะก', + 'ั‚' => 'ะข', + 'ัƒ' => 'ะฃ', + 'ั„' => 'ะค', + 'ั…' => 'ะฅ', + 'ั†' => 'ะฆ', + 'ั‡' => 'ะง', + 'ัˆ' => 'ะจ', + 'ั‰' => 'ะฉ', + 'ัŠ' => 'ะช', + 'ั‹' => 'ะซ', + 'ัŒ' => 'ะฌ', + 'ั' => 'ะญ', + 'ัŽ' => 'ะฎ', + 'ั' => 'ะฏ', + 'ั' => 'ะ€', + 'ั‘' => 'ะ', + 'ั’' => 'ะ‚', + 'ั“' => 'ะƒ', + 'ั”' => 'ะ„', + 'ั•' => 'ะ…', + 'ั–' => 'ะ†', + 'ั—' => 'ะ‡', + 'ั˜' => 'ะˆ', + 'ั™' => 'ะ‰', + 'ัš' => 'ะŠ', + 'ั›' => 'ะ‹', + 'ัœ' => 'ะŒ', + 'ั' => 'ะ', + 'ัž' => 'ะŽ', + 'ัŸ' => 'ะ', + 'ัก' => 'ั ', + 'ัฃ' => 'ัข', + 'ัฅ' => 'ัค', + 'ัง' => 'ัฆ', + 'ัฉ' => 'ัจ', + 'ัซ' => 'ัช', + 'ัญ' => 'ัฌ', + 'ัฏ' => 'ัฎ', + 'ัฑ' => 'ัฐ', + 'ัณ' => 'ัฒ', + 'ัต' => 'ัด', + 'ัท' => 'ัถ', + 'ัน' => 'ัธ', + 'ัป' => 'ับ', + 'ัฝ' => 'ัผ', + 'ัฟ' => 'ัพ', + 'า' => 'า€', + 'า‹' => 'าŠ', + 'า' => 'าŒ', + 'า' => 'าŽ', + 'า‘' => 'า', + 'า“' => 'า’', + 'า•' => 'า”', + 'า—' => 'า–', + 'า™' => 'า˜', + 'า›' => 'าš', + 'า' => 'าœ', + 'าŸ' => 'าž', + 'าก' => 'า ', + 'าฃ' => 'าข', + 'าฅ' => 'าค', + 'าง' => 'าฆ', + 'าฉ' => 'าจ', + 'าซ' => 'าช', + 'าญ' => 'าฌ', + 'าฏ' => 'าฎ', + 'าฑ' => 'าฐ', + 'าณ' => 'าฒ', + 'าต' => 'าด', + 'าท' => 'าถ', + 'าน' => 'าธ', + 'าป' => 'าบ', + 'าฝ' => 'าผ', + 'าฟ' => 'าพ', + 'ำ‚' => 'ำ', + 'ำ„' => 'ำƒ', + 'ำ†' => 'ำ…', + 'ำˆ' => 'ำ‡', + 'ำŠ' => 'ำ‰', + 'ำŒ' => 'ำ‹', + 'ำŽ' => 'ำ', + 'ำ' => 'ำ€', + 'ำ‘' => 'ำ', + 'ำ“' => 'ำ’', + 'ำ•' => 'ำ”', + 'ำ—' => 'ำ–', + 'ำ™' => 'ำ˜', + 'ำ›' => 'ำš', + 'ำ' => 'ำœ', + 'ำŸ' => 'ำž', + 'ำก' => 'ำ ', + 'ำฃ' => 'ำข', + 'ำฅ' => 'ำค', + 'ำง' => 'ำฆ', + 'ำฉ' => 'ำจ', + 'ำซ' => 'ำช', + 'ำญ' => 'ำฌ', + 'ำฏ' => 'ำฎ', + 'ำฑ' => 'ำฐ', + 'ำณ' => 'ำฒ', + 'ำต' => 'ำด', + 'ำท' => 'ำถ', + 'ำน' => 'ำธ', + 'ำป' => 'ำบ', + 'ำฝ' => 'ำผ', + 'ำฟ' => 'ำพ', + 'ิ' => 'ิ€', + 'ิƒ' => 'ิ‚', + 'ิ…' => 'ิ„', + 'ิ‡' => 'ิ†', + 'ิ‰' => 'ิˆ', + 'ิ‹' => 'ิŠ', + 'ิ' => 'ิŒ', + 'ิ' => 'ิŽ', + 'ิ‘' => 'ิ', + 'ิ“' => 'ิ’', + 'ิ•' => 'ิ”', + 'ิ—' => 'ิ–', + 'ิ™' => 'ิ˜', + 'ิ›' => 'ิš', + 'ิ' => 'ิœ', + 'ิŸ' => 'ิž', + 'ิก' => 'ิ ', + 'ิฃ' => 'ิข', + 'ิฅ' => 'ิค', + 'ิง' => 'ิฆ', + 'ิฉ' => 'ิจ', + 'ิซ' => 'ิช', + 'ิญ' => 'ิฌ', + 'ิฏ' => 'ิฎ', + 'ีก' => 'ิฑ', + 'ีข' => 'ิฒ', + 'ีฃ' => 'ิณ', + 'ีค' => 'ิด', + 'ีฅ' => 'ิต', + 'ีฆ' => 'ิถ', + 'ีง' => 'ิท', + 'ีจ' => 'ิธ', + 'ีฉ' => 'ิน', + 'ีช' => 'ิบ', + 'ีซ' => 'ิป', + 'ีฌ' => 'ิผ', + 'ีญ' => 'ิฝ', + 'ีฎ' => 'ิพ', + 'ีฏ' => 'ิฟ', + 'ีฐ' => 'ี€', + 'ีฑ' => 'ี', + 'ีฒ' => 'ี‚', + 'ีณ' => 'ีƒ', + 'ีด' => 'ี„', + 'ีต' => 'ี…', + 'ีถ' => 'ี†', + 'ีท' => 'ี‡', + 'ีธ' => 'ีˆ', + 'ีน' => 'ี‰', + 'ีบ' => 'ีŠ', + 'ีป' => 'ี‹', + 'ีผ' => 'ีŒ', + 'ีฝ' => 'ี', + 'ีพ' => 'ีŽ', + 'ีฟ' => 'ี', + 'ึ€' => 'ี', + 'ึ' => 'ี‘', + 'ึ‚' => 'ี’', + 'ึƒ' => 'ี“', + 'ึ„' => 'ี”', + 'ึ…' => 'ี•', + 'ึ†' => 'ี–', + 'แƒ' => 'แฒ', + 'แƒ‘' => 'แฒ‘', + 'แƒ’' => 'แฒ’', + 'แƒ“' => 'แฒ“', + 'แƒ”' => 'แฒ”', + 'แƒ•' => 'แฒ•', + 'แƒ–' => 'แฒ–', + 'แƒ—' => 'แฒ—', + 'แƒ˜' => 'แฒ˜', + 'แƒ™' => 'แฒ™', + 'แƒš' => 'แฒš', + 'แƒ›' => 'แฒ›', + 'แƒœ' => 'แฒœ', + 'แƒ' => 'แฒ', + 'แƒž' => 'แฒž', + 'แƒŸ' => 'แฒŸ', + 'แƒ ' => 'แฒ ', + 'แƒก' => 'แฒก', + 'แƒข' => 'แฒข', + 'แƒฃ' => 'แฒฃ', + 'แƒค' => 'แฒค', + 'แƒฅ' => 'แฒฅ', + 'แƒฆ' => 'แฒฆ', + 'แƒง' => 'แฒง', + 'แƒจ' => 'แฒจ', + 'แƒฉ' => 'แฒฉ', + 'แƒช' => 'แฒช', + 'แƒซ' => 'แฒซ', + 'แƒฌ' => 'แฒฌ', + 'แƒญ' => 'แฒญ', + 'แƒฎ' => 'แฒฎ', + 'แƒฏ' => 'แฒฏ', + 'แƒฐ' => 'แฒฐ', + 'แƒฑ' => 'แฒฑ', + 'แƒฒ' => 'แฒฒ', + 'แƒณ' => 'แฒณ', + 'แƒด' => 'แฒด', + 'แƒต' => 'แฒต', + 'แƒถ' => 'แฒถ', + 'แƒท' => 'แฒท', + 'แƒธ' => 'แฒธ', + 'แƒน' => 'แฒน', + 'แƒบ' => 'แฒบ', + 'แƒฝ' => 'แฒฝ', + 'แƒพ' => 'แฒพ', + 'แƒฟ' => 'แฒฟ', + 'แธ' => 'แฐ', + 'แน' => 'แฑ', + 'แบ' => 'แฒ', + 'แป' => 'แณ', + 'แผ' => 'แด', + 'แฝ' => 'แต', + 'แฒ€' => 'ะ’', + 'แฒ' => 'ะ”', + 'แฒ‚' => 'ะž', + 'แฒƒ' => 'ะก', + 'แฒ„' => 'ะข', + 'แฒ…' => 'ะข', + 'แฒ†' => 'ะช', + 'แฒ‡' => 'ัข', + 'แฒˆ' => '๊™Š', + 'แตน' => '๊ฝ', + 'แตฝ' => 'โฑฃ', + 'แถŽ' => '๊Ÿ†', + 'แธ' => 'แธ€', + 'แธƒ' => 'แธ‚', + 'แธ…' => 'แธ„', + 'แธ‡' => 'แธ†', + 'แธ‰' => 'แธˆ', + 'แธ‹' => 'แธŠ', + 'แธ' => 'แธŒ', + 'แธ' => 'แธŽ', + 'แธ‘' => 'แธ', + 'แธ“' => 'แธ’', + 'แธ•' => 'แธ”', + 'แธ—' => 'แธ–', + 'แธ™' => 'แธ˜', + 'แธ›' => 'แธš', + 'แธ' => 'แธœ', + 'แธŸ' => 'แธž', + 'แธก' => 'แธ ', + 'แธฃ' => 'แธข', + 'แธฅ' => 'แธค', + 'แธง' => 'แธฆ', + 'แธฉ' => 'แธจ', + 'แธซ' => 'แธช', + 'แธญ' => 'แธฌ', + 'แธฏ' => 'แธฎ', + 'แธฑ' => 'แธฐ', + 'แธณ' => 'แธฒ', + 'แธต' => 'แธด', + 'แธท' => 'แธถ', + 'แธน' => 'แธธ', + 'แธป' => 'แธบ', + 'แธฝ' => 'แธผ', + 'แธฟ' => 'แธพ', + 'แน' => 'แน€', + 'แนƒ' => 'แน‚', + 'แน…' => 'แน„', + 'แน‡' => 'แน†', + 'แน‰' => 'แนˆ', + 'แน‹' => 'แนŠ', + 'แน' => 'แนŒ', + 'แน' => 'แนŽ', + 'แน‘' => 'แน', + 'แน“' => 'แน’', + 'แน•' => 'แน”', + 'แน—' => 'แน–', + 'แน™' => 'แน˜', + 'แน›' => 'แนš', + 'แน' => 'แนœ', + 'แนŸ' => 'แนž', + 'แนก' => 'แน ', + 'แนฃ' => 'แนข', + 'แนฅ' => 'แนค', + 'แนง' => 'แนฆ', + 'แนฉ' => 'แนจ', + 'แนซ' => 'แนช', + 'แนญ' => 'แนฌ', + 'แนฏ' => 'แนฎ', + 'แนฑ' => 'แนฐ', + 'แนณ' => 'แนฒ', + 'แนต' => 'แนด', + 'แนท' => 'แนถ', + 'แนน' => 'แนธ', + 'แนป' => 'แนบ', + 'แนฝ' => 'แนผ', + 'แนฟ' => 'แนพ', + 'แบ' => 'แบ€', + 'แบƒ' => 'แบ‚', + 'แบ…' => 'แบ„', + 'แบ‡' => 'แบ†', + 'แบ‰' => 'แบˆ', + 'แบ‹' => 'แบŠ', + 'แบ' => 'แบŒ', + 'แบ' => 'แบŽ', + 'แบ‘' => 'แบ', + 'แบ“' => 'แบ’', + 'แบ•' => 'แบ”', + 'แบ›' => 'แน ', + 'แบก' => 'แบ ', + 'แบฃ' => 'แบข', + 'แบฅ' => 'แบค', + 'แบง' => 'แบฆ', + 'แบฉ' => 'แบจ', + 'แบซ' => 'แบช', + 'แบญ' => 'แบฌ', + 'แบฏ' => 'แบฎ', + 'แบฑ' => 'แบฐ', + 'แบณ' => 'แบฒ', + 'แบต' => 'แบด', + 'แบท' => 'แบถ', + 'แบน' => 'แบธ', + 'แบป' => 'แบบ', + 'แบฝ' => 'แบผ', + 'แบฟ' => 'แบพ', + 'แป' => 'แป€', + 'แปƒ' => 'แป‚', + 'แป…' => 'แป„', + 'แป‡' => 'แป†', + 'แป‰' => 'แปˆ', + 'แป‹' => 'แปŠ', + 'แป' => 'แปŒ', + 'แป' => 'แปŽ', + 'แป‘' => 'แป', + 'แป“' => 'แป’', + 'แป•' => 'แป”', + 'แป—' => 'แป–', + 'แป™' => 'แป˜', + 'แป›' => 'แปš', + 'แป' => 'แปœ', + 'แปŸ' => 'แปž', + 'แปก' => 'แป ', + 'แปฃ' => 'แปข', + 'แปฅ' => 'แปค', + 'แปง' => 'แปฆ', + 'แปฉ' => 'แปจ', + 'แปซ' => 'แปช', + 'แปญ' => 'แปฌ', + 'แปฏ' => 'แปฎ', + 'แปฑ' => 'แปฐ', + 'แปณ' => 'แปฒ', + 'แปต' => 'แปด', + 'แปท' => 'แปถ', + 'แปน' => 'แปธ', + 'แปป' => 'แปบ', + 'แปฝ' => 'แปผ', + 'แปฟ' => 'แปพ', + 'แผ€' => 'แผˆ', + 'แผ' => 'แผ‰', + 'แผ‚' => 'แผŠ', + 'แผƒ' => 'แผ‹', + 'แผ„' => 'แผŒ', + 'แผ…' => 'แผ', + 'แผ†' => 'แผŽ', + 'แผ‡' => 'แผ', + 'แผ' => 'แผ˜', + 'แผ‘' => 'แผ™', + 'แผ’' => 'แผš', + 'แผ“' => 'แผ›', + 'แผ”' => 'แผœ', + 'แผ•' => 'แผ', + 'แผ ' => 'แผจ', + 'แผก' => 'แผฉ', + 'แผข' => 'แผช', + 'แผฃ' => 'แผซ', + 'แผค' => 'แผฌ', + 'แผฅ' => 'แผญ', + 'แผฆ' => 'แผฎ', + 'แผง' => 'แผฏ', + 'แผฐ' => 'แผธ', + 'แผฑ' => 'แผน', + 'แผฒ' => 'แผบ', + 'แผณ' => 'แผป', + 'แผด' => 'แผผ', + 'แผต' => 'แผฝ', + 'แผถ' => 'แผพ', + 'แผท' => 'แผฟ', + 'แฝ€' => 'แฝˆ', + 'แฝ' => 'แฝ‰', + 'แฝ‚' => 'แฝŠ', + 'แฝƒ' => 'แฝ‹', + 'แฝ„' => 'แฝŒ', + 'แฝ…' => 'แฝ', + 'แฝ‘' => 'แฝ™', + 'แฝ“' => 'แฝ›', + 'แฝ•' => 'แฝ', + 'แฝ—' => 'แฝŸ', + 'แฝ ' => 'แฝจ', + 'แฝก' => 'แฝฉ', + 'แฝข' => 'แฝช', + 'แฝฃ' => 'แฝซ', + 'แฝค' => 'แฝฌ', + 'แฝฅ' => 'แฝญ', + 'แฝฆ' => 'แฝฎ', + 'แฝง' => 'แฝฏ', + 'แฝฐ' => 'แพบ', + 'แฝฑ' => 'แพป', + 'แฝฒ' => 'แฟˆ', + 'แฝณ' => 'แฟ‰', + 'แฝด' => 'แฟŠ', + 'แฝต' => 'แฟ‹', + 'แฝถ' => 'แฟš', + 'แฝท' => 'แฟ›', + 'แฝธ' => 'แฟธ', + 'แฝน' => 'แฟน', + 'แฝบ' => 'แฟช', + 'แฝป' => 'แฟซ', + 'แฝผ' => 'แฟบ', + 'แฝฝ' => 'แฟป', + 'แพ€' => 'แผˆฮ™', + 'แพ' => 'แผ‰ฮ™', + 'แพ‚' => 'แผŠฮ™', + 'แพƒ' => 'แผ‹ฮ™', + 'แพ„' => 'แผŒฮ™', + 'แพ…' => 'แผฮ™', + 'แพ†' => 'แผŽฮ™', + 'แพ‡' => 'แผฮ™', + 'แพ' => 'แผจฮ™', + 'แพ‘' => 'แผฉฮ™', + 'แพ’' => 'แผชฮ™', + 'แพ“' => 'แผซฮ™', + 'แพ”' => 'แผฌฮ™', + 'แพ•' => 'แผญฮ™', + 'แพ–' => 'แผฎฮ™', + 'แพ—' => 'แผฏฮ™', + 'แพ ' => 'แฝจฮ™', + 'แพก' => 'แฝฉฮ™', + 'แพข' => 'แฝชฮ™', + 'แพฃ' => 'แฝซฮ™', + 'แพค' => 'แฝฌฮ™', + 'แพฅ' => 'แฝญฮ™', + 'แพฆ' => 'แฝฎฮ™', + 'แพง' => 'แฝฏฮ™', + 'แพฐ' => 'แพธ', + 'แพฑ' => 'แพน', + 'แพณ' => 'ฮ‘ฮ™', + 'แพพ' => 'ฮ™', + 'แฟƒ' => 'ฮ—ฮ™', + 'แฟ' => 'แฟ˜', + 'แฟ‘' => 'แฟ™', + 'แฟ ' => 'แฟจ', + 'แฟก' => 'แฟฉ', + 'แฟฅ' => 'แฟฌ', + 'แฟณ' => 'ฮฉฮ™', + 'โ…Ž' => 'โ„ฒ', + 'โ…ฐ' => 'โ… ', + 'โ…ฑ' => 'โ…ก', + 'โ…ฒ' => 'โ…ข', + 'โ…ณ' => 'โ…ฃ', + 'โ…ด' => 'โ…ค', + 'โ…ต' => 'โ…ฅ', + 'โ…ถ' => 'โ…ฆ', + 'โ…ท' => 'โ…ง', + 'โ…ธ' => 'โ…จ', + 'โ…น' => 'โ…ฉ', + 'โ…บ' => 'โ…ช', + 'โ…ป' => 'โ…ซ', + 'โ…ผ' => 'โ…ฌ', + 'โ…ฝ' => 'โ…ญ', + 'โ…พ' => 'โ…ฎ', + 'โ…ฟ' => 'โ…ฏ', + 'โ†„' => 'โ†ƒ', + 'โ“' => 'โ’ถ', + 'โ“‘' => 'โ’ท', + 'โ“’' => 'โ’ธ', + 'โ““' => 'โ’น', + 'โ“”' => 'โ’บ', + 'โ“•' => 'โ’ป', + 'โ“–' => 'โ’ผ', + 'โ“—' => 'โ’ฝ', + 'โ“˜' => 'โ’พ', + 'โ“™' => 'โ’ฟ', + 'โ“š' => 'โ“€', + 'โ“›' => 'โ“', + 'โ“œ' => 'โ“‚', + 'โ“' => 'โ“ƒ', + 'โ“ž' => 'โ“„', + 'โ“Ÿ' => 'โ“…', + 'โ“ ' => 'โ“†', + 'โ“ก' => 'โ“‡', + 'โ“ข' => 'โ“ˆ', + 'โ“ฃ' => 'โ“‰', + 'โ“ค' => 'โ“Š', + 'โ“ฅ' => 'โ“‹', + 'โ“ฆ' => 'โ“Œ', + 'โ“ง' => 'โ“', + 'โ“จ' => 'โ“Ž', + 'โ“ฉ' => 'โ“', + 'โฐฐ' => 'โฐ€', + 'โฐฑ' => 'โฐ', + 'โฐฒ' => 'โฐ‚', + 'โฐณ' => 'โฐƒ', + 'โฐด' => 'โฐ„', + 'โฐต' => 'โฐ…', + 'โฐถ' => 'โฐ†', + 'โฐท' => 'โฐ‡', + 'โฐธ' => 'โฐˆ', + 'โฐน' => 'โฐ‰', + 'โฐบ' => 'โฐŠ', + 'โฐป' => 'โฐ‹', + 'โฐผ' => 'โฐŒ', + 'โฐฝ' => 'โฐ', + 'โฐพ' => 'โฐŽ', + 'โฐฟ' => 'โฐ', + 'โฑ€' => 'โฐ', + 'โฑ' => 'โฐ‘', + 'โฑ‚' => 'โฐ’', + 'โฑƒ' => 'โฐ“', + 'โฑ„' => 'โฐ”', + 'โฑ…' => 'โฐ•', + 'โฑ†' => 'โฐ–', + 'โฑ‡' => 'โฐ—', + 'โฑˆ' => 'โฐ˜', + 'โฑ‰' => 'โฐ™', + 'โฑŠ' => 'โฐš', + 'โฑ‹' => 'โฐ›', + 'โฑŒ' => 'โฐœ', + 'โฑ' => 'โฐ', + 'โฑŽ' => 'โฐž', + 'โฑ' => 'โฐŸ', + 'โฑ' => 'โฐ ', + 'โฑ‘' => 'โฐก', + 'โฑ’' => 'โฐข', + 'โฑ“' => 'โฐฃ', + 'โฑ”' => 'โฐค', + 'โฑ•' => 'โฐฅ', + 'โฑ–' => 'โฐฆ', + 'โฑ—' => 'โฐง', + 'โฑ˜' => 'โฐจ', + 'โฑ™' => 'โฐฉ', + 'โฑš' => 'โฐช', + 'โฑ›' => 'โฐซ', + 'โฑœ' => 'โฐฌ', + 'โฑ' => 'โฐญ', + 'โฑž' => 'โฐฎ', + 'โฑก' => 'โฑ ', + 'โฑฅ' => 'ศบ', + 'โฑฆ' => 'ศพ', + 'โฑจ' => 'โฑง', + 'โฑช' => 'โฑฉ', + 'โฑฌ' => 'โฑซ', + 'โฑณ' => 'โฑฒ', + 'โฑถ' => 'โฑต', + 'โฒ' => 'โฒ€', + 'โฒƒ' => 'โฒ‚', + 'โฒ…' => 'โฒ„', + 'โฒ‡' => 'โฒ†', + 'โฒ‰' => 'โฒˆ', + 'โฒ‹' => 'โฒŠ', + 'โฒ' => 'โฒŒ', + 'โฒ' => 'โฒŽ', + 'โฒ‘' => 'โฒ', + 'โฒ“' => 'โฒ’', + 'โฒ•' => 'โฒ”', + 'โฒ—' => 'โฒ–', + 'โฒ™' => 'โฒ˜', + 'โฒ›' => 'โฒš', + 'โฒ' => 'โฒœ', + 'โฒŸ' => 'โฒž', + 'โฒก' => 'โฒ ', + 'โฒฃ' => 'โฒข', + 'โฒฅ' => 'โฒค', + 'โฒง' => 'โฒฆ', + 'โฒฉ' => 'โฒจ', + 'โฒซ' => 'โฒช', + 'โฒญ' => 'โฒฌ', + 'โฒฏ' => 'โฒฎ', + 'โฒฑ' => 'โฒฐ', + 'โฒณ' => 'โฒฒ', + 'โฒต' => 'โฒด', + 'โฒท' => 'โฒถ', + 'โฒน' => 'โฒธ', + 'โฒป' => 'โฒบ', + 'โฒฝ' => 'โฒผ', + 'โฒฟ' => 'โฒพ', + 'โณ' => 'โณ€', + 'โณƒ' => 'โณ‚', + 'โณ…' => 'โณ„', + 'โณ‡' => 'โณ†', + 'โณ‰' => 'โณˆ', + 'โณ‹' => 'โณŠ', + 'โณ' => 'โณŒ', + 'โณ' => 'โณŽ', + 'โณ‘' => 'โณ', + 'โณ“' => 'โณ’', + 'โณ•' => 'โณ”', + 'โณ—' => 'โณ–', + 'โณ™' => 'โณ˜', + 'โณ›' => 'โณš', + 'โณ' => 'โณœ', + 'โณŸ' => 'โณž', + 'โณก' => 'โณ ', + 'โณฃ' => 'โณข', + 'โณฌ' => 'โณซ', + 'โณฎ' => 'โณญ', + 'โณณ' => 'โณฒ', + 'โด€' => 'แ‚ ', + 'โด' => 'แ‚ก', + 'โด‚' => 'แ‚ข', + 'โดƒ' => 'แ‚ฃ', + 'โด„' => 'แ‚ค', + 'โด…' => 'แ‚ฅ', + 'โด†' => 'แ‚ฆ', + 'โด‡' => 'แ‚ง', + 'โดˆ' => 'แ‚จ', + 'โด‰' => 'แ‚ฉ', + 'โดŠ' => 'แ‚ช', + 'โด‹' => 'แ‚ซ', + 'โดŒ' => 'แ‚ฌ', + 'โด' => 'แ‚ญ', + 'โดŽ' => 'แ‚ฎ', + 'โด' => 'แ‚ฏ', + 'โด' => 'แ‚ฐ', + 'โด‘' => 'แ‚ฑ', + 'โด’' => 'แ‚ฒ', + 'โด“' => 'แ‚ณ', + 'โด”' => 'แ‚ด', + 'โด•' => 'แ‚ต', + 'โด–' => 'แ‚ถ', + 'โด—' => 'แ‚ท', + 'โด˜' => 'แ‚ธ', + 'โด™' => 'แ‚น', + 'โดš' => 'แ‚บ', + 'โด›' => 'แ‚ป', + 'โดœ' => 'แ‚ผ', + 'โด' => 'แ‚ฝ', + 'โดž' => 'แ‚พ', + 'โดŸ' => 'แ‚ฟ', + 'โด ' => 'แƒ€', + 'โดก' => 'แƒ', + 'โดข' => 'แƒ‚', + 'โดฃ' => 'แƒƒ', + 'โดค' => 'แƒ„', + 'โดฅ' => 'แƒ…', + 'โดง' => 'แƒ‡', + 'โดญ' => 'แƒ', + '๊™' => '๊™€', + '๊™ƒ' => '๊™‚', + '๊™…' => '๊™„', + '๊™‡' => '๊™†', + '๊™‰' => '๊™ˆ', + '๊™‹' => '๊™Š', + '๊™' => '๊™Œ', + '๊™' => '๊™Ž', + '๊™‘' => '๊™', + '๊™“' => '๊™’', + '๊™•' => '๊™”', + '๊™—' => '๊™–', + '๊™™' => '๊™˜', + '๊™›' => '๊™š', + '๊™' => '๊™œ', + '๊™Ÿ' => '๊™ž', + '๊™ก' => '๊™ ', + '๊™ฃ' => '๊™ข', + '๊™ฅ' => '๊™ค', + '๊™ง' => '๊™ฆ', + '๊™ฉ' => '๊™จ', + '๊™ซ' => '๊™ช', + '๊™ญ' => '๊™ฌ', + '๊š' => '๊š€', + '๊šƒ' => '๊š‚', + '๊š…' => '๊š„', + '๊š‡' => '๊š†', + '๊š‰' => '๊šˆ', + '๊š‹' => '๊šŠ', + '๊š' => '๊šŒ', + '๊š' => '๊šŽ', + '๊š‘' => '๊š', + '๊š“' => '๊š’', + '๊š•' => '๊š”', + '๊š—' => '๊š–', + '๊š™' => '๊š˜', + '๊š›' => '๊šš', + '๊œฃ' => '๊œข', + '๊œฅ' => '๊œค', + '๊œง' => '๊œฆ', + '๊œฉ' => '๊œจ', + '๊œซ' => '๊œช', + '๊œญ' => '๊œฌ', + '๊œฏ' => '๊œฎ', + '๊œณ' => '๊œฒ', + '๊œต' => '๊œด', + '๊œท' => '๊œถ', + '๊œน' => '๊œธ', + '๊œป' => '๊œบ', + '๊œฝ' => '๊œผ', + '๊œฟ' => '๊œพ', + '๊' => '๊€', + '๊ƒ' => '๊‚', + '๊…' => '๊„', + '๊‡' => '๊†', + '๊‰' => '๊ˆ', + '๊‹' => '๊Š', + '๊' => '๊Œ', + '๊' => '๊Ž', + '๊‘' => '๊', + '๊“' => '๊’', + '๊•' => '๊”', + '๊—' => '๊–', + '๊™' => '๊˜', + '๊›' => '๊š', + '๊' => '๊œ', + '๊Ÿ' => '๊ž', + '๊ก' => '๊ ', + '๊ฃ' => '๊ข', + '๊ฅ' => '๊ค', + '๊ง' => '๊ฆ', + '๊ฉ' => '๊จ', + '๊ซ' => '๊ช', + '๊ญ' => '๊ฌ', + '๊ฏ' => '๊ฎ', + '๊บ' => '๊น', + '๊ผ' => '๊ป', + '๊ฟ' => '๊พ', + '๊ž' => '๊ž€', + '๊žƒ' => '๊ž‚', + '๊ž…' => '๊ž„', + '๊ž‡' => '๊ž†', + '๊žŒ' => '๊ž‹', + '๊ž‘' => '๊ž', + '๊ž“' => '๊ž’', + '๊ž”' => '๊Ÿ„', + '๊ž—' => '๊ž–', + '๊ž™' => '๊ž˜', + '๊ž›' => '๊žš', + '๊ž' => '๊žœ', + '๊žŸ' => '๊žž', + '๊žก' => '๊ž ', + '๊žฃ' => '๊žข', + '๊žฅ' => '๊žค', + '๊žง' => '๊žฆ', + '๊žฉ' => '๊žจ', + '๊žต' => '๊žด', + '๊žท' => '๊žถ', + '๊žน' => '๊žธ', + '๊žป' => '๊žบ', + '๊žฝ' => '๊žผ', + '๊žฟ' => '๊žพ', + '๊Ÿƒ' => '๊Ÿ‚', + '๊Ÿˆ' => '๊Ÿ‡', + '๊ŸŠ' => '๊Ÿ‰', + '๊Ÿถ' => '๊Ÿต', + '๊ญ“' => '๊žณ', + '๊ญฐ' => 'แŽ ', + '๊ญฑ' => 'แŽก', + '๊ญฒ' => 'แŽข', + '๊ญณ' => 'แŽฃ', + '๊ญด' => 'แŽค', + '๊ญต' => 'แŽฅ', + '๊ญถ' => 'แŽฆ', + '๊ญท' => 'แŽง', + '๊ญธ' => 'แŽจ', + '๊ญน' => 'แŽฉ', + '๊ญบ' => 'แŽช', + '๊ญป' => 'แŽซ', + '๊ญผ' => 'แŽฌ', + '๊ญฝ' => 'แŽญ', + '๊ญพ' => 'แŽฎ', + '๊ญฟ' => 'แŽฏ', + '๊ฎ€' => 'แŽฐ', + '๊ฎ' => 'แŽฑ', + '๊ฎ‚' => 'แŽฒ', + '๊ฎƒ' => 'แŽณ', + '๊ฎ„' => 'แŽด', + '๊ฎ…' => 'แŽต', + '๊ฎ†' => 'แŽถ', + '๊ฎ‡' => 'แŽท', + '๊ฎˆ' => 'แŽธ', + '๊ฎ‰' => 'แŽน', + '๊ฎŠ' => 'แŽบ', + '๊ฎ‹' => 'แŽป', + '๊ฎŒ' => 'แŽผ', + '๊ฎ' => 'แŽฝ', + '๊ฎŽ' => 'แŽพ', + '๊ฎ' => 'แŽฟ', + '๊ฎ' => 'แ€', + '๊ฎ‘' => 'แ', + '๊ฎ’' => 'แ‚', + '๊ฎ“' => 'แƒ', + '๊ฎ”' => 'แ„', + '๊ฎ•' => 'แ…', + '๊ฎ–' => 'แ†', + '๊ฎ—' => 'แ‡', + '๊ฎ˜' => 'แˆ', + '๊ฎ™' => 'แ‰', + '๊ฎš' => 'แŠ', + '๊ฎ›' => 'แ‹', + '๊ฎœ' => 'แŒ', + '๊ฎ' => 'แ', + '๊ฎž' => 'แŽ', + '๊ฎŸ' => 'แ', + '๊ฎ ' => 'แ', + '๊ฎก' => 'แ‘', + '๊ฎข' => 'แ’', + '๊ฎฃ' => 'แ“', + '๊ฎค' => 'แ”', + '๊ฎฅ' => 'แ•', + '๊ฎฆ' => 'แ–', + '๊ฎง' => 'แ—', + '๊ฎจ' => 'แ˜', + '๊ฎฉ' => 'แ™', + '๊ฎช' => 'แš', + '๊ฎซ' => 'แ›', + '๊ฎฌ' => 'แœ', + '๊ฎญ' => 'แ', + '๊ฎฎ' => 'แž', + '๊ฎฏ' => 'แŸ', + '๊ฎฐ' => 'แ ', + '๊ฎฑ' => 'แก', + '๊ฎฒ' => 'แข', + '๊ฎณ' => 'แฃ', + '๊ฎด' => 'แค', + '๊ฎต' => 'แฅ', + '๊ฎถ' => 'แฆ', + '๊ฎท' => 'แง', + '๊ฎธ' => 'แจ', + '๊ฎน' => 'แฉ', + '๊ฎบ' => 'แช', + '๊ฎป' => 'แซ', + '๊ฎผ' => 'แฌ', + '๊ฎฝ' => 'แญ', + '๊ฎพ' => 'แฎ', + '๊ฎฟ' => 'แฏ', + '๏ฝ' => '๏ผก', + '๏ฝ‚' => '๏ผข', + '๏ฝƒ' => '๏ผฃ', + '๏ฝ„' => '๏ผค', + '๏ฝ…' => '๏ผฅ', + '๏ฝ†' => '๏ผฆ', + '๏ฝ‡' => '๏ผง', + '๏ฝˆ' => '๏ผจ', + '๏ฝ‰' => '๏ผฉ', + '๏ฝŠ' => '๏ผช', + '๏ฝ‹' => '๏ผซ', + '๏ฝŒ' => '๏ผฌ', + '๏ฝ' => '๏ผญ', + '๏ฝŽ' => '๏ผฎ', + '๏ฝ' => '๏ผฏ', + '๏ฝ' => '๏ผฐ', + '๏ฝ‘' => '๏ผฑ', + '๏ฝ’' => '๏ผฒ', + '๏ฝ“' => '๏ผณ', + '๏ฝ”' => '๏ผด', + '๏ฝ•' => '๏ผต', + '๏ฝ–' => '๏ผถ', + '๏ฝ—' => '๏ผท', + '๏ฝ˜' => '๏ผธ', + '๏ฝ™' => '๏ผน', + '๏ฝš' => '๏ผบ', + '๐จ' => '๐€', + '๐ฉ' => '๐', + '๐ช' => '๐‚', + '๐ซ' => '๐ƒ', + '๐ฌ' => '๐„', + '๐ญ' => '๐…', + '๐ฎ' => '๐†', + '๐ฏ' => '๐‡', + '๐ฐ' => '๐ˆ', + '๐ฑ' => '๐‰', + '๐ฒ' => '๐Š', + '๐ณ' => '๐‹', + '๐ด' => '๐Œ', + '๐ต' => '๐', + '๐ถ' => '๐Ž', + '๐ท' => '๐', + '๐ธ' => '๐', + '๐น' => '๐‘', + '๐บ' => '๐’', + '๐ป' => '๐“', + '๐ผ' => '๐”', + '๐ฝ' => '๐•', + '๐พ' => '๐–', + '๐ฟ' => '๐—', + '๐‘€' => '๐˜', + '๐‘' => '๐™', + '๐‘‚' => '๐š', + '๐‘ƒ' => '๐›', + '๐‘„' => '๐œ', + '๐‘…' => '๐', + '๐‘†' => '๐ž', + '๐‘‡' => '๐Ÿ', + '๐‘ˆ' => '๐ ', + '๐‘‰' => '๐ก', + '๐‘Š' => '๐ข', + '๐‘‹' => '๐ฃ', + '๐‘Œ' => '๐ค', + '๐‘' => '๐ฅ', + '๐‘Ž' => '๐ฆ', + '๐‘' => '๐ง', + '๐“˜' => '๐’ฐ', + '๐“™' => '๐’ฑ', + '๐“š' => '๐’ฒ', + '๐“›' => '๐’ณ', + '๐“œ' => '๐’ด', + '๐“' => '๐’ต', + '๐“ž' => '๐’ถ', + '๐“Ÿ' => '๐’ท', + '๐“ ' => '๐’ธ', + '๐“ก' => '๐’น', + '๐“ข' => '๐’บ', + '๐“ฃ' => '๐’ป', + '๐“ค' => '๐’ผ', + '๐“ฅ' => '๐’ฝ', + '๐“ฆ' => '๐’พ', + '๐“ง' => '๐’ฟ', + '๐“จ' => '๐“€', + '๐“ฉ' => '๐“', + '๐“ช' => '๐“‚', + '๐“ซ' => '๐“ƒ', + '๐“ฌ' => '๐“„', + '๐“ญ' => '๐“…', + '๐“ฎ' => '๐“†', + '๐“ฏ' => '๐“‡', + '๐“ฐ' => '๐“ˆ', + '๐“ฑ' => '๐“‰', + '๐“ฒ' => '๐“Š', + '๐“ณ' => '๐“‹', + '๐“ด' => '๐“Œ', + '๐“ต' => '๐“', + '๐“ถ' => '๐“Ž', + '๐“ท' => '๐“', + '๐“ธ' => '๐“', + '๐“น' => '๐“‘', + '๐“บ' => '๐“’', + '๐“ป' => '๐““', + '๐ณ€' => '๐ฒ€', + '๐ณ' => '๐ฒ', + '๐ณ‚' => '๐ฒ‚', + '๐ณƒ' => '๐ฒƒ', + '๐ณ„' => '๐ฒ„', + '๐ณ…' => '๐ฒ…', + '๐ณ†' => '๐ฒ†', + '๐ณ‡' => '๐ฒ‡', + '๐ณˆ' => '๐ฒˆ', + '๐ณ‰' => '๐ฒ‰', + '๐ณŠ' => '๐ฒŠ', + '๐ณ‹' => '๐ฒ‹', + '๐ณŒ' => '๐ฒŒ', + '๐ณ' => '๐ฒ', + '๐ณŽ' => '๐ฒŽ', + '๐ณ' => '๐ฒ', + '๐ณ' => '๐ฒ', + '๐ณ‘' => '๐ฒ‘', + '๐ณ’' => '๐ฒ’', + '๐ณ“' => '๐ฒ“', + '๐ณ”' => '๐ฒ”', + '๐ณ•' => '๐ฒ•', + '๐ณ–' => '๐ฒ–', + '๐ณ—' => '๐ฒ—', + '๐ณ˜' => '๐ฒ˜', + '๐ณ™' => '๐ฒ™', + '๐ณš' => '๐ฒš', + '๐ณ›' => '๐ฒ›', + '๐ณœ' => '๐ฒœ', + '๐ณ' => '๐ฒ', + '๐ณž' => '๐ฒž', + '๐ณŸ' => '๐ฒŸ', + '๐ณ ' => '๐ฒ ', + '๐ณก' => '๐ฒก', + '๐ณข' => '๐ฒข', + '๐ณฃ' => '๐ฒฃ', + '๐ณค' => '๐ฒค', + '๐ณฅ' => '๐ฒฅ', + '๐ณฆ' => '๐ฒฆ', + '๐ณง' => '๐ฒง', + '๐ณจ' => '๐ฒจ', + '๐ณฉ' => '๐ฒฉ', + '๐ณช' => '๐ฒช', + '๐ณซ' => '๐ฒซ', + '๐ณฌ' => '๐ฒฌ', + '๐ณญ' => '๐ฒญ', + '๐ณฎ' => '๐ฒฎ', + '๐ณฏ' => '๐ฒฏ', + '๐ณฐ' => '๐ฒฐ', + '๐ณฑ' => '๐ฒฑ', + '๐ณฒ' => '๐ฒฒ', + '๐‘ฃ€' => '๐‘ข ', + '๐‘ฃ' => '๐‘ขก', + '๐‘ฃ‚' => '๐‘ขข', + '๐‘ฃƒ' => '๐‘ขฃ', + '๐‘ฃ„' => '๐‘ขค', + '๐‘ฃ…' => '๐‘ขฅ', + '๐‘ฃ†' => '๐‘ขฆ', + '๐‘ฃ‡' => '๐‘ขง', + '๐‘ฃˆ' => '๐‘ขจ', + '๐‘ฃ‰' => '๐‘ขฉ', + '๐‘ฃŠ' => '๐‘ขช', + '๐‘ฃ‹' => '๐‘ขซ', + '๐‘ฃŒ' => '๐‘ขฌ', + '๐‘ฃ' => '๐‘ขญ', + '๐‘ฃŽ' => '๐‘ขฎ', + '๐‘ฃ' => '๐‘ขฏ', + '๐‘ฃ' => '๐‘ขฐ', + '๐‘ฃ‘' => '๐‘ขฑ', + '๐‘ฃ’' => '๐‘ขฒ', + '๐‘ฃ“' => '๐‘ขณ', + '๐‘ฃ”' => '๐‘ขด', + '๐‘ฃ•' => '๐‘ขต', + '๐‘ฃ–' => '๐‘ขถ', + '๐‘ฃ—' => '๐‘ขท', + '๐‘ฃ˜' => '๐‘ขธ', + '๐‘ฃ™' => '๐‘ขน', + '๐‘ฃš' => '๐‘ขบ', + '๐‘ฃ›' => '๐‘ขป', + '๐‘ฃœ' => '๐‘ขผ', + '๐‘ฃ' => '๐‘ขฝ', + '๐‘ฃž' => '๐‘ขพ', + '๐‘ฃŸ' => '๐‘ขฟ', + '๐–น ' => '๐–น€', + '๐–นก' => '๐–น', + '๐–นข' => '๐–น‚', + '๐–นฃ' => '๐–นƒ', + '๐–นค' => '๐–น„', + '๐–นฅ' => '๐–น…', + '๐–นฆ' => '๐–น†', + '๐–นง' => '๐–น‡', + '๐–นจ' => '๐–นˆ', + '๐–นฉ' => '๐–น‰', + '๐–นช' => '๐–นŠ', + '๐–นซ' => '๐–น‹', + '๐–นฌ' => '๐–นŒ', + '๐–นญ' => '๐–น', + '๐–นฎ' => '๐–นŽ', + '๐–นฏ' => '๐–น', + '๐–นฐ' => '๐–น', + '๐–นฑ' => '๐–น‘', + '๐–นฒ' => '๐–น’', + '๐–นณ' => '๐–น“', + '๐–นด' => '๐–น”', + '๐–นต' => '๐–น•', + '๐–นถ' => '๐–น–', + '๐–นท' => '๐–น—', + '๐–นธ' => '๐–น˜', + '๐–นน' => '๐–น™', + '๐–นบ' => '๐–นš', + '๐–นป' => '๐–น›', + '๐–นผ' => '๐–นœ', + '๐–นฝ' => '๐–น', + '๐–นพ' => '๐–นž', + '๐–นฟ' => '๐–นŸ', + '๐žคข' => '๐žค€', + '๐žคฃ' => '๐žค', + '๐žคค' => '๐žค‚', + '๐žคฅ' => '๐žคƒ', + '๐žคฆ' => '๐žค„', + '๐žคง' => '๐žค…', + '๐žคจ' => '๐žค†', + '๐žคฉ' => '๐žค‡', + '๐žคช' => '๐žคˆ', + '๐žคซ' => '๐žค‰', + '๐žคฌ' => '๐žคŠ', + '๐žคญ' => '๐žค‹', + '๐žคฎ' => '๐žคŒ', + '๐žคฏ' => '๐žค', + '๐žคฐ' => '๐žคŽ', + '๐žคฑ' => '๐žค', + '๐žคฒ' => '๐žค', + '๐žคณ' => '๐žค‘', + '๐žคด' => '๐žค’', + '๐žคต' => '๐žค“', + '๐žคถ' => '๐žค”', + '๐žคท' => '๐žค•', + '๐žคธ' => '๐žค–', + '๐žคน' => '๐žค—', + '๐žคบ' => '๐žค˜', + '๐žคป' => '๐žค™', + '๐žคผ' => '๐žคš', + '๐žคฝ' => '๐žค›', + '๐žคพ' => '๐žคœ', + '๐žคฟ' => '๐žค', + '๐žฅ€' => '๐žคž', + '๐žฅ' => '๐žคŸ', + '๐žฅ‚' => '๐žค ', + '๐žฅƒ' => '๐žคก', + 'รŸ' => 'SS', + '๏ฌ€' => 'FF', + '๏ฌ' => 'FI', + '๏ฌ‚' => 'FL', + '๏ฌƒ' => 'FFI', + '๏ฌ„' => 'FFL', + '๏ฌ…' => 'ST', + '๏ฌ†' => 'ST', + 'ึ‡' => 'ิตี’', + '๏ฌ“' => 'ี„ี†', + '๏ฌ”' => 'ี„ิต', + '๏ฌ•' => 'ี„ิป', + '๏ฌ–' => 'ีŽี†', + '๏ฌ—' => 'ี„ิฝ', + 'ล‰' => 'สผN', + 'ฮ' => 'ฮ™ฬˆฬ', + 'ฮฐ' => 'ฮฅฬˆฬ', + 'วฐ' => 'JฬŒ', + 'แบ–' => 'Hฬฑ', + 'แบ—' => 'Tฬˆ', + 'แบ˜' => 'WฬŠ', + 'แบ™' => 'YฬŠ', + 'แบš' => 'Aสพ', + 'แฝ' => 'ฮฅฬ“', + 'แฝ’' => 'ฮฅฬ“ฬ€', + 'แฝ”' => 'ฮฅฬ“ฬ', + 'แฝ–' => 'ฮฅฬ“อ‚', + 'แพถ' => 'ฮ‘อ‚', + 'แฟ†' => 'ฮ—อ‚', + 'แฟ’' => 'ฮ™ฬˆฬ€', + 'แฟ“' => 'ฮ™ฬˆฬ', + 'แฟ–' => 'ฮ™อ‚', + 'แฟ—' => 'ฮ™ฬˆอ‚', + 'แฟข' => 'ฮฅฬˆฬ€', + 'แฟฃ' => 'ฮฅฬˆฬ', + 'แฟค' => 'ฮกฬ“', + 'แฟฆ' => 'ฮฅอ‚', + 'แฟง' => 'ฮฅฬˆอ‚', + 'แฟถ' => 'ฮฉอ‚', + 'แพˆ' => 'แผˆฮ™', + 'แพ‰' => 'แผ‰ฮ™', + 'แพŠ' => 'แผŠฮ™', + 'แพ‹' => 'แผ‹ฮ™', + 'แพŒ' => 'แผŒฮ™', + 'แพ' => 'แผฮ™', + 'แพŽ' => 'แผŽฮ™', + 'แพ' => 'แผฮ™', + 'แพ˜' => 'แผจฮ™', + 'แพ™' => 'แผฉฮ™', + 'แพš' => 'แผชฮ™', + 'แพ›' => 'แผซฮ™', + 'แพœ' => 'แผฌฮ™', + 'แพ' => 'แผญฮ™', + 'แพž' => 'แผฎฮ™', + 'แพŸ' => 'แผฏฮ™', + 'แพจ' => 'แฝจฮ™', + 'แพฉ' => 'แฝฉฮ™', + 'แพช' => 'แฝชฮ™', + 'แพซ' => 'แฝซฮ™', + 'แพฌ' => 'แฝฌฮ™', + 'แพญ' => 'แฝญฮ™', + 'แพฎ' => 'แฝฎฮ™', + 'แพฏ' => 'แฝฏฮ™', + 'แพผ' => 'ฮ‘ฮ™', + 'แฟŒ' => 'ฮ—ฮ™', + 'แฟผ' => 'ฮฉฮ™', + 'แพฒ' => 'แพบฮ™', + 'แพด' => 'ฮ†ฮ™', + 'แฟ‚' => 'แฟŠฮ™', + 'แฟ„' => 'ฮ‰ฮ™', + 'แฟฒ' => 'แฟบฮ™', + 'แฟด' => 'ฮฮ™', + 'แพท' => 'ฮ‘อ‚ฮ™', + 'แฟ‡' => 'ฮ—อ‚ฮ™', + 'แฟท' => 'ฮฉอ‚ฮ™', +); diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/bootstrap.php b/tests/php_test_files/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..6e4b5fc --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,159 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language($language = null) { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } +} + +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + +if (!function_exists('mb_ucfirst')) { + function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } +} + +if (!function_exists('mb_lcfirst')) { + function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/bootstrap80.php b/tests/php_test_files/vendor/symfony/polyfill-mbstring/bootstrap80.php new file mode 100644 index 0000000..ec2ae42 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -0,0 +1,155 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } +} + +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + +if (!function_exists('mb_ucfirst')) { + function mb_ucfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } +} + +if (!function_exists('mb_lcfirst')) { + function mb_lcfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-mbstring/composer.json b/tests/php_test_files/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 0000000..bd99d4b --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php72/LICENSE b/tests/php_test_files/vendor/symfony/polyfill-php72/LICENSE new file mode 100644 index 0000000..6e3afce --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php72/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-present Fabien Potencier + +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/symfony/polyfill-php72/Php72.php b/tests/php_test_files/vendor/symfony/polyfill-php72/Php72.php new file mode 100644 index 0000000..e97b1b2 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php72/Php72.php @@ -0,0 +1,218 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php72; + +/** + * @author Nicolas Grekas + * @author Dariusz Rumiล„ski + * + * @internal + */ +final class Php72 +{ + private static $hashMask; + + public static function utf8_encode($s) + { + $s .= $s; + $len = \strlen($s); + + for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { + switch (true) { + case $s[$i] < "\x80": $s[$j] = $s[$i]; break; + case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; + default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; + } + } + + return substr($s, 0, $j); + } + + public static function utf8_decode($s) + { + $s = (string) $s; + $len = \strlen($s); + + for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { + switch ($s[$i] & "\xF0") { + case "\xC0": + case "\xD0": + $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); + $s[$j] = $c < 256 ? \chr($c) : '?'; + break; + + case "\xF0": + ++$i; + // no break + + case "\xE0": + $s[$j] = '?'; + $i += 2; + break; + + default: + $s[$j] = $s[$i]; + } + } + + return substr($s, 0, $j); + } + + public static function php_os_family() + { + if ('\\' === \DIRECTORY_SEPARATOR) { + return 'Windows'; + } + + $map = [ + 'Darwin' => 'Darwin', + 'DragonFly' => 'BSD', + 'FreeBSD' => 'BSD', + 'NetBSD' => 'BSD', + 'OpenBSD' => 'BSD', + 'Linux' => 'Linux', + 'SunOS' => 'Solaris', + ]; + + return $map[\PHP_OS] ?? 'Unknown'; + } + + public static function spl_object_id($object) + { + if (null === self::$hashMask) { + self::initHashMask(); + } + if (null === $hash = spl_object_hash($object)) { + return; + } + + // On 32-bit systems, PHP_INT_SIZE is 4, + return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1)); + } + + public static function sapi_windows_vt100_support($stream, $enable = null) + { + if (!\is_resource($stream)) { + trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); + + return false; + } + + $meta = stream_get_meta_data($stream); + + if ('STDIO' !== $meta['stream_type']) { + trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING); + + return false; + } + + // We cannot actually disable vt100 support if it is set + if (false === $enable || !self::stream_isatty($stream)) { + return false; + } + + // The native function does not apply to stdin + $meta = array_map('strtolower', $meta); + $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; + + return !$stdin + && (false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM')); + } + + public static function stream_isatty($stream) + { + if (!\is_resource($stream)) { + trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); + + return false; + } + + if ('\\' === \DIRECTORY_SEPARATOR) { + $stat = @fstat($stream); + + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; + } + + return \function_exists('posix_isatty') && @posix_isatty($stream); + } + + private static function initHashMask() + { + $obj = (object) []; + self::$hashMask = -1; + + // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below + $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush']; + foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { + if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { + $frame['line'] = 0; + break; + } + } + if (!empty($frame['line'])) { + ob_start(); + debug_zval_dump($obj); + self::$hashMask = (int) substr(ob_get_clean(), 17); + } + + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1)); + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if (null === $encoding) { + $s = mb_convert_encoding($s, 'UTF-8'); + } elseif ('UTF-8' !== $encoding) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php72/README.md b/tests/php_test_files/vendor/symfony/polyfill-php72/README.md new file mode 100644 index 0000000..ed19050 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php72/README.md @@ -0,0 +1,35 @@ +Symfony Polyfill / Php72 +======================== + +This component provides functions added to PHP 7.2 core: + +- [`spl_object_id`](https://php.net/spl_object_id) +- [`stream_isatty`](https://php.net/stream_isatty) + +And also functions added to PHP 7.2 mbstring: + +- [`mb_ord`](https://php.net/mb_ord) +- [`mb_chr`](https://php.net/mb_chr) +- [`mb_scrub`](https://php.net/mb_scrub) + +On Windows only: + +- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support) + +Moved to core since 7.2 (was in the optional XML extension earlier): + +- [`utf8_encode`](https://php.net/utf8_encode) +- [`utf8_decode`](https://php.net/utf8_decode) + +Also, it provides constants added to PHP 7.2: + +- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig) +- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/tests/php_test_files/vendor/symfony/polyfill-php72/bootstrap.php b/tests/php_test_files/vendor/symfony/polyfill-php72/bootstrap.php new file mode 100644 index 0000000..b5c92d4 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php72/bootstrap.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php72 as p; + +if (\PHP_VERSION_ID >= 70200) { + return; +} + +if (!defined('PHP_FLOAT_DIG')) { + define('PHP_FLOAT_DIG', 15); +} +if (!defined('PHP_FLOAT_EPSILON')) { + define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); +} +if (!defined('PHP_FLOAT_MIN')) { + define('PHP_FLOAT_MIN', 2.2250738585072E-308); +} +if (!defined('PHP_FLOAT_MAX')) { + define('PHP_FLOAT_MAX', 1.7976931348623157E+308); +} +if (!defined('PHP_OS_FAMILY')) { + define('PHP_OS_FAMILY', p\Php72::php_os_family()); +} + +if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { + function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } +} +if (!function_exists('stream_isatty')) { + function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } +} +if (!function_exists('utf8_encode')) { + function utf8_encode($string) { return p\Php72::utf8_encode($string); } +} +if (!function_exists('utf8_decode')) { + function utf8_decode($string) { return p\Php72::utf8_decode($string); } +} +if (!function_exists('spl_object_id')) { + function spl_object_id($object) { return p\Php72::spl_object_id($object); } +} +if (!function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php72/composer.json b/tests/php_test_files/vendor/symfony/polyfill-php72/composer.json new file mode 100644 index 0000000..1882576 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php72/composer.json @@ -0,0 +1,32 @@ +{ + "name": "symfony/polyfill-php72", + "type": "library", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php72\\": "" }, + "files": [ "bootstrap.php" ] + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/LICENSE b/tests/php_test_files/vendor/symfony/polyfill-php83/LICENSE new file mode 100644 index 0000000..733c826 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2022-present Fabien Potencier + +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/symfony/polyfill-php83/Php83.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Php83.php new file mode 100644 index 0000000..3d94b6c --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Php83.php @@ -0,0 +1,197 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php83; + +/** + * @author Ion Bazan + * @author Pierre Ambroise + * + * @internal + */ +final class Php83 +{ + private const JSON_MAX_DEPTH = 0x7FFFFFFF; // see https://www.php.net/manual/en/function.json-decode.php + + public static function json_validate(string $json, int $depth = 512, int $flags = 0): bool + { + if (0 !== $flags && \defined('JSON_INVALID_UTF8_IGNORE') && \JSON_INVALID_UTF8_IGNORE !== $flags) { + throw new \ValueError('json_validate(): Argument #3 ($flags) must be a valid flag (allowed flags: JSON_INVALID_UTF8_IGNORE)'); + } + + if ($depth <= 0) { + throw new \ValueError('json_validate(): Argument #2 ($depth) must be greater than 0'); + } + + if ($depth > self::JSON_MAX_DEPTH) { + throw new \ValueError(sprintf('json_validate(): Argument #2 ($depth) must be less than %d', self::JSON_MAX_DEPTH)); + } + + json_decode($json, null, $depth, $flags); + + return \JSON_ERROR_NONE === json_last_error(); + } + + public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null): string + { + if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { + throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + try { + $validEncoding = @mb_check_encoding('', $encoding); + } catch (\ValueError $e) { + throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + // BC for PHP 7.3 and lower + if (!$validEncoding) { + throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + if (mb_strlen($pad_string, $encoding) <= 0) { + throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string'); + } + + $paddingRequired = $length - mb_strlen($string, $encoding); + + if ($paddingRequired < 1) { + return $string; + } + + switch ($pad_type) { + case \STR_PAD_LEFT: + return mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string; + case \STR_PAD_RIGHT: + return $string.mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); + default: + $leftPaddingLength = floor($paddingRequired / 2); + $rightPaddingLength = $paddingRequired - $leftPaddingLength; + + return mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); + } + } + + public static function str_increment(string $string): string + { + if ('' === $string) { + throw new \ValueError('str_increment(): Argument #1 ($string) cannot be empty'); + } + + if (!preg_match('/^[a-zA-Z0-9]+$/', $string)) { + throw new \ValueError('str_increment(): Argument #1 ($string) must be composed only of alphanumeric ASCII characters'); + } + + if (is_numeric($string)) { + $offset = stripos($string, 'e'); + if (false !== $offset) { + $char = $string[$offset]; + ++$char; + $string[$offset] = $char; + ++$string; + + switch ($string[$offset]) { + case 'f': + $string[$offset] = 'e'; + break; + case 'F': + $string[$offset] = 'E'; + break; + case 'g': + $string[$offset] = 'f'; + break; + case 'G': + $string[$offset] = 'F'; + break; + } + + return $string; + } + } + + return ++$string; + } + + public static function str_decrement(string $string): string + { + if ('' === $string) { + throw new \ValueError('str_decrement(): Argument #1 ($string) cannot be empty'); + } + + if (!preg_match('/^[a-zA-Z0-9]+$/', $string)) { + throw new \ValueError('str_decrement(): Argument #1 ($string) must be composed only of alphanumeric ASCII characters'); + } + + if (preg_match('/\A(?:0[aA0]?|[aA])\z/', $string)) { + throw new \ValueError(sprintf('str_decrement(): Argument #1 ($string) "%s" is out of decrement range', $string)); + } + + if (!\in_array(substr($string, -1), ['A', 'a', '0'], true)) { + return implode('', \array_slice(str_split($string), 0, -1)).\chr(\ord(substr($string, -1)) - 1); + } + + $carry = ''; + $decremented = ''; + + for ($i = \strlen($string) - 1; $i >= 0; --$i) { + $char = $string[$i]; + + switch ($char) { + case 'A': + if ('' !== $carry) { + $decremented = $carry.$decremented; + $carry = ''; + } + $carry = 'Z'; + + break; + case 'a': + if ('' !== $carry) { + $decremented = $carry.$decremented; + $carry = ''; + } + $carry = 'z'; + + break; + case '0': + if ('' !== $carry) { + $decremented = $carry.$decremented; + $carry = ''; + } + $carry = '9'; + + break; + case '1': + if ('' !== $carry) { + $decremented = $carry.$decremented; + $carry = ''; + } + + break; + default: + if ('' !== $carry) { + $decremented = $carry.$decremented; + $carry = ''; + } + + if (!\in_array($char, ['A', 'a', '0'], true)) { + $decremented = \chr(\ord($char) - 1).$decremented; + } + } + } + + return $decremented; + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/README.md b/tests/php_test_files/vendor/symfony/polyfill-php83/README.md new file mode 100644 index 0000000..f298776 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/README.md @@ -0,0 +1,22 @@ +Symfony Polyfill / Php83 +======================== + +This component provides features added to PHP 8.3 core: + +- [`json_validate`](https://wiki.php.net/rfc/json_validate) +- [`Override`](https://wiki.php.net/rfc/marking_overriden_methods) +- [`mb_str_pad`](https://wiki.php.net/rfc/mb_str_pad) +- [`ldap_exop_sync`](https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures) +- [`ldap_connect_wallet`](https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures) +- [`stream_context_set_options`](https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures) +- [`str_increment` and `str_decrement`](https://wiki.php.net/rfc/saner-inc-dec-operators) +- [`Date*Exception/Error classes`](https://wiki.php.net/rfc/datetime-exceptions) +- [`SQLite3Exception`](https://wiki.php.net/rfc/sqlite3_exceptions) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateError.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateError.php new file mode 100644 index 0000000..6e7ed8c --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateError.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateError extends Error + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateException.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateException.php new file mode 100644 index 0000000..041710a --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateException extends Exception + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php new file mode 100644 index 0000000..e2e9dfc --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateInvalidOperationException extends DateException + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php new file mode 100644 index 0000000..75bcd26 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateInvalidTimeZoneException extends DateException + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php new file mode 100644 index 0000000..af91b8e --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateMalformedIntervalStringException extends DateException + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php new file mode 100644 index 0000000..9b6d276 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateMalformedPeriodStringException extends DateException + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php new file mode 100644 index 0000000..7ad0484 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateMalformedStringException extends DateException + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateObjectError.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateObjectError.php new file mode 100644 index 0000000..11f0edc --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateObjectError.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateObjectError extends DateError + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateRangeError.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateRangeError.php new file mode 100644 index 0000000..98e6703 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/DateRangeError.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class DateRangeError extends DateError + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/Override.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/Override.php new file mode 100644 index 0000000..d3e6b3e --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/Override.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + #[Attribute(Attribute::TARGET_METHOD)] + final class Override + { + public function __construct() + { + } + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php new file mode 100644 index 0000000..ecb7c98 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class SQLite3Exception extends Exception + { + } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/bootstrap.php b/tests/php_test_files/vendor/symfony/polyfill-php83/bootstrap.php new file mode 100644 index 0000000..f43af17 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/bootstrap.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php83 as p; + +if (\PHP_VERSION_ID >= 80300) { + return; +} + +if (!function_exists('json_validate')) { + function json_validate(string $json, int $depth = 512, int $flags = 0): bool { return p\Php83::json_validate($json, $depth, $flags); } +} + +if (!function_exists('mb_str_pad') && function_exists('mb_substr')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Php83::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + +if (!function_exists('stream_context_set_options')) { + function stream_context_set_options($context, array $options): bool { return stream_context_set_option($context, $options); } +} + +if (!function_exists('str_increment')) { + function str_increment(string $string): string { return p\Php83::str_increment($string); } +} + +if (!function_exists('str_decrement')) { + function str_decrement(string $string): string { return p\Php83::str_decrement($string); } +} + +if (\PHP_VERSION_ID >= 80100) { + return require __DIR__.'/bootstrap81.php'; +} + +if (!function_exists('ldap_exop_sync') && function_exists('ldap_exop')) { + function ldap_exop_sync($ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, &$response_data = null, &$response_oid = null): bool { return ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); } +} + +if (!function_exists('ldap_connect_wallet') && function_exists('ldap_connect')) { + function ldap_connect_wallet(?string $uri, string $wallet, string $password, int $auth_mode = \GSLC_SSL_NO_AUTH) { return ldap_connect($uri, $wallet, $password, $auth_mode); } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/bootstrap81.php b/tests/php_test_files/vendor/symfony/polyfill-php83/bootstrap81.php new file mode 100644 index 0000000..68395b4 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/bootstrap81.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID >= 80300) { + return; +} + +if (!function_exists('ldap_exop_sync') && function_exists('ldap_exop')) { + function ldap_exop_sync(\LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, &$response_data = null, &$response_oid = null): bool { return ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); } +} + +if (!function_exists('ldap_connect_wallet') && function_exists('ldap_connect')) { + function ldap_connect_wallet(?string $uri, string $wallet, #[\SensitiveParameter] string $password, int $auth_mode = \GSLC_SSL_NO_AUTH): \LDAP\Connection|false { return ldap_connect($uri, $wallet, $password, $auth_mode); } +} diff --git a/tests/php_test_files/vendor/symfony/polyfill-php83/composer.json b/tests/php_test_files/vendor/symfony/polyfill-php83/composer.json new file mode 100644 index 0000000..02a0bf8 --- /dev/null +++ b/tests/php_test_files/vendor/symfony/polyfill-php83/composer.json @@ -0,0 +1,33 @@ +{ + "name": "symfony/polyfill-php83", + "type": "library", + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php83\\": "" }, + "files": [ "bootstrap.php" ], + "classmap": [ "Resources/stubs" ] + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +}